/* ============================================================================
   HUMAN DISCOVERY - "AUDIT PAPER" REDESIGN STYLESHEET
   A literary infrastructure manifesto: ink on warm paper, one accent (rust),
   bespoke SVG animations preserved on dark "instrument" panels, one dark CTA
   stage. Implements the committed blueprint. ASCII only. No em/en dashes.

   Load order: this file is intended to be appended AFTER the two existing
   inline <style> blocks so its rules win on shared selectors. It restyles
   every class used in the body and adds new component hooks.
   ============================================================================ */

/* ============================================================
   TIER 1 - BRAND TOKENS (raw; never referenced by components)
   ============================================================ */
:root {
  /* Paper canvas ramp (warm, never pure white) */
  --paper-0:   #F4F1EA;
  --paper-1:   #EFEBE2;
  --paper-2:   #E7E2D7;
  --paper-edge:#DAD4C6;

  /* Ink ramp (warm near-black, never pure #000) */
  --ink-0:     #16140F;
  --ink-1:     #3A372F;
  --ink-2:     #6B675C;
  --ink-3:     #7A766A;

  /* Dark stage ramp (instrument panels + CTA) */
  --stage-0:   #0E0D0B;
  --stage-1:   #141310;
  --stage-2:   #1B1915;
  --stage-fg:  #F0ECE2;
  --stage-fg-2:#A8A294;

  /* ONE accent + states */
  --rust-500:  #C8553D;
  --rust-600:  #B0472F;
  --rust-300:  #DD7A63;
  --rust-rgb:  200, 85, 61;
  --on-rust:   #F7F3EC;

  /* Hairlines */
  --line-light:   rgba(22, 20, 15, 0.12);
  --line-light-2: rgba(22, 20, 15, 0.22);
  --line-dark:    rgba(240, 236, 226, 0.10);
  --line-dark-2:  rgba(240, 236, 226, 0.20);

  /* ============================================================
     TIER 2 - SEMANTIC (the ONLY thing components touch)
     ============================================================ */
  --color-bg:            var(--paper-0);
  --color-bg-alt:        var(--paper-1);
  --color-surface:       var(--paper-1);
  --color-surface-sunk:  var(--paper-2);
  --color-fg:            var(--ink-0);
  --color-fg-muted:      var(--ink-2);
  --color-fg-subtle:     var(--ink-3);
  --color-border:        var(--line-light);
  --color-border-strong: var(--line-light-2);

  --color-stage-bg:      var(--stage-0);
  --color-stage-surface: var(--stage-1);
  --color-stage-fg:      var(--stage-fg);
  --color-stage-fg-muted:var(--stage-fg-2);
  --color-stage-border:  var(--line-dark);

  --color-accent:        var(--rust-500);
  --color-accent-hover:  var(--rust-600);
  --color-accent-on-dark:var(--rust-300);
  --color-on-accent:     var(--on-rust);
  --color-focus:         var(--rust-500);

  /* ---- Type families ---- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Back-compat aliases for the original variable names (kept so nothing
     referencing --font-main breaks; both now resolve to the new families) */
  --font-main: var(--font-body);

  --fw-body: 400; --fw-medium: 500; --fw-semibold: 600;
  --fw-display: 340;
  --fw-display-em: 360;

  /* ---- Fluid type scale ---- */
  --fs-eyebrow:  0.75rem;
  --fs-caption:  0.8125rem;
  --fs-body-sm:  0.9375rem;
  --fs-body:     clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lead:     clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --fs-h4:       clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h3:       clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-h2:       clamp(2.25rem, 1.5rem + 3.2vw, 4rem);
  --fs-h1:       clamp(3rem, 1.6rem + 6vw, 6rem);
  --fs-display:  clamp(3.25rem, 1.4rem + 9vw, 8.25rem);

  /* ---- Line-height / tracking ---- */
  --lh-tight: 0.96; --lh-snug: 1.08; --lh-body: 1.6; --lh-relaxed: 1.7;
  --tk-display: -0.025em; --tk-h2: -0.018em; --tk-body: 0; --tk-eyebrow: 0.16em;

  /* ---- Spacing (8px base) ---- */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-6:24px; --space-8:32px; --space-12:48px; --space-16:64px;
  --space-20:80px; --space-24:96px; --space-32:128px; --space-40:160px;

  /* ---- Containers / measure ---- */
  --container:      72rem;
  --container-wide: 80rem;
  --container-text: 40rem;
  --gutter:         var(--space-6);

  /* ---- Radii (editorial = near-square) ---- */
  --radius-xs:2px; --radius-sm:4px; --radius-md:6px; --radius-pill:999px;
  /* Back-compat: original used --radius / --radius-lg / --radius-xl */
  --radius: var(--radius-md); --radius-lg: var(--radius-md); --radius-xl: var(--radius-md);

  /* ---- Borders / elevation ---- */
  --border-w: 1px;
  --shadow-1: 0 1px 2px rgba(22,20,15,0.06);
  --shadow-2: 0 24px 60px -30px rgba(22,20,15,0.22);
  --shadow-dark: 0 24px 60px -28px rgba(0,0,0,0.6);

  /* ---- Motion ---- */
  --dur-micro:180ms; --dur-hover:200ms; --dur-press:90ms;
  --dur-enter:700ms;
  --ease-out:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-overshoot: cubic-bezier(0.25, 1.4, 0.5, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --spring-hover:   linear(0,0,0.25,1.12,0.45,0.96,0.7,1.03,1,1);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: var(--lh-body);
  overflow-x: hidden;
  isolation: isolate; /* Safari blend containment for the grain overlay */
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: rgba(var(--rust-rgb), 0.22); color: var(--color-fg); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tk-display);
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
  color: var(--color-fg);
}

