/*
 * Self-hosted Rethink Sans. Served as a static stylesheet (NOT via Astro's
 * <Font> component) so it can be linked with `transition:persist` and survive
 * View Transitions swaps untouched — Astro re-adds inline <style> on every
 * swap, which caused a FOUC in slower-to-commit browsers (Brave). See #15465.
 *
 * The .woff2 is the variable font (covers weights 400–800 in one file); the
 * per-weight .woff are fallbacks for older browsers. An Arial metric-match
 * fallback minimises layout shift before the web font loads.
 */
@font-face {
  font-family: "Rethink Sans";
  src:
    url("/fonts/rethink-sans.woff2") format("woff2"),
    url("/fonts/rethink-sans-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rethink Sans";
  src:
    url("/fonts/rethink-sans.woff2") format("woff2"),
    url("/fonts/rethink-sans-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rethink Sans";
  src:
    url("/fonts/rethink-sans.woff2") format("woff2"),
    url("/fonts/rethink-sans-800.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Arial metric-matched fallback — reduces CLS during the swap. */
@font-face {
  font-family: "Rethink Sans Fallback";
  src: local("Arial");
  font-display: swap;
  size-adjust: 104.7553%;
  ascent-override: 94.6969%;
  descent-override: 29.5928%;
  line-gap-override: 0%;
}

:root {
  --font-untitled-sans: "Rethink Sans", "Rethink Sans Fallback", system-ui,
    sans-serif;
}
