/* ====================================================================
   IO-CORE · FONTS
   ====================================================================
   Vendored fonts, self-hosted from /public/fonts/. No CDN, no Google
   Fonts call, no FOUT-from-the-internet roulette. font-display: swap
   so text renders immediately in the fallback while .ttf/.woff2 loads.

   Font palette (all mono or pixel — engineer aesthetic, no humanist sans):
   - Kode Mono     · quirky display mono · 1 weight
   - Space Mono    · workhorse mono · 4 weights (regular/italic/bold/boldItalic)
   - Silkscreen    · pixel · 1 weight · labels, badges
   - Press Start 2P · 8-bit pixel · 1 weight · extreme retro, sparing use
   ==================================================================== */

@font-face {
  font-family: "Kode Mono";
  src: url("/fonts/KodeMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/PressStart2P-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ====================================================================
   TOKENS
   ====================================================================
   Two layers:
     1. Family tokens (by name) — always available, never change.
     2. Role tokens (by purpose) — what components actually reach for.
        Swap the role's source in one line if the register shifts.
   ==================================================================== */

:root {
  /* Family tokens — by name. */
  --io-font-kode-mono:   "Kode Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --io-font-space-mono:  "Space Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --io-font-silkscreen:  "Silkscreen", ui-monospace, monospace;
  --io-font-press-start: "Press Start 2P", ui-monospace, monospace;

  /* Role tokens — what components reach for. Override these to re-cast. */
  --io-font-mono:        var(--io-font-kode-mono);    /* body, code, default workhorse */
  --io-font-display:     var(--io-font-kode-mono);    /* headers, hero, brand chrome */
  --io-font-pixel:       var(--io-font-silkscreen);   /* labels, badges, scene flair */
  --io-font-pixel-heavy: var(--io-font-press-start);  /* extreme retro, use sparingly */
}