h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tk-h2);
  font-variation-settings: "opsz" 144;
  color: var(--color-fg);
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h3);
  line-height: 1.18;
  letter-spacing: -0.008em;
  color: var(--color-fg);
}

h4 {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h4);
  line-height: 1.2;
  letter-spacing: -0.006em;
  color: var(--color-fg);
}

p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-wrap: pretty;
}

/* The ONE emphasis word - the only place italic-rust appears in headings */
.accent-word,
.gradient-text {  /* legacy class retokenized to a single accent emphasis */
  font-style: italic;
  color: var(--color-accent);
  font-weight: var(--fw-display-em);
  -webkit-text-fill-color: currentColor; /* neutralize any legacy clip */
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tk-eyebrow);
  color: var(--color-fg-subtle);
  margin-bottom: var(--space-6);
}

/* Replace the old solid accent bar with a quiet hairline tick */
.section-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-border-strong);
  border-radius: 0;
}

.eyebrow .tick,
.section-label .tick { color: var(--color-accent); }

.lead,
.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--color-fg-muted);
  max-width: 56ch;
  letter-spacing: -0.005em;
}

.measure { max-width: var(--container-text); }

/* Section title shared base (kept for legacy .section-title class) */
.section-title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tk-h2);
  font-variation-settings: "opsz" 144;
  color: var(--color-fg);
  text-wrap: balance;
  margin-bottom: var(--space-6);
}

/* Mono data utility */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container,
.container-lg {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-lg { max-width: var(--container-wide); }

.section {
  padding-block: var(--space-32);
  position: relative;
}
.section--hero,
.hero {
  padding-block: var(--space-40) var(--space-32);
}

/* 12-col editorial grid skeleton (opt-in via .editorial) */
.editorial {
  display: grid;
  column-gap: var(--space-8);
  row-gap: var(--space-12);
  grid-template-columns: minmax(1.5rem,1fr) repeat(12, minmax(0,1fr)) minmax(1.5rem,1fr);
  align-items: start;
}

/* ============================================================
   GRAIN + TEXTURE
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  filter: url(#hd-grain);
  opacity: 0.045;
  mix-blend-mode: soft-light;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Section divider: single mask-faded hairline (replaces blue/purple glow) */
.section-divider {
  height: 1px;
  border: 0;
  background: var(--color-border-strong);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* Alternating band rhythm: tag sections with .band-alt for the raised paper */
.band-alt,
.solution { background: var(--color-bg-alt); }
.problem,
.technology,
.science { background: var(--color-bg); }

/* ============================================================
   REVEAL / MOTION PRIMITIVES
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
  transition:
    opacity var(--dur-enter) var(--ease-editorial),
    transform var(--dur-enter) var(--ease-editorial);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-delay-1 { transition-delay: 70ms; }
.reveal-delay-2 { transition-delay: 140ms; }
.reveal-delay-3 { transition-delay: 210ms; }
.reveal-delay-4 { transition-delay: 280ms; }

/* Hero headline line-rise reveal */
.reveal-line { display: block; }
.reveal .reveal-line {
  opacity: 0;
  transform: translateY(0.4em);
  animation: lineRise 0.8s var(--ease-editorial) forwards;
}
.reveal .reveal-line:nth-child(1) { animation-delay: 0.05s; }
.reveal .reveal-line:nth-child(2) { animation-delay: 0.16s; }
.reveal .reveal-line:nth-child(3) { animation-delay: 0.27s; }
@keyframes lineRise { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   BUTTONS / LINKS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: 1px solid transparent;
  box-shadow: var(--shadow-1);
  transition:
    transform var(--dur-hover) var(--spring-hover),
    background var(--dur-hover) var(--ease-out);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--color-accent-hover); }
.btn-primary:active { transform: translateY(0); transition-duration: var(--dur-press); }
/* legacy sheen overlay removed */
.btn-primary::before { content: none; }

/* Secondary becomes the bare text-arrow tertiary link.
   Both .btn-secondary (legacy) and .link-arrow (new) map here. */
.btn-secondary,
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 0.25rem;
  background: none;
  border: 0;
  color: var(--color-fg);
  transition: color var(--dur-micro) var(--ease-out);
}
.btn-secondary svg,
.link-arrow svg {
  transition: transform var(--dur-hover) var(--ease-overshoot);
}
.btn-secondary:hover,
.link-arrow:hover { color: var(--color-accent); transform: none; }
.btn-secondary:hover svg,
.link-arrow:hover svg { transform: translateX(3px); }

/* On a dark stage, the bare link reads in warm off-white -> rust-300 */
.cta-section .btn-secondary,
.stage .link-arrow,
.cta-section .link-arrow { color: var(--color-stage-fg); }
.cta-section .btn-secondary:hover,
.stage .link-arrow:hover,
.cta-section .link-arrow:hover { color: var(--color-accent-on-dark); }

/* Inline / nav underline draw-in */
.nav-link::after,
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-overshoot);
}
.nav-link:hover::after,
.link-underline:hover::after { transform: scaleX(1); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) var(--ease-out),
              padding var(--dur-hover) var(--ease-out);
}
/* Solid bar on scroll - NO glassmorphism */
.nav.scrolled {
  background: var(--color-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--fw-display-em);
  font-variation-settings: "opsz" 40;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--color-fg);
}

