/* ------------------------------------------------------------------
   The Velvet prototype — layout, type, motion
   Colours live in tokens.css.
   Two voices: light italic serif = what's asked and the Muse's asides;
               heavy sans = what gets built.
------------------------------------------------------------------- */
:root {
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 4.4vw, 64px);
  --max: 1480px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-bottom: 72px; background: var(--ivory); color: var(--ink); font: 400 1.1rem/1.55 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.build :focus-visible { outline-color: var(--brand); }
.mono { font: 500 0.76rem/1.35 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 70; padding: 10px 14px; background: var(--gold); color: var(--on-gold); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 30px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font: 600 1.1rem/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1.5px solid var(--gold); transition: gap 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.4s, color 0.4s, border-color 0.4s; }
.btn:hover { gap: 20px; transform: rotate(-1.5deg); }
.btn--small { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.btn--ghost { background: none; color: var(--on-night); border-color: var(--line-on-night); }
.btn--ghost:hover { border-color: var(--on-night); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: 30px; padding: 16px var(--pad); color: var(--on-night); border-bottom: 1px solid transparent; transition: background-color 0.35s, color 0.35s, border-color 0.35s; }
.nav[data-solid] { background: var(--night); border-bottom-color: var(--line-on-night); }
.nav[data-tone="ivory"] { background: var(--ivory); color: var(--ink); border-bottom-color: var(--line); }
.mark { margin-right: auto; display: inline-flex; align-items: baseline; min-height: 48px; padding-top: 10px; font: 400 1.45rem/1 var(--serif); font-variation-settings: "SOFT" 60; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; gap: 0.26em; }
.mark span { color: var(--gold); margin-left: -0.2em; }
.nav[data-tone="ivory"] .mark span { color: var(--brand); }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-size: 1rem; font-weight: 500; text-decoration: none; padding: 13px 0; background: linear-gradient(var(--gold), var(--gold)) 0 calc(100% - 8px) / 0 2px no-repeat; transition: background-size 0.25s var(--ease); }
.nav__links a:hover { background-size: 100% 2px; }
.nav__menu { display: none; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid currentColor; background: none; font-weight: 600; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--night); color: var(--on-night); }
.hero.is-pinned { height: 480vh; height: 480svh; }
.hero__stage { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: clamp(24px, 4vw, 72px); padding: 92px var(--pad) 0; --mx: 0; --my: 0; --lit: 0; }
.hero.is-pinned .hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; }

.bg, .bg i { position: absolute; inset: 0; pointer-events: none; }
.bg__a { background: radial-gradient(58% 62% at 14% 18%, var(--light-a), transparent 72%), radial-gradient(40% 44% at 96% 4%, var(--light-a), transparent 70%); opacity: 0.8; }
.bg__b { background: radial-gradient(40% 46% at calc(77% + var(--mx) * 3%) calc(60% + var(--my) * 3%), var(--light-b), transparent 70%); opacity: calc(0.12 + var(--lit) * 0.78); transition: opacity 0.9s var(--ease); }
.bg__grain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); mix-blend-mode: overlay; opacity: 0.4; box-shadow: inset 0 0 220px 40px rgba(0, 0, 0, 0.45); }

