/* ─────────────────────────────────────────────────────────────
   PanGalactic — Cosmic Dark Theme
   ───────────────────────────────────────────────────────────── */

/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cyan:        #00f5ff;
  --cyan-dim:    rgba(0,245,255,.15);
  --cyan-glow:   rgba(0,245,255,.35);
  --purple:      #a855f7;
  --purple-dim:  rgba(168,85,247,.15);
  --purple-glow: rgba(168,85,247,.35);
  --orange:      #f97316;
  --orange-dim:  rgba(249,115,22,.12);

  --bg:          #050510;
  --bg-alt:      #080820;
  --bg-card:     rgba(255,255,255,.03);
  --bg-card-hover: rgba(255,255,255,.06);

  --border:      rgba(255,255,255,.08);
  --border-cyan: rgba(0,245,255,.25);
  --border-purple: rgba(168,85,247,.25);

  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    rgba(226,232,240,.6);

  --font-head:   'Orbitron', sans-serif;
  --font-body:   'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  --radius:      12px;
  --radius-lg:   20px;
  --transition:  .25s cubic-bezier(.4,0,.2,1);

  --section-pad: 100px 0;
  --max-width:   1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--cyan-dim); color: var(--cyan); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ── Utilities ─────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-pad); }
.section-alt { background: var(--bg-alt); }

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

/* ── Reveal Animations ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible, .reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .15s; }
.reveal-delay-2 { transition-delay: .30s; }

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 16px 32px;
  background: rgba(5,5,16,.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#nav.scrolled { background: rgba(5,5,16,.95); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .05em;
}
.nav-logo:hover { color: var(--cyan); }
.logo-icon { color: var(--cyan); font-size: 1.4rem; filter: drop-shadow(0 0 8px var(--cyan)); }

.nav-links {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--cyan); }

.nav-cta {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: var(--cyan);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: .05em;
  transition: var(--transition);
}
.nav-cta:hover {
  background: var(--cyan-dim);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ── Hero ──────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

#stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  pointer-events: none;
}
.hero-glow-cyan  { width: 600px; height: 600px; background: var(--cyan);   top: -100px; left: -100px; }
.hero-glow-purple{ width: 500px; height: 500px; background: var(--purple); bottom: 0;   right: -80px; }

.hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-cyan);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  background: var(--cyan-dim);
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 0 80px rgba(0,245,255,.2);
}

.hero-tagline {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-family: var(--font-head);
  letter-spacing: .02em;
}
.hero-tagline em { font-style: normal; color: var(--purple); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--cyan) 0%, #0088aa 100%);
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: .05em;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: 0 0 40px var(--cyan-glow), 0 4px 24px rgba(0,0,0,.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px var(--cyan-glow), 0 8px 32px rgba(0,0,0,.5);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* Hero stats */
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 60px;
  padding: 24px 40px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 40px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 20px var(--cyan-glow);
}
.stat-unit { font-size: 1rem; color: var(--text-muted); }
.stat-times { font-size: .75rem; color: var(--purple); font-weight: 500; margin-top: 2px; }
.stat-label { font-size: .8rem; color: var(--text-muted); text-align: center; }
.stat-divider { width: 1px; height: 50px; background: var(--border); flex-shrink: 0; }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  cursor: pointer;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 1.5s ease infinite;
}
@keyframes bounce { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(45deg) translateY(6px); } }

/* ── Section Header ────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--border-purple);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: var(--purple-dim);
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.section-header p { font-size: 1.05rem; color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* ── Feature Cards ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card[data-color="cyan"]::before   { background: radial-gradient(ellipse at top left, var(--cyan-dim), transparent 70%); }
.feature-card[data-color="purple"]::before { background: radial-gradient(ellipse at top left, var(--purple-dim), transparent 70%); }
.feature-card[data-color="orange"]::before { background: radial-gradient(ellipse at top left, var(--orange-dim), transparent 70%); }

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: transparent;
}
.feature-card[data-color="cyan"]:hover   { border-color: var(--border-cyan);   box-shadow: 0 0 40px rgba(0,245,255,.1), 0 16px 40px rgba(0,0,0,.3); }
.feature-card[data-color="purple"]:hover { border-color: var(--border-purple); box-shadow: 0 0 40px rgba(168,85,247,.1), 0 16px 40px rgba(0,0,0,.3); }
.feature-card[data-color="orange"]:hover { border-color: rgba(249,115,22,.3);  box-shadow: 0 0 40px rgba(249,115,22,.1), 0 16px 40px rgba(0,0,0,.3); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; }
[data-color="cyan"]   .feature-icon { background: var(--cyan-dim);   color: var(--cyan);   }
[data-color="purple"] .feature-icon { background: var(--purple-dim); color: var(--purple); }
[data-color="orange"] .feature-icon { background: var(--orange-dim); color: var(--orange); }

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .03em;
  margin-bottom: 12px;
}
.feature-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }

.feature-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
[data-color="cyan"]   .feature-tag { background: var(--cyan-dim);   color: var(--cyan);   }
[data-color="purple"] .feature-tag { background: var(--purple-dim); color: var(--purple); }
[data-color="orange"] .feature-tag { background: var(--orange-dim); color: var(--orange); }

/* ── Pipeline Diagram ──────────────────────────────────────── */
.pipeline-diagram { width: 100%; overflow-x: auto; padding: 20px 0; }

