/**
 * Self-hosted webfonts.
 *
 * Poppins (headings) and Inter (body), served from this server — no Google Fonts
 * request, so no render-blocking third party and no visitor IPs leaving the site.
 * Both are SIL Open Font License 1.1; see assets/fonts/LICENSE-fonts.txt.
 *
 * Why this is a separate file and not part of the inline token block:
 * av_tokens_css() is also injected into the block editor and the admin settings
 * screen, where src:url() would need absolute per-context theme URLs baked in.
 * Relative URLs here resolve against this stylesheet's own location, so the file
 * needs no PHP, works via add_editor_style(), and stays cacheable forever.
 *
 * A face's file is only downloaded when the page actually uses a character in
 * its unicode-range, so declaring latin-ext costs nothing until someone's name
 * has a diacritic in it.
 */

/* ---------------------------------------------------------------- Poppins */
/* Headings only — 600 and 700. No other weight is offered in the settings,
   because shipping a weight we don't host means the browser synthesises a fake
   one. */

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../fonts/Poppins-600-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../fonts/Poppins-600-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../fonts/Poppins-700-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../fonts/Poppins-700-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- Inter */
/* One variable file covers 400–700, so body, medium, semibold and bold cost a
   single download instead of four. */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(../fonts/Inter-400-700-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(../fonts/Inter-400-700-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------- metric-matched fallbacks
 *
 * These are the reason the page does not jump when the webfont arrives.
 *
 * font-display:swap renders immediately in a fallback and swaps when the real
 * font loads. Normally that swap reflows everything, which is a CLS hit on the
 * largest text on the page. These faces re-shape Arial to Poppins'/Inter's
 * metrics, so the swap is geometrically near-neutral and CLS stays ~0.
 *
 * `swap` is the right choice over `optional` here: optional would silently drop
 * the brand font entirely on a slow connection, which on a brand-led redesign
 * defeats the point.
 *
 * NOTE: these override values are published community figures for Arial, not
 * measured from the exact files above. They are close, but verify with Fontaine
 * or capsize against the downloaded woff2 before treating CLS as solved.
 */

@font-face {
	font-family: "Poppins Fallback";
	src: local("Arial");
	ascent-override: 93.75%;
	descent-override: 31.25%;
	line-gap-override: 8.75%;
	size-adjust: 112%;
}

@font-face {
	font-family: "Inter Fallback";
	src: local("Arial");
	ascent-override: 90%;
	descent-override: 22.43%;
	line-gap-override: 0%;
	size-adjust: 107.12%;
}