.hero__copy { position: relative; z-index: 2; align-self: center; padding-bottom: 2vh; }
.eyebrow { color: var(--muted-on-night); margin-bottom: clamp(14px, 2.4vh, 26px); }
.h > span { display: block; }
.h__ask { font: 340 clamp(3rem, 7.1vw, 8rem)/0.93 var(--serif); font-variation-settings: "SOFT" 40; letter-spacing: -0.03em; }
.h__ask em { color: var(--aside); font-variation-settings: "SOFT" 100; background: linear-gradient(var(--aside), var(--aside)) 0 96% / 100% 0.045em no-repeat; padding-right: 0.04em; }
.h__do { font: 800 clamp(2.4rem, 5.5vw, 6.1rem)/1.04 var(--sans); letter-spacing: -0.055em; margin-top: 0.14em; }
.h__nw { display: block; white-space: nowrap; }
.verb { display: inline-block; padding: 0 0.16em 0.04em; border-radius: 0.14em; background: var(--gold); color: var(--on-gold); transform: rotate(-2deg); overflow: hidden; vertical-align: baseline; }
.verb span { display: inline-block; }
.verb span.swap { animation: verb 0.5s var(--spring); }
@keyframes verb { from { transform: translateY(70%) rotate(6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hero__sub { margin-top: clamp(18px, 3vh, 30px); max-width: 30em; font-size: clamp(1.1rem, 1.4vw, 1.32rem); line-height: 1.48; color: var(--muted-on-night); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(20px, 3.4vh, 34px); }

/* ---------- the scene ---------- */
.scene { position: relative; z-index: 7; align-self: center; height: min(64vh, 580px); }
.comment { position: absolute; left: 0; top: 3%; width: min(80%, 380px); padding: 18px 22px 22px; background: var(--ivory); color: var(--ink); border-radius: 24px 24px 24px 6px; box-shadow: 0 34px 70px -22px rgba(0, 0, 0, 0.6); transform: translate3d(calc(var(--mx) * -12px), calc(var(--my) * -9px), 0) rotate(-4deg) scale(var(--csc, 1)); transform-origin: 20% 80%; transition: transform 0.7s var(--ease), opacity 0.6s; }
.comment__from { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 10px; }
.comment__from i { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); }
.comment__q { font: italic 380 clamp(1.5rem, 2.3vw, 2.15rem)/1.12 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.015em; }
.comment__q mark { background: linear-gradient(var(--gold), var(--gold)) 0 0 / 0% 100% no-repeat; color: inherit; padding: 0 0.1em; border-radius: 0.12em; transition: background-size 0.6s var(--ease); }
.hero:not([data-step="0"]) .comment__q mark { background-size: 100% 100%; }
.aside { position: absolute; left: 1%; top: 44%; max-width: 31%; font: italic 380 1.22rem/1.25 var(--serif); font-variation-settings: "SOFT" 100; color: var(--aside); }
.arrow { position: absolute; left: 12%; top: 66%; width: clamp(70px, 7vw, 104px); overflow: visible; transform: scaleY(-1) rotate(8deg); }
.arrow path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 150; stroke-dashoffset: 150; transition: stroke-dashoffset 0.7s var(--ease) 0.15s; }
.arrow.is-on path { stroke-dashoffset: 0; }

.card { position: absolute; right: 0; bottom: 2%; width: min(66%, 390px); min-height: 318px; padding: 20px; display: flex; flex-direction: column; gap: 10px; border-radius: 20px; border: 1.5px dashed var(--line-on-night); transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 13px), 0) rotate(var(--rot, 2.5deg)) scale(var(--sc, 0.96)); transform-origin: 70% 60%; transition: transform 0.8s var(--spring), background-color 0.6s var(--ease), color 0.5s, border-color 0.5s, box-shadow 0.8s; }
.card__empty { position: absolute; inset: 0; display: grid; place-items: center; font: italic 380 1.2rem var(--serif); color: var(--muted-on-night); transition: opacity 0.3s; }
.card.is-built { background: var(--ivory); color: var(--ink); border: 1.5px solid transparent; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.65); }
.card.is-built .card__empty { opacity: 0; }
.card.is-live { box-shadow: 0 0 0 4px var(--gold), 0 0 90px 10px var(--light-b), 0 40px 80px -24px rgba(0, 0, 0, 0.65); }
.hero[data-step="2"] .card { --sc: 1; }
.hero[data-step="3"] .card { --sc: 1.03; --rot: 1.5deg; }
.hero[data-step="4"] .card { --sc: 1.06; --rot: 0.5deg; }
.hero[data-step="5"] .card { --sc: 1.1; --rot: -1.6deg; }
.hero[data-step="2"] .comment, .hero[data-step="3"] .comment { --csc: 0.94; }
.hero[data-step="4"] .comment, .hero[data-step="5"] .comment { --csc: 0.88; }
.card__kicker { color: var(--muted); }
.card__title { font: 800 clamp(1.6rem, 2.4vw, 2.2rem)/1 var(--sans); letter-spacing: -0.05em; }
.card__promise { font: italic 380 1.14rem/1.25 var(--serif); color: var(--muted); }
.mods { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-top: 6px; }
.mods i { height: 42px; border-radius: 7px; background: var(--brand); transform: scale(0) rotate(-12deg); transition: transform 0.5s var(--spring) calc(var(--i, 0) * 70ms); }
.mods i:nth-child(1) { --i: 0; } .mods i:nth-child(2) { --i: 1; background: var(--gold); } .mods i:nth-child(3) { --i: 2; background: var(--night); }
.mods i:nth-child(4) { --i: 3; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--line); } .mods i:nth-child(5) { --i: 4; } .mods i:nth-child(6) { --i: 5; background: var(--gold); }
.mods.is-on i { transform: none; }
.sys { display: flex; flex-wrap: wrap; gap: 6px; }
.sys li { padding: 7px 11px; border-radius: 6px; border: 1px solid var(--line); font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.card__buy { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-weight: 600; font-size: 1.05rem; }
.card__live { position: absolute; right: 18px; top: 18px; display: flex; align-items: center; gap: 7px; color: var(--brand); }
.card__live i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
[data-at]:not(.mods):not(.arrow) { opacity: 0; transform: translateY(10px); transition: opacity 0.45s var(--ease), transform 0.55s var(--spring); }
[data-at].is-on:not(.mods):not(.arrow) { opacity: 1; transform: none; }

/* ---------- rail ---------- */
.rail { position: relative; z-index: 2; grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 28px; padding: 12px 0 16px; border-top: 1px solid var(--line-on-night); }
.chips { display: flex; gap: 8px; }
.chips button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-on-night); background: none; cursor: pointer; font: italic 380 1.08rem/1 var(--serif); transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.chips button:hover { border-color: var(--on-night); }
.chips button[aria-pressed="true"] { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.rail__caption { font-size: 1.02rem; color: var(--muted-on-night); min-height: 1.6em; }
.rail__caption b { color: var(--on-night); font-weight: 600; }
.steps { display: flex; gap: 2px; }
.steps button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 8px; background: none; border: 0; border-radius: 999px; cursor: pointer; color: var(--muted-on-night); font: 500 0.76rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.25s; }
.steps button::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color 0.25s, transform 0.4s var(--spring); }
.steps button:hover, .steps button.is-done { color: var(--on-night); }
.steps button.is-done::before { background: currentColor; }
.steps button[aria-current="step"] { color: var(--gold); }
.steps button[aria-current="step"]::before { background: currentColor; transform: scale(1.4); }

