/* ===========================================================================
 * PROMOKING K9.5 — Arabic / RTL layer
 * Loaded ONLY by the generated /ar/ pages (see tools/build-ar.js).
 * Page layout is mirrored at build time (physical left/right in each page's
 * inline CSS); this file only adds what a mechanical mirror cannot do.
 * TR / EN / DE pages never load this file.
 * ======================================================================== */

/* ---- 1. Arabic typography ------------------------------------------------
 * Noto Sans Arabic (variable, self-hosted, OFL). The same file is also
 * registered under the site's Latin families with an Arabic-only
 * unicode-range, so every existing font-family ('Sora', 'Inter',
 * 'JetBrains Mono', Arial) renders Arabic in Noto while Latin text, product
 * codes and brand names keep the original Promoking fonts. */
@font-face{font-family:'Noto Sans Arabic';font-style:normal;font-weight:100 900;font-display:swap;
  src:url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2-variations'),url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Sora';font-style:normal;font-weight:100 900;font-display:swap;
  src:url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:100 900;font-display:swap;
  src:url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Arial';font-style:normal;font-weight:100 900;font-display:swap;
  src:url(/assets/fonts/noto-sans-arabic-wght.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFC}

html[dir="rtl"] body{font-family:'Inter','Noto Sans Arabic',system-ui,sans-serif}

/* Arabic is a joined script: tracking breaks letter connections and the
 * tight Latin display leading clips ascenders/descenders and dots. */
html[dir="rtl"] *{letter-spacing:0!important}
html[dir="rtl"] :is(h1,h2,h3,h4,.mbig){line-height:1.34!important;word-spacing:.02em}
html[dir="rtl"] :is(p,li,.lead,label,figcaption){line-height:1.8}
html[dir="rtl"] h1{text-wrap:balance}

/* Monospace UI labels (tags, captions, metadata) — Arabic reads better
 * slightly larger than the Latin mono sizes. */
html[dir="rtl"] :is(.tag,.mono,.hkick,.fl,.pCode,.rk,.bck,.cn,.tk,figcaption){font-size:max(12px,1em)}

/* ---- 2. Content that must stay left-to-right -------------------------- */
html[dir="rtl"] [dir="ltr"]{unicode-bidi:isolate}
html[dir="rtl"] :is(input,textarea)[dir="ltr"]{direction:ltr;text-align:right}
html[dir="rtl"] :is(input,textarea)[dir="ltr"]:placeholder-shown{text-align:right}
html[dir="rtl"] :is(.pCode,code,kbd,samp){direction:ltr;unicode-bidi:isolate}

/* Language selector keeps the same TR | EN | DE | AR order on every page. */
html[dir="rtl"] :is(.lang,.lang-tog){direction:ltr}

/* ---- 3. Never mirror media --------------------------------------------- */
html[dir="rtl"] :is(img,video,picture,svg image){direction:ltr}

/* ---- 4. Overflow guard --------------------------------------------------
 * Mirrored off-canvas and marquee elements must not create a horizontal
 * scrollbar in RTL (negative-scroll side). */
html[dir="rtl"],html[dir="rtl"] body{overflow-x:clip}
