/* ═══════════════════════════════════════════════════════════════
   Cytognosis: Flagship Landing Page
   Built on the Cytognosis Design System v10.1 tokens.
   A scientific map built for human lives.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  /* page palette: warm light foundation */
  --bg:          var(--cg-lp-bg-soft);
  --bg-soft:     var(--cg-lp-bg-soft);
  --bg-section:  var(--surface-tint);
  --surface:     var(--cg-lp-surface);
  --ink:         var(--fg-1);
  --ink-2:       var(--fg-2);
  --muted:       var(--fg-3);
  --faint:       var(--fg-3);  /* text-safe: the design system's fg-4 is 2.5:1 on paper */
  --hair:        var(--border-1);
  --hair-soft:   var(--border-2);

  /* brand */
  --violet:      var(--cg-violet-600);
  --violet-deep: var(--cg-violet-800);
  --violet-300:  var(--cg-violet-300);
  --azure:       var(--cg-azure-600);
  --indigo:      var(--cg-indigo-600);
  --lavender:    var(--cg-violet-300);
  --teal:        var(--cg-teal-600);
  --coral:       var(--cg-coral-600);

  /* dark scientific surfaces */
  --night:       var(--cg-neutral-950);
  --night-2:     var(--cg-neutral-900);
  --night-card:  var(--cg-neutral-800);
  --abyss:       var(--cg-abyss);
  --on-night-1:  var(--cg-day-100);
  --on-night-2:  var(--cg-day-300);
  --on-night-3:  var(--cg-day-400);

  /* type: Space Grotesk is the display font per Design System v11.2.1
     (reverts the Jul 6 Inter patch, which was made against the superseded
     v10.1.0). Marketing headings render Space Grotesk weight 500; body is Inter. */
  --f-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body:    var(--reader-font, 'Inter'), system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-serif:   'Newsreader', 'Source Serif Pro', Georgia, serif;
  --f-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  --f-a11y: 'Lexend', 'Atkinson Hyperlegible', 'Inter', system-ui, sans-serif;

  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --maxw:      1180px;
  /* Calm motion overrides per §14 website profile (ND-first) */
  --dur-fast:  200ms;
  --dur-base:  320ms;
  --dur-slow:  520ms;
  --measure:   68ch;

  /* ── r2-shell: ND-friendly type scale + rhythm tokens ──────────
     Base body text targets ~18-20px (never below 18px) with roomier
     line-height; headings step up through a fluid clamp() scale so new
     sections get consistent, large section titles without hardcoding a
     fresh font-size per component. --measure above stays the
     constrained reading width for prose blocks (~68ch). */
  --fs-body:   clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);   /* ~18-20px */
  --fs-lead:   clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);        /* ~19-23px */
  --fs-h5:     clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
  --fs-h4:     clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  --fs-h3:     clamp(1.85rem, 1.55rem + 1.5vw, 2.4rem);
  --fs-h2:     clamp(2.1rem, 1.7rem + 2vw, 2.95rem);
  --fs-h1:     clamp(2.7rem, 2.1rem + 3vw, 4.25rem);
  --fs-nav:     clamp(1rem, 0.95rem + 0.25vw, 1.0625rem); /* r8 fix: nav read as primary nav (was 13.5px fixed), not fine print */

  /* Vertical rhythm + nav height. .section and .home-hero's viewport
     calc both read --nav-h so header growth never desyncs them. */
  --nav-h:          96px;
  --space-section:  clamp(64px, 8vw, 112px);
  --tap-min:        44px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--reader-lh, 1.65);
  letter-spacing: var(--reader-ls, normal);
  word-spacing: var(--reader-ws, normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }
::selection { background: color-mix(in srgb, var(--cg-violet-600) 18%, transparent); }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 4px; }
/* Dark regions (the Yar hero, the footer, .dark bands) take the lighter ring so it keeps 3:1 on ink. */
[data-theme="dark"] :focus-visible, .dark :focus-visible { outline-color: var(--cg-azure-300); }

/* Motion setting: handled by data-motion on <html> (see the site base layer in the tokens file). */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}