/* Logo mark loses its gradient backing - transparent */
.nav-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.nav-logo-icon img,
.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin-left: auto;
  margin-right: var(--space-8);
}
.nav-links a {
  position: relative;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-fg-muted);
  transition: color var(--dur-micro) var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-overshoot);
}
.nav-links a:hover { color: var(--color-fg); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Quiet text CTA with accent underline-draw, NOT a filled pill */
.nav-cta {
  position: relative;
  padding: 0;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  background: none;
  color: var(--color-fg);
  transition: color var(--dur-micro) var(--ease-out);
}
.nav-cta::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--color-accent);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-overshoot);
}
.nav-cta:hover { color: var(--color-accent); transform: none; }
.nav-cta:hover::after { transform: scaleX(0); transform-origin: right; }

.nav-mobile-toggle { display: none; }
.nav-mobile-toggle span {
  width: 22px; height: 2px;
  background: var(--color-fg);
  border-radius: 2px;
  transition: all var(--dur-micro);
}

/* ============================================================
   HERO - Spark manifesto + Centaur instrument artifact
   ============================================================ */
.hero {
  min-height: auto;
  display: block;
  position: relative;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* Orbs deleted - hidden defensively if markup remains */
.hero-orb, .hero-orb-1, .hero-orb-2, .hero-orb-3,
.cta-orb, .cta-orb-1, .cta-orb-2,
.problem-ring, .problem-visual, .problem-icon-center { display: none !important; }

/* Two-tier blueprint instrument grid, mask-faded, accent-tinted fine grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 70% 38%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 75% at 70% 38%, #000, transparent 78%);
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: var(--space-16);
}

/* Optional wrapper if editor groups the left column copy */
.hero-copy { max-width: 36rem; }

/* Eyebrow badge -> quiet mono status line */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tk-eyebrow);
  color: var(--color-fg-subtle);
  margin-bottom: var(--space-8);
}
.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 390;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tk-display);
  font-variation-settings: "opsz" 144;
  max-width: 20ch;
  color: var(--color-fg);
  margin-bottom: var(--space-8);
  opacity: 1;
  animation: none;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  letter-spacing: -0.005em;
  color: var(--color-fg-muted);
  max-width: 52ch;
  margin: 0 0 var(--space-12);
  opacity: 1;
  animation: none;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-8);
  flex-wrap: wrap;
  opacity: 1;
  animation: none;
}

/* ----- Dark instrument panel + audit/consent ledger ----- */
.instrument {
  position: relative;
  background: var(--color-stage-bg);
  color: var(--color-stage-fg);
  border: 1px solid var(--color-stage-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  isolation: isolate;
}
.instrument::after { /* faint film grain inside the panel */
  content: "";
  position: absolute;
  inset: 0;
  filter: url(#hd-grain);
  opacity: 0.06;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-instrument { align-self: center; }

.instrument-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-stage-border);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-stage-fg-muted);
}
.instrument-head .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 rgba(var(--rust-rgb), 0.5);
  animation: live-dot 2.4s ease-in-out infinite;
}
@keyframes live-dot {
  0%   { box-shadow: 0 0 0 0 rgba(var(--rust-rgb), 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(var(--rust-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--rust-rgb), 0); }
}
.instrument-head .spacer { margin-left: auto; }

/* The ledger: mono columns STATUS / EVENT / CONSENT / TRACE-ID */
.ledger {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  line-height: 1.5;
}
.ledger-row {
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 0.9fr 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--color-stage-border);
  color: var(--color-stage-fg-muted);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row--head {
  color: var(--color-stage-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
}
.ledger-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-cell--event { color: var(--color-stage-fg); }
.ledger-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-stage-fg);
}
.ledger-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.ledger-status--ok::before { background: var(--color-accent-on-dark); }
.ledger-trace { color: var(--color-accent-on-dark); }

/* Stats word-row removed (replaced by ledger). Defensive: hide if present. */
.hero-stats { display: none !important; }

/* ============================================================
   SOCIAL PROOF - one tonal band, mono category index
   ============================================================ */
.social-proof {
  padding-block: var(--space-16);
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}
.social-proof .container { display: grid; gap: var(--space-8); }

/* Promote the label into the Fraunces proof statement */
.social-proof-label {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-variation-settings: "opsz" 144;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-transform: none;
  color: var(--color-fg);
  max-width: 22ch;
  margin: 0 auto;
}

/* Six sectors as a single mono row, dot-separated, no glow */
.social-proof-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  opacity: 1;
}
.social-proof-logos span {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-fg-subtle);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.social-proof-logos span:not(:last-child)::after {
  content: "\00B7"; /* middle dot */
  margin-left: var(--space-4);
  color: var(--color-border-strong);
}

/* ============================================================
   PROBLEM - typographic editorial split (no sad-face ring)
   ============================================================ */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}
.problem-content .section-title { margin-bottom: var(--space-8); }
.problem-content h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tk-eyebrow);
  font-weight: 500;
  color: var(--color-fg-subtle);
  margin-bottom: var(--space-4);
}

/* Problem points -> hairline-ruled numbered list, no pink dots */
.problem-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: var(--space-8);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-6);
}
.problem-list li {
  counter-increment: prob;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: baseline;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-fg-muted);
  line-height: var(--lh-body);
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.problem-list { counter-reset: prob; }
.problem-list li:first-child { border-top: 0; }
.problem-list li::before {
  content: counter(prob, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--color-fg-subtle);
  letter-spacing: 0.04em;
  margin: 0;
  width: auto; height: auto;
  background: none;
  border-radius: 0;
}

/* ============================================================
   SOLUTION - four layers as manifesto rows + instrument panels
   ============================================================ */
.solution {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.solution-header { text-align: left; margin-bottom: var(--space-16); max-width: 48rem; }
.solution-header .section-subtitle { margin: 0; }

/* Break the 2x2 grid into full-width hairline-ruled editorial rows */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.stack-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-12);
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  overflow: visible;
  padding-block: var(--space-12);
  transition: none;
}
.stack-card:last-child { border-bottom: 1px solid var(--color-border); }
.stack-card::before { content: none; } /* drop the colored top bar */
.stack-card:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.stack-card:hover::before { content: none; }