/* ---------- the lights come up ---------- */
.flood { position: absolute; inset: 0; z-index: 6; background: var(--ivory); pointer-events: none; clip-path: circle(calc(var(--flood, 0) * 150vmax) at var(--fx, 76%) var(--fy, 62%)); }
.hero:not(.is-pinned) .flood { display: none; }
.flood__line { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); width: min(44%, 620px); color: var(--ink); }
.flood__line em { display: block; font: italic 340 clamp(2.6rem, 6vw, 6.4rem)/0.96 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.03em; color: var(--brand); }
.flood__line span { display: block; margin-top: 0.5em; font: 800 clamp(1.3rem, 2.2vw, 2.1rem)/1.1 var(--sans); letter-spacing: -0.045em; }
.comment, .arrow { opacity: calc(1 - var(--flood, 0) * 4); }
.hero .scene p.aside.is-on { opacity: calc(1 - var(--flood, 0) * 6); }
.hero .scene .arrow.is-on { opacity: calc(1 - var(--flood, 0) * 6); }
.hero[data-step="4"] .comment, .hero[data-step="5"] .comment { opacity: calc(0.82 - var(--flood, 0) * 4); }
.rail, .hero__copy { opacity: calc(1 - var(--flood, 0) * 3); }

/* ---------- what I build ---------- */
.build { background: var(--ivory); padding: clamp(64px, 9vw, 140px) var(--pad) clamp(56px, 7vw, 110px); }
.build > * { max-width: var(--max); margin-inline: auto; }
.build__head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px 72px; align-items: end; }
.build__head > .mono { grid-column: 1 / -1; color: var(--muted); }
.h2__a, .h2__b { display: block; }
.h2__a { font: italic 340 clamp(2.6rem, 6.3vw, 6.6rem)/0.96 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.03em; color: var(--brand); }
.h2__b { font: 800 clamp(2.2rem, 5.2vw, 5.4rem)/1 var(--sans); letter-spacing: -0.058em; margin-top: 0.12em; }
.pair { display: grid; gap: 16px; }
.pair p { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.pair .mono { color: var(--muted); }
.pair em { font: italic 380 1.4rem/1.25 var(--serif); font-variation-settings: "SOFT" 100; }
.pair strong { font: 800 1.22rem/1.25 var(--sans); letter-spacing: -0.03em; }
.ledger { margin-top: clamp(44px, 6vw, 88px); border-top: 2px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: clamp(60px, 7vw, 110px) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.05fr); align-items: baseline; gap: 8px 30px; padding: 26px 0; border-bottom: 1px solid var(--line); transition: background-color 0.3s, padding 0.35s var(--ease); }
.ledger li:hover { background: var(--panel); padding-inline: 18px; }
.ledger__no { font: italic 300 clamp(2.6rem, 4.6vw, 4.4rem)/0.8 var(--serif); font-variation-settings: "SOFT" 100; color: var(--brand); }
.ledger h3 { font: 800 clamp(1.5rem, 2.5vw, 2.25rem)/1.05 var(--sans); letter-spacing: -0.05em; }
.ledger li > p:not(.margin) { color: var(--muted); max-width: 34em; }
.margin { font: italic 380 1.2rem/1.3 var(--serif); font-variation-settings: "SOFT" 100; color: var(--brand); transform: rotate(-1deg); transform-origin: left; }
.next { margin-top: clamp(40px, 6vw, 72px); display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--muted); }
.next b { color: var(--ink); font-weight: 600; }

