/* ═══════════════════════════════════════════════════════════════
   AI QUANT & AGENT LAB — Design System
   Constitution: §3.4 Dark-first | §3.3 Cinematic Minimalism
   Typography: Syne (display) · JetBrains Mono (accent) · Geist (body)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --color-bg:        #0B0F14;
  --color-surface:   #111820;
  --color-surface-2: #141c26;
  --color-border:    rgba(0, 200, 255, 0.11);
  --color-primary:   #00C8FF;
  --color-accent:    #00FF9D;
  --color-secondary: #8B5CF6;
  --color-warn:      #FFAA00;
  --color-text:      #C9D4E0;
  --color-muted:     #4A5568;
  --color-white:     #E2E8F0;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Geist', 'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --glow-cyan:   0 0 24px rgba(0, 200, 255, 0.28);
  --glow-green:  0 0 16px rgba(0, 255, 157, 0.22);
  --glow-violet: 0 0 20px rgba(139, 92, 246, 0.28);

  --transition-base: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.18s ease;
  --nav-height:  64px;
  --section-pad: clamp(5rem, 10vw, 8rem);
  --max-w:       1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(0, 200, 255, 0.18);
  color: #fff;
}

/* ─── Global Grid Overlay (constitution §6.1 data-driven aesthetic) ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography Utilities ─── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--color-white);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.display-sm {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.body-lg  { font-size: 1.0625rem; line-height: 1.7; }
.body-md  { font-size: 0.9375rem; line-height: 1.65; }

.mono-sm {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mono-md {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ─── Section Layout Helpers ─── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad) 2rem;
  position: relative;
  z-index: 1;
}

.section-tag {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  display: block;
}

.h-rule {
  height: 1px;
  max-width: 100px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 1.75rem auto;
}

/* ─── Buttons (constitution §5.2 system-like feedback) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-primary);
  color: #080c10;
  font-weight: 700;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(0, 200, 255, 0.4);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: rgba(0, 200, 255, 0.07);
  border-color: var(--color-primary);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.45s ease, border-color 0.45s ease;
}

#nav.nav--scrolled {
  background: rgba(11, 15, 20, 0.92);
  border-bottom-color: var(--color-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover { opacity: 0.7; }

.logo-mark {
  width: 20px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-verse {
  color: var(--color-primary);
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link--active {
  color: var(--color-white);
}

.nav-link:hover::after,
.nav-link--active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.28s ease;
  transform-origin: center;
}

#nav.nav--open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav.nav--open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav.nav--open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: var(--nav-height) 2rem 4rem;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.status-label {
  display: inline-block;
  color: var(--color-accent);
  margin-bottom: 1.75rem;
}

/* Blinking cursor after status label */
.status-label::after {
  content: '_';
  animation: blink 1.3s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-content .display-xl {
  margin-bottom: 1.5rem;
}

.hero-sub {
  color: var(--color-muted);
  max-width: 480px;
  margin: 0 auto 3rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   POSITIONING STATEMENT
   ═══════════════════════════════════════════════ */
#positioning {
  position: relative;
  z-index: 1;
}

.positioning-inner {
  text-align: center;
  max-width: 680px;
}

.positioning-sub {
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════
   SYSTEM FLOW & RESEARCH LAB
   ═══════════════════════════════════════════════ */
#system-flow {
  position: relative;
  z-index: 1;
}

/* Pipeline */
.pipeline-container {
  margin: 3.5rem 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#pipeline-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 640px;
}

/* Node hover (CSS) — JS adds active class for sequential animation */
.pipeline-node {
  cursor: default;
  transition: filter 0.35s ease;
}

.pipeline-node--active rect {
  stroke: rgba(0, 200, 255, 0.45) !important;
}

.pipeline-node--active .node-indicator {
  opacity: 1 !important;
  filter: drop-shadow(0 0 4px currentColor);
}

.pipeline-node--active text:last-of-type {
  fill: var(--color-accent) !important;
}

/* Mobile pipeline fallback */
.pipeline-labels {
  display: none;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.pipeline-labels li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.pipeline-labels li:last-child { border-bottom: none; }
.pipeline-labels .mono-sm { color: var(--color-primary); min-width: 2ch; }

.pipe-status {
  margin-left: auto;
  color: var(--color-muted);
}

/* Quantitative approaches */
.quant-approaches {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.approaches-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.approaches-row span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.approaches-row span:hover {
  color: var(--color-primary);
  border-color: rgba(0, 200, 255, 0.35);
}

/* Research grid */
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--color-border);
}

.research-areas,
.current-directions {
  list-style: none;
  margin-top: 1.25rem;
}

.research-areas li,
.current-directions li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  cursor: default;
}

