/* ===================================================================
   A20Core — A New Renaissance · self-hosted type (public site)
   Pairs with A20Core_BRAND.md §4. Order, born from many.

   Sovereign by construction: every glyph is served from this origin.
   No Google Fonts, no CDN — no third-party request leaves the perimeter.

       <link rel="stylesheet" href="/brand/fonts/fonts.css">

   SCOPE — the full type system, both scripts (site ships /  and /ar):
     Hanken Grotesk  Latin display / headlines / body / UI
     Fraunces        Latin editorial accent — never UI/body
     Cairo           Arabic display / headlines / body / UI (§9.1)
     Amiri           Arabic editorial accent — covers / pull-quotes / tagline
     Space Mono      metadata, labels, data — shared; Latin runs stay LTR
   Arabic faces load only on pages that use them: the /ar route carries
   lang="ar", and browsers fetch a face on first glyph hit, so the Latin
   pages never download Cairo or Amiri.

   Format is WOFF2, converted losslessly from the OFL TTFs pinned in
   Brand/fonts/fonts.manifest.json (google/fonts @ 877f8918). Same
   outlines, same provenance, ~46% the bytes. Licenses in ./licenses/.
   =================================================================== */

/* --- Hanken Grotesk · display / headlines / body / UI (§4) ---
   Variable; brand uses the 400–800 range. The wordmark is an outlined
   SVG lockup, so it does not depend on this face loading. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("./woff2/HankenGrotesk-Variable.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* --- Fraunces · editorial accent (§4) ---
   Covers and pull-quotes only, never UI or body. Variable across
   opsz/wght (+SOFT/WONK). Upright only: the site's one italic moment
   is set in Hanken, so the italic file need not ship. */
@font-face {
  font-family: "Fraunces";
  src: url("./woff2/Fraunces-Variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --- Cairo · Arabic display / headlines / body / UI (§9.1) ---
   Hanken Grotesk's companion; variable across the same 400–800 range. */
@font-face {
  font-family: "Cairo";
  src: url("./woff2/Cairo-Variable.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* --- Amiri · Arabic editorial accent (§9.1) ---
   Fraunces' companion — covers, pull-quotes, and the tagline lockup only.
   Classical Naskh; never UI or body. */
@font-face {
  font-family: "Amiri";
  src: url("./woff2/Amiri-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("./woff2/Amiri-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Space Mono · metadata / labels / data (§4) ---
   Wide tracking, usually uppercase. Two static weights, no variable axis. */
@font-face {
  font-family: "Space Mono";
  src: url("./woff2/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("./woff2/SpaceMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------
   Role bindings — mirrors §4 so a build that links this file alone
   still gets the right stack. Tailwind's font-sans/serif/mono
   utilities carry the same stacks (tailwind.config.mjs); these rules
   cover unclassed markup.
   ------------------------------------------------------------------- */
html {
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
}
.tagline,
blockquote {
  font-family: "Fraunces", Georgia, serif;
}
.meta,
code,
time,
kbd,
samp,
pre {
  font-family: "Space Mono", ui-monospace, monospace;
}

/* -------------------------------------------------------------------
   RTL role bindings — §9.3 verbatim, so an Arabic page that links this
   file needs nothing else. The attribute selectors outrank the Latin
   rules above; Tailwind utilities are overridden in global.css with the
   same [lang="ar"] prefix pattern.
   ------------------------------------------------------------------- */
[dir="rtl"],
[lang="ar"] {
  font-family: "Cairo", system-ui, sans-serif; /* Arabic body / UI / headings */
  line-height: 1.8;
}
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3 {
  line-height: 1.3;
}
[lang="ar"] .tagline,
[lang="ar"] blockquote {
  font-family: "Amiri", serif; /* editorial accent */
}
[lang="ar"] .meta,
[lang="ar"] code,
[lang="ar"] time {
  font-family: "Space Mono", ui-monospace, monospace; /* Latin metadata stays LTR */
}
[lang="ar"] bdi,
[lang="ar"] [dir="ltr"] {
  unicode-bidi: isolate;
}