/* ---------- ticker ---------- */
.ticker { background: var(--brand); color: var(--on-brand); overflow: hidden; white-space: nowrap; height: 76px; display: flex; align-items: center; }
.ticker__track { display: inline-flex; animation: tick 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: baseline; gap: 16px; padding: 0 32px; }
.ticker i { font: italic 380 1.7rem/1 var(--serif); font-variation-settings: "SOFT" 100; }
.ticker i::after { content: "→"; font: 400 1.05rem var(--mono); margin-left: 16px; color: var(--gold); }
.ticker b { font: 800 1.55rem/1 var(--sans); letter-spacing: -0.045em; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- let's talk ---------- */
.talk { background: var(--rare); color: var(--on-rare); padding: clamp(72px, 10vw, 150px) var(--pad); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px 72px; align-items: end; }
.talk .h2__a { color: inherit; font-size: clamp(2.8rem, 7vw, 7.4rem); }
.talk .h2__b { font-size: clamp(2.3rem, 5.7vw, 6rem); }
.chip { display: inline-block; padding: 0 0.16em 0.04em; border-radius: 0.14em; background: var(--gold); color: var(--on-gold); transform: rotate(-2deg); }
.talk__side p { max-width: 30em; opacity: 0.86; }
.talk__side .btn { margin-top: 24px; }
.talk__side .mono { margin-top: 16px; opacity: 0.8; }

/* ---------- menu ---------- */
.menu { position: fixed; inset: 0; z-index: 60; background: var(--night); color: var(--on-night); padding: 92px var(--pad) 96px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow: auto; }
.menu[hidden] { display: none; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; font: italic 340 clamp(2.1rem, 9.4vw, 3.4rem)/1.05 var(--serif); font-variation-settings: "SOFT" 100; text-decoration: none; border-bottom: 1px solid var(--line-on-night); }
.menu nav .mono { color: var(--gold); }
.menu__close { position: absolute; top: 16px; right: var(--pad); min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--on-night); background: none; font-weight: 600; cursor: pointer; }
.menu .btn { justify-content: center; }

