/*
 * Self-hosted fonts (SIL Open Font License, from Google Fonts). Latin subset, WOFF2 only.
 * Exactly the eight styles the design uses (approved by Tim, 2026-11-18). No external font requests.
 * font-display: swap shows text immediately in the fallback font while these load.
 */

@font-face {
	font-family: "Libre Caslon Display";
	src: url("../fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Libre Caslon Text";
	src: url("../fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Libre Caslon Text";
	src: url("../fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Libre Caslon Text";
	src: url("../fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/*
 * Size-matched fallbacks (Phase 7 QA, 2026-11-18). Until the web fonts arrive, text shows in Georgia or Arial
 * scaled to the same width, so lines break in the same places and nothing jumps when the fonts swap in.
 * size-adjust measured in Chrome: average width of the web font / width of the fallback for the same text.
 */
@font-face {
	font-family: "Libre Caslon Display Fallback";
	src: local("Georgia");
	size-adjust: 83.17%;
}

@font-face {
	font-family: "Libre Caslon Text Fallback";
	src: local("Georgia");
	size-adjust: 106.46%;
}

@font-face {
	font-family: "Alegreya Sans Fallback";
	src: local("Arial"), local("Helvetica");
	size-adjust: 86.26%;
}
