/*
 * Benecaster Theme — Fonts
 *
 * Self-hosted @font-face declarations. Font files live in assets/fonts/.
 * Loaded before tokens.css so font families are resolvable when tokens define
 * --bc-font-* variables.
 *
 * Preload: InterVariable.woff2 is preloaded via <link rel="preload"> in
 * header.php. JetBrainsMono is intentionally not preloaded — code blocks are
 * not above the fold on any landing page; revisit if that changes.
 */

/* --------------------------------------------------------------------------
 * Inter — variable, roman + italic
 * Source: https://rsms.me/inter/ (v4.0, OFL-1.1)
 * -------------------------------------------------------------------------- */

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

@font-face {
	font-family: 'Inter';
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/InterVariable-Italic.woff2') format('woff2-variations'),
	     url('../fonts/InterVariable-Italic.woff2') format('woff2');
}

/* Metric-matched Arial fallback for Inter. Overrides derived from the
 * Inter → Arial fallback pairing published in Adobe's fallback-font tool;
 * they minimize CLS while InterVariable.woff2 is loading. */
@font-face {
	font-family: 'Inter Fallback';
	font-style: normal;
	font-weight: 100 900;
	src: local('Arial');
	ascent-override: 90%;
	descent-override: 22.43%;
	line-gap-override: 0%;
	size-adjust: 107.64%;
}

@font-face {
	font-family: 'Inter Fallback';
	font-style: italic;
	font-weight: 100 900;
	src: local('Arial Italic'), local('Arial');
	ascent-override: 90%;
	descent-override: 22.43%;
	line-gap-override: 0%;
	size-adjust: 107.64%;
}

/* --------------------------------------------------------------------------
 * JetBrains Mono — variable, roman (latin subset)
 * Source: Google Fonts webfont build (v24, OFL-1.1)
 * Italic and non-Latin subsets omitted — code blocks are ASCII and italic in
 * code is vanishingly rare. Add them here if a use case appears.
 * -------------------------------------------------------------------------- */

@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 100 800;
	font-display: swap;
	src: url('../fonts/JetBrainsMono-Variable.woff2') format('woff2-variations'),
	     url('../fonts/JetBrainsMono-Variable.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* No metric-matched fallback for JetBrains Mono. Code blocks live in <pre>
 * with fixed dimensions and monospace fallbacks (Consolas / Menlo) are
 * already close in cadence, so swap-in shift is not visible in practice. */
