/* ==========================================================================
   Comparagon waitlist. The workspace's Void palette at night (see ../DESIGN.md),
   dark only. Barlow for language, Barlow Semi Condensed for numbers and headings.

   Graphite night sections alternate with deeper bands. Behind the hero,
   comets fall along perspective lines into a violet horizon (js/field.js)
   whose lower half lights the top of the tour. The tour shows the real
   product: the full screen rises out of that glow, then five chapters, each
   a close-up that settles in as it scrolls into view (js/motion.js).
   ========================================================================== */

@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-400-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-500-latin.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-600-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlowsemicondensed-500-latin.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlowsemicondensed-600-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/geist-600-latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
/* Dark only: the Void palette (the app's dark theme, see ../DESIGN.md), with
   a second light colour, --spark, for comets, the strike through "twenty tabs"
   and the glow in the bands. */
:root {
  --f-ui: 'Barlow', 'Helvetica Neue', system-ui, sans-serif;
  --f-num: 'Barlow Semi Condensed', 'Barlow', 'Helvetica Neue', system-ui, sans-serif;
  --f-brand: 'Geist', 'Barlow', system-ui, sans-serif;   /* wordmark only */

  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px;
  --gutter: 28px; --max: 1200px; --top-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-cam: cubic-bezier(.65, 0, .15, 1);

  /* the night sky: the waitlist's own ground. Graphite, like the app at night;
     violet lives only in the horizon glow, the comets and the accent. */
  --bg: #0b0b0e;
  /* from here down: the app's dark theme, value for value (../css/styles.css) */
  --pnl: #19191c;
  --pnl2: #222226;
  --hover: #1f1f23;
  --ink: #ededef;
  --ink2: #b4b4bb;
  --mut: #8f8f98;
  --br: #2a2a2f;
  --br-strong: #3b3b41;
  --acc: #b18cff;
  --acc-ink: #160a2b;
  --acc-hover: #c3a6ff;
  --accs: #2d2742;
  --acc-tint: #1e1c26;
  --spark: #e6c4ff;
  --bad: #ec8b81;
  --sh: 0 0 0 1px rgba(255,255,255,.06), 0 1px 2px rgba(0,0,0,.35), 0 14px 32px -18px rgba(0,0,0,.7);
  --sh-lg: 0 0 0 1px rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.35), 0 40px 80px -24px rgba(0,0,0,.75);

  /* night bands */
  --band: #0b0b0e;            /* = --bg, so bands and the hero meet without a seam */
  --band-2: #070709;
  --band-ink: var(--ink);
  --band-ink2: var(--ink2);
  --band-mut: var(--mut);
  --band-acc: var(--acc);
  --band-br: rgba(255, 255, 255, .09);

  /* hero sky (rgb triplets, read by js/field.js): neutral starlight, violet light */
  --field-ring: 237, 237, 242;
  --field-fill: 157, 96, 255;
  --field-spark: 230, 196, 255;
  --glow-core: 230, 196, 255;
  --glow: 157, 96, 255;
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--f-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal;
  transition: background-color .3s, color .3s;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--accs); color: var(--ink); }
.band ::selection { background: var(--band-acc); color: var(--band-2); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: var(--r-xs); }
.band :focus-visible { outline-color: var(--band-acc); }
.band .fb :focus-visible { outline-color: var(--acc); }
* { scrollbar-width: thin; scrollbar-color: var(--br-strong) transparent; caret-color: var(--acc); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--br-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 60; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font-weight: 500; }
.skip:focus { top: 12px; }

