/* ──────────────────────────────────────────────────────────────────────
   rtl.css — the Arabic edition of forz.vn
   Loaded only on /ar/ pages, after forz.css and page.css.

   The layout is built almost entirely from flexbox, grid and gap, so it
   mirrors on its own the moment the document says dir="rtl". What is left
   here are the handful of places the design still speaks in left and right,
   and — more important — the typographic habits that a Latin design can
   afford and an Arabic one cannot.

   Arabic is cursive: letters join. Negative tracking, the device that gives
   the English headings their density, pulls those joins apart and makes the
   word look misspelt rather than tight. Capitals do not exist, so an
   uppercase label is at best ignored and at worst renders the string with the
   wrong shaping. Both are undone below, and the leading is opened up, because
   Arabic carries marks above and below the line that a 1.0 line-height clips.
   ────────────────────────────────────────────────────────────────────── */

/* ---------- 1. Type: joined, untracked, given room ---------- */
:root{
  /* Latin keeps its own faces — fallback is per character, so FORZ and
     5–3000 kVA still set in Space Grotesk and Inter while the Arabic falls
     through to the one face in the stack that has Arabic in it. */
  --ff-display:'Space Grotesk','IBM Plex Sans Arabic','Inter',-apple-system,sans-serif;
  --ff-body:'Inter','IBM Plex Sans Arabic',-apple-system,'Segoe UI',Roboto,sans-serif;
  --ff-mono:'JetBrains Mono','IBM Plex Sans Arabic',ui-monospace,Menlo,monospace;
}

body{line-height:1.75}

/* Tracking has to be cleared everywhere it could reach a joined word, and the
   design applies it from selectors far more specific than a bare class, so the
   reset is made at the document root and allowed to win outright. The cost is
   the designed tracking on the few Latin labels left on an Arabic page; the
   alternative is Arabic words that render as loose, unjoined letters, which
   reads as a spelling mistake rather than as a style. */
html[dir="rtl"] *{letter-spacing:normal !important}
/* The language codes are always Latin, so they keep theirs. */
html[dir="rtl"] .lang a{letter-spacing:.08em !important}

h1,.h1{line-height:1.18}
h2,.h2{line-height:1.22}
h3,.h3{line-height:1.3}

/* Uppercase is a Latin idea. Where a label is Arabic it must be left alone;
   where it is still a code or a figure the shape is unchanged anyway. */
html[dir="rtl"] .tag,html[dir="rtl"] .bx-st,html[dir="rtl"] .stat .l,
html[dir="rtl"] .k,html[dir="rtl"] .foot h5,html[dir="rtl"] .duo-n,
html[dir="rtl"] .cap-n,html[dir="rtl"] .tag-n,
html[dir="rtl"] .sim-clock span,html[dir="rtl"] .spec th{text-transform:none}

/* Numbers, ratings and codes stay left-to-right inside an Arabic sentence. */
.mono,.stat .n,.v,.bx-site span,time,[data-to]{direction:ltr;unicode-bidi:isolate}

/* ---------- 2. The places the design still says left or right ---------- */
.nav-sub,.sub{padding-left:0;padding-right:13px;
  border-left:0;border-right:1px solid var(--line-2)}

.menu,.nav-cta{margin-left:0;margin-right:auto}
@media(min-width:1061px){.nav-cta{margin-right:0}}

.menu a::after{transform-origin:right}
.foot li a{transition:color var(--t-1),padding-right var(--t-2) var(--ease)}
.foot li a:hover{padding-left:0;padding-right:5px}

.dot{margin-right:0;margin-left:7px}
.stat .n sup{margin-left:0;margin-right:3px}
.sim-clock{margin-right:0;margin-left:auto}

.spec th,.spec td{text-align:right}
.v,.row .v{text-align:left}
.pil-list em{text-align:left}

.proof,.note,.callout{border-left:0;border-right:3px solid var(--accent)}

/* the scroll-progress bar and the section rules fill from the right */
.prog i,.story-track i,.bar i{transform-origin:right}

/* ---------- 3. Things that must not mirror ---------- */
/* An arrow that means "onward" has to point the way the reader is going. */
.btn svg,.link-a svg,.bx-site svg,.scroll-cue svg{transform:scaleX(-1)}
/* …but an arrow that means "outward" to another site, and the logo, do not. */
.bx-site svg{transform:none}
.brand img,.foot-logo,.bx-plate img,.plate img{transform:none}

/* The marquee is a band of Latin technical terms; reversing it would make it
   read backwards rather than naturally. */
.marq-in{direction:ltr}

/* ---------- 4. The language switcher ---------- */
.lang{flex-direction:row-reverse}
