/* ===== v8 design side: the v5 design view on a deep navy ground ===== */
:root {
  /* the graphite family becomes navy; every rule that read graphite now reads the new ground */
  --graphite: #0c1222;
  --graphite-2: #131a2f;
  --graphite-3: #222b47;
  --black: #070b16;
  --black-2: #0f1424;
  --on-graphite-2nd: #b3b9c9;   /* 9.4:1 on the ground */
  --on-black-2nd: #aab0c0;
  --rule-graphite: rgba(214, 222, 240, .14);
  --quiet: #8d94a8;             /* 5.6:1 on the ground, for small print */
  --ground: var(--graphite);
}
body { background: var(--graphite); color: var(--bone); }
html { scrollbar-color: var(--graphite-3) var(--black); }
::selection { background: var(--lemon); color: var(--black); }

/* module colour context: dark page, light paper */
body { --rn-ink: #ECE8E0; --rn-muted: #b3b9c9; --rn-line: rgba(214,222,240,.16); --rn-ok: #3FC6D8; --rn-bad: #FF6B4A; --rn-warn: #F4E04D; --rn-accent: #F4E04D; --rn-surface: #131a2f; }
.paper { --rn-ink: #17181B; --rn-muted: #4A463F; --rn-line: rgba(23,24,27,.16); --rn-ok: #1E6B52; --rn-bad: #C23A1C; --rn-warn: #8A5F00; --rn-accent: #2F4DE0; --rn-surface: #F8F5EF;
  background: var(--bone); color: var(--black); border-radius: 18px; padding: 48px; }
.paper ::selection { background: var(--cobalt); color: #fff; }
.paper--game { padding: 28px; }

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

/* nav */
.nav.is-scrolled { background: color-mix(in srgb, var(--graphite) 94%, transparent); }
.nav__links a { color: var(--on-graphite-2nd); }

/* hero */
.hero { padding: 168px 0 96px; }
.hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
.reg-head { font-size: clamp(54px, 5.4vw, 82px); max-width: 12ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__actions .btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.hero__actions .btn:hover svg { transform: translateX(4px); }
.receipts { margin-top: 44px; }

/* specimen, now on the dark ground, framed with crop marks like a proof */
.specimen { position: relative; border-top: 0; padding: 30px 30px 24px; }
.specimen .crop { border-color: var(--quiet); }
.specimen__glyphs { color: var(--bone); font-size: 232px; height: 280px; }
.specimen__g { color: var(--coral); }
.specimen .m { border-top-color: rgba(63, 198, 216, .75); }
.specimen .m i { color: var(--cyan); }
.specimen figcaption { color: var(--on-graphite-2nd); }
.specimen__try { color: var(--lemon); text-underline-offset: 3px; }

/* colour fields: full bleed, chips stay paper */
.fields { margin-top: 0; background: var(--bone); height: 440px; }   /* bone paper under the multiply overprints */
main section, #fields { scroll-margin-top: 84px; }
.field--k { background: var(--black); box-shadow: inset 1px 0 0 var(--rule-graphite); }
.fields__hint { background: var(--black); color: var(--bone); }
.chip { box-shadow: 0 18px 32px -18px rgba(2, 4, 12, .7); }
.chip svg { color: #8f95a8; }
.chip--ink { background: var(--black); }

/* bands */
.dband { padding: 128px 0 104px; }
.dband + .dband { border-top: 1px solid var(--rule-graphite); }
.dband .band__intro { color: var(--on-graphite-2nd); }
.does li::before { border-radius: 2px; }
.does li:nth-child(4n+2)::before { background: var(--cyan); }
.does li:nth-child(4n+3)::before { background: var(--lemon); }
.does li:nth-child(4n)::before { background: var(--cobalt); }
.does { font-size: 17px; gap: 16px 32px; }

/* how it works */
.steps { border-top-color: var(--bone); }
.boundary { background: var(--graphite-2); }
.who__grid { margin-top: 88px; padding-top: 48px; border-top: 1px solid var(--rule-graphite); }
.who__h { font: 700 34px/1.08 var(--display); letter-spacing: -.015em; max-width: 16ch; }
.overlap__ticks, .overlap__note, .overlap__facts small { color: var(--quiet); }

/* the break and the game */
.dband--break { padding: 64px 0; }
.dband--break + .dband { border-top: 0; }
.break-row .btn--ink { background: var(--black); color: var(--bone); }
.dband--game { padding-top: 24px; border-top: 0 !important; }
#games:not([hidden]) { display: block; }

/* caps and brief on navy */
.rn-caps__ask { border-bottom-color: var(--bone); }
.rn-caps__input::placeholder { color: rgba(214, 222, 240, .34); }
.rn-caps__add { background: rgba(214, 222, 240, .1); }
.rn-caps__add:hover { background: rgba(214, 222, 240, .18); }
.rn-brief__field::placeholder { color: #98a0b6; }
.rn-brief__field option { background: var(--graphite-2); }
.rn-brief__chip { background: rgba(214, 222, 240, .1); }
.rn-brief__preview { background: var(--graphite-2); box-shadow: inset 0 0 0 1px var(--rule-graphite); }

/* tuner inside paper */
.paper .rn-tuner__code { background: var(--black); }

/* footer and review notes */
footer.foot { background: var(--black); border-top-color: var(--rule-graphite); padding-bottom: 56px; }
.foot a { color: var(--bone); text-underline-offset: 3px; }
.review-notes { margin-top: 32px; font-size: 14.5px; color: var(--on-graphite-2nd); }
.review-notes summary { cursor: pointer; color: var(--bone); font-weight: 600; width: fit-content; }
.review-notes > div { margin-top: 14px; max-width: 72ch; display: grid; gap: 10px; }
.review-notes ul { padding-left: 20px; display: grid; gap: 6px; }

/* x-ray on the navy ground */
body.xray .hero > .rn-xray__label, body.xray .dband > .rn-xray__label { position: absolute; top: 88px; left: max(var(--gutter), calc((100% - var(--axis)) / 2 + var(--gutter))); }
body.xray main > section > .axis, body.xray .fields { filter: grayscale(.85) contrast(1.05); }

@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .specimen { max-width: 520px; }
  .who__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .paper { padding: 32px; }
}
@media (max-width: 760px) {
  .hero { padding: 104px 0 56px; }
  .reg-head { font-size: clamp(40px, 11.5vw, 56px); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: space-between; }
  .specimen { padding: 20px 18px 16px; }
  .specimen__glyphs { font-size: 150px; height: 186px; }
  .fields { height: 500px; }
  .fields__hint { top: auto; bottom: 16px; right: 16px; }
  .dband { padding: 64px 0 56px; }
  .paper { padding: 20px 16px; border-radius: 14px; }
  .paper--game { padding: 12px; }
  .does { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--rule-graphite); }
  .who__grid { margin-top: 56px; padding-top: 32px; }
  .who__h { font-size: 28px; }
  .overlap { padding: 20px 18px; }
  .nav .btn--primary { padding: 10px 14px; font-size: 14.5px; }
}
@media (max-width: 400px) {
  .wordmark { font-size: 16px; }
  .paper { padding: 16px 8px; }
  .rn-feed__card { width: min(320px, 100%); }
  .rn-tuner__fonts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rn-tuner__font { min-width: 0; overflow-wrap: anywhere; }
}

/* first screen fits without scrolling (user 11-13) */
@media (min-width: 721px) {
  .hero { min-height: 100svh; display: flex; align-items: center; padding: calc(76px + clamp(12px, 4vh, 56px)) 0 clamp(16px, 4vh, 56px); box-sizing: border-box; }
  .hero > .axis { width: 100%; }
  .reg-head { font-size: clamp(44px, min(5.4vw, 8.6vh), 82px); }
  .hero__actions { margin-top: clamp(16px, 3.2vh, 40px); }
  .receipts { margin-top: clamp(14px, 3.4vh, 44px); }
  .specimen { padding: clamp(16px, 2.6vh, 30px) 30px clamp(14px, 2vh, 24px); }
  .specimen__glyphs { font-size: min(232px, 25vh); height: min(280px, 30vh); }
}
@media (min-width: 721px) and (max-height: 820px) {
  .hero__lede { font-size: 16px; line-height: 1.6; }
}
@media (max-width: 720px) {
  .hero { min-height: calc(100svh - 0px); padding: 88px 0 28px; box-sizing: border-box; }
  .hero .specimen { display: none; }
  .hero__lede { font-size: 16px; }
}

/* scroll motion (motion.js adds .motion only when motion is allowed) */
.motion [data-r] { opacity: 0; translate: 0 22px; transition: opacity .9s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s); }
.motion [data-r].is-in { opacity: 1; translate: 0 0; }
.motion [data-r].no-delay { transition: none; }
.motion .fields .field--c { translate: calc((1 - var(--p, 1)) * -70%) 0; }
.motion .fields .field--m { translate: calc((1 - var(--p, 1)) * -150%) 0; }
.motion .fields .field--y { translate: calc((1 - var(--p, 1)) * -210%) 0; }
.motion .fields .field--k { translate: calc((1 - var(--p, 1)) * 110%) 0; }