/* ── shared primitives ─────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 760px; }

.mono { font-family: var(--f-mono); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

.grad-text {
  background: linear-gradient(118deg, var(--azure) 0%, var(--violet) 52%, var(--indigo) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-violet);
  margin-bottom: 24px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--violet-300); }
.dark .eyebrow { color: var(--violet-300); }
.dark .eyebrow::before { background: color-mix(in srgb, var(--cg-violet-300) 50%, transparent); }

/* 96px desktop section rhythm per the live-site treatment delta (v11.2.1) */
.section { padding: var(--space-section) 0; position: relative; }
.section-head { max-width: 680px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-title {
  font-family: var(--f-display);
  font-size: var(--fs-h2); font-weight: 500;
  letter-spacing: -0.025em; line-height: 1.12; color: var(--ink);
  text-wrap: balance;
}
.section-title .serif { font-weight: 400; }
.section-sub {
  font-size: var(--fs-lead); color: var(--muted); line-height: 1.66;
  margin-top: 20px; max-width: var(--measure); font-weight: 400;
}

.dark { background: var(--night-2); color: var(--on-night-1); }
.dark .section-title { color: var(--on-night-1); }
.dark .section-sub { color: var(--on-night-2); }
/* Text roles that default to light-surface values, re-pointed for the ink section (AA on --night-2). */
.dark .figure-caption,
.dark .post-meta { color: var(--on-night-3); }
.dark .figure .figure-caption { color: var(--muted); } /* a .figure keeps its own light frame */
.dark .post-meta .tag,
.dark .values-more a,
.dark .section-cta { color: var(--violet-300); }
.dark .post-meta .sep { background: var(--on-night-3); }

/* ── buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 500; font-family: var(--f-body);
  padding: 13px 24px; border-radius: 11px; cursor: pointer; border: none;
  transition: transform var(--ease) 250ms, box-shadow var(--ease) 250ms, background 250ms, gap 250ms;
  min-height: 44px;
}
.btn .arr { transition: transform 250ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--violet); color: var(--on-ink); }
.btn-primary:hover { background: var(--cg-violet-700); transform: translateY(-2px); box-shadow: 0 14px 34px color-mix(in srgb, var(--cg-violet-600) 32%, transparent); }
.btn-ghost { background: transparent; color: var(--text-violet); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { gap: 13px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--violet); transform: translateY(-2px); box-shadow: 0 14px 34px color-mix(in srgb, var(--cg-violet-600) 28%, transparent); }
.btn-light { background: var(--on-night-1); color: var(--night); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 16px 40px color-mix(in srgb, var(--cg-violet-600) 40%, transparent); }
/* r-qa2: was pale-lavender text (var(--violet-300), var(--cg-violet-300)) on a
   near-invisible border -- ~2:1 contrast against the light --bg, read
   as disabled/decorative rather than a clickable secondary CTA (Team
   page "Join us" row: Careers / Partner with us / Join Our Community
   / Share Your Story). Dark-violet text on a light violet tint with a
   clearly visible border keeps this a distinct *secondary* button
   (vs. the solid-fill .btn-primary/.btn-ink) while clearing AA (>9:1
   against --bg var(--prim-color-paper-bg)). */
.btn-outline { background: color-mix(in srgb, var(--cg-violet-600) 8%, transparent); color: var(--text-violet-deep); border: 1.5px solid color-mix(in srgb, var(--cg-violet-600) 45%, transparent); }
.btn-outline:hover { border-color: var(--violet); background: color-mix(in srgb, var(--cg-violet-600) 16%, transparent); color: var(--text-violet); }

/* ── reveal animation base ─────────────────────────────────── */
.reveal { opacity: 1; transform: none; }
.animations-ready:not(.reduced-motion) .reveal { opacity: 0; transform: translateY(14px); }
.animations-ready:not(.reduced-motion) .reveal { transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.animations-ready:not(.reduced-motion) .reveal.in { opacity: 1; transform: none; }
.animations-ready:not(.reduced-motion) .reveal,
.hero-stage,
.hero-map,
.trip-anim svg,
.traj-svg-box svg,
.cmp-wipe {
  backface-visibility: hidden;
}
.reveal[data-d="1"] { transition-delay: 45ms; }
.reveal[data-d="2"] { transition-delay: 90ms; }
.reveal[data-d="3"] { transition-delay: 135ms; }
.reveal[data-d="4"] { transition-delay: 180ms; }
.reveal[data-d="5"] { transition-delay: 225ms; }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: sticky; top: 0; z-index: 200; min-height: var(--nav-h);
  padding: 12px 0;
  background: color-mix(in srgb, var(--cg-lp-bg-soft) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent; display: flex; align-items: center;
  transition: border-color 300ms, background 300ms;
}
.nav.scrolled { border-bottom-color: var(--hair); }
/* .nav is a flex row, so its .container (margin: 0 auto) shrank to its content and the
   logo sat inset from the page column. Full width keeps the header on the page grid. */
.nav > .container { width: 100%; }
/* flex-wrap is a safety net, not the primary responsive strategy: the
   dedicated 880px breakpoint below is what normally moves the nav to
   the hamburger before things crowd. Wrapping just means an unexpected
   width (browser zoom, larger-text mode, a long localized name in the
   sign-in chip) grows the bar to two rows instead of overlapping. */
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px 18px; flex-wrap: wrap; }
.nav-logo { display: inline-flex; }
.nav-logo img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.nav-links a { font-family: var(--f-body); font-size: var(--fs-nav); font-weight: 500; color: var(--ink-2); transition: color 220ms; position: relative; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:not(.nav-cta)::after { content:''; position:absolute; left:0; bottom:7px; width:0; height:1.5px; background: var(--violet); transition: width 260ms var(--ease); }
.nav-links a:not(.nav-cta):hover { color: var(--text-violet); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a.active:not(.nav-cta) { color: var(--text-violet); }
.nav-links a.active:not(.nav-cta)::after { width: 100%; }
.nav-cta { background: var(--ink); color: var(--bg) !important; padding: 8px 16px; border-radius: 8px; font-family: var(--f-body); font-size: var(--fs-nav); font-weight: 500; transition: all 220ms; white-space: nowrap; }
.nav-cta:hover { background: var(--violet); transform: translateY(-1px); }
.nav-cta.active { background: var(--violet); box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--cg-indigo-600) 55%, transparent); }
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); background: none; border: none; cursor: pointer; padding: 0; border-radius: 10px; }
.nav-toggle:hover { background: color-mix(in srgb, var(--cg-indigo-600) 8%, transparent); }
/* Three evenly-spaced bars (r7-mobile fix): without flex-direction: column
   above, the row-flex default laid these three spans out side by side
   instead of stacked, so the "hamburger" rendered as one solid-looking
   line. Width bumped 22->24px to match the ~24px icon spec; height/margin
   are untouched because the open-state translateY(6.6px) transforms below
   are computed from them (5px margin + 1.6px height = 6.6px) -- changing
   those would misalign the X. */