.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 900px;
  padding: 40px 20px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pipe-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-radius: var(--radius);
  min-width: 130px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}
.pipe-gateway { border-color: var(--border-cyan);   background: rgba(0,245,255,.05); }
.pipe-hub     { border-color: var(--border-purple); background: rgba(168,85,247,.05); }
.pipe-worker  { border-color: rgba(249,115,22,.25); background: rgba(249,115,22,.04); }

.pipe-icon { width: 36px; height: 36px; }
.pipe-icon svg { width: 100%; height: 100%; }
.pipe-gateway .pipe-icon { color: var(--cyan); }
.pipe-hub     .pipe-icon { color: var(--purple); }
.pipe-worker  .pipe-icon { color: var(--orange); }

.pipe-label { font-family: var(--font-head); font-size: .8rem; font-weight: 700; color: #fff; letter-spacing: .05em; }
.pipe-sub   { font-size: .7rem; color: var(--text-muted); }

.pipe-conn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  min-width: 80px;
  flex: 1;
  max-width: 120px;
}
.pipe-conn-line {
  position: relative;
  width: 100%;
  height: 2px;
  overflow: visible;
}
.pipe-conn-grpc .pipe-conn-line { background: linear-gradient(90deg, rgba(168,85,247,.5), rgba(168,85,247,.2)); }
.pipe-conn-starstream .pipe-conn-line { background: linear-gradient(90deg, rgba(0,245,255,.5), rgba(0,245,255,.2)); }

