/* ============================================================
   Inter font — self-hosted
   Source: https://rsms.me/inter/ (v4.1)
   Downloaded and self-hosted for performance + privacy:
   - Eliminates render-blocking external request to rsms.me
   - No third-party DNS lookup or connection
   - No IP exposure to rsms.me
   - Fonts cached with site's own Cache-Control headers (immutable, 1 year)

   Font family declared:
   - InterVariable  variable font (the only family in this file)
     Also aliased as 'Inter var' for legacy compatibility.

   Usage in global.css:
     --font-sans: 'InterVariable', 'Inter var', 'Inter', 'Segoe UI',
                  system-ui, -apple-system, sans-serif;
   The 'Inter' fallback is a named-family match for system-installed
   Inter (if present); 'InterVariable' is the self-hosted variable font.

   CLS prevention: size-adjust + override metrics on the fallback fonts
   so the layout doesn't shift when Inter loads. The values below are
   tuned for Inter v4.1's metrics — they make the fallback system font
   occupy the same space as Inter, eliminating layout shift (CLS → 0).
   Reference: https://www.nicchan.me/posts/cls-font-loading/
   ============================================================ */

/* Fallback font with size-adjust — prevents CLS when Inter is loading.
   Applied via the --font-sans stack in global.css: the browser uses
   this @font-face for the brief period before InterVariable loads,
   then swaps to InterVariable via font-display: swap.
   Font names are quoted per CSS Fonts Level 4 spec — unquoted names
   with hyphens (e.g. -apple-system) or generic families (sans-serif)
   as local() args are non-standard and may break in stricter parsers. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI'), local('system-ui'), local('-apple-system'), local('sans-serif');
  font-display: swap;
  size-adjust: 100.06%;
  ascent-override: 92.77%;
  descent-override: 22.26%;
  line-gap-override: 0%;
}

@font-face {
  font-family: InterVariable;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: InterVariable;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable-Italic.woff2') format('woff2');
}

/* legacy name "Inter var" (Oct 2023) — kept for backward compatibility
   with any CSS that references the old name */
@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter var';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable-Italic.woff2') format('woff2');
}

