/**
 * The site's layout and geometry — every page links this one file.
 *
 * Colours, fonts and the gradient recipes are NOT here: they come from
 * site/tokens.css, generated from design/tokens.json. A hex literal in this
 * file fails `npm run design:check`.
 */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ══ The pitch: mown turf, floodlight bloom, vignette ═══════════════ */
.turf { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.turf > div { position: absolute; inset: 0; }
.turf .base    { background: linear-gradient(180deg, var(--turf) 0%, var(--night) 55%, var(--night) 100%); }
.turf .stripes { background-image: var(--turf-stripes-site); }
.turf .bloom   { background: radial-gradient(ellipse 900px 620px at 50% 4%, rgb(var(--flood-rgb) / .13) 0%, transparent 70%); }
.turf .vignette{ background: radial-gradient(ellipse at 50% 40%, transparent 38%, rgb(0 0 0 / .60) 100%); }
.turf svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ══ Layout ════════════════════════════════════════════════════════ */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; }

/* ══ Type ══════════════════════════════════════════════════════════ */
.strap {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--flood);
  padding: 7px 14px;
  border-radius: 6px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 20px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(58px, 9vw, 118px); }
h2 { font-size: clamp(38px, 5.4vw, 68px); }
h3 { font-size: 30px; }
p  { line-height: 1.5; color: var(--muted); }
.lede { font-size: 20px; max-width: 46ch; }

.rule { height: 2px; background: var(--chalk-rule); }

/* ══ Buttons ═══════════════════════════════════════════════════════ */
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
  padding: 14px 30px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary {
  background: var(--flood); color: var(--night);
  box-shadow: 0 0 60px rgb(var(--flood-rgb) / .20);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 70px rgb(var(--flood-rgb) / .38); }
.btn-ghost {
  color: var(--chalk); border: 2px solid var(--line);
  background: var(--card-fill);
}
.btn-ghost:hover { border-color: var(--chalk); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--flood); outline-offset: 4px; }

/* ══ Hero ══════════════════════════════════════════════════════════ */
.hero { padding: 88px 0 72px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-copy > * + * { margin-top: 26px; }
.mark { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; }
.mark img { display: block; width: 100%; height: 100%; }

.brandbar { display: flex; align-items: center; gap: 16px; padding: 26px 0 0; }
.brandbar .name {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  text-transform: uppercase; letter-spacing: .01em;
}
.brandbar .mark { width: 40px; height: 40px; }
.brandbar nav { margin-left: auto; display: flex; gap: 26px; }
.brandbar nav a {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--faint); text-decoration: none;
}
.brandbar nav a:hover { color: var(--chalk); }

/* ══ The board — the shape every video frame is printed on ══════════ */
.board {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: rgb(var(--night-rgb) / .55);
  padding: 38px 30px 30px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgb(0 0 0 / .45);
}
.board::before { /* the board keeps its own turf, like a rendered frame */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgb(var(--flood-rgb) / .12), transparent 70%),
    linear-gradient(180deg, var(--turf), var(--night));
}
.board-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.board .prompt {
  font-family: var(--font-display); font-weight: 800; font-size: 44px;
  line-height: .94; text-transform: uppercase; text-align: center;
}
.board .rule { width: 180px; }

.ring { position: relative; width: 108px; height: 108px; }
.ring svg { transform: rotate(-90deg); }
.ring .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 44px; color: var(--flood);
}
.ring circle.track { stroke: var(--line-soft); }
.ring circle.arc {
  stroke: var(--flood); stroke-linecap: round;
  stroke-dasharray: 289; stroke-dashoffset: 58;
}

.options { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 16px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--card-fill);
  padding: 14px 18px;
  font-family: var(--font-mono); font-weight: 500; font-size: 17px;
  letter-spacing: .04em;
}
.option .letter {
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
  letter-spacing: .1em;
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 8px;
  color: var(--faint);
}
.option.correct {
  border-color: var(--flood);
  background: rgb(var(--flood-rgb) / .12);
  color: var(--flood);
}
.option.correct .letter { border-color: var(--flood); color: var(--flood); background: rgb(var(--flood-rgb) / .14); }

.factoid {
  border-left: 4px solid var(--flood);
  padding-left: 16px;
  font-size: 15px; line-height: 1.45; color: var(--muted);
  align-self: stretch;
}

/* ══ The game ══════════════════════════════════════════════════════ */
.game { padding: 34px 30px 30px; }
.game-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.game-head h3 { font-size: clamp(34px, 4vw, 54px); }
.game-head .subhead {
  margin: 0;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}

/* The board's body. Its margins belong to the slot, not to what fills it, so a
   pitch and a chart sit in exactly the same place. */
.stage { margin: 28px 0 26px; }

