/* Self-hosted webfonts — latin + latin-ext subsets. No external @import. */

@font-face {
	font-family: 'Oswald';
	src: url('../fonts/Oswald-Variable-latin.woff2') format('woff2-variations'),
	     url('../fonts/Oswald-Variable-latin.woff2') format('woff2');
	font-weight: 200 700;
	font-style: normal;
	font-display: swap;
}

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

@font-face {
	font-family: 'JetBrains Mono';
	src: url('../fonts/JetBrainsMono-Regular-latin.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'JetBrains Mono';
	src: url('../fonts/JetBrainsMono-Medium-latin.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/*
 * Metric-matched fallbacks (Capsize/fontaine method) to minimize CLS during swap.
 * Metrics computed from OS/2 sTypoAscender/Descender/LineGap + xAvgCharWidth
 * of each webfont vs. its local system-font stand-in (Arial / Courier New).
 */

@font-face {
	font-family: 'Oswald Fallback';
	src: local('Arial');
	size-adjust: 105.35%;
	ascent-override: 113.25%;
	descent-override: 27.43%;
	line-gap-override: 0%;
}

@font-face {
	font-family: 'Montserrat Fallback';
	src: local('Arial');
	size-adjust: 141.37%;
	ascent-override: 68.47%;
	descent-override: 17.76%;
	line-gap-override: 0%;
}

@font-face {
	font-family: 'JetBrains Mono Fallback';
	src: local('Courier New');
	size-adjust: 100.32%;
	ascent-override: 101.68%;
	descent-override: 29.91%;
	line-gap-override: 0%;
}