.nav-toggle span { display: block; width: 24px; height: 1.6px; background: var(--ink); margin: 5px 0; transition: 250ms; border-radius: 1px; }

/* ═══════════════ HERO ═══════════════ */
.hero { position: relative; padding: 64px 0 96px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg .glow-a { position: absolute; top: -160px; right: -120px; width: 620px; height: 620px;
  background: radial-gradient(circle, color-mix(in srgb, var(--cg-violet-600) 13%, transparent) 0%, transparent 66%); }
.hero-bg .glow-b { position: absolute; bottom: -200px; left: -140px; width: 560px; height: 560px;
  background: radial-gradient(circle, color-mix(in srgb, var(--cg-azure-600) 10%, transparent) 0%, transparent 66%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(2.7rem, 4.6vw, 4rem); font-weight: 500; line-height: 1.04;
  letter-spacing: -0.035em; color: var(--ink); margin-bottom: 26px; text-wrap: balance;
}
.hero-title .serif { letter-spacing: -0.02em; }
.hero-sub { font-size: 18.5px; color: var(--ink-2); line-height: 1.62; max-width: 500px; margin-bottom: 16px; }
.hero-note { font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--muted); line-height: 1.6; max-width: 460px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 38px; }
.hero-trust { display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.trust-item svg { flex-shrink: 0; }

/* hero visual: portrait + animated coordinate map + glass cards */
.hero-visual { position: relative; }
.hero-stage { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, var(--surface-tint), var(--surface-tint)); box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--cg-indigo-600) 34%, transparent); aspect-ratio: 4 / 4.6; contain: paint; }
.hero-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 54% 38%; }
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; mix-blend-mode: normal; }
.hero-vignette { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--cg-indigo-950) 30%, transparent) 0%, transparent 38%), linear-gradient(115deg, color-mix(in srgb, var(--cg-violet-600) 10%, transparent), transparent 50%); }

.hero-badge {
  position: absolute; top: 18px; left: 18px; z-index: 5;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  background: color-mix(in srgb, var(--bg-2) 72%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--on-ink) 90%, transparent); border-radius: 9999px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-2);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--cg-indigo-600) 14%, transparent);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cg-teal-600) 22%, transparent); }