.stack-card-body { padding: 0; }

/* Big mono numeral via the layer label */
.stack-card-layer {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  color: var(--color-fg-subtle);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.stack-card-layer::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: none;
}
.stack-card h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-variation-settings: "opsz" 144;
  font-size: var(--fs-h3);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin-bottom: var(--space-4);
  color: var(--color-fg);
}
.stack-card p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-fg-muted);
  max-width: 48ch;
  margin-bottom: var(--space-6);
}

/* Feature list -> quiet inline comma-prose chips on hairlines */
.stack-card-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.03em;
  color: var(--color-fg-subtle);
}
.stack-card-features li {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--color-fg-subtle);
  display: inline-flex;
  align-items: center;
}
.stack-card-features li:not(:last-child)::after {
  content: "\00B7";
  margin-left: var(--space-4);
  color: var(--color-border-strong);
}

.stack-card-scope {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-subtle);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
}
.stack-card--engine .stack-card-scope,
.stack-card--edna .stack-card-scope { color: var(--color-accent); }

/* The dark instrument panel that hosts each row's bespoke viz */
.stack-card-visual {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-stage-bg);
  border: 1px solid var(--color-stage-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  isolation: isolate;
}
.stack-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  filter: url(#hd-grain);
  opacity: 0.06;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Per-card accent overrides collapse to the ONE accent */
.stack-card--engine,
.stack-card--graph,
.stack-card--edna,
.stack-card--os {
  --card-accent: var(--color-accent);
  --card-rgb: var(--rust-rgb);
}

/* ============================================================
   SOLUTION viz recolor (dark panel, single accent + warm mono)
   ============================================================ */
/* Visual 1: waveform (Engine) */
.viz-waveform {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 110px; width: 100%; padding: 0 var(--space-6);
}
.viz-waveform .bar {
  flex: 1; min-width: 3px; max-width: 5px; border-radius: 2px;
  background: linear-gradient(180deg, var(--rust-300), rgba(var(--rust-rgb), 0.35));
  animation: wavePulse 1.6s ease-in-out infinite;
  transform-origin: center;
}
.viz-waveform .bar:nth-child(3n)   { height: 70%; }
.viz-waveform .bar:nth-child(3n+1) { height: 35%; }
.viz-waveform .bar:nth-child(3n+2) { height: 90%; }
.viz-waveform .bar:nth-child(5n)   { height: 55%; }
.viz-waveform .bar:nth-child(7n)   { height: 25%; }
.viz-waveform .bar:nth-child(11n)  { height: 95%; }
@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* E-DNA: Data Flow strands (recolored to accent) */
.sc-edna-3, .sc-edna-3 .sc-edna-3-svg { width: 100%; height: 100%; }
.sc-edna-3 .sc-edna-3-strand { fill: none; stroke: var(--rust-300); stroke-width: 1.5; stroke-linecap: round; }
.sc-edna-3 .sc-edna-3-strand-b { opacity: 0.45; }

/* Emotional Graph: Living Graph (recolored) */
.sc-graph-2 { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sc-graph-2 svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sc-graph-2 .sc-graph-2-edge { stroke: rgba(var(--rust-rgb), 0.28); stroke-width: 1.2; stroke-linecap: round; }
.sc-graph-2 .sc-graph-2-node { fill: var(--rust-300); opacity: 0.85; }
.sc-graph-2 .sc-graph-2-hub { fill: var(--rust-300); }
.sc-graph-2 .sc-graph-2-packet { fill: var(--stage-fg); will-change: transform; }

/* Emotional OS: Data Mesh Flow (recolored) */
.sc-os-2 { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sc-os-2 .stage {
  position: relative; width: 260px; height: 140px; margin: 0 auto;
  overflow: hidden; perspective: 800px; perspective-origin: 50% 38%;
}
.sc-os-2 .plane {
  position: absolute; left: 50%; top: 56%; width: 360px; height: 280px;
  margin-left: -180px; margin-top: -140px;
  transform: rotateX(55deg); transform-style: preserve-3d;
}
.sc-os-2 .grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(var(--rust-rgb),0.30) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(var(--rust-rgb),0.30) 0 1px, transparent 1px 40px);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 78%);
}
.sc-os-2 .pulse {
  position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--rust-300);
  box-shadow: 0 0 8px rgba(var(--rust-rgb),0.95), 0 0 16px rgba(var(--rust-rgb),0.5);
  will-change: transform, opacity;
}

