/* FreeEdu (Free Education) — the two Arabic-script webfaces the prototype loads.
   Two families, two jobs:
     Noto Nastaliq Urdu = every Urdu string on the site (--ui-font when html[lang="ur"])
     Amiri              = Arabic source blocks only (Quranic ayat in the chapter sheet)

   SELF-HOSTED ONLY. The prototype used the Google Fonts CDN (prototype.html:18); we
   cannot. Two independent reasons, either one sufficient:
     1. The CSP is `font-src 'self'` (SecurityHeadersMiddleware) — fonts.gstatic.com is
        blocked outright, so the CDN link would silently render the fallback.
     2. The audience is on metered data. A self-hosted, subset face is a fraction of the
        full Nastaliq download and is cached with the app, not a third-party origin.

   Files live in wwwroot/fonts/ — see wwwroot/fonts/README.md for exact filenames and
   how to build the subsets. Until those .woff2 files are present the stacks below fall
   back to the platform's Urdu/Arabic face, which is correct but not the brand. Nothing
   breaks — the same arrangement ds/tokens/fonts.css already uses for the Latin families.

   unicode-range is declared (unlike the DS's Latin faces, which deliberately omit it):
   an English-language page never touches an Arabic codepoint, so the browser skips the
   download entirely on html[lang="en"]. That is the single biggest data saving here. */

/* Arabic script + the joiners, dashes and presentation forms Urdu typesetting needs.
   Matches Google's own Nastaliq subset so a subsetted file drops in unchanged. */

/* TWO STATIC WEIGHTS, NOT ONE VARIABLE FILE. The declaration here used to name a
   `NotoNastaliqUrdu-Variable.woff2` that was never supplied; the binaries that finally
   arrived — carried base64-embedded inside the KPK Class 8 Islamiyat chapter document —
   are Google's static 400 and 700 instances, with a STAT table and no `fvar`. Pointing
   `format('woff2-variations')` at a static file would be a lie the browser is entitled to
   act on, and a single 400 face would leave the 700 weight to be synthesised — and faux
   bold on Nastaliq smears the diagonal baseline rather than thickening it. So: two files,
   two rules, one family. */

@font-face {
  font-family: 'Noto Nastaliq Urdu';
  src: url('../fonts/NotoNastaliqUrdu-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Noto Nastaliq Urdu';
  src: url('../fonts/NotoNastaliqUrdu-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FEFF;
}

/* Amiri ships as static weights, not a variable font — two files, two @font-face rules. */
@font-face {
  font-family: 'Amiri';
  src: url('../fonts/Amiri-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Amiri';
  src: url('../fonts/Amiri-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  /* Consumed by fe.css. Named as tokens so no component ever writes a family name.
     The fallbacks are the platform Urdu/Arabic faces, in the order each OS prefers. */
  --fe-font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq',
                  'Noto Naskh Arabic', 'Segoe UI', serif;
  --fe-font-arabic: 'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
}
