/* ═══════════════════════════════════════════════════════════════════════════
   RealPosed — landing page
   Navy and brand blue from the official mark. STIX Two (the typeface of
   mathematical publishing) for display, Inter for everything else.
   One rule: a bordered panel means you can touch it. Everything else is type.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:      #040d14;
  --bg-2:    #07131f;
  --bg-3:    #0b1b2b;
  --blue:    #1264a4;
  --blue-2:  #1b7fd1;
  --sky:     #5eb3f2;
  --ice:     #c9e6ff;
  --amber:   #f2b84b;
  --warn:    #ff7a5c;
  --text:    #edf4fa;
  --text-2:  #a7bbcf;
  --muted:   #6b8197;
  --line:    rgba(140, 190, 240, 0.10);
  --line-2:  rgba(140, 190, 240, 0.22);
  --surface: rgba(94, 179, 242, 0.04);

  --display: 'STIX Two Text', 'Times New Roman', serif;
  --font:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1180px;
  --gutter: 24px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }

::selection { background: rgba(94, 179, 242, 0.35); color: #fff; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--sky);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Blueprint sheet ──────────────────────────────────
   The grid behind the page. initBlueprint() sets its geometry so the major lines frame the
   container (content edges fall mid-cell, clear of box edges) and a major line runs along the
   bottom of the hero; the sheet fades out past the container. Opaque surfaces (hero, panels,
   footer) sit on top of it. The canvas above it draws the mesh refinement around the cursor. */