.glass-card {
  position: absolute; z-index: 5;
  background: color-mix(in srgb, var(--bg-2) 74%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--on-ink) 92%, transparent); border-radius: 15px; padding: 14px 16px;
  box-shadow: 0 18px 46px -12px color-mix(in srgb, var(--cg-indigo-600) 30%, transparent);
}
.gc-coord { right: 18px; top: 28%; width: 210px; }
.gc-axes  { left: 18px; bottom: 26px; width: 224px; }
.gc-label { font-family: var(--f-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-violet); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.gc-label .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.gc-coord .val { font-family: var(--f-mono); font-size: 13px; color: var(--ink); }
.gc-coord .val span { color: var(--text-violet); }
.gc-sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* mini axis bars inside glass card */
.axis-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.axis-row:last-child { margin-bottom: 0; }
.axis-name { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.04em; color: var(--muted); width: 58px; text-transform: uppercase; }
.axis-track { flex: 1; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--cg-indigo-600) 12%, transparent); overflow: hidden; }
.axis-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--cg-azure-400), var(--violet)); width: 0; transition: width 1100ms var(--ease); }

/* ═══════════════ NARRATIVE QUOTE STRIP ═══════════════ */
.quote-strip { background: var(--bg-soft); border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft); padding: 92px 0; }
.quote-strip .container { text-align: center; }
.bigquote { font-family: var(--f-serif); font-style: normal; font-size: clamp(1.55rem, 2.9vw, 2.2rem); font-weight: 300; line-height: 1.44; color: var(--ink-2); letter-spacing: -0.01em; max-width: 880px; margin: 0 auto; text-wrap: balance; }
.bigquote em { font-style: italic; color: var(--text-violet); }
.quote-attr { margin-top: 28px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ═══════════════ ORIGIN / STORY ═══════════════ */
.origin { background: var(--bg); }
.origin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.origin-copy p { font-size: 17px; color: var(--ink-2); line-height: 1.7; margin-bottom: 18px; max-width: 50ch; }
.origin-copy p.lead { font-family: var(--f-serif); font-style: italic; font-size: 22px; color: var(--ink); line-height: 1.5; margin-bottom: 24px; }
.origin-copy .pull { font-size: 15px; color: var(--muted); border-left: 2px solid var(--violet-300); padding-left: 18px; margin-top: 28px; }

/* maze-to-map SVG figure. r-chainB: hosts the checksum-pinned Website
   Template's viz/maze-map.js module (see landing/viz-panels.css), whose
   stroke colors (--cg-violet-400/--cg-indigo-300/--cg-day-50 etc.) are
   designed for the template's dark viz-panel treatment, not this site's
   light --bg-soft. Background swapped to the template's own dark
   neutral so the figure reads with correct contrast; scoped to this one
   figure only, not a site-wide theme change. */
.maze-figure { position: relative; border-radius: 18px; overflow: hidden; background: var(--cg-neutral-900, var(--cg-neutral-900)); border: 1px solid var(--hair); aspect-ratio: 1 / 1; }
.maze-figure svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.maze-caption { position: absolute; left: 20px; bottom: 18px; display: flex; gap: 22px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cg-day-300, var(--cg-day-300)); z-index: 4; }
.maze-caption b { color: var(--cg-violet-300, var(--cg-violet-300)); font-weight: 600; }

/* ═══════════════ PROBLEM ═══════════════ */
.problem { background: var(--bg-section); }
.cmp-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; margin-bottom: 60px; padding: 24px 30px; background: var(--bg-soft); border: 1px solid var(--hair); border-radius: 16px; position: relative; overflow: hidden; }
.cmp-bar > :not(.cmp-wipe) { position: relative; z-index: 1; }
.cmp-wipe { position: absolute; inset: 0; z-index: 0; pointer-events: none; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, color-mix(in srgb, var(--cg-violet-600) 8%, transparent), color-mix(in srgb, var(--cg-teal-600) 10%, transparent), color-mix(in srgb, var(--cg-violet-600) 3%, transparent)); }
.animations-ready:not(.reduced-motion) .cmp-wipe { transition: transform 620ms var(--ease); }
.animations-ready:not(.reduced-motion) .cmp-bar.in .cmp-wipe { transform: scaleX(1); }
.cmp-side { display: flex; flex-direction: column; gap: 4px; }
.cmp-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.cmp-head { font-family: var(--f-display); font-size: 19px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.cmp-side.to .cmp-head { color: var(--text-violet); }
.cmp-arrow { color: var(--text-violet); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.soft-card { background: var(--bg-soft); border: 1px solid var(--hair); border-radius: 16px; padding: 30px 28px; transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), border-color 320ms; }
.soft-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -18px color-mix(in srgb, var(--cg-indigo-600) 26%, transparent); border-color: color-mix(in srgb, var(--cg-violet-600) 22%, transparent); }
.sc-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--cg-violet-600) 13%, transparent), color-mix(in srgb, var(--cg-azure-600) 10%, transparent)); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.sc-title { font-family: var(--f-display); font-size: 18px; font-weight: 500; margin-bottom: 11px; letter-spacing: -0.01em; color: var(--ink); }
.sc-body { font-size: 14.5px; color: var(--muted); line-height: 1.62; }

