/**
 * Self-hosted fonts for Gold Coast First Class.
 *
 * Two variable woff2 files, subset to Latin, replacing six static files
 * fetched from Google. One family declaration each covers every weight
 * the site uses — Fraunces 400/500/600, Manrope 400/600/700 — because a
 * variable font interpolates between them rather than shipping each one.
 *
 * font-display:swap keeps text visible while the file downloads, so a
 * slow font never blanks the page. The size-adjust and metric overrides
 * on the fallbacks match the system face closely enough that the swap
 * doesn't shove the layout around when the real font lands.
 *
 * Regenerating these: subset from the Google Fonts sources with
 * pyftsubset, keeping the wght axis (and opsz on Fraunces, which the
 * headings rely on for optical sizing). Fraunces' SOFT and WONK axes are
 * pinned to their defaults — the site never varies them and they cost
 * size.
 */

@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-var.woff2') format('woff2-variations'),
	     url('fonts/manrope-var.woff2') format('woff2');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

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

/*
 * Fallback faces used during the swap window. Without these the browser
 * measures text in plain Arial first, then reflows when Manrope arrives,
 * which shows up as layout shift. The adjustments below bring Arial's
 * metrics close to Manrope's so the reflow is near-invisible.
 */
@font-face {
	font-family: 'Manrope Fallback';
	src: local('Arial');
	size-adjust: 102%;
	ascent-override: 100%;
	descent-override: 28%;
	line-gap-override: 0%;
}

@font-face {
	font-family: 'Fraunces Fallback';
	src: local('Times New Roman');
	size-adjust: 108%;
	ascent-override: 92%;
	descent-override: 26%;
	line-gap-override: 0%;
}