:root { --bp-cell: 48px; --bp-major: 192px; --bp-x: 0px; --bp-y: 0px; --bp-w: 100vw; --bp-plus: none; }
body { position: relative; }
.blueprint {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    var(--bp-plus),
    linear-gradient(to right, rgba(94, 179, 242, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(94, 179, 242, 0.085) 1px, transparent 1px),
    linear-gradient(to right, rgba(94, 179, 242, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(94, 179, 242, 0.05) 1px, transparent 1px);
  background-size:
    var(--bp-major) var(--bp-major), var(--bp-major) var(--bp-major), var(--bp-major) var(--bp-major),
    var(--bp-cell) var(--bp-cell), var(--bp-cell) var(--bp-cell);
  background-position: var(--bp-x) var(--bp-y);
  --bp-mask: linear-gradient(90deg, transparent calc(var(--bp-x) - 180px), #000 var(--bp-x), #000 calc(var(--bp-x) + var(--bp-w)), transparent calc(var(--bp-x) + var(--bp-w) + 180px));
  -webkit-mask-image: var(--bp-mask);
  mask-image: var(--bp-mask);
}
.amr { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ── Type ───────────────────────────────────────────── */
h1, h2, .manifesto-text {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  max-width: 22ch;
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h4 { font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
.lede {
  color: var(--text-2);
  font-size: 1.06rem;
  max-width: 58ch;
  margin-top: 20px;
  text-wrap: pretty;
}
.hint {
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn-sm { padding: 0.55rem 1rem; font-size: 0.86rem; }
.btn-primary { color: #fff; background: var(--blue); }
.btn-primary:hover { background: var(--blue-2); box-shadow: 0 8px 28px -12px rgba(27, 127, 209, 0.9); }
.btn-ghost { color: var(--text); border-color: var(--line-2); background: rgba(94, 179, 242, 0.04); }
.btn-ghost:hover { border-color: rgba(140, 190, 240, 0.45); background: rgba(94, 179, 242, 0.09); }

/* ── Chips (toggles) ────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: var(--text); border-color: rgba(140, 190, 240, 0.45); }
.chip[aria-pressed="true"] { color: var(--ice); border-color: var(--sky); background: rgba(94, 179, 242, 0.14); }
.control-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Instruments: the only boxed things on the page ─── */
.instrument {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.instrument-label, .corner-hint, .corner-eq {
  position: absolute;
  font-size: 0.74rem;
  pointer-events: none;
}
.instrument-label { left: 14px; top: 12px; color: var(--sky); font-weight: 500; }
.corner-hint { left: 14px; bottom: 11px; color: var(--text-2); opacity: 0; transition: opacity 0.3s; }
.corner-hint-top { bottom: auto; top: 12px; }            /* for cards whose canvas uses its bottom edge */
.card:hover .corner-hint, .toy:hover .corner-hint { opacity: 1; }
.corner-eq { right: 14px; top: 12px; font-family: var(--mono); color: var(--muted); }
.corner-eq sub { font-size: 0.72em; line-height: 0; vertical-align: -0.25em; }
.instrument-title { font-size: 0.86rem; font-weight: 500; color: var(--text-2); margin-bottom: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Nav
   ═══════════════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: padding 0.4s var(--ease), background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(4, 13, 20, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand { display: block; flex-shrink: 0; }
.nav-logo { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: rgba(94, 179, 242, 0.1); }
.nav-links-mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav.open .nav-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child  { top: 20px; transform: rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 96px;
  background: var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 13, 20, 0.5) 0%, rgba(4, 13, 20, 0.22) 45%, rgba(4, 13, 20, 0) 70%),
    linear-gradient(to bottom, rgba(4, 13, 20, 0.55), transparent 18%, transparent 80%, var(--bg) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  pointer-events: none;
}
.hero-inner a, .hero-inner button { pointer-events: auto; }

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.04;
  max-width: 15ch;
}

/* ── Written headings: glyph outlines are traced, then the letters fill in.
      The real text stays in the DOM (transparent while the overlay plays). ── */
[data-write] { position: relative; font-variant-ligatures: none; }   /* so overlay glyphs match the text's glyphs */
[data-write].writing > span { color: transparent; }
.write {
  position: absolute;
  left: 0; top: 0;
  overflow: visible;
  pointer-events: none;
  transition: opacity 0.25s;
}
.write.done { opacity: 0; }
.write text {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2px;          /* clipped to the glyph interior, so 1px shows */
  stroke-linejoin: round;
  paint-order: stroke;
}
.write tspan {
  fill-opacity: 0;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: write-trace 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards, write-ink 0.45s ease-out forwards;
}
.write clipPath tspan { animation: none; }
.hero-sub {
  margin-top: 28px;
  max-width: 52ch;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: var(--text-2);
  text-wrap: pretty;
  animation: fade-up 1s var(--ease) 0.6s both;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
  animation: fade-up 1s var(--ease) 0.75s both;
}

.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  animation: fade-up 1.4s var(--ease) 0.3s both;
}
.mark {
  width: min(100%, 360px);
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
}
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-mark.gl .mark svg { visibility: hidden; }        /* the WebGL globe replaces the SVG mark */
.mark .waves { animation: flow 8s linear infinite; }
.hero-mark:hover .mark .waves { animation-duration: 3.5s; }
.mark-glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(27, 127, 209, 0.28), rgba(27, 127, 209, 0.06) 55%, transparent 72%);
  filter: blur(22px);
  pointer-events: none;
}

.hero-hud, .hero-hint {
  position: absolute;
  bottom: 26px;
  z-index: 2;
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  pointer-events: none;
  animation: fade-up 1s var(--ease) 1.1s both;
}
.hero-hud { left: var(--gutter); display: flex; gap: 18px; font-family: var(--mono); }
.hero-hud b { color: var(--text-2); font-weight: 500; }
.hero-hint { right: var(--gutter); }

/* ═══════════════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════════════ */
.section { padding: 128px 0; position: relative; }
.section-head { margin-bottom: 56px; }
.section-alt { background: rgba(7, 19, 31, 0.8); border-block: 1px solid var(--line); }   /* lets the sheet show through, quieter */

/* ── Pillars: three columns of type ─────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.pillar { padding-top: 22px; border-top: 1px solid var(--line-2); }
.pillar h3 { font-size: 1.3rem; }
.pillar p { margin-top: 12px; color: var(--text-2); }

/* ── Pipeline ───────────────────────────────────────── */
.pipeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: start;
}
.pipeline-intro { position: sticky; top: calc(var(--nav-h) + 32px); }
.stage-wrap { margin-top: 32px; aspect-ratio: 16 / 10; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0 0 0 44px;
  position: relative;
}
.steps::before, .steps::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  width: 2px;
  border-radius: 2px;
}
.steps::before { bottom: 0; background: var(--line); }
.steps::after {
  height: var(--progress, 0%);
  background: linear-gradient(var(--sky), var(--blue));
}
.step {
  position: relative;
  padding: 8px 0 40px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  opacity: 0.45;
  cursor: default;
  transition: opacity 0.5s var(--ease);
}
.step.active { opacity: 1; }
.step::before {
  content: '';
  position: absolute;
  z-index: 1;                 /* above the rail, which is painted after the steps */
  left: -39px;
  top: 14px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--line-2);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.step.active::before {
  background: var(--sky);
  border-color: var(--sky);
  box-shadow: 0 0 0 5px rgba(94, 179, 242, 0.16);
}
.step-num {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--muted);
  line-height: 1.35;
  transition: color 0.4s;
}
.step.active .step-num { color: var(--sky); }
.step-body p { margin-top: 6px; color: var(--text-2); max-width: 48ch; }

/* ── Engine and industry cards (instruments) ────────── */
.bento, .toys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card-lg, .card-wide { grid-column: span 2; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.card-visual {
  position: relative;
  height: 200px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card-lg .card-visual { height: 230px; }
.card-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.card-body { padding: 20px 22px 24px; }
.card-body p { margin-top: 8px; color: var(--text-2); font-size: 0.95rem; }

.card-visual-cloud { padding: 22px; align-content: center; }
.cloud {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.cloud li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--text-2);
}

/* ── Resolve finer ──────────────────────────────────── */
.resolve-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.compare {
  aspect-ratio: 278 / 286;
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  --pos: 50%;
}
.compare canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.compare .cmp-top { clip-path: inset(0 0 0 var(--pos)); }
.cmp-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.cmp-handle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(4, 13, 20, 0.85);
  border: 1.5px solid #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 7l-4 5 4 5M16 7l4 5-4 5'/></svg>");
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}
.cmp-label {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  color: var(--text);
  background: rgba(4, 13, 20, 0.72);
  pointer-events: none;
}
.cmp-label-l { left: 12px; }
.cmp-label-r { right: 12px; }
.cmp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.readout { font-size: 0.82rem; color: var(--muted); }
.readout b { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
  margin-top: 36px;
}
.stat { padding-top: 14px; border-top: 1px solid var(--line-2); }
.stat dt { font-size: 0.86rem; color: var(--muted); }
.stat dd {
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 2.6vw, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* ── Lab ────────────────────────────────────────────── */
.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
.controls { margin-top: 32px; display: grid; gap: 20px; padding: 22px; }
.control { display: grid; gap: 10px; }
.control-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
  color: var(--text-2);
}
.control-head output { font-family: var(--mono); font-size: 0.8rem; color: var(--sky); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky) var(--fill, 0%), rgba(140, 190, 240, 0.14) var(--fill, 0%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--line-2);
}
input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--line-2);
}
input[type="range"]:focus-visible { outline-offset: 8px; }
input[type="range"]:disabled { opacity: 0.35; cursor: default; }