/* A pitch, cropped by its box the way a real one is. */
.pitch {
  position: relative;
  padding: 30px 18px;
  border: 2px solid var(--line-soft);
  border-radius: 14px;
  background-image: var(--turf-stripes-pitch);
  background-color: var(--turf);
  display: flex; flex-direction: column; gap: 22px;
  overflow: hidden;
}
.pitch::before { /* halfway line */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--line-soft);
}
.pitch-line { display: flex; justify-content: center; gap: clamp(6px, 1.4vw, 20px); position: relative; }

/* The chalk-edged plate a crest sits on — under a shirt, or beside a chart row. */
.plate {
  border-radius: 22%;
  border: 2px solid var(--line);
  background: rgb(var(--night-rgb) / .55);
  display: grid; place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  text-transform: uppercase;
}
.plate img { width: 76%; height: 76%; object-fit: contain; }
.plate.small { width: 34px; height: 34px; font-size: 12px; }
.plate.small.emoji { font-size: 19px; }

.slot { display: flex; flex-direction: column; align-items: center; gap: 7px; width: clamp(64px, 9vw, 104px); }
.slot .plate { width: clamp(38px, 5vw, 52px); height: clamp(38px, 5vw, 52px); }
.slot .plate.emoji { font-size: clamp(20px, 2.6vw, 28px); }
.slot .name {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(10px, 1.15vw, 13px); letter-spacing: .04em;
  text-align: center; line-height: 1.25;
  color: var(--faint);
  min-height: 2.5em;
  overflow-wrap: anywhere;
}
.slot.found .name { color: var(--flood); }
.slot.found .plate { border-color: var(--flood); }
.slot.missed .name { color: var(--offside); }
.slot.missed .plate { border-color: var(--offside); }
/* The reveal: a plate lands rather than fades, same as in the videos. */
.slot.just-found .plate { animation: land .42s cubic-bezier(.2,1.5,.4,1); }
@keyframes land {
  from { transform: scale(.6) translateY(-10px); }
  to   { transform: scale(1) translateY(0); }
}

/* ── A chart with the names blanked out: the same board, ranked ─────── */
.metric-label {
  margin: 0 0 10px;
  text-align: right;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 16px;
  border: 2px dashed var(--line-soft);
  border-radius: 12px;
  background: var(--card-fill);
}
.rank .marker {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  padding-top: 2px;
  color: var(--faint);
}
.rank .name {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-weight: 500; font-size: 16px;
  letter-spacing: .04em; color: var(--faint);
  overflow-wrap: anywhere;
}
/* An unfilled row: a chalk bar where the name goes, so the row reads as a gap
   to fill rather than as an empty one. Same idea as the video's blanked rows. */
