/* ==========================================================================
   SAWT IBB — typography.css
   Arabic-first type system. RTL by default. Requires brand-tokens.css.
   Fonts: SIL OFL 1.1 — Noto Kufi Arabic, Noto Sans Arabic, IBM Plex Sans Arabic, Inter.
   Files are NOT bundled (licence-clean download script in 02-BRAND-FOUNDATIONS/TYPOGRAPHY).
   ========================================================================== */

/* ---------- 1. font faces (local, self-hosted, woff2) ---------- */
/* The family aliases SAWT Kufi / SAWT Sans / SAWT UI let you swap a vendor
   later without touching a single component rule. */
@font-face {
  font-family: "SAWT Kufi"; src: url("/brand/fonts/NotoKufiArabic-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT Kufi"; src: url("/brand/fonts/NotoKufiArabic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT Kufi"; src: url("/brand/fonts/NotoKufiArabic-Black.woff2") format("woff2");
  font-weight: 800 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT Sans"; src: url("/brand/fonts/NotoSansArabic-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT Sans"; src: url("/brand/fonts/NotoSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 500 600; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT Sans"; src: url("/brand/fonts/NotoSansArabic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT UI"; src: url("/brand/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT UI"; src: url("/brand/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "SAWT UI"; src: url("/brand/fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}
@font-face {
  font-family: "Inter"; src: url("/brand/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter"; src: url("/brand/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 500 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter"; src: url("/brand/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap;
}

/* ---------- 2. base type ---------- */
:where(html) {
  font-family: var(--si-font-arabic-body);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Arabic must never be tracked negatively and never justified badly */
:where([dir="rtl"]) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote) { letter-spacing: normal; }

/* Latin / numerals inside Arabic copy */
.si-ltr, .si-num {
  font-family: var(--si-font-latin);
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- 3. type scale utilities ---------- */
.si-display-1, .si-display-2, .si-h1, .si-h2, .si-h3 { font-family: var(--si-font-arabic-headline); font-weight: 800; }
.si-display-1 { font-size: var(--si-text-display-1); line-height: var(--si-leading-display-1); }
.si-display-2 { font-size: var(--si-text-display-2); line-height: var(--si-leading-display-2); }
.si-h1 { font-size: var(--si-text-h1); line-height: var(--si-leading-h1); font-weight: 700; }
.si-h2 { font-size: var(--si-text-h2); line-height: var(--si-leading-h2); font-weight: 700; }
.si-h3 { font-size: var(--si-text-h3); line-height: var(--si-leading-h3); font-weight: 700; }
.si-h4, .si-h5, .si-h6 { font-family: var(--si-font-arabic-body); font-weight: 700; }
.si-h4 { font-size: var(--si-text-h4); line-height: var(--si-leading-h4); }
.si-h5 { font-size: var(--si-text-h5); line-height: var(--si-leading-h5); }
.si-h6 { font-size: var(--si-text-h6); line-height: var(--si-leading-h6); }
.si-body-lg { font-size: var(--si-text-body-lg); line-height: var(--si-leading-body-lg); }
.si-body    { font-size: var(--si-text-body); line-height: var(--si-leading-body); }
.si-body-sm { font-size: var(--si-text-body-sm); line-height: var(--si-leading-body-sm); }
.si-meta, .si-caption, .si-micro { font-family: var(--si-font-arabic-ui); color: var(--si-color-text-muted); }
.si-meta    { font-size: var(--si-text-meta); line-height: var(--si-leading-meta); font-weight: 500; }
.si-caption { font-size: var(--si-text-caption); line-height: var(--si-leading-caption); }
.si-micro   { font-size: var(--si-text-micro); line-height: var(--si-leading-micro); font-weight: 600; }
.si-quote   { font-size: var(--si-text-quote); line-height: var(--si-leading-quote); font-weight: 500; }

/* headline clamp helpers for the responsive site */
@media (max-width: 767px) {
  .si-display-1 { font-size: 2rem; line-height: 1.25; }
  .si-display-2 { font-size: 1.75rem; line-height: 1.28; }
  .si-h1 { font-size: 1.625rem; line-height: 1.3; }
  .si-h2 { font-size: 1.375rem; line-height: 1.35; }
  .si-h3 { font-size: 1.1875rem; line-height: 1.4; }
}

/* ---------- 4. breaking-news typography ---------- */
.si-breaking-label {
  font-family: var(--si-font-arabic-headline);
  font-size: var(--si-text-breaking);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  color: var(--si-pure-white);
}
.si-breaking-text {
  font-family: var(--si-font-arabic-ui);
  font-size: var(--si-text-breaking);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- 5. buttons / navigation / forms ---------- */
.si-btn-text, .si-nav-text {
  font-family: var(--si-font-arabic-ui);
  font-size: var(--si-text-button);
  font-weight: 600;
}
.si-nav-text { font-size: var(--si-text-nav); }

/* ---------- 6. trimming Arabic line boxes ---------- */
.si-trim-head { margin-block: 0; text-wrap: balance; }
.si-trim-body { margin-block: 0; text-wrap: pretty; }