.panel-head, .panel-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  font-size: 0.8rem;
  color: var(--text-2);
}
.panel-head { border-bottom: 1px solid var(--line); justify-content: space-between; }
.panel-foot { border-top: 1px solid var(--line); flex-wrap: wrap; }
.panel-title { font-family: var(--mono); color: var(--text); font-size: 0.78rem; }
.panel-body { position: relative; }
#lab-canvas { width: 100%; aspect-ratio: 16 / 10; }
.panel-foot .readout { margin-left: auto; }
.panel-foot .readout + .readout { margin-left: 0; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.76rem;
  font-weight: 500;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status[data-state="stable"]   { color: var(--sky);   border-color: rgba(94, 179, 242, 0.45); background: rgba(94, 179, 242, 0.08); }
.status[data-state="unstable"] { color: var(--amber); border-color: rgba(242, 184, 75, 0.4);  background: rgba(242, 184, 75, 0.08); }
.status[data-state="blowup"]   { color: var(--warn);  border-color: rgba(255, 122, 92, 0.45); background: rgba(255, 122, 92, 0.08); }

.legend { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 14px; height: 2px; border-radius: 2px; }
.sw-truth { background: var(--text-2); opacity: 0.6; }
.sw-data  { background: var(--blue-2); }
.sw-rec   { background: var(--ice); }

/* ── Research ───────────────────────────────────────── */
.lineage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 72px;
}
.lineage-col h3 { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); font-size: 1.05rem; }
.lineage ol { list-style: none; padding: 0; display: grid; }
.lineage li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}
.lineage li:last-child { border-bottom: 0; }
.lineage li b { font-weight: 500; font-size: 0.82rem; color: var(--sky); padding-top: 2px; font-variant-numeric: tabular-nums; }
.lineage li span { color: var(--text-2); }
.lineage li span strong { color: var(--text); font-weight: 600; }

