/* Snake Escape — shared shell.
   Tokens are the game's own, so the site and the app cannot drift apart.
   Flat fills and one-pixel rules only: no shadows, gradients or blur. */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,75..125,300..900;1,75..125,300..900&display=swap');

:root {
  --bg: #111116;
  --surface: #1a1a22;
  --surface-alt: #20202b;
  --rule: #2e2e3a;
  --ink: #e8e8f0;
  --ink-muted: #6c6c7e;
  --ink-faint: #44444f;
  --mint: #5ee3a6;
  --amber: #ffc857;
  --coral: #ff5c6e;

  --gutter: clamp(20px, 5vw, 56px);
  --measure: 62ch;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Archivo, 'Helvetica Neue', Arial, sans-serif;
  font-variation-settings: 'wdth' 100;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The page sits inside the same kind of ruled frame the board does. */
.frame {
  max-width: 1180px;
  margin: 0 auto;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.band { border-bottom: 1px solid var(--rule); }
.band:last-child { border-bottom: 0; }

.pad { padding: clamp(36px, 6vw, 76px) var(--gutter); }

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variation-settings: 'wdth' 118;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wordmark svg { display: block; }

.masthead nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 13px;
  font-weight: 500;
}

.masthead nav a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.masthead nav a:hover,
.masthead nav a:focus-visible { color: var(--ink); border-bottom-color: var(--mint); }

/* ---- type -------------------------------------------------------------- */

h1, h2, h3 {
  font-variation-settings: 'wdth' 112;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 7vw, 68px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.01em; }
h3 { font-size: 17px; letter-spacing: 0.01em; font-variation-settings: 'wdth' 106; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--mint); }

.lede { font-size: clamp(16px, 2vw, 19px); color: #b9b9c8; }
.muted { color: var(--ink-muted); }
.small { font-size: 13.5px; line-height: 1.65; }

/* The one uppercase device on the page, borrowed from the in-game HUD.
   Used for the board's own readout, not stacked above every heading. */
.readout {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---- actions ----------------------------------------------------------- */

.cta {
  display: inline-block;
  padding: 14px 26px;
  background: var(--mint);
  color: #111116;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--mint);
  border-radius: 10px;
}

.cta:hover, .cta:focus-visible { background: #7cebba; border-color: #7cebba; }

.cta-quiet {
  display: inline-block;
  padding: 14px 22px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.cta-quiet:hover, .cta-quiet:focus-visible { border-color: var(--ink-muted); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- prose pages ------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { margin: 44px 0 12px; }
.prose h3 { margin: 30px 0 8px; }
.prose ul { margin: 0 0 1em; padding-left: 1.1em; max-width: var(--measure); }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--ink-faint); }
.prose .stamp { color: var(--ink-faint); font-size: 13px; }

.callout {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--mint);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 18px 20px;
  margin: 24px 0;
  max-width: var(--measure);
}

/* ---- footer ------------------------------------------------------------ */

footer {
  padding: 30px var(--gutter) 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-muted);
}

footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
footer a { color: var(--ink-muted); text-decoration: none; }
footer a:hover, footer a:focus-visible { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
