/*
 * Thmanyah web fonts (local, official, unmodified files).
 *
 * Enqueued by inc/fonts.php ONLY when the files are present (they are
 * git-ignored — see decisions.md D-09 / D-25 and README.md → Fonts).
 *
 * Family names match the stacks in typography.css:
 *   "Thmanyah Sans"          → UI, body, navigation, forms, buttons
 *   "Thmanyah Serif Display" → hero, h1/h2, cinematic moments
 *
 * All five weights are declared; the browser downloads a file only when a rule
 * actually uses that weight, so unused weights cost nothing.
 *
 * font-display: swap — text renders immediately in the fallback face and swaps
 * when the font arrives. Never invisible text, and LCP is not held back.
 *
 * The fonts include the new Saudi Riyal sign: the sequence «ر.س» (and ﷼) is
 * shaped into it automatically through the font's own ligatures.
 */

/* ---------- Thmanyah Sans ---------- */

@font-face {
	font-family: "Thmanyah Sans";
	src: url("../fonts/thmanyah/sans/thmanyahsans-Light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("../fonts/thmanyah/sans/thmanyahsans-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("../fonts/thmanyah/sans/thmanyahsans-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("../fonts/thmanyah/sans/thmanyahsans-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("../fonts/thmanyah/sans/thmanyahsans-Black.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/* ---------- Thmanyah Serif Display ---------- */

@font-face {
	font-family: "Thmanyah Serif Display";
	src: url("../fonts/thmanyah/serif-display/thmanyahserifdisplay-Light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Serif Display";
	src: url("../fonts/thmanyah/serif-display/thmanyahserifdisplay-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Serif Display";
	src: url("../fonts/thmanyah/serif-display/thmanyahserifdisplay-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Serif Display";
	src: url("../fonts/thmanyah/serif-display/thmanyahserifdisplay-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Serif Display";
	src: url("../fonts/thmanyah/serif-display/thmanyahserifdisplay-Black.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/*
 * Superscript digits (² ³ ¹) — a family of their own, never inside the
 * Thmanyah families.
 *
 * Thmanyah Serif Display maps these three characters to an empty glyph and
 * Thmanyah Sans has none, so «M²» printed as «M ». Titles and stories turn
 * them into <sup>2</sup> (inc/text.php → gb_theme_text_marks()), drawn with
 * the font's own digits. This family is the safety net for any other place:
 * it covers ONLY those three characters and sits first in both stacks
 * (typography.css), so the browser takes them from a system face and
 * everything else from Thmanyah.
 *
 * WHY a separate family (D-89): in Stage 4 the same three characters were
 * declared as an extra face of "Thmanyah Serif Display" with a weight range.
 * Browsers group the faces of a family by weight; for bold text Chrome chose
 * the range face, which holds only ² ³ ¹, so on Windows every bold display
 * title fell through to Times New Roman. A face in its own family cannot
 * take over another family's weights.
 */
@font-face {
	font-family: "GB Superscripts";
	src: local("Segoe UI"), local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("DejaVu Sans");
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+00B2-00B3, U+00B9;
}