/* Legacy viz-network / viz-helix / viz-grid (if present) recolored to accent */
.viz-network svg, .viz-helix svg, .viz-grid { width: 100%; height: 100%; }
.viz-network .net-line { stroke: rgba(var(--rust-rgb),0.32); stroke-width: 1; stroke-dasharray: 4 4; animation: dashShift 20s linear infinite; }
@keyframes dashShift { to { stroke-dashoffset: -100; } }
.viz-network .net-node { fill: var(--color-stage-surface); stroke: var(--rust-300); stroke-width: 1.5; }
.viz-network .net-node--pulse { animation: nodePulse 2s ease-in-out infinite; }
.viz-network .net-node--pulse:nth-child(2) { animation-delay: 0.4s; }
.viz-network .net-node--pulse:nth-child(3) { animation-delay: 0.8s; }
.viz-network .net-node--pulse:nth-child(4) { animation-delay: 1.2s; }
@keyframes nodePulse { 0%,100% { r: 5; opacity: 0.7; } 50% { r: 7; opacity: 1; } }
.viz-helix .helix-path { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.viz-helix .helix-path-1 { stroke: var(--rust-300); opacity: 0.9; }
.viz-helix .helix-path-2 { stroke: var(--rust-300); opacity: 0.4; }
.viz-helix .helix-dot { fill: var(--rust-300); animation: dotPulse 3s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ============================================================
   TECHNOLOGY (How It Works) - stepped vertical rhythm
   ============================================================ */
.technology { background: var(--color-bg); }
.tech-header { text-align: left; margin-bottom: var(--space-16); max-width: 48rem; }
.tech-header .section-subtitle { margin: 0; }

/* Legacy pipeline (if still rendered) - flatten, single accent */
.tech-pipeline { display: flex; gap: var(--space-6); position: relative; overflow: visible; }
.tech-pipeline::before {
  content: ""; position: absolute; top: 24px; left: 60px; right: 60px;
  height: 1px; background: var(--color-border-strong); opacity: 1; z-index: 0;
}
.tech-step { flex: 1; text-align: left; position: relative; }
.tech-step-number {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 var(--space-4); font-family: var(--font-mono);
  font-size: 15px; font-weight: 500; position: relative; z-index: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}
.tech-step:nth-child(1) .tech-step-number,
.tech-step:nth-child(2) .tech-step-number,
.tech-step:nth-child(3) .tech-step-number,
.tech-step:nth-child(4) .tech-step-number,
.tech-step:nth-child(5) .tech-step-number {
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}
.tech-step h4 { font-size: var(--fs-h4); font-weight: 600; margin-bottom: var(--space-2); }
.tech-step p { font-size: var(--fs-body-sm); color: var(--color-fg-muted); line-height: var(--lh-body); max-width: 28ch; margin: 0; }

/* The four embedding artifacts -> stepped editorial rows (rebuilt grid) */
.embeddings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--space-16);
}
.embedding-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.55fr);
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
  background: none;
  border-radius: 0;
  overflow: visible;
  transition: none;
  --emb-rgb: var(--rust-rgb);
}
.embedding-card:last-child { border-bottom: 1px solid var(--color-border); }
.embedding-card::before { content: none; }
.embedding-card:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.embedding-card:nth-child(odd) .embedding-card-viz { order: 3; }

/* Mono numeral (accent), via a generated counter on the grid */
.embeddings-grid { counter-reset: emb; }
.embedding-card::after {
  content: counter(emb, decimal-leading-zero);
  counter-increment: emb;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  font-family: var(--font-mono);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.02em;
}
.embedding-card-header {
  display: block;
  margin-bottom: var(--space-2);
}
.embedding-card-axis {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--color-fg-subtle);
  letter-spacing: var(--tk-eyebrow);
  text-transform: uppercase;
}
.embedding-card-abbr {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--color-fg-subtle);
  border: 0;
}
.embedding-card h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-variation-settings: "opsz" 144;
  font-size: var(--fs-h4);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--color-fg);
}
.embedding-card p {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-fg-muted);
  line-height: var(--lh-body);
  max-width: 44ch;
}

/* Small dark instrument panel hosting the per-step viz */
.embedding-card-viz {
  height: 92px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--color-stage-bg);
  border: 1px solid var(--color-stage-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  padding: 0 var(--space-3);
}

/* Trait EQ bars recolor */
.emb-viz-trait {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 6px; width: 100%; height: 50px; padding: 0 20px;
}
.emb-viz-trait .trait-bar {
  flex: 1; max-width: 14px;
  background: linear-gradient(180deg, var(--rust-300), rgba(var(--rust-rgb),0.25));
  border-radius: 3px; transform-origin: bottom center;
  animation: traitEq 3s ease-in-out infinite;
}
.emb-viz-trait .trait-bar:nth-child(1) { height: 60%; animation-delay: 0s;    --eq-min: 0.45; --eq-max: 1; }
.emb-viz-trait .trait-bar:nth-child(2) { height: 85%; animation-delay: 0.25s; --eq-min: 0.55; --eq-max: 1; }
.emb-viz-trait .trait-bar:nth-child(3) { height: 70%; animation-delay: 0.5s;  --eq-min: 0.5;  --eq-max: 1; }
.emb-viz-trait .trait-bar:nth-child(4) { height: 95%; animation-delay: 0.75s; --eq-min: 0.6;  --eq-max: 1; }
.emb-viz-trait .trait-bar:nth-child(5) { height: 75%; animation-delay: 1s;    --eq-min: 0.5;  --eq-max: 1; }
.emb-viz-trait .trait-bar:nth-child(6) { height: 55%; animation-delay: 1.25s; --eq-min: 0.45; --eq-max: 1; }
@keyframes traitEq { 0%,100% { transform: scaleY(var(--eq-min,0.5)); } 50% { transform: scaleY(var(--eq-max,1)); } }

/* sc-trait-1 Spring EQ recolor */
.sc-trait-1 .sc-trait-1-eq { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 50px; }
.sc-trait-1 .sc-trait-1-bar {
  width: 14px; height: 50px; border-radius: 4px;
  background: linear-gradient(180deg, var(--rust-300), rgba(var(--rust-rgb),0.4));
  transform-origin: bottom center;
  transform: scaleY(var(--eq-min, 0.3));
  will-change: transform;
  animation: sc-trait-1-eq var(--d, 1s) cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
  animation-delay: var(--dl, 0s);
}
@keyframes sc-trait-1-eq {
  from { transform: scaleY(var(--eq-min, 0.3)); }
  to   { transform: scaleY(var(--eq-max, 1)); }
}

