/* =========================================================================
   RED GALAXY — RTL overrides, loaded only on Arabic pages (dir="rtl")
   Base style.css already mirrors correctly in most places because it is
   built on flexbox/grid (which follow the document's writing direction
   automatically). This file only fixes the handful of things that don't:
   the Arabic type family, letter-spacing (which must never be applied to
   Arabic script — it breaks letter joining), and a couple of decorative,
   absolutely-positioned elements.
   ========================================================================= */

html[dir="rtl"] {
  --font-display: "Noto Kufi Arabic", "Tahoma", sans-serif;
  --font-body: "Noto Kufi Arabic", "Tahoma", sans-serif;
}

/* Arabic script must never receive letter-spacing: it breaks the joining
   between letters and looks broken. Reset every place the base sheet
   sets a tracked/uppercase treatment. */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .eyebrow::before,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .brand-word span,
html[dir="rtl"] .hero-stats .label,
html[dir="rtl"] .capability .lbl,
html[dir="rtl"] .status-pill,
html[dir="rtl"] .footer-grid h4,
html[dir="rtl"] .lang-switch,
html[dir="rtl"] .u-right,
html[dir="rtl"] .hero-panel .tag {
  letter-spacing: 0;
}

/* the eyebrow rule-line should sit after the Arabic label (still the
   leading/start edge — flex handles that) but reads better with a touch
   less gap given Arabic's natural width */
html[dir="rtl"] .eyebrow { gap: 0.5em; }

/* headings set in Noto Kufi Arabic read slightly heavier than Space
   Grotesk at the same size/weight — soften the letter-spacing pull and
   give body copy a touch more line-height for descenders/diacritics */
html[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.22; }
html[dir="rtl"] h2 { line-height: 1.35; }
html[dir="rtl"] p, html[dir="rtl"] .field .error, html[dir="rtl"] .form-note {
  line-height: 1.85;
}

/* mirror the two decorative orbit rings in the hero so the composition
   still reads as "anchored to the leading edge" in RTL */
html[dir="rtl"] .orbit-1 { right: auto; left: -160px; }
html[dir="rtl"] .orbit-2 { right: auto; left: -300px; }

/* stat numerals stay LTR (Western digits) by design, but should sit
   flush with their Arabic label rather than centering oddly */
html[dir="rtl"] .hero-stats .num,
html[dir="rtl"] .capability .num { direction: ltr; }

/* phone / email links keep their own LTR run inside RTL paragraphs */
html[dir="rtl"] .contact-info .row a[href^="tel:"] { direction: ltr; text-align: right; unicode-bidi: isolate; }
