/* Self-hosted fonts (latin subset). Replaces render-blocking Google Fonts. */

/* Libre Baskerville (serif) */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/libre-baskerville-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/libre-baskerville-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/libre-baskerville-700.woff2') format('woff2');
}

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

/* Barlow Condensed (condensed) */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/barlow-condensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/barlow-condensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/barlow-condensed-800.woff2') format('woff2');
}

/* Metric-matched fallbacks to eliminate font-swap layout shift (CLS).
   Values computed from the actual woff2 metrics vs. the system fallback. */
@font-face {
  font-family: 'Barlow Fallback';
  src: local('Arial');
  size-adjust: 97.42%;
  ascent-override: 102.65%;
  descent-override: 20.53%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial');
  size-adjust: 81.09%;
  ascent-override: 123.32%;
  descent-override: 24.66%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Libre Baskerville Fallback';
  src: local('Times New Roman');
  size-adjust: 131.25%;
  ascent-override: 73.91%;
  descent-override: 20.57%;
  line-gap-override: 0%;
}
