/* ==========================================================================
   Hypermnesia - Public Website Stylesheet (Complete & Robust Edition)
   Design System: Deep Obsidian, Electric Violet & Emerald Mesh Theme
   ========================================================================== */

@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/instrumentserif-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/instrumentserif-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibmplexmono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/ibmplexmono-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibmplexmono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibmplexsans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibmplexsans-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/ibmplexsans-600.woff2') format('woff2'); }

:root {
  /* Color Palette - Obsidian & Vibrant Neon Violet/Emerald/Amber */
  --bg: #060609;
  --bg-surface: #0c0c14;
  --bg-surface-elevated: #12121f;
  --bg-glass: rgba(12, 12, 20, 0.85);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(168, 85, 247, 0.35);
  --border-glow: rgba(124, 58, 237, 0.5);

  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --dim: #64748b;

  --violet-primary: #7c3aed;
  --violet-light: #a855f7;
  --violet-glow: #c084fc;
  --indigo-accent: #6366f1;
  
  --emerald-accent: #10b981;
  --emerald-light: #34d399;
  --amber-accent: #f59e0b;
  --rose-accent: #f43f5e;
  --cyan-accent: #06b6d4;

  --glow-violet: 0 0 35px rgba(124, 58, 237, 0.35);

  /* Typography */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(168, 85, 247, 0.4);
  color: #ffffff;
}

/* Background Atmosphere Mesh & Glowing Orbs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1000px 700px at 50% -100px, rgba(124, 58, 237, 0.18), transparent 70%),
    radial-gradient(800px 600px at 85% 25%, rgba(99, 102, 241, 0.1), transparent 60%),
    radial-gradient(800px 600px at 15% 65%, rgba(16, 185, 129, 0.08), transparent 60%),
    linear-gradient(180deg, #090910 0%, var(--bg) 50%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Typography Utilities */
h1, h2, h3, h4 {
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.text-gradient-purple {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 35%, #c084fc 70%, #9333ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.38em;
  color: #f1f5f9;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--violet-glow);
  text-decoration: none;
}

.glyph-icon {
  width: 20px;
  height: 20px;
  color: var(--violet-primary);
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.6));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link:hover { color: var(--ink); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kbd-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border-color: rgba(168, 85, 247, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 100%);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--violet-light);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--violet-light);
}

/* Hero Section */
.hero {
  padding-top: 150px;
  padding-bottom: 70px;
  text-align: center;
}

