/* ==========================================================================
   Design tokens — The Educated Meathead

   The single place a raw value is allowed to appear. Everything else in the
   stylesheet refers to these by name. If you find yourself typing a hex code
   or a pixel value anywhere else, add a token here instead.
   ========================================================================== */

:root {
  /* --- Colour -------------------------------------------------------------

     Near-monochrome by design. The orange is reserved for things you can
     click and things being emphasised; it is never decoration. The greys are
     warm rather than blue so they sit with the orange instead of fighting it.
     --------------------------------------------------------------------- */

  --color-accent: #db7f12;
  --color-accent-hover: #b3660a;
  --color-accent-bright: #fe9730; /* the old site's button hover, measured */
  --color-accent-quiet: #f8efe3;

  --color-ink: #14120f;
  --color-ink-secondary: #4b463e;
  --color-ink-muted: #787166;
  --color-ink-faint: #a49d92;

  --color-rule: #e6e2db;
  --color-rule-strong: #cdc7bc;

  --color-surface: #ffffff;
  --color-surface-sunken: #faf8f5;
  --color-on-accent: #ffffff;

  --color-selection: var(--color-accent-quiet);

  /* --- Type ---------------------------------------------------------------

     A clean grotesque. The system stack resolves to SF Pro on macOS/iOS,
     Segoe UI on Windows, Roboto on Android — all neo-grotesques, all already
     on the device, so there is no webfont request and no flash of unstyled
     text. To swap in a self-hosted face later, add the @font-face rule and
     put its family name at the front of this one list.
     --------------------------------------------------------------------- */

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  /* The display face is the old site's: Fjalla One, a condensed gothic that
     did most of the "meathead" heavy lifting there. Self-hosted, one file,
     one weight — it only exists at 400, so nothing may fake-bold it. */
  --font-display: "Fjalla One", "Arial Narrow", Arial, sans-serif;

  /* Fluid steps interpolate between the small-screen and large-screen size,
     so there is no jump at a breakpoint and no fixed width to overflow. */
  --text-2xs: 0.75rem;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-md: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --text-lg: clamp(1.25rem, 1.13rem + 0.6vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.28rem + 1.1vw, 2rem);
  --text-2xl: clamp(1.875rem, 1.5rem + 1.9vw, 2.75rem);
  --text-3xl: clamp(2.25rem, 1.65rem + 3vw, 3.75rem);
  /* Display size for the condensed face, which runs narrow at any given
     size and so can afford to be set larger than the grotesque ever is. */
  --text-4xl: clamp(2.5rem, 1.75rem + 3.4vw, 4rem);

  --leading-tight: 1.06;
  --leading-snug: 1.25;
  --leading-normal: 1.6;
  --leading-loose: 1.75;

  --tracking-tight: -0.022em;
  --tracking-snug: -0.011em;
  --tracking-normal: 0;
  --tracking-caps: 0.09em;
  /* Condensed caps need air between letters but less than label-caps get. */
  --tracking-display: 0.035em;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Space ------------------------------------------------------------ */

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Vertical rhythm between major sections. Scales with the viewport so
     phones are not given desktop-sized gaps. */
  --space-section: clamp(3rem, 8vw, 7rem);

  /* --- Layout ------------------------------------------------------------

     --gutter is the page's side padding. It is fluid, so it shrinks on a
     narrow phone rather than squeezing the text column to nothing.
     --------------------------------------------------------------------- */

  --container-max: 72rem;
  --container-narrow: 46rem;
  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  --border-hairline: 1px;
  --border-thick: 2px;
  --radius-sm: 2px;

  /* --- Motion ----------------------------------------------------------- */

  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
}