.rank .name:empty::before {
  content: "";
  display: block;
  width: 42%; max-width: 210px; height: 11px;
  border-radius: 6px;
  background: rgb(var(--chalk-rgb) / .13);
}
/* The clue, and the reason the row is answerable at all — always visible. */
.rank .detail {
  font-family: var(--font-mono); font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
  color: var(--muted);
}
.rank.found { border-style: solid; border-color: rgb(var(--flood-rgb) / .55); background: rgb(var(--flood-rgb) / .08); }
.rank.found .name, .rank.found .detail { color: var(--flood); }
.rank.found .marker { border-color: var(--flood); background: var(--flood); color: var(--night); }
.rank.missed { border-style: solid; border-color: rgb(var(--offside-rgb) / .5); }
.rank.missed .name, .rank.missed .detail { color: var(--offside); }
.rank.missed .marker { border-color: var(--offside); color: var(--offside); }
/* The row fills in from the left, the way the video's does. */
.rank.just-found .name { animation: fill-in .42s cubic-bezier(.2,1.5,.4,1); }
@keyframes fill-in {
  from { transform: translateX(-14px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
/* An unranked list is a set, not a table — its markers don't count anything. */
.rank-list.unranked .marker { border-style: none; color: var(--faint); font-size: 30px; }
.rank-list.unranked .rank.found .marker { background: none; color: var(--flood); }
.rank-list.unranked .rank.missed .marker { color: var(--offside); }

.guess { display: flex; gap: 12px; align-items: center; }
.guess input {
  flex: 1; min-width: 0;
  background: rgb(var(--night-rgb) / .55);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--chalk);
  font-family: var(--font-mono); font-weight: 500; font-size: 18px;
  letter-spacing: .04em;
}
.guess input::placeholder { color: var(--faint); }
.guess input:focus { outline: none; border-color: var(--flood); }
.guess input:disabled { opacity: .5; }

.game-foot {
  margin-top: 18px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.game-foot .tally { color: var(--chalk); }
.game-foot .tally b { color: var(--flood); font-weight: 600; }
.game-foot .spacer { margin-left: auto; }
.game-foot button {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; padding: 6px 2px;
  cursor: pointer; border-bottom: 2px solid var(--line);
}
.game-foot button:hover { color: var(--chalk); border-color: var(--chalk); }
.game-foot button:focus-visible { outline: 3px solid var(--flood); outline-offset: 3px; }
/* The link to the board's own page. Only the home page draws one. */
.game-foot a {
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid var(--line); padding-bottom: 4px;
}
.game-foot a:hover { color: var(--chalk); border-color: var(--chalk); }

.verdict {
  margin: 20px 0 0;
  font-family: var(--font-display); font-weight: 800; font-size: 30px;
  text-transform: uppercase; color: var(--flood);
}
.verdict.short { color: var(--offside); }
.verdict:empty { display: none; }
.game .factoid { margin-top: 18px; }
.game .factoid:empty { display: none; }

.no-js { color: var(--muted); font-size: 16px; }

/* ══ Modes ═════════════════════════════════════════════════════════ */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line-soft); border: 2px solid var(--line); border-radius: 18px; overflow: hidden; }
.mode { background: rgb(var(--night-rgb) / .55); padding: 34px 30px 30px; }
/* Odd one out: five cards in two columns, so the last runs the full width. */
.mode:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mode .n {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .24em; color: var(--flood); display: block; margin-bottom: 14px;
}
.mode h3 { margin-bottom: 10px; }
.mode p { margin: 0; font-size: 16px; }

/* ══ Numbers ═══════════════════════════════════════════════════════ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat .fig {
  font-family: var(--font-display); font-weight: 800; font-size: 76px; line-height: .85;
  color: var(--flood);
}
.stat .cap {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}

/* ══ How it works ══════════════════════════════════════════════════ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.step { border-top: 2px solid var(--line); padding-top: 22px; }
.step .n {
  font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--flood);
  line-height: 1; display: block; margin-bottom: 10px;
}
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { margin: 0; font-size: 16px; }

/* ══ Closing call ══════════════════════════════════════════════════ */
.closing { text-align: center; }
.closing h2 { margin-bottom: 26px; }
.closing .actions { justify-content: center; }

/* ══ Board pages ═══════════════════════════════════════════════════ */
/* One page per board, generated. Everything below is only ever drawn on those
   pages and on the hubs that list them — index.html uses none of it. */

/* The trail, which is also the page's only navigation upwards. */
.crumbs {
  padding: 26px 0 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 10px; color: var(--line); }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--chalk); }
.crumbs [aria-current] { color: var(--muted); }

/* The masthead of a board page: the question as an h1, then the game. */
.page-head { padding: 40px 0 34px; }
.page-head h1 { font-size: clamp(40px, 6.4vw, 84px); }
.page-head .lede { margin: 24px 0 0; max-width: 62ch; }
.page-head .strap { margin-bottom: 22px; }

/* ── The facts under the board ──────────────────────────────────────── */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px; margin: 34px 0 0;
  background: var(--line-soft); border: 2px solid var(--line);
  border-radius: 16px; overflow: hidden;
}
.facts div { background: rgb(var(--night-rgb) / .55); padding: 20px 22px; }
.facts dt {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.facts dd {
  margin: 8px 0 0;
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  text-transform: uppercase; line-height: 1;
}

/* ── Cards: a board in a list of boards ─────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; gap: 14px;
  border: 2px solid var(--line); border-radius: 16px;
  background: rgb(var(--night-rgb) / .55);
  padding: 24px 24px 26px;
  text-decoration: none; color: var(--chalk);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--chalk); transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid var(--flood); outline-offset: 3px; }
.card .n {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--flood);
}
.card h2, .card h3 { font-size: 27px; }
.card .meta {
  margin: 0; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.card .plate { width: 40px; height: 40px; }
.card .plate.emoji { font-size: 22px; }

/* ── Where to go next ───────────────────────────────────────────────── */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills a {
  border: 2px solid var(--line); border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.pills a:hover { border-color: var(--chalk); color: var(--chalk); }
.pills a:focus-visible { outline: 3px solid var(--flood); outline-offset: 3px; }

/* ══ Footer ════════════════════════════════════════════════════════ */
footer {
  border-top: 2px solid var(--line-soft);
  padding: 34px 0 46px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint);
}
footer nav { margin-left: auto; display: flex; gap: 24px; }
footer a { color: var(--faint); text-decoration: none; }
footer a:hover { color: var(--chalk); }

/* ══ Small screens ═════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; }
  .modes, .stats, .steps { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  section { padding: 68px 0; }
  .brandbar nav { display: none; }
  .board .prompt { font-size: 34px; }
  .pitch { padding: 20px 8px; gap: 16px; }
  .rank { gap: 12px; padding: 10px 12px; }
  .facts dd { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slot.just-found .plate { animation: none; }
  .rank.just-found .name { animation: none; }
  .btn:hover { transform: none; }
}
