/* saferockit.ma: right to left additions for the Arabic pages, loaded after /assets/site.css (the build adds the
   link on pages whose language has dir "rtl" in src/site.json).
   site.css already lays everything out with logical properties (margin-inline, inset-inline, text-align: start),
   mirrors every arrow icon through the --flip token ([dir="rtl"] { --flip: -1 }), and swaps the type tokens to
   IBM Plex Sans Arabic. The tabs follow the reading direction in site.js (ArrowLeft moves forward).
   This file holds only what those cannot express. No colours here: every colour comes from the site.css tokens. */

/* Arabic has no capitals, and letter spacing breaks the joins between letters: spaced, upper case labels
   get plain spacing and a slightly larger size instead. */
[dir="rtl"] :is(.kicker, .eyebrow, .level, .badge, .trust-title, .fiche-label, .console-label) {
    letter-spacing: 0; text-transform: none;
}
[dir="rtl"] .kicker { font-size: 0.92rem; }
[dir="rtl"] .eyebrow { font-size: 0.9rem; }
[dir="rtl"] .level, [dir="rtl"] .badge { font-size: 0.86rem; }
[dir="rtl"] .trust-title, [dir="rtl"] .fiche-label { font-size: 0.86rem; }

/* The network in the hero arch is mirrored with the arch, so the intruder still waits on the outer side of the dome,
   away from the text. The shield tile sits on the axis outside the mirrored group and never flips; its guard arc
   flips with the network to face the intruder. Same transform as the live page. */
[dir="rtl"] .arch .board { transform: scaleX(-1); transform-origin: 200px 0; }

/* The quotation mark icon opens on the reading side */
[dir="rtl"] .quote-card > .icon { transform: scaleX(-1); }

/* Email addresses and phone numbers are typed left to right */
[dir="rtl"] .field input[type="email"], [dir="rtl"] .field input[type="tel"] { direction: ltr; text-align: right; }

/* The mobile menu marks the current page on the reading side (site.css draws it with a physical inset shadow) */
@media (max-width: 980px) {
    [dir="rtl"] .nav-link[aria-current="page"], [dir="rtl"] .nav-item.is-current > .nav-link { box-shadow: inset -3px 0 0 var(--brand); }
}

/* A heading that is only a Latin name keeps its own direction but lines up with the Arabic text */
[dir="rtl"] :is(.card, .plan, .group, .split-aside, .tab-panel, .person-body) > :is(h2, h3)[dir="ltr"] { text-align: right; }

/* The steps progress line fills from the right, so its gradient starts on the right too */
[dir="rtl"] .timeline .progress { background: linear-gradient(270deg, var(--brand), var(--accent)); }

/* Latin names inside Arabic text never break inside the name (Google | Workspace, Windows | 11) */
[dir="rtl"] bdi { white-space: nowrap; }
[dir="rtl"] .foot-legal bdi { white-space: normal; }

@media (max-width: 640px) {
    [dir="rtl"] .eyebrow { font-size: 0.8rem; }
}