/* sc-state-2 Reactive Spikes recolor */
.sc-state-2 { width: 100%; }
.sc-state-2 svg { width: 100%; height: 100%; display: block; margin: 0 auto; overflow: visible; }
.sc-state-2 .sc-state-2-line {
  fill: none; stroke: var(--rust-300); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  will-change: d;
}
.sc-state-2 .sc-state-2-dot { fill: var(--stage-fg); will-change: transform; }

/* Legacy emb-viz-state recolor */
.emb-viz-state { width: 100%; height: 50px; }
.emb-viz-state svg { width: 100%; height: 100%; }
.emb-viz-state .state-line {
  fill: none; stroke: var(--rust-300); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: stateDraw 10s ease-in-out infinite;
}
@keyframes stateDraw { 0% { stroke-dashoffset: 1000; } 90%,100% { stroke-dashoffset: 0; } }
.emb-viz-state .state-fill { fill: url(#stateFillGrad); opacity: 0.3; }

/* Resonance circles recolor */
.emb-viz-resonance { width: 100%; height: 60px; position: relative; }
.emb-viz-resonance .res-circle {
  position: absolute; top: 50%; width: 50px; height: 50px;
  border-radius: 50%; border: 2px solid var(--rust-300);
  transform: translateY(-50%); animation: resonate 3s ease-in-out infinite;
}
.emb-viz-resonance .res-circle:nth-child(1) {
  left: calc(50% - 32px);
  background: radial-gradient(circle, rgba(var(--rust-rgb),0.2), transparent 70%);
}
.emb-viz-resonance .res-circle:nth-child(2) {
  left: calc(50% - 18px);
  background: radial-gradient(circle, rgba(var(--rust-rgb),0.15), transparent 70%);
  animation-delay: 0.5s;
}
@keyframes resonate {
  0%,100% { transform: translateY(-50%) scale(0.9); opacity: 0.6; }
  50% { transform: translateY(-50%) scale(1.05); opacity: 1; }
}

/* sc-rel-2 Data Packets recolor */
.sc-rel-2 { width: 100%; }
.sc-rel-2 svg { width: 100%; height: 100%; display: block; margin: 0 auto; overflow: visible; }
.sc-rel-2 .sc-rel-2-edge { stroke: rgba(var(--rust-rgb),0.3); stroke-width: 1.2; stroke-linecap: round; }
.sc-rel-2 .sc-rel-2-node { fill: var(--rust-500); opacity: 0.5; }
.sc-rel-2 .sc-rel-2-packet { fill: var(--rust-300); will-change: transform; }

/* Legacy emb-viz-relational recolor */
.emb-viz-relational { width: 100%; height: 60px; position: relative; }
.emb-viz-relational svg { width: 100%; height: 100%; }
.emb-viz-relational .rel-line { stroke: rgba(var(--rust-rgb),0.4); stroke-width: 1.5; stroke-dasharray: 3 3; animation: relDash 6s linear infinite; }
@keyframes relDash { to { stroke-dashoffset: -60; } }
.emb-viz-relational .rel-dot { fill: var(--rust-300); transform-box: fill-box; transform-origin: center; animation: relPulse 2.4s ease-in-out infinite; }
@keyframes relPulse { 0%,100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1.3); opacity: 1; } }

/* Fit small embedded-card visuals into the panel */
.embedding-card-viz .sc-state-2,
.embedding-card-viz .sc-rel-2 { width: 100%; height: 100%; }
.embedding-card-viz .sc-state-2 svg,
.embedding-card-viz .sc-rel-2 svg { height: 100%; }

/* ============================================================
   SCIENCE - broken editorial board (magazine stats)
   ============================================================ */
.science { background: var(--color-bg); }
.science-header { text-align: left; margin-bottom: var(--space-16); max-width: 48rem; }
.science-header .section-subtitle { margin: 0; }

/* Asymmetric magazine board: feature stat tall + offset smaller stats */
.science-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--color-border);
}
.science-card {
  position: relative;
  padding: var(--space-12) var(--space-8) var(--space-8) 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  transition: border-color var(--dur-hover) var(--ease-out);
}
.science-card:not(:nth-child(3n))::after {
  content: "";
  position: absolute;
  top: 0; right: var(--space-8); bottom: 0;
  width: 1px;
  background: var(--color-border);
}
.science-card:hover { transform: none; border-bottom-color: var(--color-border-strong); }

/* Feature stat (first) sits tall, raised, larger numeral */
.science-card:first-child { grid-row: span 2; padding-top: var(--space-8); }
.science-card:first-child .science-card-stat { font-size: var(--fs-h1); }
.science-card:nth-child(2) { margin-top: var(--space-12); } /* one raised via offset */

.science-card-stat {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
  color: var(--color-fg);
}
/* Collapse all per-child stat colors to ink (accent reserved) */
.science-card:nth-child(1) .science-card-stat,
.science-card:nth-child(2) .science-card-stat,
.science-card:nth-child(3) .science-card-stat,
.science-card:nth-child(4) .science-card-stat,
.science-card:nth-child(5) .science-card-stat,
.science-card:nth-child(6) .science-card-stat { color: var(--color-fg); }
.science-card:first-child .science-card-stat { color: var(--color-fg); }

.science-card h4 {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-fg);
}
.science-card p {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-fg-muted);
  line-height: var(--lh-body);
  max-width: 42ch;
}

/* Footnote -> mono caption */
.science .container > p[style] {
  font-family: var(--font-mono) !important;
  font-size: var(--fs-caption) !important;
  color: var(--color-fg-subtle) !important;
  letter-spacing: 0.02em;
  margin-top: var(--space-12) !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 60ch !important;
}