/* ── Top bar: transparent over the hero, a night strip once you scroll ── */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); margin-bottom: calc(var(--top-h) * -1);
  transition: background-color .35s, box-shadow .35s, color .35s;
}
.top.is-stuck {
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--br);
}
.top[data-over="band"] { background: color-mix(in oklab, var(--band-2) 82%, transparent); box-shadow: 0 1px 0 var(--band-br); color: var(--band-ink); }
.top:not(.is-stuck)[data-over="band"] { background: transparent; box-shadow: none; }
.top[data-over="band"] .tool { color: var(--band-ink2); }
.top[data-over="band"] .tool .i { color: var(--band-mut); }
.top[data-over="band"] .tool:hover { background: rgba(255,255,255,.08); color: var(--band-ink); }
.top[data-over="band"] .top-tag { color: var(--band-ink2); box-shadow: inset 0 0 0 1px var(--band-br); }
.top[data-over="band"] .top-join { background: var(--band-acc); color: var(--band-2); }
.top[data-over="band"] .logo { color: var(--band-ink); --logo-acc: var(--band-acc); }
.top-in { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
/* Logo: gauge ring in ink, verdict check in accent */
.logo { flex: none; color: var(--ink); transition: color .35s; }
.logo-check { stroke: var(--logo-acc, var(--acc)); transition: stroke .35s; }
.brand-name { font: 600 18px/1 var(--f-brand); letter-spacing: -.05em; text-transform: lowercase; }
/* Confirmation seal (joined, note sent); a status, not the logo */
.brand-mark {
  width: 26px; height: 26px; display: grid; place-items: center; flex: none; border-radius: var(--r-sm);
  background: var(--acc); color: var(--acc-ink);
}
.brand-mark .i { stroke-width: 2.6; }
.top-tag {
  font: 500 12px/1 var(--f-ui); color: var(--ink2); padding: 5px 8px; border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px var(--br-strong); transition: color .35s, box-shadow .35s;
}
.top-end { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; transition: background .15s, color .35s;
}
.tool:hover { background: var(--pnl2); color: var(--ink); }
.tool .i { color: var(--mut); }
.top .top-join {  /* .top-scoped so .btn's transition (declared later) can't override it */
  margin-left: 6px; opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s .3s, background-color .35s, color .35s;
}
.top.show-join .top-join { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }

/* ── Buttons, fields ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); font-weight: 500; font-size: 14px; color: var(--ink2); white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-acc { background: var(--acc); color: var(--acc-ink); }
.btn-acc:hover:not(:disabled) { background: var(--acc-hover); }
.btn-acc:active:not(:disabled) { transform: translateY(1px); }
.btn-ghost:hover { background: var(--pnl2); color: var(--ink); }
.btn-line { box-shadow: inset 0 0 0 1px var(--br-strong); }
.btn-line:hover { background: var(--hover); color: var(--ink); }
.btn[aria-busy="true"] { cursor: progress; opacity: 1; }
.btn-text {
  font-size: 13px; color: var(--mut); text-decoration: underline; text-decoration-color: var(--br-strong);
  text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s;
}
.btn-text:hover { color: var(--ink); text-decoration-color: var(--mut); }
.link-inline {
  color: var(--acc); font-weight: 500; text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--acc) 35%, transparent); text-underline-offset: 3px;
}
.link-inline:hover { text-decoration-color: var(--acc); }

.field-in {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: var(--pnl);
  box-shadow: inset 0 0 0 1px var(--br-strong); font: 400 15px/1.2 var(--f-ui); color: var(--ink); transition: box-shadow .15s;
}
.field-lg { height: 46px; padding: 0 14px; }
.field-in::placeholder { color: var(--mut); }
.field-in:hover { box-shadow: inset 0 0 0 1px var(--mut); }
.field-in:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 3px color-mix(in oklab, var(--acc) 16%, transparent); }
.field-in[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--bad); }
.field-in[aria-invalid="true"] { animation: nudge .32s var(--ease-out); }
@keyframes nudge { 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }
.field-area { height: auto; min-height: 132px; padding: 11px 12px; line-height: 1.55; resize: vertical; }
.err { font-size: 13px; color: var(--bad); margin-top: 7px; }
.lbl { display: block; font: 500 13px/1.3 var(--f-ui); color: var(--ink); margin-bottom: 7px; }
.lbl span { color: var(--mut); font-weight: 400; margin-left: 4px; }
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--br-strong); margin: 0 9px; vertical-align: middle; }

/* The working glyph: a half-filled Harvey ball turning. */
.spin {
  display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; padding: 2.6px; background-clip: content-box;
  box-shadow: inset 0 0 0 1.4px currentColor; background-image: conic-gradient(currentColor 0 50%, transparent 0);
  animation: turn .9s linear infinite;
}
@keyframes turn { to { transform: rotate(1turn); } }

/* ── Hero ───────────────────────────────────────────────────────────────── */
/* Centred copy under a sky of stars, perspective lines and comets
   that fall into a glowing horizon (js/field.js). */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--ink); color-scheme: dark;
  min-height: min(100svh, 980px); display: flex; align-items: center;
  padding: calc(var(--top-h) + 64px) 0 clamp(150px, 20svh, 210px);
  background:
    radial-gradient(70% 45% at 50% 0%, color-mix(in oklab, var(--acc) 9%, transparent), transparent 70%),
    linear-gradient(180deg, var(--band-2) 0%, var(--bg) 55%, var(--band) 100%);
}
.field {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero h1 {
  font: 600 clamp(44px, 6.2vw, 90px)/1 var(--f-num); letter-spacing: -.03em; text-wrap: balance; max-width: 14ch;
}
/* soft white type that settles into the night toward its last line */
.hero h1 .w:not(.w-free) > span {
  /* stops in em so the fade is unchanged while the box reaches under the descenders */
  background: linear-gradient(180deg, var(--ink) .35em, color-mix(in oklab, var(--ink) 72%, var(--bg)) 1em);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .22em; margin-bottom: -.22em;
}
.lede { margin-top: 44px; font-size: 18.5px; line-height: 1.6; color: var(--ink2); max-width: 54ch; text-wrap: pretty; }

/* headline: words rise out of their line, then "twenty tabs" is ruled out */
/* the clip box reaches .22em under the line so descenders (y, g, p) aren't cut */
.reveal-words .w { display: inline-block; vertical-align: top; overflow: clip; padding-bottom: .22em; margin-bottom: -.22em; }
.reveal-words .w > span { display: inline-block; }
.js .reveal-words .w > span { animation: word-up 1s var(--ease-out) calc(.12s + var(--i) * 55ms) both; }
.reveal-words .w-free { overflow: visible; }
.js .reveal-words .w-free > span { animation-name: rise; }
@keyframes word-up { from { transform: translateY(108%) rotate(4deg); transform-origin: 0 100%; } }
.ruled { position: relative; display: inline-block; color: var(--mut); }
.ruled::after {
  content: ""; position: absolute; left: -.05em; right: -.05em; top: 52%; height: .07em; min-height: 3px;
  border-radius: 3px; background: var(--spark); transform-origin: 0 50%;
}
.ruled::before {
  content: attr(data-note); position: absolute; left: 0; top: calc(100% + .12em); white-space: nowrap;
  font: 600 14px/1 var(--f-num); letter-spacing: .01em; color: var(--acc);
  padding: 5px 8px; border-radius: var(--r-xs); background: var(--acc-tint); box-shadow: inset 0 0 0 1px var(--accs);
}
.js .ruled { animation: ruled-ink .5s ease 1.25s both; }
.js .ruled::after { animation: strike .7s var(--ease-out) 1.2s both; }
.js .ruled::before { animation: tag-in .6s var(--ease-out) 1.6s both; }
@keyframes ruled-ink { from { color: var(--ink); } }
@keyframes strike { from { transform: scaleX(0); } }
@keyframes tag-in { from { opacity: 0; transform: translateY(-6px); } }

.js .rise { animation: rise 1s var(--ease-out) var(--d, 0s) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } }

