/* Normal Variable Font
   NOTE: These TTF files are ~5 MB each — roughly 10-20x larger than an
   equivalent WOFF2. Convert with fonttools when possible:
     pip install fonttools brotli
     pyftsubset input.ttf --output-file=output.woff2 --flavor=woff2 \
       --unicodes="U+0000-00FF,U+0100-017F" --layout-features='*'
   Or use https://google-webfonts-helper.herokuapp.com/ (Google fonts).
   Once WOFF2 versions exist, update src: url() + format() below and drop TTF. */
@font-face {
  font-family: "Google Sans Variable";
  src: url("../GoogleSans-VariableFont_GRAD,opsz,wght.ttf")
    format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  /* Show fallback immediately; swap when font arrives. Prevents text being
     invisible for several seconds while the 5 MB file downloads. */
  font-display: swap;
}

/* Italic Variable Font */
@font-face {
  font-family: "Google Sans Variable";
  src: url("../GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf")
    format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  /* Italic is rarely used — only load it when the browser actually needs
     an italic glyph (e.g. <em>, font-style: italic). Without this hint the
     browser eagerly downloads it on every page. */
  size-adjust: 100%;
}

/* Apply to the site. The fallback chain is metric-matched so fallback
   rendering has similar widths/heights to Google Sans, minimizing layout
   shift when the web font swaps in. */
body {
  font-family: "Google Sans Variable",
    -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}