/* ---------- skin preview (testing only) ---------- */
.skins { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: #141210; color: #f3eee4; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); max-width: calc(100vw - 16px); font: 500 0.86rem/1 var(--sans); }
.skins button, .skins a { display: flex; align-items: center; min-height: 44px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; background: none; color: inherit; cursor: pointer; white-space: nowrap; text-decoration: none; }
.skins a { padding: 0 14px; color: #c9c0b3; }
.skins i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); margin-right: -5px; }
.skins span { margin-left: 12px; }
.skins button:hover, .skins a:hover { background: rgba(255, 255, 255, 0.12); }
.skins button[aria-pressed="true"] { background: #f3eee4; color: #141210; }
.wide-only { display: inline; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav__links, .nav .btn { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
}
@media (max-width: 900px) {
  body { font-size: 1.04rem; }
  .hero__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; padding-top: 76px; padding-bottom: 62px; row-gap: 12px; }
  .mark { font-size: 1.16rem; }
  .nav { gap: 12px; padding-block: 10px; }
  .nav__menu { min-height: 44px; padding: 0 18px; }
  .hero__copy { padding-bottom: 0; align-self: start; }
  .eyebrow, .btn--ghost, .wide-only, .aside, .arrow, .chips { display: none; }
  .flood__line { top: 96px; transform: none; width: auto; right: var(--pad); }
  .h__ask { font-size: clamp(2.6rem, 12.6vw, 5rem); }
  .h__do { font-size: clamp(2.2rem, 10.6vw, 4rem); }
  .hero__sub { margin-top: 12px; font-size: 1.02rem; }
  .hero__actions { margin-top: 14px; }
  .btn { min-height: 54px; padding: 0 26px; font-size: 1.04rem; }
  .scene { height: auto; min-height: 236px; align-self: stretch; }
  .comment { top: 0; width: 84%; padding: 12px 16px 14px; border-radius: 18px 18px 18px 5px; }
  .comment__from { margin-bottom: 6px; font-size: 0.64rem; }
  .comment__q { font-size: 1.32rem; }
  .card { bottom: 4px; width: 86%; min-height: 196px; padding: 14px; gap: 6px; border-radius: 16px; }
  .card__title { font-size: 1.42rem; }
  .card__promise { font-size: 1rem; }
  .mods i { height: 24px; }
  .sys { flex-wrap: nowrap; gap: 5px; }
  .sys li { padding: 5px 6px; font-size: 0.56rem; letter-spacing: 0.05em; white-space: nowrap; }
  .card__buy { min-height: 40px; font-size: 0.98rem; }
  .card__live { right: 12px; top: 12px; }
  .hero[data-step="3"] .card, .hero[data-step="4"] .card, .hero[data-step="5"] .card { --sc: 1; }
  .rail { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 0 10px; }
  .rail__caption { font-size: 0.9rem; line-height: 1.35; min-height: 2.7em; }
  .steps { justify-content: space-between; }
  .steps button { flex-direction: column; justify-content: center; gap: 5px; padding: 0 2px; min-height: 46px; font-size: 0.64rem; letter-spacing: 0.04em; }
  .build__head, .talk { grid-template-columns: minmax(0, 1fr); }
  .ledger li { grid-template-columns: 46px minmax(0, 1fr); gap: 6px 12px; }
  .ledger li > p { grid-column: 2; }
  .ledger__no { font-size: 2.4rem; }
  .skins { font-size: 0.76rem; gap: 0; }
  .skins button, .skins a { padding: 0 9px 0 7px; }
  .skins a { padding: 0 9px; }
  .skins span { margin-left: 9px; font-size: 0; }
  .skins span::after { content: attr(data-short); font-size: 0.76rem; }
}

/* =====================================================================
   REFINEMENT PASS (17 Nov): same design, sharper execution.
   ===================================================================== */

/* -- type: nothing important below 12.8px on desktop -- */
.mono { font-size: 0.8rem; }
.steps button { font-size: 0.8rem; }
.sys li { font-size: 0.74rem; }
.comment__from { font-size: 0.74rem; }

/* -- headline: the whole second line changes with the stage -- */
.h__do { font-size: clamp(2.3rem, 5.1vw, 5.7rem); }
.h__obj { overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.h__obj span { display: inline-block; }
.h__obj span.swap { animation: verb 0.55s var(--spring) 0.07s both; }

/* -- depth: two faint shafts of light and a deeper vignette -- */
.bg__a { background:
  linear-gradient(118deg, transparent 34%, rgba(255, 255, 255, 0.05) 41%, transparent 49%),
  linear-gradient(118deg, transparent 58%, rgba(255, 255, 255, 0.035) 63%, transparent 70%),
  radial-gradient(58% 62% at 14% 18%, var(--light-a), transparent 72%),
  radial-gradient(40% 44% at 96% 4%, var(--light-a), transparent 70%); }
.bg__grain { box-shadow: inset 0 0 260px 60px rgba(0, 0, 0, 0.55); }
.comment { box-shadow: 0 46px 90px -26px rgba(0, 0, 0, 0.7), 0 6px 14px -6px rgba(0, 0, 0, 0.4); }

/* -- progress you can see: rings grow from the product as it becomes real -- */
.rings { position: absolute; right: 0; bottom: 2%; width: min(66%, 390px); height: 318px; pointer-events: none; transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 13px), 0); }
.rings i { position: absolute; left: 50%; top: 50%; width: 128%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--gold); opacity: calc(var(--lit) * 0.42 - var(--flood, 0) * 2); transform: translate(-50%, -50%) scale(calc(0.55 + var(--lit) * var(--k))); transition: transform 1.1s var(--ease), opacity 0.8s; }
.rings i:nth-child(1) { --k: 0.32; }
.rings i:nth-child(2) { --k: 0.66; border-style: dashed; }
.rings i:nth-child(3) { --k: 1; }