.dictionary-entry {
  font-family: var(--serif);
  font-size: clamp(44px, 7.5vw, 82px);
  line-height: 1.05;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.headword { color: var(--ink); }
.gram { font-family: var(--serif); font-style: italic; color: var(--dim); font-size: 0.5em; margin-left: 0.35em; }

.definition {
  font-family: var(--serif);
  font-size: clamp(19px, 2.5vw, 25px);
  color: var(--ink-secondary);
  margin-bottom: 36px;
}

.definition em { color: var(--dim); }

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(30px, 4.8vw, 52px);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-lede {
  max-width: 740px;
  margin: 0 auto 38px auto;
  color: var(--ink-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Brain MRI Visualizer Container */
.hero-visual-card {
  max-width: 1040px;
  margin: 50px auto 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.visual-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover, .filter-chip.active {
  border-color: var(--violet-light);
  color: #ffffff;
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

#mri-canvas {
  width: 100%;
  height: 390px;
  display: block;
  border-radius: var(--radius-md);
  background: #050409;
}

.canvas-overlay-stats {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 28px;
  background: rgba(12, 12, 20, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.stat-num {
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--ink);
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sections & Scroll Margin Offset */
.section {
  padding: 95px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.section-title-wrap {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px auto;
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--violet-glow);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--ink-secondary);
}

/* LIVE CONTEXT HYDRATION PLAYGROUND WIDGET */
.playground-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: grid;
  grid-template-columns: 380px 1fr;
  margin-top: 28px;
}

.playground-input-side {
  padding: 32px;
  border-right: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #080612;
}

.playground-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--violet-glow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

.prompt-picker-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-option {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.90625rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.prompt-option:hover, .prompt-option.active {
  border-color: var(--violet-light);
  color: var(--ink);
  background: rgba(124, 58, 237, 0.15);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

.prompt-custom-input {
  width: 100%;
  background: #040308;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  box-sizing: border-box;
}

.prompt-custom-input:focus {
  outline: none;
  border-color: var(--violet-light);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.playground-output-side {
  padding: 32px;
  background: #040308;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.output-comparison-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.8);
}

.output-tag-hydrated {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.18);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.75rem;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.output-tag-memoryless {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.18);
  color: var(--rose-accent);
  border: 1px solid rgba(244, 63, 94, 0.4);
  font-size: 0.75rem;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Multi-Client Setup Section */
.setup-tabs-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  margin-top: 24px;
}

.tabs-header {
  display: flex;
  background: #080612;
  border-bottom: 1px solid var(--border-strong);
  gap: 6px;
  padding: 10px 14px 0 14px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-bottom: none;
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.84375rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
}

.tab-btn.active {
  color: var(--violet-glow);
  background: var(--bg-surface);
  border-color: var(--border-strong);
  border-top: 2px solid var(--violet-light);
  box-shadow: 0 -4px 15px rgba(124, 58, 237, 0.2);
}

.tab-content {
  display: none !important;
  padding: 32px;
}

.tab-content.active {
  display: block !important;
}

.terminal-box {
  background: #040308;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  font-family: var(--mono);
  position: relative;
  margin-top: 14px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.8);
}

.terminal-line {
  color: var(--ink);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.8;
}

.prompt-symbol {
  color: var(--violet-glow);
  font-weight: 600;
  user-select: none;
}

.terminal-cmd-text {
  color: var(--ink);
  font-weight: 500;
}

.terminal-comment {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.84375rem;
  margin-bottom: 8px;
}

.copy-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(124, 58, 237, 0.35);
  color: var(--ink);
  border-color: var(--violet-light);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-light);
  border-color: rgba(16, 185, 129, 0.4);
}

/* Terminal Simulator Window & Line Formatting */
.terminal-window {
  background: #040308;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.terminal-titlebar {
  background: #0b0914;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-strong);
}

.terminal-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.terminal-interactive-body {
  padding: 26px 30px;
  font-family: var(--mono);
  font-size: 0.875rem;
  min-height: 260px;
  color: var(--ink);
  line-height: 1.75;
  background: #040308;
}

.terminal-prompt-line {
  margin-bottom: 10px;
  font-size: 0.9375rem;
}

.terminal-divider {
  color: var(--border-strong);
  margin-bottom: 14px;
  user-select: none;
  overflow: hidden;
}

.terminal-out-line {
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.term-key {
  display: inline-block;
  min-width: 140px;
  color: var(--muted);
}

.term-val {
  color: var(--ink);
}

.term-dim {
  color: var(--dim);
}

.term-ok {
  color: #34d399;
  font-weight: 600;
  margin-left: 6px;
}

.terminal-quick-cmds {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: #080612;
  border-top: 1px solid var(--border-strong);
}

.cmd-chip {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cmd-chip:hover {
  background: rgba(168, 85, 247, 0.15);
  color: var(--ink);
  border-color: rgba(168, 85, 247, 0.4);
}

.cmd-chip.active {
  background: rgba(124, 58, 237, 0.25);
  color: var(--violet-glow);
  border-color: var(--violet-light);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

/* Dreams & Architecture */
.dreams-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.dreams-title { font-family: var(--serif); font-size: 2.3rem; margin-bottom: 14px; }
.dreams-desc { color: var(--ink-secondary); font-size: 0.9375rem; line-height: 1.6; }

.pipeline-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 40px; }
.pipeline-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.pipeline-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet-light);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.2);
}

.step-num { font-family: var(--mono); font-size: 0.75rem; color: var(--violet-glow); margin-bottom: 12px; }
.step-title { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 8px; }
.step-desc { font-size: 0.84375rem; color: var(--muted); line-height: 1.5; }

/* Evals & Features Cards */
.evals-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.eval-metrics { display: flex; flex-direction: column; gap: 28px; }
.metric-bar-group { display: flex; flex-direction: column; gap: 8px; }
.metric-header { display: flex; justify-content: space-between; font-size: 0.9375rem; }
.metric-value { font-family: var(--mono); color: var(--violet-glow); font-weight: 600; }

.bar-track { height: 10px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--border); border-radius: var(--radius-full); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, #7c3aed, #c084fc); box-shadow: 0 0 12px rgba(124, 58, 237, 0.5); transition: width 1s ease; }

.eval-quote {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--violet-primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: rgba(20, 20, 34, 0.7);
}

.feature-icon { font-size: 1.75rem; margin-bottom: 16px; }
.feature-title { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 10px; }
.feature-desc { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }

/* FAQ Accordion */
.faq-grid { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: var(--bg-surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-item.active { border-color: var(--violet-light); }

.faq-question {
  width: 100%; padding: 20px 24px; background: transparent; border: none; color: var(--ink);
  font-family: var(--serif); font-size: 1.25rem; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.faq-chevron { width: 18px; height: 18px; transition: transform var(--transition-normal); color: var(--dim); }
.faq-item.active .faq-chevron { transform: rotate(180deg); color: var(--violet-glow); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 24px; color: var(--ink-secondary); font-size: 0.9375rem; line-height: 1.65; }
.faq-item.active .faq-answer { max-height: 320px; padding-bottom: 20px; }

/* Download CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(12, 12, 20, 0.95) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 60px 40px; text-align: center;
}

.cta-title { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); margin-bottom: 16px; }
.cta-desc { font-size: 1.0625rem; color: var(--ink-secondary); max-width: 600px; margin: 0 auto 32px auto; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0 40px 0; font-size: 0.875rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-col-title { font-family: var(--mono); font-size: 0.75rem; color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-link { color: var(--muted); text-decoration: none; transition: color var(--transition-fast); }
.footer-link:hover { color: var(--ink); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }

/* Responsive */
@media (max-width: 1024px) {
  .playground-container { grid-template-columns: 1fr; }
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .evals-container { grid-template-columns: 1fr; }
  .dreams-banner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }

  /* Keep the fixed header inside its 72px bar */
  .nav-container { gap: 10px; }
  .nav-brand { letter-spacing: 0.18em; font-size: 12px; gap: 8px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { padding: 8px 12px; font-size: 12px; white-space: nowrap; }

  .hero { padding-top: 120px; padding-bottom: 48px; }
  .section { padding: 60px 0; scroll-margin-top: 88px; }
  .section-title-wrap { margin-bottom: 32px; }

  .pipeline-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  /* MRI card: stats flow below the canvas instead of covering it */
  .visual-header { flex-wrap: wrap; gap: 10px; }
  #mri-canvas { height: 300px; }
  .canvas-overlay-stats {
    position: static;
    margin-top: 12px;
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    backdrop-filter: none;
  }

  /* Setup tabs: keep the horizontal scroll usable */
  .tabs-header { -webkit-overflow-scrolling: touch; padding: 10px 10px 0 10px; }
  .tab-btn { padding: 10px 14px; font-size: 0.78125rem; }
  .tab-content { padding: 20px 16px; }

  /* Terminal boxes: copy button flows above the command instead of covering it */
  .terminal-box { padding: 16px; }
  .copy-btn { position: static; margin-bottom: 12px; }
  .terminal-line { flex-wrap: wrap; gap: 8px; }
  .terminal-cmd-text { word-break: break-word; }
  .terminal-interactive-body { padding: 18px 16px; font-size: 0.8125rem; }
  .terminal-divider { white-space: nowrap; }
  .term-key { min-width: 0; }
  .terminal-quick-cmds { padding: 12px 16px; }

  .faq-item.active .faq-answer { max-height: 900px; }

  .cta-banner { padding: 40px 20px; }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  /* Brand + Download fit 375px; GitHub stays reachable in hero and footer */
  #nav-btn-github { display: none; }
  .hero-actions .btn { width: 100%; }
}