.join {
  width: min(100%, 540px); margin-top: 40px; text-align: left; padding: 8px; border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--pnl) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 11%, transparent), 0 30px 80px -34px rgba(0, 0, 0, .7);
}
.join:has(.joined:not([hidden])) { padding: 24px; }
.join-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.join-row { display: flex; gap: 8px; }
.join-row .field-in { flex: 1; min-width: 0; background: color-mix(in oklab, var(--bg) 70%, transparent); }
.join .btn-acc { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 28px -10px color-mix(in oklab, var(--acc) 70%, transparent); }
.join-form .err { padding: 0 6px; }
.join-meta { margin: 10px 6px 4px; font-size: 13px; color: var(--mut); text-align: center; }
.join-meta b { font-weight: 600; font-size: 14px; color: var(--ink); }
/* the count stays hidden until it has loaded (js/waitlist.js) */
.join-meta.no-count .count, .join-meta.no-count .dot { display: none; }

.joined { animation: settle .5s var(--ease-out); }
.joined-head { display: flex; align-items: flex-start; gap: 12px; }
.joined-head .brand-mark { margin-top: 1px; }
.joined-title { font: 600 21px/1.2 var(--f-num); letter-spacing: -.01em; outline: none; }
.joined-sub { margin-top: 3px; font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.joined-sub .num { color: var(--ink); font-weight: 600; font-size: 14px; }
.joined > .btn-text { margin-top: 16px; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
/* the confirmation seal lands like a stamp */
.stamp { position: relative; animation: stamp .55s var(--ease-out) .08s both; }
.stamp::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 2px var(--acc); animation: stamp-ring .8s var(--ease-out) .3s both; opacity: 0; }
@keyframes stamp { from { transform: scale(1.8) rotate(-12deg); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } }
@keyframes stamp-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }

.q { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--br); }
.q-intro { font-size: 13.5px; color: var(--ink2); }
.q-set { margin-top: 16px; }
.q-set:focus { outline: none; }
/* one question at a time (js/waitlist.js sets data-q) */
.q[data-q="1"] #qSet2, .q[data-q="2"] #qSet1 { display: none; }
.q[data-q] .q-set { animation: settle .4s var(--ease-out); }
.q-step { margin-left: 6px; font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.q-set legend { font: 500 13px/1.3 var(--f-ui); color: var(--ink); margin-bottom: 9px; }
.q-set legend span { color: var(--mut); font-weight: 400; margin-left: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--br-strong); background: var(--pnl);
  transition: background .15s, color .15s, box-shadow .15s;
}
.opt span .i { display: none; color: var(--acc); }
.opt:hover span { background: var(--hover); color: var(--ink); }
.opt input:checked + span { background: var(--acc-tint); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--acc); }
.opt input:checked + span .i { display: block; animation: tag-in .25s var(--ease-out); }
.opt input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.q-other { margin-top: 8px; }
.q-actions { display: flex; gap: 6px; margin-top: 20px; }

.thanks { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--br); font-size: 14px; color: var(--ink2); animation: settle .5s var(--ease-out); }

/* ── Bands ──────────────────────────────────────────────────────────────── */
.band {
  position: relative; color: var(--band-ink);
  background:
    radial-gradient(70% 60% at 30% 40%, color-mix(in oklab, var(--band-acc) 7%, transparent), transparent 70%),
    radial-gradient(50% 45% at 92% 96%, color-mix(in oklab, var(--spark) 8%, transparent), transparent 70%),
    linear-gradient(180deg, var(--band), var(--band-2));
}

/* ── Tour: the product, then five chapters ──────────────────────────────── */
.tour::before {
  /* same ellipse the canvas draws at the hero's bottom edge (js/field.js), lower half */
  content: ""; position: absolute; z-index: 0; left: 50%; top: 0; pointer-events: none;
  width: calc(2 * min(56vw, 860px)); height: calc(2 * var(--glow-ry, 270px)); transform: translate(-50%, -50%);
  clip-path: inset(50% 0 0 0);
  background: radial-gradient(closest-side, rgba(var(--glow-core), .9), rgba(var(--glow-core), .55) 12%, rgba(var(--glow), .5) 32%, rgba(var(--glow), .14) 65%, rgba(var(--glow), 0));
}
/* the tour ends on the page ground, so the votes below meet it without a seam */
.tour {
  overflow-x: clip;
  background:
    radial-gradient(70% 50% at 30% 35%, color-mix(in oklab, var(--band-acc) 7%, transparent), transparent 70%),
    linear-gradient(180deg, var(--band), var(--band-2) 45%, var(--bg));
}
.tour-in { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 64px; }

/* a screenshot sits in the app's own frame: a hairline ring and a long, soft drop */
.shot-frame, .chap-frame {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--pnl);
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 2px 6px rgba(0,0,0,.25), 0 50px 100px -30px rgba(0,0,0,.8);
}
.shot-frame img, .chap-frame img { display: block; width: 100%; height: auto; }

.shot { max-width: 1120px; margin-inline: auto; perspective: 1800px; }
.shot-cap { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; font-size: 13px; color: var(--band-mut); }
.shot-cap .i { color: var(--band-mut); }