.pubs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pubs { display: grid; border-top: 1px solid var(--line-2); }
.pub {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub.hide { display: none; }
.pub-venue { font-size: 0.84rem; color: var(--sky); font-weight: 500; }
.pub p { margin-top: 3px; font-size: 0.86rem; color: var(--muted); }

/* Paper titles and founder names link out; the underline appears on hover. */
.pub h4 a, .person h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}
.pub h4 a:hover, .person h3 a:hover { text-decoration-color: var(--sky); }

/* ── Team ───────────────────────────────────────────── */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}
.person { padding-top: 22px; border-top: 1px solid var(--line-2); }
.person-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  --head-h: calc(1.6rem * 1.2 + 0.92rem * 1.6 + 4px);   /* name line + role line + their gap */
}
.person-photo {
  flex: none;
  width: var(--head-h);
  height: var(--head-h);      /* exactly as tall as the name + role beside it */
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-2);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: -0.01em; line-height: 1.2; }
.person-role { margin-top: 4px; color: var(--sky); font-size: 0.92rem; font-weight: 500; line-height: 1.6; }
.person-bio { margin-top: 16px; color: var(--text-2); font-size: 0.95rem; }

/* ── The name ───────────────────────────────────────── */
.manifesto { height: 210vh; position: relative; }
.manifesto-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(50% 50% at 15% 30%, rgba(27, 127, 209, 0.12), transparent 70%),
    radial-gradient(45% 45% at 85% 75%, rgba(94, 179, 242, 0.08), transparent 70%);
}
.manifesto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 56px;
  align-items: center;
}
.manifesto-text {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.06;
  max-width: 14ch;
}
.manifesto-text span { opacity: 0.14; transition: opacity 0.3s; }
.manifesto-text span.on { opacity: 1; }
.manifesto-text span.on.hi { color: var(--sky); }
.manifesto-sub { margin-top: 26px; max-width: 42ch; color: var(--text-2); font-size: 1.05rem; }