/* -- the payoff: three quick strokes when it goes live -- */
.spark { position: absolute; right: -30px; top: -66px; width: 88px; overflow: visible; }
.spark path { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 46; stroke-dashoffset: 46; transition: stroke-dashoffset 0.45s var(--ease); }
.spark.is-on path { stroke-dashoffset: 0; }
.spark.is-on path:nth-child(1) { transition-delay: 0.35s; }
.spark.is-on path:nth-child(2) { transition-delay: 0.47s; }
.spark.is-on path:nth-child(3) { transition-delay: 0.59s; }

/* -- the rail: caption on its own line, a gold line that fills as you scroll -- */
.rail { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "cap cap cap" "chips . steps"; row-gap: 8px; padding: 14px 0 14px; }
.rail::before { content: ""; position: absolute; left: 0; top: -1.5px; width: 100%; height: 2px; background: var(--gold); transform-origin: left; transform: scaleX(var(--prog, 0)); }
.rail__caption { grid-area: cap; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 1.1rem; }
.rail__caption .mono { color: var(--gold); }
.chips { grid-area: chips; }
.steps { grid-area: steps; }
.hero[data-step="0"] .rail__caption { font: italic 380 1.34rem/1.3 var(--serif); font-variation-settings: "SOFT" 100; color: var(--on-night); }
.cue { display: inline-block; color: var(--gold); font-style: normal; animation: cue 1.4s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(6px); } }

/* -- dark to light: a marigold rim leads the ivory, and the product settles upright -- */
.flood--edge { z-index: 5; background: var(--gold); clip-path: circle(calc(var(--flood, 0) * 153vmax) at var(--fx, 76%) var(--fy, 62%)); }
.card { transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 13px), 0) rotate(calc(var(--rot, 2.5deg) * (1 - var(--flood, 0)))) scale(var(--sc, 0.96)); }

/* -- testing bar: smaller, and it now sits in the gap between the rail's controls -- */
.skins { font-size: 0.8rem; }
.skins button, .skins a { min-height: 40px; padding: 0 12px 0 9px; }
.skins a { padding: 0 12px; }

@media (max-width: 900px) {
  .h__do { font-size: clamp(2.1rem, 9.7vw, 4rem); }
  .rail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cap" "steps"; row-gap: 2px; padding: 10px 0 8px; }
  .rail__caption { font-size: 0.92rem; }
  .rail__caption .mono { display: none; }
  .hero[data-step="0"] .rail__caption { font-size: 1.12rem; }
  .steps button { font-size: 0.7rem; }
  .sys li { font-size: 0.66rem; padding: 5px 6px; }
  .comment__from { font-size: 0.68rem; }
  .rings { width: 86%; height: 200px; bottom: 4px; }
  .rings i { width: 100%; }
  .rings i:nth-child(1) { --k: 0.2; } .rings i:nth-child(2) { --k: 0.42; } .rings i:nth-child(3) { display: none; }
  .spark { right: -6px; top: -42px; width: 56px; }
  .skins button, .skins a { padding: 0 8px 0 6px; font-size: 0.72rem; }
  .skins a { padding: 0 8px; }
}

/* ---------- reduced motion (or add ?calm to the address) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
