/* SpecuLab-MCP Showcase Web App — Ultra-Premium Dark Metrology Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #080c14;
  --bg-card: rgba(14, 21, 37, 0.82);
  --bg-card-hover: rgba(20, 30, 52, 0.95);
  --bg-elevated: #162035;
  --border-subtle: rgba(0, 240, 255, 0.12);
  --border-active: rgba(0, 240, 255, 0.45);
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.35);
  --accent-emerald: #00f59b;
  --accent-emerald-glow: rgba(0, 245, 155, 0.35);
  --accent-amber: #ffb703;
  --accent-crimson: #ff0055;
  --accent-crimson-glow: rgba(255, 0, 85, 0.4);
  --text-main: #f0f4fc;
  --text-muted: #8e9cb4;
  --text-dim: #5c6880;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(0, 245, 155, 0.04) 0%, transparent 45%),
    linear-gradient(rgba(8, 12, 20, 0.95), rgba(8, 12, 20, 0.95)),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255, 255, 255, 0.015) 40px, rgba(255, 255, 255, 0.015) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255, 255, 255, 0.015) 40px, rgba(255, 255, 255, 0.015) 41px);
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.mono {
  font-family: var(--font-mono);
}

.cyan-gradient-text {
  background: linear-gradient(135deg, #00f0ff 0%, #00f59b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.amber-gradient-text {
  background: linear-gradient(135deg, #ffd166 0%, #ff9f1c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navigation */
header.app-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 12, 20, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00f0ff, #00f59b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #080c14;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-title span {
  color: var(--accent-cyan);
}

nav.nav-links {
  display: flex;
  gap: 1.5rem;
}

nav.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

nav.nav-links a:hover {
  color: var(--accent-cyan);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.badge-ci-pass {
  background: rgba(0, 245, 155, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 245, 155, 0.35);
}

.badge-ci-pass .dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

.badge-github {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.badge-github:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Hero Section */
section.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.5rem 2rem 3rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.4rem 1.1rem;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
}

h1.hero-title {
  font-size: 3.4rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

p.hero-desc {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  font-size: 1.18rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff, #00b8ff);
  color: #080c14;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Metrics Row */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.25rem;
  text-align: left;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  color: #fff;
}

.metric-card.accent-emerald .metric-value {
  color: var(--accent-emerald);
}

.metric-card.accent-cyan .metric-value {
  color: var(--accent-cyan);
}

.metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Common Section Layout */
section.container {
  max-width: 1280px;
  margin: 4.5rem auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 2rem;
  text-align: left;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 750px;
  font-size: 1.05rem;
}

/* Interactive Inspector Studio */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.studio-toolbar {
  background: rgba(12, 18, 32, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.specimen-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pills-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-right: 0.25rem;
}

.specimen-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
}

.specimen-pill:hover {
  color: #fff;
  border-color: rgba(0, 240, 255, 0.4);
}

.specimen-pill.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.view-mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-tab {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab.active {
  background: var(--bg-elevated);
  color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Canvas Viewport */
.studio-viewport {
  position: relative;
  background: #04070d;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.inspection-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 2000 / 800;
  margin: 1.5rem auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.inspection-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

/* Interactive Split Lens Overlay */
.split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-cyan);
  cursor: ew-resize;
  box-shadow: 0 0 10px var(--accent-cyan);
  z-index: 20;
}

.split-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #080c14;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.8rem;
  user-select: none;
}

.overlay-healed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  z-index: 10;
}

.overlay-healed img {
  width: 1100px;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Telemetry HUD Footer */
.studio-hud {
  background: #090e18;
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.hud-item {
  display: flex;
  flex-direction: column;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.hud-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.hud-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
}

.verdict-reject {
  background: rgba(255, 0, 85, 0.15);
  color: var(--accent-crimson);
  border: 1px solid rgba(255, 0, 85, 0.4);
}

.verdict-pass {
  background: rgba(0, 245, 155, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 245, 155, 0.4);
}

.verdict-escalate {
  background: rgba(255, 183, 3, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 183, 3, 0.4);
}

/* Comparison Table Section */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

table.metrology-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

table.metrology-table th {
  background: rgba(12, 18, 32, 0.95);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

table.metrology-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

table.metrology-table tr:hover td {
  background: rgba(0, 240, 255, 0.025);
}

table.metrology-table tr.highlight td {
  background: rgba(0, 240, 255, 0.06);
  font-weight: 600;
  color: #fff;
}

table.metrology-table tr.highlight td:first-child {
  border-left: 3px solid var(--accent-cyan);
}

/* Agentic FastMCP Visualizer */
.agent-flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .agent-flow-grid {
    grid-template-columns: 1fr;
  }
}

.flow-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.timeline-step {
  display: flex;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 14px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-step:last-child::before {
  display: none;
}

.step-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.step-content {
  flex-grow: 1;
}

.step-header {
  font-weight: 600;
  font-size: 0.96rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.step-tool {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* FastMCP Code & JSON Inspector */
.json-box {
  background: #05080f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a0aec0;
  overflow-x: auto;
  max-height: 350px;
  line-height: 1.5;
}

/* Hardware Benchmarks Card */
.benchmark-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.bench-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.bench-title {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.bench-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.bar-row {
  margin-bottom: 0.85rem;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  margin-bottom: 0.3rem;
}

.bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease-in-out;
}

.bar-fill.cyan {
  background: linear-gradient(90deg, #00f0ff, #00b8ff);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.bar-fill.dim {
  background: #3a4b68;
}

/* Footer */
footer.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 2rem;
  background: #05080e;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}
