/* =========================================================
   Contin-U Medical — Font faces
   All fonts self-hosted, variable where available.
   font-display strategy per web.dev best practice:
     - swap on display (visible headings must render)
     - optional on body (avoid FOIT flash on slow networks)
   ========================================================= */

@font-face {
  font-family: 'Geist';
  src: url('../fonts/Geist-Variable.woff2') format('woff2-variations'),
       url('../fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Variable.woff2') format('woff2-variations'),
       url('../fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/InterVariable.woff2') format('woff2-variations'),
       url('../fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  /* swap, not optional. `optional` gives the font a ~100ms budget and, if it
     misses, pins the page to the fallback face for the WHOLE page lifetime
     with no later swap. On a cold cellular load that silently ships the
     checkout in a system font. Inter is preloaded in <head>, so swap's
     unstyled window is short, and it always resolves to real Inter. */
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* -------------------------------------------------------
   Metric-matched fallback for Inter, to hold layout steady
   during the font-display:swap window above.

   The previous version of this block was dead and partly
   invalid: nothing ever referenced 'Inter Fallback', and
   local('sans-serif') is not a font name so that entry
   could never match. It is now referenced by --font-body
   in tokens.css, directly ahead of the generic stack.

   size-adjust is 100%: Inter 4.x is already very close to
   Arial in x-height, and the old 107.64% figure came from
   a different Inter build. Overriding the ascent/descent
   is what actually removes the reflow jump.
   ------------------------------------------------------- */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
  ascent-override: 96.88%;
  descent-override: 24.15%;
  line-gap-override: 0%;
  size-adjust: 100%;
}
