/*
 * Thmanyah Sans — the company (Anseraf) Arabic typeface, applied to every
 * Arabic UI surface. Weight mapping mirrors anseraf-core core_ui/pubspec.yaml
 * (five static cuts: 300/400/500/700/900). Latin sessions keep frappe's
 * Inter stack: the override targets html[lang="ar"] only, which frappe sets
 * on desk and website pages from the session language.
 *
 * The OTFs are shipped in this app (public/fonts). wkhtmltopdf does not read
 * webfonts reliably — for PDFs the same files are registered with fontconfig
 * (see docs/BRANDING.md).
 */

@font-face {
	font-family: "Thmanyah Sans";
	src: url("/assets/sijillak/fonts/thmanyahsans-Light.otf") format("opentype");
	font-weight: 300;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("/assets/sijillak/fonts/thmanyahsans-Regular.otf") format("opentype");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("/assets/sijillak/fonts/thmanyahsans-Medium.otf") format("opentype");
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("/assets/sijillak/fonts/thmanyahsans-Bold.otf") format("opentype");
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Thmanyah Sans";
	src: url("/assets/sijillak/fonts/thmanyahsans-Black.otf") format("opentype");
	font-weight: 900;
	font-display: swap;
}

/* frappe's whole UI (desk + website) keys off --font-stack
   (espresso/_typography.scss). This file is emitted after frappe's bundles
   (app_include_css concatenates in install order; sijillak is last), so a
   same-specificity :root override wins by source order.

   All sessions: Latin keeps Inter (frappe ships it, full Latin coverage);
   Arabic glyphs fall through Inter to Thmanyah BEFORE reaching Segoe/system
   Arabic — so Arabic data renders in Thmanyah even in an English session. */
:root {
	--font-stack: "InterVariable", "Inter", "Thmanyah Sans", "-apple-system",
		"BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
		"Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* Arabic sessions: Thmanyah leads outright — the whole UI is Arabic. */
html[lang="ar"] {
	--font-stack: "Thmanyah Sans", "InterVariable", "Inter", "-apple-system",
		"BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
		"Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