/* ═══════════════ DISEASE AS TRAJECTORY (DARK) ═══════════════ */
.trajectory { background: var(--night-2); overflow: hidden; }
.trajectory::before { content:''; position:absolute; top:-10%; left:50%; transform:translateX(-50%); width:90%; height:60%; background: radial-gradient(ellipse, color-mix(in srgb, var(--cg-violet-600) 14%, transparent) 0%, transparent 68%); pointer-events:none; }
.traj-layout { position: relative; z-index: 1; }
.traj-head { max-width: 720px; margin-bottom: 52px; }
.traj-statement { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 300; line-height: 1.5; color: var(--on-night-1); margin-top: 22px; max-width: 60ch; }
.traj-statement b { font-style: normal; font-weight: 500; color: var(--violet-300); }

.traj-chart-wrap { background: color-mix(in srgb, var(--on-ink) 2%, transparent); border: 1px solid color-mix(in srgb, var(--cg-indigo-300) 16%, transparent); border-radius: 20px; padding: 34px 36px 28px; position: relative; box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--cg-abyss) 50%, transparent); }
.traj-chart-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.traj-chart-title { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-night-3); }
.traj-legend { display: flex; gap: 18px; flex-wrap: wrap; }
.leg { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 10.5px; color: var(--on-night-2); }
.leg .swatch { width: 14px; height: 3px; border-radius: 2px; }
.traj-svg-box { position: relative; width: 100%; }
.traj-svg-box svg { width: 100%; height: auto; }
.traj-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--cg-indigo-300) 12%, transparent); }
.tf-item .tf-num { font-family: var(--f-display); font-size: 30px; font-weight: 500; color: var(--on-night-1); letter-spacing: -0.02em; line-height: 1; }
.tf-item .tf-num .u { font-size: 16px; color: var(--violet-300); }
.tf-item .tf-lbl { font-size: 12.5px; color: var(--on-night-3); margin-top: 8px; line-height: 1.4; }

/* ═══════════════ PLATFORM TRIPTYCH ═══════════════ */
.platform { background: var(--bg); }
.trip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trip-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 0; overflow: hidden; transition: transform 360ms var(--ease), box-shadow 360ms var(--ease), border-color 360ms; display: flex; flex-direction: column; }
.trip-card:hover { transform: translateY(-5px); box-shadow: 0 28px 60px -24px color-mix(in srgb, var(--cg-indigo-600) 30%, transparent); border-color: color-mix(in srgb, var(--cg-violet-600) 22%, transparent); }
.trip-anim { height: 168px; position: relative; overflow: hidden; background: linear-gradient(165deg, var(--surface-tint), var(--surface-tint)); border-bottom: 1px solid var(--hair-soft); contain: paint; }
.trip-anim svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trip-body { padding: 26px 26px 30px; }
.trip-name-row { display: flex; align-items: baseline; gap: 11px; margin-bottom: 6px; }
.trip-name { font-family: var(--f-display); font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.trip-metaphor { font-family: var(--f-serif); font-style: italic; font-size: 15px; color: var(--text-violet); }
.trip-role { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 13px; }
.trip-desc { font-size: 14.5px; color: var(--muted); line-height: 1.62; }
.engine-row { margin-top: 22px; display: flex; align-items: center; gap: 20px; padding: 22px 28px; background: var(--night-2); border-radius: 16px; color: var(--on-night-1); flex-wrap: wrap; }
.engine-row .er-mark { width: 46px; height: 46px; flex-shrink: 0; }
.engine-row .er-text { flex: 1; min-width: 220px; }
.engine-row .er-name { font-family: var(--f-display); font-size: 18px; font-weight: 500; }
.engine-row .er-name .serif { color: var(--violet-300); font-size: 16px; }
.engine-row .er-desc { font-size: 13.5px; color: var(--on-night-2); margin-top: 4px; line-height: 1.55; }
.engine-row .er-meta { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-3); }

