/* ============================================================
   Arabic (RTL) design system — Amiri  (per KETURAH Syria spec §6 — locked)
   Layered on top of style.css (home) and sub.css (subpages).
   Loaded ONLY on Arabic pages (html[lang="ar"]).
   ============================================================ */
:root{
  --ar-font: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --amiri-quran: "Amiri Quran", "Amiri", "Noto Naskh Arabic", serif;  /* Quranic verses ONLY — loaded per-page, never for headings/body */
}

/* ---- direction + base font ---- */
html[lang="ar"]{ direction: rtl; }
html[lang="ar"] body{ direction: rtl; text-align: right; font-family: var(--ar-font); letter-spacing: 0; }

/* Amiri everywhere text lives (overrides Fraunces/Cormorant/Inter) */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
html[lang="ar"] h5, html[lang="ar"] h6, html[lang="ar"] p, html[lang="ar"] li,
html[lang="ar"] a, html[lang="ar"] span, html[lang="ar"] button, html[lang="ar"] input,
html[lang="ar"] textarea, html[lang="ar"] select, html[lang="ar"] label, html[lang="ar"] td,
html[lang="ar"] th, html[lang="ar"] figcaption, html[lang="ar"] blockquote, html[lang="ar"] em,
html[lang="ar"] strong, html[lang="ar"] .hero-title, html[lang="ar"] .section-title,
html[lang="ar"] .eyebrow, html[lang="ar"] .sub-h2, html[lang="ar"] .sub-eyebrow{
  font-family: var(--ar-font) !important;
  letter-spacing: 0 !important;
}
/* Arabic is never italicised — distinguish the accent word by weight/colour instead */
html[lang="ar"] .hero-title em, html[lang="ar"] .section-title em{ font-style: normal; font-weight: 700; }
html[lang="ar"] .hero-title em{ color: var(--gold, #c79546); }

/* ---- typography scale (per spec) ---- */
html[lang="ar"] .hero-title{ font-size: clamp(40px, 6vw, 64px); line-height: 1.4; }
html[lang="ar"] .section-title, html[lang="ar"] .sub-h2, html[lang="ar"] h1{ font-size: clamp(32px, 4.4vw, 46px); line-height: 1.4; }
html[lang="ar"] h2{ font-size: clamp(30px, 3.6vw, 40px); line-height: 1.4; }
html[lang="ar"] h3{ font-size: clamp(24px, 2.8vw, 34px); line-height: 1.45; }
html[lang="ar"] h4{ font-size: clamp(22px, 2.2vw, 26px); line-height: 1.5; }
/* body/reading text +20% (per request) — Amiri renders small, so this restores comfortable size */
html[lang="ar"] p, html[lang="ar"] li{ font-size: clamp(20px, 1.5vw, 25px); line-height: 1.95; }
html[lang="ar"] .lead, html[lang="ar"] .lead-narrow, html[lang="ar"] .lead-2{ font-size: clamp(22px, 1.8vw, 26px); line-height: 1.95; }
html[lang="ar"] .hero-subtitle{ font-size: clamp(22px, 1.9vw, 26px); line-height: 1.85; }
/* spec §6: never use positive letter-spacing with Arabic */
html[lang="ar"] .eyebrow, html[lang="ar"] .sub-eyebrow{ font-size: 15px; letter-spacing: 0 !important; }
html[lang="ar"] button, html[lang="ar"] .hero-cta, html[lang="ar"] .cta{ font-size: clamp(16px, 1.1vw, 18px); }
/* comfortable reading measure for running text */
html[lang="ar"] .lead, html[lang="ar"] .lead-narrow, html[lang="ar"] .lead-2,
html[lang="ar"] .id-card p, html[lang="ar"] .sub-sec > p, html[lang="ar"] .prose{ max-width: 72ch; }

/* keep Latin fragments (names, coords, codes, units) upright inside Arabic */
html[lang="ar"] .ltr, html[lang="ar"] bdi, html[lang="ar"] code{ direction: ltr; unicode-bidi: isolate; }

/* ---- RTL layout fixes: HOME (style.css) ---- */
html[lang="ar"] .nav-links{ flex-direction: row; }           /* dir:rtl already reverses order */
html[lang="ar"] .hero-content{ text-align: right; }
html[lang="ar"] .principles li{ padding-right: 0; }
html[lang="ar"] .principles li[data-icon]::before{ right: 0; left: auto; }
html[lang="ar"] .foot-row, html[lang="ar"] .foot-research{ text-align: right; }
html[lang="ar"] .mgc-marquee-track{ direction: ltr; }        /* keep image strip visually L→R */

/* ---- RTL layout fixes: SUBPAGES (sub.css) ---- */
html[lang="ar"] .sub-nav .back{ margin-left: 0 !important; margin-right: auto !important; }
html[lang="ar"] .rsec-nav .inner{ direction: rtl; }
html[lang="ar"] .sub-hero-inner{ text-align: right; }
html[lang="ar"] .sub-sec, html[lang="ar"] .sub-sec .inner{ text-align: right; }
html[lang="ar"] .rsec-div{ margin: 0 8px 0 4px; }
html[lang="ar"] table.data{ direction: rtl; }
html[lang="ar"] table.data th, html[lang="ar"] table.data td{ text-align: right; }
html[lang="ar"] .kpi, html[lang="ar"] .card{ text-align: right; }
html[lang="ar"] .sec-no{ margin-left: 6px; margin-right: 0; }

/* ---- language switcher: base styles live in style.css / sub.css (loaded on every page);
   only the Arabic-font override belongs here ---- */
html[lang="ar"] .lang-switch a{ font-family: var(--ar-font); font-size: 14px; }

/* ---- Quran verse component (Amiri Quran ONLY here) ---- */
html[lang="ar"] .quran-verse{ margin: 40px auto; max-width: 70ch; padding: clamp(24px,4vw,44px);
  border: 1px solid var(--rule, rgba(21,17,11,.12)); border-radius: 16px; background: rgba(199,149,70,.04); text-align: center; }
html[lang="ar"] .quran-verse blockquote{ font-family: var(--amiri-quran) !important; margin: 0;
  font-size: clamp(25px, 3vw, 34px); line-height: 2.1; color: var(--ink, #15110b); }
html[lang="ar"] .quran-verse figcaption{ font-family: var(--ar-font) !important; margin-top: 18px;
  font-size: 16px; color: var(--stone-700, #5a4a35); }

/* ---- subpage dense component text +20% (cards, tables, captions, lists) ----
   Qualified with html[lang="ar"] so it outranks the pages' inline component sizes. */
html[lang="ar"] .feat p, html[lang="ar"] .card p, html[lang="ar"] .park p, html[lang="ar"] .path p,
html[lang="ar"] .persona .jn, html[lang="ar"] .kpi .l, html[lang="ar"] .park .lesson,
html[lang="ar"] .feat .why, html[lang="ar"] .study-k, html[lang="ar"] .study-v, html[lang="ar"] .study-note,
html[lang="ar"] .dwg-desc, html[lang="ar"] .dwg-osm, html[lang="ar"] .dwg-subtitle{
  font-size: 16.5px; line-height: 1.8;
}
html[lang="ar"] table.data td, html[lang="ar"] table.data th{ font-size: 16px; line-height: 1.7; }
html[lang="ar"] .cap, html[lang="ar"] .chart-note, html[lang="ar"] .foot-taglines p{ font-size: 15px; line-height: 1.7; }

/* reduced-motion already handled globally; ensure Arabic inherits it */
