/* ============================================================
   Somehow Functional — self-hosted fonts
   Served same-origin from /fonts/. No third-party requests.

   Fontsource builds of the upstream Google Fonts sources, latin
   subset, variable where variable exists. All SIL Open Font
   License 1.1 — texts ship in /fonts/licenses/ as OFL requires.

   Families are declared under their plain names (matching the
   font-family declarations already used across the site and the
   tools) so removing Google Fonts needs no other CSS change.
   ============================================================ */

/* Fraunces — site display serif (variable: opsz 9-144, wght 100-900).
   Optical sizing applies automatically via the opsz axis. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/fraunces-latin-opsz-normal.woff2') format('woff2-variations');
}

/* Space Mono — site mono/labels (static 400 / 700). */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/space-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/fonts/space-mono-latin-700-normal.woff2') format('woff2');
}

/* Inter — tool UI (variable: wght 100-900). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-standard-normal.woff2') format('woff2-variations');
}

/* JetBrains Mono — tool mono/metrics (variable: wght 100-800). */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

/* IBM Plex Mono — used by the Resin tool, but not shipped in the font
   bundle. Aliased to the self-hosted JetBrains Mono so the Google Fonts
   purge is complete and Resin keeps a real monospace face. Swap in a real
   IBM Plex Mono woff2 here if you want its exact look back. */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

/* Optional named stacks, if a future refactor wants to reference these
   instead of naming families directly. */
:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono-site: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono-tool: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}