/* ═══════════════ SCIENTIFIC LAYERS / STACK ═══════════════ */
.layers { background: var(--bg-soft); }
.layers-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 64px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; perspective: 1200px; }
.layer { display: flex; align-items: center; gap: 18px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--cg-indigo-600) 22%, transparent); transition: transform 360ms var(--ease), box-shadow 360ms var(--ease); }
.layer:hover { transform: translateX(8px); box-shadow: 0 18px 44px -18px color-mix(in srgb, var(--cg-indigo-600) 30%, transparent); }
.layer-ico { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cg-violet-600) 10%, transparent); }
.layer-txt .lt-title { font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.layer-txt .lt-meta { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--faint); margin-top: 3px; text-transform: uppercase; }
.layer .lt-depth { margin-left: auto; font-family: var(--f-mono); font-size: 10px; color: var(--text-violet); opacity: 0.7; }

/* ═══════════════ PSYCHOVERSE (DARK) ═══════════════ */
.neuro { background: var(--night); overflow: hidden; }
.neuro::before { content:''; position:absolute; top:0; right:-5%; width:55%; height:100%; background: radial-gradient(ellipse at 70% 30%, color-mix(in srgb, var(--cg-violet-600) 16%, transparent) 0%, transparent 62%); pointer-events:none; }
.neuro-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.neuro-visual { position: relative; }
.neuro-brain-wrap { position: relative; border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, var(--cg-neutral-800), var(--cg-abyss)); border: 1px solid color-mix(in srgb, var(--cg-indigo-300) 14%, transparent); }
.neuro-brain { width: 100%; mix-blend-mode: screen; opacity: 0.96; }
.neuro-scales { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.nscale { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: color-mix(in srgb, var(--on-ink) 3%, transparent); border: 1px solid color-mix(in srgb, var(--cg-indigo-300) 13%, transparent); border-radius: 12px; }
.nscale .ns-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet-300); width: 54px; flex-shrink: 0; }
.nscale .ns-body { font-size: 13.5px; color: var(--on-night-2); line-height: 1.5; }
.nscale .ns-body b { color: var(--on-night-1); font-weight: 600; }
.neuro-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 9px 15px; border-radius: 9999px; background: color-mix(in srgb, var(--cg-teal-600) 10%, transparent); border: 1px solid color-mix(in srgb, var(--cg-teal-600) 30%, transparent); font-family: var(--f-mono); font-size: 11px; color: var(--cg-teal-300); }

/* ═══════════════ OPEN SCIENCE ═══════════════ */
.openscience { background: var(--bg); }
.os-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 18px; overflow: hidden; }
.os-cell { background: var(--bg-soft); padding: 32px 28px; transition: background 300ms; }
.os-cell:hover { background: var(--surface); }
.os-ico { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--cg-violet-600) 9%, transparent); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.os-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 9px; letter-spacing: -0.01em; }
.os-body { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ═══════════════ SAFETY ═══════════════ */
.safety { background: var(--bg-section); }
.safety-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 68px; align-items: start; }
.safety-statement { font-family: var(--f-serif); font-size: 21px; color: var(--ink-2); line-height: 1.6; font-weight: 300; }
.safety-statement em { font-style: italic; color: var(--text-violet); }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* number in its own column, title above text in the other (the markup has no wrapper; a flex row put all three side by side and overflowed phones) */
.principle { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 13px; row-gap: 6px; padding: 20px 20px; background: var(--bg-soft); border: 1px solid var(--hair); border-radius: 14px; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.principle > .pr-num { grid-row: 1 / span 2; }
.principle > h3, .principle > p { grid-column: 2; margin: 0; }
.principle:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -16px color-mix(in srgb, var(--cg-indigo-600) 24%, transparent); }
.p-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cg-teal-600) 16%, transparent); }
.p-body { font-size: 14px; color: var(--muted); line-height: 1.55; }
.p-body strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