.research-areas li:hover,
.current-directions li:hover {
  color: var(--color-white);
  padding-left: 0.4rem;
}

.research-areas li:last-child,
.current-directions li:last-child {
  border-bottom: none;
}

/* Output types */
.output-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.output-block {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-secondary);
  border-radius: 0 0 2px 2px;
}

.output-label {
  color: var(--color-secondary);
  display: block;
  margin-bottom: 0.75rem;
}

.output-block h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.output-block p {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════
   AGENT MODULES
   ═══════════════════════════════════════════════ */
#agents {
  position: relative;
  z-index: 1;
}

#agents .section-inner {
  padding-top: calc(var(--section-pad) * 0.6);
}

#agents .display-lg {
  margin-top: 0.75rem;
  margin-bottom: 3rem;
}

/* Grid: gap IS the border (border-as-gap technique) */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--color-border);
  border: 1.5px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.agent-card {
  background: var(--color-surface);
  padding: 2.25rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.agent-card::before {
  /* Corner accent — bottom-left */
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-bottom: 1px solid rgba(0, 200, 255, 0.3);
  border-left: 1px solid rgba(0, 200, 255, 0.3);
  transition: opacity var(--transition-base);
}

.agent-card:hover {
  background: var(--color-surface-2);
  box-shadow: inset 0 0 0 1px rgba(0, 200, 255, 0.22);
}

.agent-card:hover::before {
  border-color: var(--color-primary);
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.agent-number {
  color: var(--color-muted);
}

/* Status badges */
.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 0.26rem 0.65rem;
  border-radius: 2px;
}

.agent-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-status[data-status="live"] {
  background: rgba(0, 255, 157, 0.08);
  color: var(--color-accent);
  border: 1px solid rgba(0, 255, 157, 0.25);
}

.agent-status[data-status="live"]::before {
  background: var(--color-accent);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.agent-status[data-status="active"] {
  background: rgba(0, 200, 255, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(0, 200, 255, 0.25);
}

.agent-status[data-status="active"]::before {
  background: var(--color-primary);
  animation: pulse-dot 2.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Card body */
.agent-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.6rem;
}

.agent-card > p {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.capability-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.capability-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.845rem;
  color: var(--color-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.capability-list li::before {
  content: '→';
  color: var(--color-primary);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.05em;
}

.capability-list li:last-child { border-bottom: none; }

/* Sparkline metric */
.card-metric {
  margin-top: 0.5rem;
  height: 28px;
  opacity: 0.85;
}

.card-metric svg {
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════
   CASE STUDIES
   ═══════════════════════════════════════════════ */
#cases {
  position: relative;
  z-index: 1;
}

#cases .display-lg {
  margin-top: 0.75rem;
  margin-bottom: 3.5rem;
}

.case-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.case-card:last-child { border-bottom: none; }

.case-card--reversed {
  direction: rtl;
}

.case-card--reversed > * {
  direction: ltr;
}

.case-number {
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.85rem;
}

.case-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.case-content p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.case-features {
  list-style: none;
}

.case-features li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.case-features li::before {
  content: '→';
  color: var(--color-primary);
  flex-shrink: 0;
}

.case-features li:last-child { border-bottom: none; }

/* ── Terminal Visual ── */
.terminal-window {
  background: #070b10;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  height: 34px;
  background: #0d1117;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.t-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.t-title {
  margin-left: 8px;
  color: var(--color-muted);
}

.terminal-body {
  padding: 1rem 1.125rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.9;
  min-height: 180px;
  overflow-y: hidden;
}

.log-ts   { color: #4A5568; }
.log-info { color: var(--color-primary); }
.log-proc { color: var(--color-secondary); }
.log-done { color: var(--color-accent); }
.log-msg  { color: var(--color-text); }

/* ── Heatmap Visual ── */
.heatmap-container {
  background: #070b10;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.heatmap-label {
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.85rem;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(0, 255, 157, 0.04);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.heatmap-cell.heat-low  { background: rgba(0, 255, 157, 0.10); }
.heatmap-cell.heat-mid  { background: rgba(0, 255, 157, 0.30); }
.heatmap-cell.heat-high { background: rgba(0, 255, 157, 0.60); }
.heatmap-cell.heat-peak {
  background: rgba(0, 255, 157, 0.92);
  box-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.heatmap-legend .mono-sm { color: var(--color-muted); }

.legend-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(0, 255, 157, 0.1),
    rgba(0, 255, 157, 0.4),
    rgba(0, 255, 157, 0.92));
}

/* ── Chart Visual ── */
.chart-container {
  background: #070b10;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chart-label {
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.85rem;
}

#perf-chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
}

/* ═══════════════════════════════════════════════
   TECHNOLOGY STACK
   ═══════════════════════════════════════════════ */
#technology {
  position: relative;
  z-index: 1;
}

#technology .display-lg {
  margin-top: 0.75rem;
  margin-bottom: 3rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tech-column {
  padding: 0 2.5rem;
  border-right: 1px solid var(--color-border);
}

.tech-column:first-child { padding-left: 0; }
.tech-column:last-child  { padding-right: 0; border-right: none; }

.tech-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.tech-prompt {
  color: var(--color-primary);
}

.tech-header h3 {
  color: var(--color-white);
  letter-spacing: 0.1em;
}

.tech-list {
  list-style: none;
}

.tech-list li {
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: var(--color-muted);
  border-bottom: 1px solid rgba(0, 200, 255, 0.05);
  line-height: 1.5;
}

.tech-list li:last-child { border-bottom: none; }

.tech-tagline {
  text-align: center;
  color: var(--color-muted);
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
  display: block;
}

/* ═══════════════════════════════════════════════
   CONTACT / CTA
   ═══════════════════════════════════════════════ */
#contact {
  position: relative;
  z-index: 1;
  text-align: center;
}

#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 900px 450px at 50% 50%, rgba(0, 200, 255, 0.035), transparent);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

#contact .display-lg {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.contact-sub {
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.75rem 0;
}

.contact-email {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.email-link {
  color: var(--color-primary);
  text-decoration: none;
  display: block;
  margin-top: 0.5rem;
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.email-link:hover {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 1.75rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-brand,
.footer-copy {
  color: var(--color-muted);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 1024px
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .case-card { gap: 3rem; }
  .tech-column { padding: 0 1.5rem; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 768px (tablet / mobile)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav — mobile overlay */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 20, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
  }

  #nav.nav--open .nav-links {
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    font-size: 1rem;
    letter-spacing: 0.14em;
  }

  /* Pipeline — show list, hide SVG */
  #pipeline-svg { display: none; }
  .pipeline-labels { display: block; }

  /* Grids — single column */
  .agents-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .output-types { grid-template-columns: 1fr; gap: 1rem; }

  /* Case cards — stack */
  .case-card {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
  }

  .case-card--reversed { direction: ltr; }

  /* Tech — single column, no side borders */
  .tech-grid { grid-template-columns: 1fr; }
  .tech-column {
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
  }
  .tech-column:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 480px (small mobile)
   ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .section-inner { padding: 4.5rem 1.25rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .cta-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; gap: 0.5rem; }
}

/* ═══════════════════════════════════════════════
   PREFERS REDUCED MOTION
   (constitution §5.1 — respect user preference)
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-label::after { animation: none; }
  .agent-status::before { animation: none; }
}
