/* ==========================================================================
   The Source — pre-launch landing page
   Swiss grid, two weights, one accent (citations + main button only).
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Color */
  --paper: #ECEAE4;
  --paper-2: #E4E2DB;
  --paper-hi: #F7F6F2;        /* off-white, lighter than the page: Ask search boxes */
  --ink: #151515;
  --muted: #6E6C67;
  --rule: rgba(21, 21, 21, 0.12);
  --rule-strong: rgba(21, 21, 21, 0.28);
  --accent: #2A3BE8;          /* citations + primary button, nothing else */
  --accent-ink: #FFFFFF;

  /* Type — swap --sans for Söhne / Neue Haas when licensed */
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* small labels (sources, counts, times): same family, regular-ish weight, tabular figures */
  --label: var(--sans);
  --light: 300;
  --medium: 500;
  --semibold: 600;
  --bold: 700;

  /* Scale */
  --t-display: clamp(3.25rem, 10.5vw, 10.5rem);
  --t-h2: clamp(1.9rem, 3.6vw, 3.4rem);
  --t-lead: clamp(1.35rem, 1.9vw, 1.75rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-label: 0.8125rem;

  /* Grid */
  --max: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --gap: clamp(12px, 1.6vw, 24px);
  --cols: 12;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: var(--light);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Grid ---------------------------------------------------------- */
.wrap {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gap);
}

.rules { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.rules .wrap { height: 100%; }
.rules i { border-left: 1px solid var(--rule); height: 100%; }
.rules i:last-child { border-right: 1px solid var(--rule); }

main, .foot, .top { position: relative; z-index: 1; }

/* ---------- Shared type --------------------------------------------------- */
.cite {
  font-family: var(--label);
  font-weight: var(--medium);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-label);
  color: var(--accent);
  letter-spacing: 0;
}
.label {
  grid-column: 1 / span 2;
  font-family: var(--label);
  font-weight: 400;
  font-size: var(--t-label);
  line-height: 1.4;
  color: var(--muted);
  padding-top: 0.6em;
}
.label .cite { display: block; margin-bottom: 4px; }
.label:empty { min-height: calc(var(--t-label) * 1.4); }   /* numbering removed; the empty label keeps its space */
.h2 {
  font-size: var(--t-h2);
  font-weight: var(--light);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lbl { font-family: var(--label); }
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  font-weight: var(--semibold);
}
.link:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 999px;
  font: var(--medium) 1rem/1 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: #1E2CC4; }
.btn:active { transform: translateY(1px); }
.btn--small { height: 38px; padding: 0 18px; font-size: var(--t-small); }