.tour-head { max-width: 640px; margin: 152px auto 0; text-align: center; }
.tour-head h2 { font: 600 clamp(34px, 4.4vw, 60px)/1.02 var(--f-num); letter-spacing: -.028em; text-wrap: balance; }
.tour-head p { margin-top: 18px; font-size: 17px; color: var(--band-ink2); text-wrap: pretty; }

/* chapters: copy beside its close-up, sides alternating; the last one spans the width */
.chapters { display: flex; flex-direction: column; gap: 152px; margin-top: 120px; }
.chap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.chap:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.chap:nth-child(even) .chap-copy { order: 2; }
.chap-copy { max-width: 400px; }
.chap:nth-child(even) .chap-copy { justify-self: end; }
.chap-copy h3 { font: 600 clamp(26px, 2.5vw, 34px)/1.08 var(--f-num); letter-spacing: -.02em; text-wrap: balance; }
.chap-copy p { margin-top: 14px; font-size: 16.5px; line-height: 1.6; color: var(--band-ink2); text-wrap: pretty; }
/* --w: the close-up's 1x width, so it shows at the app's own size and never upscales */
.chap-shot { width: min(100%, var(--w)); justify-self: start; }
.chap:nth-child(even) .chap-shot { justify-self: end; }
.chap-wide { grid-template-columns: minmax(0, 1fr); gap: 40px; }
.chap-wide .chap-copy { max-width: 560px; justify-self: center; text-align: center; }
.chap-wide .chap-shot { justify-self: center; }

/* Reveals (js/motion.js arms .can-reveal, then adds .is-in once). The screen
   rises flat out of the horizon; in a chapter the copy settles first, then the
   close-up opens from a narrower window while the picture inside eases back,
   like a camera settling on its subject. */
.can-reveal .shot .shot-frame {
  opacity: 0; transform: translateY(72px) rotateX(18deg) scale(.94); transform-origin: 50% 0; filter: blur(6px);
  transition: opacity .9s var(--ease-out), transform 1.6s var(--ease-out), filter 1.1s var(--ease-out);
}
.can-reveal .shot.is-in .shot-frame { opacity: 1; transform: none; filter: none; }
.can-reveal .shot .shot-cap { opacity: 0; transition: opacity .8s var(--ease-out) .7s; }
.can-reveal .shot.is-in .shot-cap { opacity: 1; }

.can-reveal .tour-head > *, .can-reveal .chap-copy > * {
  opacity: 0; transform: translateY(20px); filter: blur(5px);
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out), filter .8s var(--ease-out);
}
.can-reveal .tour-head > :nth-child(2), .can-reveal .chap-copy > :nth-child(2) { transition-delay: .1s; }
.can-reveal .is-in.tour-head > *, .can-reveal .is-in .chap-copy > * { opacity: 1; transform: none; filter: none; }

.can-reveal .chap-frame {
  opacity: 0; clip-path: inset(10% 8% 10% 8% round var(--r-lg)); transform: translateY(40px);
  transition: opacity .7s var(--ease-out) .15s, clip-path 1.3s var(--ease-out) .15s, transform 1.3s var(--ease-out) .15s;
}
.can-reveal .chap-frame img { transform: scale(1.1); transition: transform 1.6s var(--ease-out) .15s; }
.can-reveal .is-in .chap-frame { opacity: 1; clip-path: inset(0 round var(--r-lg)); transform: none; }
.can-reveal .is-in .chap-frame img { transform: none; }

/* ── Feature votes ──────────────────────────────────────────────────────── */
.roadmap { padding: 136px 0 144px; }
.sec-head { max-width: 680px; margin-bottom: 36px; }
.sec-head h2 { font: 600 clamp(34px, 4.4vw, 60px)/1.02 var(--f-num); letter-spacing: -.028em; text-wrap: balance; }
.sec-head p { margin-top: 16px; font-size: 17px; color: var(--ink2); max-width: 56ch; text-wrap: pretty; }
.band .sec-head p { color: var(--band-ink2); }

