/*
 * Candle Shine — bundled typefaces.
 *
 * All three faces are self-hosted. Iranian visitors frequently cannot reach
 * fonts.googleapis.com reliably, so loading them from a CDN would leave the brand
 * typography broken for a large part of the audience.
 *
 *   Vazirmatn        — body / UI. Variable, 100-900. SIL OFL 1.1.
 *   Estedad          — headings. Variable, 100-900. SIL OFL 1.1.
 *   Playfair Display — Latin display accents only (latin subset). SIL OFL 1.1.
 *
 * font-display: swap keeps text visible during load; the two Persian faces are
 * preloaded from inc/setup/assets.php so the first paint already uses them.
 *
 * To swap a typeface, replace the files in assets/fonts/ and edit the src below —
 * every component reads --cs-font-sans / --cs-font-display, never a family name.
 */

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/vazirmatn-variable.woff2") format("woff2-variations"),
		url("../fonts/vazirmatn-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	/* Arabic/Persian range + Latin, so the browser can skip the file for other scripts. */
	unicode-range: U+0000-00FF, U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011,
		U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
	font-family: "Estedad";
	src: url("../fonts/estedad-variable.woff2") format("woff2-variations"),
		url("../fonts/estedad-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011,
		U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

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

:root {
	/*
	 * Font stacks. The system fallbacks are the Persian faces most likely to be
	 * installed locally in Iran, so a failed download still renders readable Persian
	 * rather than defaulting to a Latin face with broken joining.
	 */
	--cs-font-sans: "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, "Iranian Sans",
		system-ui, sans-serif;
	--cs-font-display: "Estedad", "Vazirmatn", "IRANSans", "Segoe UI", Tahoma,
		system-ui, sans-serif;
	--cs-font-latin: "Playfair Display", "Iowan Old Style", Georgia, serif;
	--cs-font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;

	/* Overridden per-site by inc/setup/customizer-css.php. */
	--cs-font-heading: var(--cs-font-display);
}