/* Animated packets */
.pipe-packet, .pipe-tensor {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 3px;
  animation: flow 2s linear infinite;
}
.pipe-packet { width: 12px; background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.pipe-tensor { width: 20px; background: var(--cyan);   box-shadow: 0 0 10px var(--cyan); }

@keyframes flow {
  0%   { left: -20px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.pipe-conn-label { font-size: .65rem; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.pipe-nodes-group { display: flex; align-items: center; flex: 1; }

.phase-labels { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.phase-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.phase-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.phase-dot-cyan   { background: var(--cyan);   box-shadow: 0 0 8px var(--cyan); }
.phase-dot-purple { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.phase-label strong { color: #fff; }

/* ── Live Demo ─────────────────────────────────────────────── */
.demo-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  height: 560px;
}

.demo-config {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}
.config-title {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.config-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.config-field label { font-size: .78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.config-field input, .config-field select {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: .88rem;
  font-family: var(--font-mono);
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.config-field input:focus, .config-field select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.select-wrapper { position: relative; }
.config-field select { appearance: none; cursor: pointer; }

.config-field input[type="range"] {
  padding: 0;
  height: 4px;
  cursor: pointer;
  accent-color: var(--cyan);
}
.range-value { font-size: .8rem; color: var(--cyan); font-family: var(--font-mono); text-align: right; }

.btn-config {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--cyan-dim), rgba(0,245,255,.05));
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  color: var(--cyan);
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: .05em;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 12px;
}
.btn-config:hover { background: var(--cyan-dim); box-shadow: 0 0 20px var(--cyan-glow); }

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .8rem;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.connection-idle   { color: var(--text-muted); background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.connection-ok     { color: #4ade80; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.2); }
.connection-error  { color: #f87171; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.connection-ok .status-dot { animation: blink 1.5s infinite; }

.config-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Chat panel */
.demo-chat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-welcome {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
}
.welcome-icon { font-size: 3rem; color: var(--cyan); margin-bottom: 12px; filter: drop-shadow(0 0 12px var(--cyan)); }
.chat-welcome p { max-width: 300px; font-size: .9rem; }

.chat-msg { display: flex; gap: 12px; max-width: 85%; }
.chat-msg.user { flex-direction: row-reverse; margin-left: auto; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.6;
  position: relative;
}
.user .msg-bubble {
  background: linear-gradient(135deg, var(--cyan-dim), rgba(168,85,247,.1));
  border: 1px solid var(--border-cyan);
  border-radius: 16px 4px 16px 16px;
  color: var(--text);
}
.assistant .msg-bubble {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  color: var(--text);
}
.typing-cursor { display: inline-block; width: 8px; height: 16px; background: var(--cyan); margin-left: 2px; vertical-align: middle; animation: cursor-blink .7s step-end infinite; }
@keyframes cursor-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: .9rem;
  font-family: var(--font-body);
  resize: none;
  outline: none;
  max-height: 120px;
  transition: var(--transition);
}
.chat-input-row textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }

.btn-send {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  border: none;
  border-radius: 12px;
  color: #000;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-send:hover:not(:disabled) { box-shadow: 0 0 20px var(--cyan-glow); transform: scale(1.05); }
.btn-send:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.btn-send svg { width: 18px; height: 18px; }

.chat-hint { padding: 8px 16px; font-size: .72rem; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border); font-family: var(--font-mono); }

/* ── Benchmarks ────────────────────────────────────────────── */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.bench-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.bench-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity var(--transition);
}
.bench-card:hover { border-color: var(--border-cyan); transform: translateY(-3px); }
.bench-card:hover::after { opacity: 1; }

.bench-value {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--cyan-glow);
}
.bench-unit { font-size: 1.2rem; color: var(--text-muted); }
.bench-label { font-size: .9rem; color: #fff; font-weight: 600; margin-bottom: 6px; }
.bench-note { font-size: .78rem; color: var(--text-muted); font-family: var(--font-mono); }

.bench-footnote {
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
}

/* ── Quickstart ────────────────────────────────────────────── */
.quickstart-layout { margin-bottom: 48px; }

.quickstart-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-btn {
  padding: 8px 20px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tab-btn.active { background: var(--cyan-dim); color: var(--cyan); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-content pre {
  margin: 0;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  border: 1px solid var(--border);
}
.tab-content pre code {
  font-family: var(--font-mono) !important;
  font-size: .85rem !important;
  line-height: 1.7 !important;
}

/* Highlight.js overrides for our theme */
.hljs { background: rgba(255,255,255,.03) !important; padding: 24px !important; }

.docs-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
}
.doc-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.doc-link:hover { border-color: var(--border-purple); color: var(--purple); background: var(--purple-dim); transform: translateY(-2px); }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.3);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.footer-tagline { font-size: .9rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 32px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: .88rem; transition: var(--transition); }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { font-size: .78rem; color: var(--text-muted); opacity: .6; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .bench-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 64px 0; }

  #nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(5,5,16,.97);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }

  .hero-stats { flex-direction: column; gap: 20px; width: 100%; }
  .stat-divider { width: 100%; height: 1px; }
  .hero-stat { padding: 0 16px; }

  .features-grid { grid-template-columns: 1fr; }
  .bench-grid { grid-template-columns: 1fr; }
  .docs-links { grid-template-columns: 1fr; }

  .demo-layout { grid-template-columns: 1fr; height: auto; }
  .demo-config { order: 2; }
  .demo-chat { height: 400px; order: 1; }

  .pipeline-row { flex-wrap: wrap; min-width: unset; gap: 16px; }
  .pipe-conn { display: none; }
  .pipe-nodes-group { display: flex; flex-direction: column; gap: 12px; align-items: center; }

  .quickstart-tabs { flex-wrap: wrap; }
  .footer-links { flex-wrap: wrap; gap: 20px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; max-width: 280px; justify-content: center; }
}

/* ── Dynamically-injected chat elements ──────────────────────────────────── */
.chat-error {
  color: #f87171;
  font-style: italic;
  font-size: .85rem;
}

/* ── Copy button (injected by main.js next to code blocks) ───────────────── */
.code-block { position: relative; }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: rgba(0,245,255,.1);
  border: 1px solid var(--border-cyan);
  border-radius: 6px;
  color: var(--cyan);
  font-size: .72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
}
.code-block:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: var(--cyan-dim); }
.copy-btn.copied { color: #4ade80; border-color: rgba(74,222,128,.4); }

/* ── Active nav link ──────────────────────────────────────────────────────── */
#nav .nav-links a.active { color: var(--cyan); }
