/* Base: reset, the two fonts (Chakra Petch titles, Nunito text), the page width and the keyboard focus ring.
   Colours come from theme.css, loaded before this one. The fonts are our own copies (fonts/, the game's files
   cut to Latin letters as woff2), so no page asks a font CDN for anything. */
@font-face { font-family: "Chakra Petch"; src: url("/fonts/chakra-petch-bold.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  text-transform: var(--title-case);
  letter-spacing: var(--title-track);
}
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

/* (one width for every section; the side gutter grows from 16 px on phones to 48 px on wide screens) */
:root { --gutter: clamp(16px, 4vw, 48px); }
.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.kicker {
  font: 600 0.85rem/1 "Chakra Petch", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}

/* Keyboard focus: always visible, in the game's focus yellow (A) or ink (B) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scroll reveal: js/reveal.js marks parts below the screen as waiting, so the page reads without scripts */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.reveal.is-waiting { opacity: 0; transform: translateY(28px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-waiting { opacity: 1; transform: none; }
}

/* Small helpers instead of inline styles */
.tight-top { padding-top: 0; }
.flush { margin: 0; }
.spaced { margin-top: 40px; }
.scroll-x { overflow-x: auto; }
figure { margin: 0; }
[hidden] { display: none !important; } /* (a page part a script hides must stay hidden whatever its own display is) */
