/* Self-hosted web fonts.
 *
 * These faces were previously pulled from fonts.googleapis.com. That cost every
 * page two sequential round trips before any text could paint — one for the
 * generated stylesheet, then one per woff2 it named — and the stylesheet was
 * render-blocking on a third-party origin, so it could not be preloaded
 * reliably. Measured on the homepage it wasted ~800ms of render-blocking time
 * and produced a font-swap layout shift.
 *
 * Everything here is the latin subset of the same Google Fonts release, served
 * from this origin so the critical faces can be preloaded and the browser makes
 * one hop instead of three.
 *
 * Variable fonts are used where the family ships one, which is why a single file
 * covers a weight range. `font-display: swap` is on every face: text paints in
 * the fallback immediately and reflows once, rather than staying invisible.
 *
 * unicode-range is deliberately omitted. The subsets here are latin-only, and
 * declaring the latin range would stop the browser from falling back to a system
 * font for any character outside it — a page with a stray non-latin glyph would
 * render tofu rather than the glyph.
 */

/* Bodoni Moda — display face (--font-display). Variable 400..800; the italic
   file covers 400..500, the only italic weights any page asks for. Weight 900
   is not shipped because no rule in the site requests it. */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-latin-var.woff2') format('woff2-variations'),
       url('/assets/fonts/bodoni-moda-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-latin-italic-var.woff2') format('woff2-variations'),
       url('/assets/fonts/bodoni-moda-latin-italic-var.woff2') format('woff2');
}

/* Inter — body face (--font-body, --font-inter). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-var.woff2') format('woff2-variations'),
       url('/assets/fonts/inter-latin-var.woff2') format('woff2');
}

/* Space Grotesk — --font-heading on the homepage. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin-var.woff2') format('woff2-variations'),
       url('/assets/fonts/space-grotesk-latin-var.woff2') format('woff2');
}

/* Outfit — kept because /emergency and /tools set it as their primary body and
   heading face, not merely as a fallback behind Inter. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin-var.woff2') format('woff2-variations'),
       url('/assets/fonts/outfit-latin-var.woff2') format('woff2');
}

/* IBM Plex Mono — --font-mono, used for eyebrow and label text. Not a variable
   family, so the three referenced weights are separate files. */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
}