.board { background: var(--pnl); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; }
.vt-head, .vt-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 104px; align-items: center; gap: 16px; padding: 0 28px; }
.vt-head { height: 46px; border-bottom: 1px solid var(--br); font: 600 12.5px/1 var(--f-num); color: var(--mut); }
.vt-head-votes { text-align: right; }
.vt-row { position: relative; min-height: 82px; padding-top: 16px; padding-bottom: 16px; transition: background .2s; }
.vt-row + .vt-row { border-top: 1px solid var(--br); }
.vt-row:hover { background: var(--hover); }
.vt-row.is-voted { background: var(--acc-tint); }
.js .board.is-in .vt-row:not(.is-skel) { animation: row-in .8s var(--ease-out) calc(var(--i, 0) * 70ms) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(14px); } }
.vt-title { font: 600 17px/1.25 var(--f-num); letter-spacing: -.005em; }
.vt-desc { margin-top: 3px; font-size: 14px; color: var(--mut); }
.vt-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink2); }
/* Status marks stay clear of the Harvey ball, which only ever means a verdict. */
.vt-status .mark { width: 7px; height: 7px; margin: 0 2px; border-radius: 2px; flex: none; background: color-mix(in oklab, var(--mut) 70%, var(--bg)); }
.vt-status .mark.next { background: var(--acc); }
/* building now: the same square, alive (the turning Harvey ball is reserved for loading) */
.vt-status .mark.building { position: relative; background: var(--acc); }
.vt-status .mark.building::after { content: ""; position: absolute; inset: -3px; border-radius: 3px; box-shadow: 0 0 0 1.5px var(--acc); animation: ping 2.4s var(--ease-out) infinite; }
.vote {
  position: relative; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 84px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--br-strong); background: var(--pnl); color: var(--ink2);
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.vote:hover { box-shadow: inset 0 0 0 1px var(--mut); color: var(--ink); }
.vote:active { transform: scale(.96); }
.vote .i { color: var(--mut); transition: transform .3s var(--ease-out), color .15s; }
.vote:hover .i { transform: translateY(-2px); }
.vote-n { font: 600 16px/1 var(--f-num); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.vote[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
.vote[aria-pressed="true"] .i { color: var(--acc-ink); transform: translateY(-1px); }
.vote[aria-pressed="true"]:hover { background: var(--acc-hover); }
.vote.is-bump .vote-n { animation: bump .4s var(--ease-out); }
@keyframes bump { 40% { transform: translateY(-4px); } }
.burst { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; pointer-events: none; box-shadow: inset 0 0 0 1.5px var(--acc); }
.burst.full { background: var(--acc); }
.vt-foot { padding: 18px 28px; border-top: 1px solid var(--br); font-size: 14px; color: var(--mut); background: var(--pnl); }
.vt-err { padding: 24px 28px; font-size: 14px; color: var(--ink2); }

.skel { display: block; height: 12px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--pnl2) 30%, var(--hover) 50%, var(--pnl2) 70%); background-size: 250% 100%; animation: shimmer 1.4s linear infinite; }
.skel-t { width: 40%; height: 14px; }
.skel-s { width: 64%; margin-top: 8px; }
.vt-row.is-skel { display: block; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* ── Feedback, on the closing band ──────────────────────────────────────── */
.feedback { padding-top: 136px; }
.fb-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; padding-bottom: 136px; }
.fb-grid .sec-head { margin-bottom: 0; position: sticky; top: calc(var(--top-h) + 32px); }
.fb { background: var(--pnl); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 40px 90px -30px rgba(0,0,0,.7); padding: 28px; }
.fld + .fld { margin-top: 18px; }
.fld-foot { display: flex; align-items: flex-start; gap: 12px; }
.fld-foot .err { flex: 1; }
.fld-count { margin-left: auto; margin-top: 7px; font-size: 12.5px; color: var(--mut); }
.fld-count.is-near { color: var(--bad); }
.fb-actions { margin-top: 22px; }
.fb-done { display: flex; align-items: flex-start; gap: 12px; animation: settle .5s var(--ease-out); }
.fb-done-title { font: 600 21px/1.25 var(--f-num); outline: none; }
.fb-done-sub { margin: 3px 0 16px; font-size: 14px; color: var(--mut); }

