/**
 * Web-font layout-shift (CLS) mitigation.
 *
 * The theme loads Roboto (body/UI) and Lora (headings + hero) via OMGF with
 * `font-display: swap`. Swap renders a system fallback first, then swaps in the
 * web font; because the fallback has different metrics, text reflows (CLS).
 *
 * Below we define two "adjusted fallback" faces built on local system fonts
 * (Arial for Roboto, Times New Roman for Lora) whose box is scaled to match the
 * real web font, then insert each adjusted fallback into the font stack right
 * after its primary. The fallback now occupies the same space, so the swap no
 * longer moves layout — while keeping `swap` so the branded fonts still appear.
 *
 * size-adjust / *-override values were computed with the Fontaine algorithm
 * from real font metrics (fontkit on the actual .woff2 files) and Capsize
 * fallback metrics. Do not hand-tweak — regenerate if the fonts change.
 *
 * Selectors are prefixed (`html body` / `body ...`) to out-specify the theme's
 * equal-specificity rules regardless of stylesheet load order, without !important
 * (so icon fonts inside buttons are never clobbered).
 */

/* Roboto over Arial (Win/Mac), Liberation Sans (Linux), Arimo (ChromeOS/Android).
   All three are metric-compatible; ascent/descent/line-gap are overridden below
   regardless, so only the advance-width-based size-adjust depends on the font. */
@font-face {
	font-family: 'Roboto-fallback';
	src: local('Arial'), local('Liberation Sans'), local('Arimo');
	size-adjust: 99.7809%;
	ascent-override: 92.9771%;
	descent-override: 24.4677%;
	line-gap-override: 0%;
}

/* Lora over Times New Roman (Win/Mac), Liberation Serif (Linux), Tinos. */
@font-face {
	font-family: 'Lora-fallback';
	src: local('Times New Roman'), local('Liberation Serif'), local('Tinos');
	size-adjust: 115.2%;
	ascent-override: 87.3264%;
	descent-override: 23.7847%;
	line-gap-override: 0%;
}

/* Body + UI text (Roboto) */
html body {
	font-family: 'Roboto', 'Roboto-fallback', sans-serif;
}
body .thb-full-menu,
body .thb-mobile-menu,
body .thb-secondary-menu,
body label,
body em,
body input[type="submit"],
body .button,
body .btn,
body .vc_btn3 {
	font-family: 'Roboto', 'Roboto-fallback', BlinkMacSystemFont, -apple-system, Roboto, "Lucida Sans", sans-serif;
}

/* Headings + hero (Lora) — the largest above-the-fold text, biggest shifter */
body h1,
body .h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .lead p,
body .section-title p,
body .reformscape-institution-title,
body .support-dora em {
	font-family: 'Lora', 'Lora-fallback', BlinkMacSystemFont, -apple-system, Roboto, "Lucida Sans", serif;
}