/* ============================================================
   CTA - the ONE dark studio-lit stage (Regrello)
   ============================================================ */
.cta-section {
  position: relative;
  padding-block: var(--space-40);
  text-align: left;
  overflow: hidden;
  background: var(--color-stage-bg);
  color: var(--color-stage-fg);
  isolation: isolate;
}
/* Chamfered hairline frame inset */
.cta-section::before {
  content: "";
  position: absolute;
  inset: var(--space-6);
  border: 1px solid var(--color-stage-border);
  clip-path: polygon(
    0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px,
    100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
  pointer-events: none;
  z-index: 0;
}
/* Studio light: single low-opacity radial through hard-light + vignette + grain */
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 22% 18%, rgba(var(--rust-rgb), 0.45), transparent 60%);
  mix-blend-mode: hard-light;
}
.cta-section::after { /* vignette + film grain */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 30%, transparent 55%, rgba(0,0,0,0.55) 100%);
  filter: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin-left: 8.333%;
}
.cta-section .section-label {
  color: var(--color-stage-fg-muted);
  justify-content: flex-start !important;
}
.cta-section .section-label::before { background: var(--line-dark-2); }
.cta-content h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-variation-settings: "opsz" 144;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tk-h2);
  color: var(--color-stage-fg);
  margin-bottom: var(--space-6);
  text-wrap: balance;
}
.cta-content p {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  color: var(--color-stage-fg-muted);
  max-width: 50ch;
  margin: 0 0 var(--space-12);
  line-height: var(--lh-body);
}
.cta-content .accent-word,
.cta-content .gradient-text { color: var(--color-accent-on-dark); }

.cta-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

/* Ghosted oversized HD brand-mark outline behind */
.cta-watermark {
  position: absolute;
  z-index: 0;
  right: -2%;
  bottom: -8%;
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: clamp(12rem, 30vw, 26rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 236, 226, 0.12);
  pointer-events: none;
  user-select: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding-block: var(--space-16);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: start;
  gap: var(--space-8);
}
.footer-brand { display: flex; align-items: center; gap: var(--space-3); }
.footer-logo {
  width: 26px; height: 26px;
  border-radius: var(--radius-xs);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: var(--fw-display-em);
  font-variation-settings: "opsz" 40;
  font-size: 1rem;
  color: var(--color-fg);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.02em;
  color: var(--color-fg-subtle);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}
.footer-links a {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  color: var(--color-fg-muted);
  transition: color var(--dur-micro) var(--ease-out);
  align-self: flex-start;
}
.footer-links a:hover { color: var(--color-accent); }

/* ============================================================
   LEGACY SECTIONS NOT IN THE 7-SECTION ORDER (defensive styling
   so any leftover markup still reads on-brand, single-accent)
   ============================================================ */
.market, .business-model, .roadmap, .moat, .why-now { background: var(--color-bg); }
.market, .moat, .roadmap {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.tam-banner {
  text-align: left; padding: var(--space-12);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-12);
}
.tam-value {
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-variation-settings: "opsz" 144;
  font-size: var(--fs-h1); letter-spacing: var(--tk-display);
  color: var(--color-accent);
  -webkit-text-fill-color: currentColor; background: none;
}
.tam-label { font-size: var(--fs-lead); color: var(--color-fg-muted); margin-top: var(--space-2); }
.market-sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.market-sector {
  padding: var(--space-6); border-radius: var(--radius-sm);
  background: var(--color-surface); border: 1px solid var(--color-border);
  transition: border-color var(--dur-hover) var(--ease-out);
}
.market-sector:hover { border-color: var(--color-border-strong); transform: none; }
.market-sector-value { font-family: var(--font-mono); font-size: var(--fs-h4); font-weight: 500; letter-spacing: -0.01em; margin-bottom: var(--space-2); color: var(--color-fg); }
.market-sector:nth-child(n) .market-sector-value { color: var(--color-fg); }
.market-sector-name { font-size: var(--fs-body-sm); font-weight: 600; margin-bottom: var(--space-1); }
.market-sector-desc { font-size: var(--fs-caption); color: var(--color-fg-subtle); }

.revenue-streams { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); margin-bottom: var(--space-12); }
.revenue-card { padding: var(--space-8); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); transition: border-color var(--dur-hover) var(--ease-out); }
.revenue-card:hover { border-color: var(--color-border-strong); transform: none; box-shadow: none; }
.revenue-card-phase { font-family: var(--font-mono); font-size: var(--fs-eyebrow); color: var(--color-fg-subtle); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-4); }
.revenue-card h3 { font-size: var(--fs-h4); font-weight: 600; margin-bottom: var(--space-2); }
.revenue-card-margin { font-size: var(--fs-body-sm); color: var(--color-accent); font-weight: 600; margin-bottom: var(--space-4); }
.revenue-card p { font-size: var(--fs-body-sm); color: var(--color-fg-muted); }

.financials { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.financial-year { padding: var(--space-8) var(--space-4); background: var(--color-surface); text-align: left; }
.financial-year-label { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--color-fg-subtle); margin-bottom: var(--space-3); }
.financial-year-revenue { font-family: var(--font-mono); font-size: var(--fs-h4); font-weight: 500; letter-spacing: -0.01em; color: var(--color-accent); -webkit-text-fill-color: currentColor; background: none; margin-bottom: var(--space-1); }
.financial-year-margin { font-size: var(--fs-caption); color: var(--color-fg-muted); }
.financial-year-driver { font-size: var(--fs-caption); color: var(--color-fg-subtle); margin-top: var(--space-2); }