.hadamard { padding: 24px; }
.switches { display: grid; gap: 14px; }
.switch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-2);
  text-align: left;
}
.switch .knob {
  position: relative;
  flex-shrink: 0;
  width: 40px; height: 22px;
  border-radius: 999px;
  background: rgba(140, 190, 240, 0.12);
  border: 1px solid var(--line-2);
  transition: background 0.3s, border-color 0.3s;
}
.switch .knob::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.35s var(--ease), background 0.3s;
}
.switch[aria-pressed="true"] .knob { background: rgba(94, 179, 242, 0.3); border-color: rgba(94, 179, 242, 0.7); }
.switch[aria-pressed="true"] .knob::after { transform: translateX(18px); background: var(--sky); }
.switch[aria-pressed="true"] .switch-label { color: var(--text); }
.switch[aria-pressed="false"] .switch-label { text-decoration: line-through; opacity: 0.6; }
.hadamard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.hadamard-badge span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hadamard-badge b { font-weight: 500; }
.hadamard-badge[data-ok="true"]  { color: var(--sky);  border-color: rgba(94, 179, 242, 0.45); background: rgba(94, 179, 242, 0.08); }
.hadamard-badge[data-ok="false"] { color: var(--warn); border-color: rgba(255, 122, 92, 0.45); background: rgba(255, 122, 92, 0.08); }

/* ── Roadmap ────────────────────────────────────────── */
.milestones {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: milestone;
}
.milestone { padding-top: 18px; border-top: 1px solid var(--line-2); counter-increment: milestone; }
.milestone::before {
  content: counter(milestone);
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--sky);
  margin-bottom: 10px;
}
.milestone p { margin-top: 8px; color: var(--text-2); font-size: 0.94rem; }

/* ── Contact ────────────────────────────────────────── */
.cta { overflow: hidden; padding: 150px 0; }
.cta-inner { text-align: center; position: relative; z-index: 1; }
.cta-inner h2, .cta-inner .lede { margin-inline: auto; }
.cta-inner h2 { max-width: 18ch; font-size: clamp(2.4rem, 5vw, 4.2rem); }
.cta-inner .hero-cta { justify-content: center; }
.cta-note { margin-top: 28px; font-size: 0.9rem; color: var(--muted); }
.cta-note span { margin-left: 18px; }
.cta-note a { color: var(--text-2); text-decoration: none; }
.cta-note a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
.cta-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 760px; height: 760px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(27, 127, 209, 0.22), transparent);
  filter: blur(40px);
}

/* ── Footer ─────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.footer-logo { height: 26px; width: auto; }
.footer-tagline { margin-top: 18px; color: var(--text-2); max-width: 38ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col-label { font-size: 0.86rem; color: var(--muted); margin-bottom: 4px; }
.footer-col a { color: var(--text-2); text-decoration: none; width: fit-content; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Keyframes
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fade-up     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes write-trace { to { stroke-dashoffset: 0; } }
@keyframes write-ink   { to { fill-opacity: 1; } }
@keyframes flow    { from { transform: translateX(-68px); } to { transform: translateX(0); } }

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-mark { order: -1; }
  .mark { width: min(44vw, 220px); }
  .hero-veil { background: linear-gradient(to bottom, rgba(4, 13, 20, 0.6), rgba(4, 13, 20, 0.3) 40%, var(--bg) 100%); }
  .bento, .toys, .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-grid, .pipeline-grid, .resolve-grid, .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
  .pipeline-intro { position: static; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter); right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 0.8rem 1rem; }
  .nav-links-mobile-only { display: block; }
  .nav-toggle { display: block; }
  .lineage, .people { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .section { padding: 88px 0; }
  .hero { padding-bottom: 90px; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3rem); max-width: none; }
  .hero-hud { gap: 12px; }
  .hero-hud span:first-child { display: none; }
  .hero-hint { display: none; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .mark { width: 160px; }
  .bento, .toys, .pillars, .milestones { grid-template-columns: 1fr; }
  .card-lg, .card-wide { grid-column: auto; }
  .stat-row { gap: 20px; }
  .steps { padding-left: 36px; }
  .step { grid-template-columns: 1fr; gap: 2px; }
  .step::before { left: -31px; }
  .manifesto { height: 170vh; }
  .manifesto-text { max-width: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .cta { padding: 110px 0; }
  .panel-head, .panel-foot { padding: 12px 14px; gap: 12px; }
  .panel-foot .readout { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .manifesto-text span { opacity: 1; }
  .mark .waves { animation: none; }
}