/* ═══════════════ CLOSING (DARK) ═══════════════ */
.closing { background: var(--night-2); position: relative; overflow: hidden; text-align: center; }
.closing::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse 62% 80% at 50% -5%, color-mix(in srgb, var(--cg-violet-600) 22%, transparent) 0%, transparent 66%); pointer-events:none; }
.closing-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.closing-title { font-family: var(--f-display); font-size: clamp(2.2rem, 3.6vw, 3.1rem); font-weight: 500; color: var(--on-night-1); letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 22px; text-wrap: balance; }
.closing-title .serif { color: var(--violet-300); }
.closing-sub { font-size: 18px; color: var(--on-night-2); margin: 0 auto 38px; line-height: 1.62; max-width: 540px; }
.closing-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════ FOOTER ═══════════════ */
/* The footer is a dark region (data-theme="dark" in the markup): text roles come from the
   Template's dark theme, so every line clears AA on the abyss surface in light and dark pages. */
.footer { background: var(--abyss); padding: 64px 0 40px; color: var(--tpl-text-2); }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 38px; border-bottom: 1px solid var(--tpl-border-soft); margin-bottom: 28px; }
.footer-brand { max-width: 320px; }
.footer-logo { height: 28px; margin-bottom: 18px; }
.footer-tag { font-family: var(--f-serif); font-style: italic; font-size: 15.5px; color: var(--cg-violet-300); line-height: 1.55; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col-title { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tpl-muted); margin-bottom: 15px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--tpl-text-2); margin-bottom: 10px; transition: color 200ms; }
.footer-col a:hover { color: var(--violet-300); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-sitemap { padding-bottom: 38px; border-bottom: 1px solid var(--tpl-border-soft); margin-bottom: 28px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-meta { font-family: var(--f-mono); font-size: 11px; color: var(--tpl-muted); letter-spacing: 0.03em; }
.footer-meta a { color: var(--tpl-text-2); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta a:hover { color: var(--cg-violet-300); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1000px) {
  .hero-inner, .origin-grid, .layers-grid, .neuro-grid, .safety-grid { grid-template-columns: 1fr; gap: 48px; }
  .trip, .cards-3, .os-grid { grid-template-columns: 1fr; }
  .os-grid { gap: 1px; }
  .principles { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .neuro-visual { max-width: 480px; }
}
@media (max-width: 720px) {
  .container { padding: 0 22px; }
  .footer-cols { flex-direction: column; gap: 30px; }
  .hero { padding: 36px 0 64px; }
  .hero-inner { gap: 24px; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 2.7rem); margin-bottom: 18px; }
  .hero-sub { font-size: 16.5px; line-height: 1.55; margin-bottom: 22px; }
  .hero-note { display: none; }
  .hero-actions { margin-bottom: 0; }
  .hero-trust { display: none; }
  .cmp-bar { grid-template-columns: 1fr; gap: 16px; text-align: left; }
  .cmp-arrow { transform: rotate(90deg); }
  .traj-foot { grid-template-columns: 1fr 1fr; gap: 22px; }
  .gc-coord, .gc-axes { display: none; }
  .hero-stage { aspect-ratio: 4 / 4.2; }
  .traj-chart-wrap { padding: 22px 18px; }
}

/* Collapse the primary nav to the hamburger earlier than the general
   720px content breakpoint: once the sign-in control and the
   repositioned a11y trigger sit next to a five-item nav (see
   header-controls in site-extend.css), ~880px is where they start
   crowding the bar. Kept as its own query instead of widening the
   720px block above so unrelated content spacing doesn't shift
   earlier than it needs to. */
@media (max-width: 880px) {
  /* r6-mobile: #navLinks (and its dropdowns/submenus) no longer opens
     in-place below the header -- initMobileDrawer() in
     landing/site.js (or Header() in LandingPage.jsx for the React
     shell) reparents/renders it into the off-canvas drawer instead
     (see .nav-drawer* rules in site-extend.css). This just keeps
     #navLinks hidden here in its original header slot; it is only
     ever shown once moved into the drawer. */
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
}

/* Extra-narrow phones: shrink the lockup and go icon-only on the
   sign-in control so the brand lockup + header controls never exceed
   a ~360px viewport. */
@media (max-width: 400px) {
  .nav-logo img { height: 34px; }
  .header-controls { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { scroll-behavior: auto !important; }
}

/* Display settings (theme, contrast, motion, reader) are tokens on <html>; see vendor/design-tokens-v13 and landing/prefs.js. */