.timeline { position: relative; padding-left: var(--space-12); max-width: 50rem; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--color-border-strong); }
.timeline-item { position: relative; padding-bottom: var(--space-12); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -40px; top: 4px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.timeline-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); }
.timeline-item:nth-child(n) .timeline-dot { background: transparent; }
.timeline-item:nth-child(n) .timeline-dot::after { background: var(--color-accent); }
.timeline-item h3 { font-size: var(--fs-h4); font-weight: 600; margin-bottom: var(--space-1); }
.timeline-item-period { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--color-fg-subtle); margin-bottom: var(--space-3); }
.timeline-item p { font-size: var(--fs-body); color: var(--color-fg-muted); }
.timeline-milestones { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--color-fg-subtle); }
.timeline-milestone { padding: 0; background: none; color: var(--color-fg-subtle); }

.moat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.moat-card { position: relative; padding: var(--space-12) var(--space-8); background: var(--color-surface); border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); transition: background var(--dur-hover) var(--ease-out); isolation: isolate; }
.moat-card::before { content: none; }
.moat-card:hover { background: var(--color-surface-sunk); }
.moat-card:nth-child(n) { --moat-color: var(--color-accent); --moat-rgb: var(--rust-rgb); }
.moat-card-number { font-family: var(--font-mono); font-size: var(--fs-caption); font-weight: 500; color: var(--color-accent); letter-spacing: 0.1em; margin-bottom: var(--space-6); display: flex; align-items: center; gap: var(--space-3); }
.moat-card-number::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.moat-card-mark { position: absolute; top: 24px; right: 28px; font-family: var(--font-mono); font-size: 64px; font-weight: 300; line-height: 1; color: var(--color-border); letter-spacing: -0.04em; pointer-events: none; }
.moat-card:hover .moat-card-mark { color: var(--color-border-strong); }
.moat-card h3 { font-size: var(--fs-h4); font-weight: 600; margin-bottom: var(--space-4); max-width: 90%; }
.moat-card p { font-size: var(--fs-body-sm); color: var(--color-fg-muted); }

.why-now-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); max-width: 56rem; margin: 0 auto; }
.why-now-card { display: flex; gap: var(--space-4); padding: var(--space-6); border: 0; border-top: 1px solid var(--color-border); background: none; border-radius: 0; }
.why-now-card:hover { border-color: var(--color-border); }
.why-now-card-number { flex-shrink: 0; width: auto; height: auto; border-radius: 0; background: none; color: var(--color-accent); font-family: var(--font-mono); font-size: var(--fs-body); font-weight: 500; }
.why-now-card h4 { font-size: var(--fs-body); font-weight: 600; margin-bottom: var(--space-1); }
.why-now-card p { font-size: var(--fs-body-sm); color: var(--color-fg-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .market-sectors { grid-template-columns: repeat(2, 1fr); }
  .revenue-streams { grid-template-columns: repeat(2, 1fr); }
  .financials { grid-template-columns: repeat(3, 1fr); }
  .science-grid { grid-template-columns: 1fr 1fr; }
  .moat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero-instrument { order: 2; }
  .stack-card { grid-template-columns: 1fr; gap: var(--space-8); }
  .embedding-card { grid-template-columns: auto 1fr; }
  .embedding-card-viz { grid-column: 1 / -1; order: 4 !important; height: 84px; }
  .embedding-card:nth-child(odd) .embedding-card-viz { order: 4; }
  .problem-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .science-grid { grid-template-columns: 1fr; border-top: 0; }
  .science-card { padding: var(--space-8) 0; border-top: 1px solid var(--color-border); border-bottom: 0; }
  .science-card::after { display: none; }
  .science-card:first-child { grid-row: auto; }
  .science-card:nth-child(2) { margin-top: 0; }
}

@media (max-width: 768px) {
  .section { padding-block: var(--space-20); }
  .section--hero, .hero { padding-block: var(--space-24) var(--space-20); }
  .container, .container-lg { padding-inline: var(--space-4); }

  .nav-inner { padding: 0 var(--space-4); gap: var(--space-3); }
  .nav-links { display: none; }
  .nav-logo { font-size: 1rem; gap: var(--space-2); }
  .nav-logo-icon { width: 28px; height: 28px; }

  .hero-title { max-width: 100%; }
  .hero-subtitle { max-width: 100%; }
  .hero-actions { gap: var(--space-6); }

  .ledger-row { grid-template-columns: 0.8fr 1.4fr; }
  .ledger-cell--consent, .ledger-row--head .ledger-cell:nth-child(3),
  .ledger-cell--trace, .ledger-row--head .ledger-cell:nth-child(4) { display: none; }

  .stack-card { padding-block: var(--space-8); }
  .stack-card-visual { height: 180px; }
  .moat-card { padding: var(--space-8); }

  .market-sectors { grid-template-columns: 1fr; }
  .revenue-streams { grid-template-columns: 1fr; }
  .financials { grid-template-columns: 1fr; }
  .moat-grid { grid-template-columns: 1fr; }
  .why-now-grid { grid-template-columns: 1fr; }

  .tech-pipeline { flex-direction: column; gap: var(--space-8); }
  .tech-pipeline::before { display: none; }
  .tech-step { text-align: left; display: flex; align-items: flex-start; gap: var(--space-4); }
  .tech-step-number { margin: 0; flex-shrink: 0; }
  .tech-step p { max-width: none; }

  .cta-section { padding-block: var(--space-24); }
  .cta-section::before { inset: var(--space-4); }
  .cta-content { margin-left: 0; }
  .cta-actions { gap: var(--space-6); }

  .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); text-align: left; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: var(--space-6); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    animation-timeline: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .grain { animation: none; opacity: 0.03; }
  .sc-trait-1 .sc-trait-1-bar { animation: none; transform: scaleY(0.6); }
}
