/* --------------------------------------------------
   Self-hosted fonts (Outfit + Playfair Display)
   Served from our own origin so text never waits on a third-party
   Google Fonts round-trip. The critical weights (Outfit 400/600) are
   <link rel="preload">-ed in each page <head>, so they're usually ready
   before first paint — no flash. The metric-matched fallback faces below
   size the system font to match, so if a swap does happen there is no
   layout shift (only a subtle glyph change).
   -------------------------------------------------- */

/* ---- Outfit (sans) ---- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/outfit-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/outfit-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/outfit-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/outfit-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/outfit-700.woff2') format('woff2');
}

/* ---- Playfair Display (serif accents) ---- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/playfair-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/playfair-600-italic.woff2') format('woff2');
}

/* ---- Metric-matched fallbacks (no layout shift on swap) ----
   size-adjust scales the system font's glyphs so its line box and advance
   widths approximate the web font, eliminating reflow when the real font
   loads. Values are tuned to Arial (sans) and Georgia (serif). */
@font-face {
  font-family: 'Outfit Fallback';
  src: local('Arial');
  size-adjust: 97%;
  ascent-override: 100%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia');
  size-adjust: 111%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
