/* Tokens, fonts, reset, type and the shared interaction states.
   Palette and states come from DESIGN-CONTRACT.md. */

@font-face {
  font-family: "Urbanist";
  src: url("/fonts/urbanist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #b8b8b8;
  --rule: #3d3d3d;
  --skel-1: #1a1a1a;
  --skel-2: #262626;
  --pin: #ffd21f;
  --sans: "Urbanist", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --ease: 100ms ease-out;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; border-radius: 0; }
[hidden] { display: none !important; }

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

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--grey); }
.num { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* Interaction: hover 0.8, press 0.6 with a 1px drop, yellow focus. */
a, button, .choice {
  transition: opacity var(--ease), transform var(--ease), background-color var(--ease), color var(--ease);
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover, button:not(:disabled):hover, .choice:hover { opacity: 0.8; }
a:active, button:not(:disabled):active, .choice:active { opacity: 0.6; transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--pin); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--white); color: var(--black); padding: 8px 12px; font-weight: 700;
}
.skip:focus { top: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Primary button: white on black. Yellow is kept for the pin, focus and warnings. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  background: var(--white); color: var(--black);
  border: 0; font: 700 1.0625rem/1 var(--sans); cursor: pointer; text-decoration: none;
}
.btn:disabled { cursor: progress; opacity: 0.6; }

/* Non-shimmering skeleton block. */
.skeleton { background: var(--skel-1); }
.skeleton::after { content: ""; display: block; height: 40%; background: var(--skel-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
  a:active, button:active, .choice:active { transform: none; }
}