/* ---------- Header -------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top__inner { height: 100%; align-items: center; }
.wordmark {
  grid-column: 1 / span 3;
  font-weight: var(--bold);
  font-size: 1.1875rem;
  letter-spacing: -0.055em;
  text-decoration: none;
}
.top .btn { grid-column: 11 / span 2; justify-self: end; }

/* ---------- [00] Hero ----------------------------------------------------- */
.hero { padding-top: clamp(40px, 8vh, 104px); }
.hero__lockup { grid-column: 3 / -1; justify-self: start; width: fit-content; max-width: 100%; }
.hero__title {
  font-size: var(--t-display);
  font-weight: var(--light);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-left: -0.05em;
}
.hero__tagline {
  width: 0; min-width: 100%;            /* wrap to exactly the headline's width */
  margin-top: clamp(24px, 3vw, 40px);
  font-size: clamp(1.5rem, 3.15vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.hero { padding-bottom: clamp(40px, 6vw, 88px); }
.hero__cta { margin-top: clamp(28px, 3.5vw, 44px); }

/* ---------- [00] 3D node graph (D3, hero-graph.js) ------------------------ */
/* Same trick as the tagline: the figure takes the headline's width, never sets it. */
.hero__figure { width: 0; min-width: 100%; margin-top: clamp(40px, 5vw, 72px); }
.graph__svg { display: block; width: 100%; height: auto; overflow: visible; }
.graph .edge { fill: none; stroke: var(--ink); stroke-width: 1; }
.graph .thread { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.graph .hub { fill: var(--ink); }
.graph .pill rect { fill: var(--paper); stroke: rgba(21, 21, 21, .38); stroke-width: 1px; }
.graph .pill text { fill: var(--ink); font-family: var(--label); font-weight: var(--medium); dominant-baseline: central; text-anchor: middle; }
.graph .pill--bg rect { stroke: var(--muted); stroke-dasharray: 2 2; }
.graph .pill--bg text { fill: var(--muted); font-weight: 400; }
.graph .slot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.graph .slot.is-filled { fill: var(--accent); stroke: var(--accent); }
.graph .pulse { fill: var(--accent); }
.graph .pulse-halo { fill: var(--accent); opacity: .18; }
.graph .halo-text { font-family: var(--label); stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
.graph .aspect-label { fill: var(--accent); font-family: var(--label); font-weight: var(--medium); text-anchor: middle; }
.graph .pill:not(.pill--bg) { cursor: grab; touch-action: none; }
.graph.is-dragging, .graph.is-dragging .pill { cursor: grabbing; }
.graph .graph__out { fill: var(--ink); font-weight: var(--medium); text-anchor: end; }


@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- [01] What it is ----------------------------------------------- */
.what { border-top: 1px solid var(--rule-strong); padding: clamp(64px, 10vw, 140px) 0 0; }
.what__title { grid-column: 3 / span 8; max-width: 18ch; }
.what__body {
  grid-column: 7 / span 5;
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; gap: 1.1em;
  max-width: 60ch;
}
.what__stance { font-weight: var(--semibold); }

.pillars { margin-top: clamp(72px, 10vw, 140px); }
.pillar {
  grid-column: span 4;
  border-top: 1px solid var(--rule-strong);
  padding: 28px 0 clamp(64px, 9vw, 120px);
}
.pillar:first-child { grid-column: 3 / span 4; }
.pillar:nth-child(2) { grid-column: span 3; }
.pillar:nth-child(3) { grid-column: span 3; }
.pillar__lead { font-size: var(--t-lead); line-height: 1.2; letter-spacing: -0.015em; max-width: 16ch; }
.pillar__body { margin-top: 14px; color: var(--muted); max-width: 30ch; }

/* ---------- [02] How it works --------------------------------------------- */
.how { border-top: 1px solid var(--rule-strong); padding-top: clamp(56px, 7vw, 96px); }
.how__title { grid-column: 3 / span 8; max-width: 22ch; }
.how__grid { margin-top: clamp(24px, 3vw, 40px); align-items: start; }

.steps { grid-column: 3 / span 4; grid-row: 1; }
.step {
  min-height: 46vh;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding-top: 6vh;
  border-top: 1px solid var(--rule);
  opacity: .28;
  transition: opacity .35s ease;
}
.step:first-child { border-top: 0; justify-content: flex-start; padding-top: 2vh; }
.step.is-active { opacity: 1; }
.step__title { margin-top: 0; font-size: var(--t-h2); font-weight: var(--light); letter-spacing: -0.025em; line-height: 1.05; }
.step__body { margin-top: 18px; max-width: 38ch; }

.stage { grid-column: 8 / span 5; grid-row: 1; position: relative; align-self: stretch; }
/* desktop: each step's diagram sits beside its own heading (main.js sets --top so the diagram's
   top lines up with the top of the heading text); it scrolls with its step and crossfades */
.stage__frame { position: absolute; left: 0; top: var(--top, 0); width: 100%; aspect-ratio: 1; }
.stage__svg { width: 100%; height: 100%; display: block; }

.scene { opacity: 0; transition: opacity .45s ease; }
.scene.is-active { opacity: 1; }
.stage text { font-family: var(--sans); fill: var(--ink); }
.stage .lbl { font-family: var(--label); font-size: 15px; }
.stage .lbl-lg { font-family: var(--label); font-size: 19px; }
.stage .sans-sm { font-size: 17px; }
.stage .muted { fill: var(--muted); }
.stage .accent { fill: var(--accent); }
.stage .box { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.stage .ln, .stage .ln path { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .5; }
.stage .ln--accent { stroke: var(--accent); opacity: 1; stroke-width: 1.5; }
.stage .thread { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.stage .node { fill: var(--ink); }
.stage .node--accent { fill: var(--accent); }
.stage .node--hollow { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.stage .ask__row { transition: opacity 1.1s ease-in-out; }
.stage .ask__row .box { fill: var(--paper-hi); }
.stage .ask__text { font-family: var(--label); font-size: 17px; font-weight: var(--bold); fill: var(--ink); }
.stage .caret { fill: var(--accent); animation: blink 1s steps(1) infinite; }
.node--pulse { transform-box: fill-box; transform-origin: center; }
.scene.is-active .node--pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* scene 4: source lines fan out when shown */
/* Read the thread: outlets feed each part of the story; parts light up in turn */
.read__thread { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1); }
.read.is-active .read__thread { stroke-dashoffset: 0; }
.read__edge { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .14; transition: opacity .5s ease, stroke .4s ease; }
.read__edge.is-on { stroke: var(--accent); stroke-width: 1.5; opacity: 1; stroke-dasharray: 1; animation: read-draw .9s cubic-bezier(.4,0,.2,1) both; }
.read__pill rect { fill: var(--paper-hi); stroke: rgba(21, 21, 21, .38); stroke-width: 1; transition: stroke .35s ease; }
.read__pill text { font-family: var(--label); font-size: 14px; font-weight: var(--medium); fill: var(--ink); }
.read__pill.is-on rect { stroke: var(--accent); stroke-width: 1.5; }
.read__stitch { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: fill .3s ease, stroke .3s ease; }
.read__stitch.is-filled { fill: var(--accent); stroke: var(--accent); }
.read__stitch.is-pop { animation: read-pop .5s cubic-bezier(.3,1.6,.5,1); }
/* the thread's words: large and bold; each rises out from the thread as its part is woven in */
.read__word { opacity: 0; transform: translateX(-14px); transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.read__word.is-shown { opacity: 1; transform: none; }
.read__name { font-family: var(--label); font-size: 21px; font-weight: var(--bold); fill: var(--ink); letter-spacing: -0.01em; transition: fill .4s ease; }
.read__word.is-current .read__name { fill: var(--accent); }
.read__count { font-family: var(--label); font-size: 13px; fill: var(--muted); }
@keyframes read-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes read-pop { 0% { transform: scale(1); } 50% { transform: scale(1.7); } 100% { transform: scale(1); } }

/* Pull any thread: the woven thread; tap a part and it opens to its outlets and history */
.pull__thread { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.pull__stitch { fill: var(--accent); stroke: var(--accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.pull__name { font-family: var(--label); font-size: 19px; font-weight: var(--bold); fill: var(--ink); letter-spacing: -0.01em; transition: fill .4s ease, opacity .4s ease; }
.pull__tap { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.pull__fan { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s cubic-bezier(.4,0,.2,1); }
.pull__fan:nth-of-type(3) { transition-delay: .12s; }   /* paths: thread, then the three fans */
.pull__fan:nth-of-type(4) { transition-delay: .24s; }
.pull__src { opacity: 0; transform: translateX(-12px); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.pull__src rect { fill: var(--paper-hi); stroke: rgba(21, 21, 21, .38); stroke-width: 1; }
.pull__srcname { font-family: var(--label); font-size: 14px; font-weight: var(--medium); fill: var(--ink); }
.pull__meta { font-family: var(--label); font-size: 13px; fill: var(--muted); }
.pull__history { opacity: 0; transition: opacity .5s ease; }
.pull__track { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s ease .1s; }
.pull__ver { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.pull__ver--now { fill: var(--accent); stroke: var(--accent); }
.pull .cursor { opacity: 0; transform: translate(260px, 470px); transition: transform 1.1s cubic-bezier(.45,0,.2,1), opacity .4s ease; }
.pull.is-pointing .cursor { opacity: 1; transform: translate(42px, 244px); }
.pull.is-open .cursor { transform: translate(42px, 244px) scale(.88); transition: transform .12s ease, opacity .4s ease; }
.pull.is-done .cursor { opacity: 0; }
.pull.is-open .pull__tap { animation: tap .7s ease-out forwards; }
.pull.is-open .pull__stitch.is-open { animation: read-pop .5s cubic-bezier(.3,1.6,.5,1); }
.pull.is-open .pull__name.is-open { fill: var(--accent); }
.pull.is-open .pull__name:not(.is-open) { opacity: .3; }
.pull.is-open .pull__fan { stroke-dashoffset: 0; }
.pull.is-open .pull__src { opacity: 1; transform: none; }
.pull.is-open .pull__src:nth-of-type(2) { transition-delay: .12s; }
.pull.is-open .pull__src:nth-of-type(3) { transition-delay: .24s; }
.pull.is-history .pull__history { opacity: 1; }
.pull.is-history .pull__track { stroke-dashoffset: 0; }

/* Narrow: branches draw from "Did you mean", then the pointer taps the council vote */
.narrow .qbox { fill: var(--paper-hi); }
.narrow .br { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s cubic-bezier(.4,0,.2,1), stroke .4s ease, opacity .4s ease; }
.narrow.is-active .br { stroke-dashoffset: 0; }
.narrow.is-active .br:nth-of-type(2) { transition-delay: .1s, 0s, 0s; }
.narrow.is-active .br:nth-of-type(3) { transition-delay: .2s, 0s, 0s; }
.narrow .opt-node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; transition: fill .3s ease, stroke .3s ease; }
.narrow .opt, .narrow .dym { transition: opacity .4s ease; }
.narrow .opt text { transition: fill .3s ease; }
.narrow .pick-pill { fill: var(--paper-hi); stroke: var(--accent); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.9); transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.5,.5,1); }
.narrow .tap { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.narrow .cursor path { fill: var(--ink); stroke: var(--paper-hi); stroke-width: 1.5; stroke-linejoin: round; }
.narrow .cursor { opacity: 0; transform: translate(470px, 440px); transition: transform 1.1s cubic-bezier(.45,0,.2,1), opacity .4s ease; }
.narrow.is-pointing .cursor { opacity: 1; transform: translate(262px, 246px); }
.narrow.is-picked .cursor { transform: translate(262px, 246px) scale(.88); transition: transform .12s ease, opacity .4s ease; }
.narrow.is-picked .tap { animation: tap .7s ease-out forwards; }
.narrow.is-picked .pick-pill { opacity: 1; transform: none; }
.narrow.is-picked .opt-node--pick { fill: var(--accent); stroke: var(--accent); }
.narrow.is-picked .opt--pick text { fill: var(--accent); font-weight: var(--medium); }
.narrow.is-picked .br--pick { stroke: var(--accent); opacity: 1; stroke-width: 1.5; }
.narrow.is-picked .br:not(.br--pick), .narrow.is-picked .opt:not(.opt--pick) { opacity: .25; }
.narrow.is-done .cursor { opacity: 0; }
@keyframes tap { 0% { opacity: .45; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.8); } }

/* ---------- [03] What we believe (inverted) ------------------------------- */
.believe {
  margin-top: clamp(40px, 5vw, 72px);
  background: var(--ink); color: var(--paper);
  padding: clamp(72px, 11vw, 160px) 0;
}
.believe .label { color: rgba(236,234,228,.55); }
.believe .cite { color: #8E99FF; }
.beliefs { grid-column: 3 / -1; display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); column-gap: var(--gap); }
.beliefs li {
  position: relative;
  grid-column: span 10;
  display: grid; grid-template-columns: subgrid; align-items: baseline;
  padding: clamp(20px, 3vw, 36px) 0;
}
/* the row's top rule is a drawn line, so it can draw in with the text */
.beliefs li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: rgba(236,234,228,.18);
  transform-origin: left center;
}
.beliefs li:last-child { border-bottom: 1px solid rgba(236,234,228,.18); }
.beliefs__lead { grid-column: span 6; font-size: var(--t-h2); font-weight: var(--medium); letter-spacing: -0.025em; line-height: 1.05; }
.beliefs p { grid-column: span 4; color: rgba(236,234,228,.7); max-width: 32ch; }

/* ---------- [04] Join ----------------------------------------------------- */
.join { padding: clamp(80px, 12vw, 180px) 0 clamp(64px, 9vw, 120px); }
.join__title { grid-column: 3 / span 9; max-width: 24ch; }
.join__body { grid-column: 7 / span 5; margin-top: clamp(40px, 6vw, 72px); max-width: 52ch; }
.join__body > p:first-child { font-size: var(--t-lead); line-height: 1.35; }

.waitlist { margin-top: 36px; }
.waitlist__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* spam honeypot */
.waitlist__label { display: block; font-family: var(--label); font-size: var(--t-label); color: var(--muted); margin-bottom: 10px; }
.waitlist__row { display: flex; gap: 8px; }
.waitlist__input {
  flex: 1; min-width: 0; height: 52px; padding: 0 22px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: var(--light) 1rem/1 var(--sans);
}
.waitlist__input::placeholder { color: #9A978F; }
.waitlist__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.waitlist__input[aria-invalid="true"] { border-color: var(--ink); }
.waitlist__msg { min-height: 1.5em; margin-top: 12px; font-size: var(--t-small); }
.waitlist.is-done .waitlist__row { display: none; }
.waitlist.is-done .waitlist__msg { font-size: var(--t-lead); line-height: 1.3; }

.join__partners a { white-space: nowrap; }
.join__partners { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule-strong); color: var(--muted); }

/* ---------- Footer: giant wordmark ---------------------------------------- */
.foot { border-top: 1px solid var(--rule-strong); overflow: hidden; padding-bottom: 32px; }
.foot__mark {
  grid-column: 1 / -1;
  font-size: clamp(4rem, 19.4vw, 18.1rem);
  font-weight: var(--medium);
  letter-spacing: -0.065em;
  line-height: 0.8;
  white-space: nowrap;
  padding: 0.12em 0 0.1em;
  margin-left: -0.06em;
}
.foot__meta {
  grid-column: 3 / -1;
  display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: baseline;
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule);
  font-family: var(--label); font-size: var(--t-label); color: var(--muted);
}
.foot__meta .link { margin-left: auto; font-family: var(--label); font-weight: 400; color: var(--muted); }



/* ---------- [01] Tangle: scroll-linked (positions set in main.js) ------- */
.what__title { grid-row: 1; }
.tangle { grid-column: 2 / span 5; grid-row: 2; margin-top: clamp(40px, 6vw, 72px); align-self: start; }
.what__body { grid-row: 2; align-self: start; align-content: start; }
.tangle__svg { width: 100%; height: auto; display: block; overflow: visible; }
.tangle__count { font-family: var(--label); font-size: 22px; font-weight: var(--bold); fill: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tangle__count.is-one { fill: var(--accent); }
.tab rect { fill: var(--paper-hi); stroke: rgba(21, 21, 21, .38); stroke-width: 1; }
.tab text { font-family: var(--label); font-size: 13px; font-weight: var(--bold); fill: var(--ink); }
.tangle__card { transform-box: fill-box; transform-origin: center; }
.tangle__card rect { fill: var(--paper-hi); stroke: rgba(21, 21, 21, .38); stroke-width: 1; }
.tangle__thread { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 1; }
.tangle__part circle { fill: var(--accent); }
.tangle__name { font-family: var(--label); font-size: 19px; font-weight: var(--bold); fill: var(--ink); letter-spacing: -0.01em; }

/* ---------- [04] Join: title above, body in the right-hand columns -------- */
.join__title { grid-row: 1; }
@keyframes dim { to { opacity: .45; } }
@keyframes pop { to { transform: scale(1); } }

/* ---------- [03] Beliefs reveal on scroll --------------------------------- */
/* Scroll-linked: main.js sets --rule, --lead and --body (0 → 1) per row as it
   travels up the screen. Rule draws first, headline rises, then the line beside it. */
.js .beliefs li::before { transform: scaleX(var(--rule, 0)); }
.js .beliefs__lead { opacity: var(--lead, 0); transform: translateY(calc((1 - var(--lead, 0)) * 64px)); will-change: transform, opacity; }
.js .beliefs li > p { opacity: var(--body, 0); transform: translateY(calc((1 - var(--body, 0)) * 40px)); will-change: transform, opacity; }


/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 1080px) {
    .what__body { grid-column: 3 / -1; }
  .join__body { grid-column: 3 / -1; }
  .pillar:first-child, .pillar:nth-child(2), .pillar:nth-child(3) { grid-column: span 10; padding-bottom: 40px; }
  .pillar:first-child { grid-column: 3 / -1; }
  .pillar:nth-child(2), .pillar:nth-child(3) { grid-column: 3 / -1; }
  .pillar:last-child { padding-bottom: clamp(64px, 9vw, 120px); }
  .tangle { grid-column: 3 / span 6; grid-row: auto; max-width: 480px; }
  .tangle { max-width: 580px; }
  .what__body, .join__body { grid-row: auto; }
}

@media (max-width: 760px) {
  :root { --cols: 4; --header-h: 56px; }
  .rules i:nth-child(n+5) { display: none; }
  .wordmark { grid-column: 1 / span 2; }
  .top .btn { grid-column: 3 / span 2; }
  .label { grid-column: 1 / -1; margin-bottom: 20px; padding-top: 0; }
  .label .cite { display: inline; margin: 0 6px 0 0; }
  .hero__lockup, .hero__cta, .what__title, .tangle, .what__body, .how__title,
  .join__title, .join__body, .foot__meta { grid-column: 1 / -1; }
  .pillar:first-child, .pillar:nth-child(2), .pillar:nth-child(3) { grid-column: 1 / -1; }
  .tangle { margin-top: 32px; }
  .what__title, .join__title, .tangle, .what__body, .join__body { grid-row: auto; }

  /* How it works: diagram pinned on top, steps scroll under it */
  .how__grid { display: block; }
  .stage { position: sticky; top: var(--header-h); height: auto; z-index: 2; background: var(--paper); padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .stage { display: grid; justify-items: center; align-self: auto; }
  .stage__frame { position: relative; top: auto; grid-area: 1 / 1; width: min(100%, 36vh); }
  .steps { margin-top: 0; }
  .step { min-height: 52vh; justify-content: flex-start; padding-top: 28px; }

  .beliefs { grid-column: 1 / -1; display: block; }
  .beliefs li { display: block; }
  .beliefs p { margin-top: 10px; }

  .waitlist__row { flex-direction: column; }
  .waitlist__input { flex: none; }
  .waitlist .btn { width: 100%; }
  .hero { padding-top: 64px; }
  .foot__meta .link { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .stage .caret { animation: none; }
}
