/* Self-hosted webfonts — the local replacement for the Google Fonts stylesheet that
   `index.html` used to link.
 *
 * WHY: the Google link was an egress attempt on every page load (two preconnects, a
 * stylesheet, then the font files). It was never fatal — the stacks in
 * `src/styles/globals.css` fall back to system-ui / ui-monospace — but on an isolated
 * network it is a request that cannot succeed, and anywhere else it tells a third party
 * who is loading the app and when. These files ship with the app instead.
 *
 * WHY THIS FILE lives in `public/` rather than in `globals.css`: it pairs with the
 * binaries next to it, and `index.html` links it exactly where the Google stylesheet
 * was, so the loading shape (one stylesheet request in `<head>`, then the woff2s) is
 * unchanged. Nothing here is hashed by the bundler, which is the normal trade for
 * `public/` and is why the filenames carry the family, subset and version instead.
 *
 * WHAT THE FILES ARE: the **latin** subset of each family's VARIABLE font, taken from
 * the exact URLs the previous `fonts.googleapis.com/css2?…` link resolved to (Inter v20,
 * JetBrains Mono v24, Space Grotesk v22). One file per family covers every weight the
 * app asks for, which is why there are three files and not twelve.
 *
 * Two deliberate consequences:
 *
 * - `font-weight` is a RANGE, not a value: these are variable fonts, so the browser
 *   interpolates the requested weight from the single file. The ranges are the ones the
 *   old Google request asked for (Inter 300–700, JetBrains Mono 400–600, Space Grotesk
 *   400–700), so a weight outside them clamps and synthesises exactly as it did before.
 * - Latin only. Text outside that subset falls through to the next family in the
 *   `--font-sans` / `--font-mono` stack (system-ui, ui-monospace), per-glyph, rather
 *   than being rendered from a latin-ext/cyrillic file that would have to be fetched.
 *   Adding a subset means adding a file plus a `unicode-range` block here.
 *
 * `font-display: swap` matches the `&display=swap` the old link carried: text paints in
 * the fallback immediately and re-renders when the woff2 lands, so a font that fails to
 * load costs nothing but the substitution.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-variable.woff2') format('woff2');
}