/* ── Closing: the sky returns over the one action ─────────────────────── */
.finale {
  position: relative; isolation: isolate; overflow: hidden; color: var(--ink);
  min-height: min(92svh, 860px); display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(96px, 16svh, 150px);
  background: linear-gradient(180deg, var(--band-2), var(--bg) 45%);
}
.finale-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.finale h2 { font: 600 clamp(38px, 5.2vw, 72px)/1.02 var(--f-num); letter-spacing: -.028em; text-wrap: balance; max-width: 14ch; }
.finale-sub { margin-top: 18px; font-size: 17px; color: var(--ink2); text-wrap: pretty; }
#finaleJoin { margin-top: 32px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 28px -10px color-mix(in oklab, var(--acc) 70%, transparent); }
.finale .foot { position: relative; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot {
  display: flex; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 32px; font-size: 13px; color: var(--band-mut);
  background: linear-gradient(var(--band-br), var(--band-br)) no-repeat var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px;
}
.foot .brand-name { font-size: 16px; color: var(--band-ink); }
.foot .logo { color: var(--band-ink); --logo-acc: var(--band-acc); }
.foot .tool { margin-left: auto; color: var(--band-ink2); }
.foot .tool .i { color: var(--band-mut); }
.foot .tool:hover { background: rgba(255,255,255,.08); color: var(--band-ink); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hide-md { display: none; }
}

@media (max-width: 1080px) {
  .hero { min-height: 0; padding-top: calc(var(--top-h) + 48px); }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero h1 { max-width: 13ch; }
  .join { max-width: 560px; }
  .fb-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fb-grid .sec-head { position: static; }
  .tour-head { margin-top: 112px; }
  .chapters { gap: 104px; margin-top: 88px; }
  .chap, .chap:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chap:nth-child(even) .chap-copy { order: 0; justify-self: start; }
  .chap-copy { max-width: 560px; }
  .chap-shot, .chap:nth-child(even) .chap-shot { justify-self: start; }
  .chap-wide .chap-copy { justify-self: start; text-align: left; }
  .chap-wide .chap-shot { justify-self: start; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --top-h: 58px; }
  .top-tag { display: none; }
  .top .top-join { margin-left: auto; height: 32px; padding: 0 12px; }
  .hero { padding-top: calc(var(--top-h) + 40px); padding-bottom: 150px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 56px); }
  .ruled::before { font-size: 12.5px; padding: 4px 7px; }
  .lede { font-size: 16.5px; margin-top: 36px; }
  .hero-in { gap: 32px; }
  .join { margin-top: 32px; }
  .join:has(.joined:not([hidden])) { padding: 20px; }
  .lede { text-align: center; }
  .join-row { flex-direction: column; }
  .join-row .field-in { flex: none; }
  .join-row .btn { width: 100%; }
  .join-meta .dot { display: none; }
  .join-meta .count { display: block; margin-bottom: 2px; }

  .tour-in { padding-top: 48px; padding-bottom: 40px; }
  .shot-frame, .chap-frame { border-radius: var(--r-md); }
  .can-reveal .chap-frame { clip-path: inset(6% 4% 6% 4% round var(--r-md)); }
  .can-reveal .is-in .chap-frame { clip-path: inset(0 round var(--r-md)); }
  .tour-head { margin-top: 88px; text-align: left; }
  .tour-head p, .chap-copy p { font-size: 16px; }
  .chapters { gap: 88px; margin-top: 64px; }

  .roadmap { padding: 88px 0 96px; }
  .feedback { padding-top: 88px; }
  .fb-grid { padding-bottom: 88px; }
  .sec-head { margin-bottom: 28px; }
  .sec-head p { font-size: 16px; }
  .vt-head { display: none; }
  .vt-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main vote" "status vote"; row-gap: 8px; padding: 16px; }
  .vt-main { grid-area: main; }
  .vt-status { grid-area: status; font-size: 12.5px; }
  .vote { grid-area: vote; align-self: center; min-width: 70px; }
  .vt-foot { padding: 14px 16px; }
  .fb { padding: 20px; margin-inline: -4px; }
  .foot { flex-wrap: wrap; gap: 10px 16px; }
  .foot p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}
