/* Arabic (right-to-left) layer, loaded after site.css on /ar/ pages only. */
[dir="rtl"] {
  --display: "Noto Naskh Arabic", "Newsreader", Georgia, serif;
  --body: "IBM Plex Sans Arabic", "Archivo", Tahoma, Arial, sans-serif;
  --mono: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
}
/* Arabic letters join: never space them apart or force capitals */
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; text-transform: none !important; }
/* Slanted Arabic reads poorly: keep emphasis upright, colour only */
[dir="rtl"] * { font-style: normal !important; }   /* Arabic is never slanted: emphasis is colour only */
[dir="rtl"] body { line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.45; }
/* Latin runs (brand names, sizes, numbers) inside Arabic text */
[dir="rtl"] bdi { unicode-bidi: isolate; }
.lang-switch { font-family: "IBM Plex Sans Arabic", var(--body); }
/* Skip link: parked off the RIGHT edge (the start side in RTL), which the browser
   clips; parking it off the left edge makes the whole page scroll sideways. */
[dir="rtl"] .skip { left: auto; right: -9999px; }
[dir="rtl"] .skip:focus { left: auto; right: 1rem; top: 1rem; }

/* ---------- Mirrored versions of site.css left/right rules (RTL only) ---------- */
/* Logo lockup is Latin lettering composed left-to-right: keep it that way */
[dir="rtl"] .wordmark { direction: ltr; }
/* Hidden anti-spam field: park off the right edge (see .skip above) */
[dir="rtl"] .hp { left: auto; right: -9999px; }
/* Statistics row dividers */
[dir="rtl"] .cred { padding: 1.9rem 0 0 1.4rem; border-right: 0; border-left: 1px solid var(--hairline-dark); }
[dir="rtl"] .cred:last-child { border-left: 0; }
@media (max-width: 720px) { [dir="rtl"] .cred:nth-child(2) { border-left: 0; } }
/* Founder quote bar and name spacing */
[dir="rtl"] .founder blockquote, [dir="rtl"] blockquote { border-left: 0; border-right: 2px solid var(--bronze); padding-left: 0; padding-right: clamp(1rem, 2.2vw, 1.6rem); }
[dir="rtl"] .founder cite .n { margin-right: 0; margin-left: .55em; }
/* Brand photo row gutters */
[dir="rtl"] .brand-row > div:first-child p { padding-left: .6rem; padding-right: max(.6rem, var(--gutter)); }
[dir="rtl"] .brand-row > div:last-child p { padding-right: .6rem; padding-left: max(.6rem, var(--gutter)); }
/* Footer icons, footnote marks, required-field marks */
[dir="rtl"] .foot .ico { margin-right: 0; margin-left: .5em; }
[dir="rtl"] sup.fn { margin-left: 0; margin-right: .18em; }
[dir="rtl"] .footnotes sup { margin-right: 0; margin-left: .5rem; }
[dir="rtl"] .req { margin-left: 0; margin-right: .15em; }
[dir="rtl"] .prose ul { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .philosophy { text-align: right; }
/* Markets grid (About): borders between cells sit on the left in RTL */
[dir="rtl"] .index-grid a, [dir="rtl"] .index-grid .static { padding: 1.15rem 0 1.15rem 1.2rem; border-right: 0; border-left: 1px solid var(--hairline); }
[dir="rtl"] .index-grid a:nth-child(4n), [dir="rtl"] .index-grid .static:nth-child(4n) { border-left: 0; }
[dir="rtl"] .dark .index-grid a, [dir="rtl"] .deep .index-grid a, [dir="rtl"] .dark .index-grid .static, [dir="rtl"] .deep .index-grid .static { border-left-color: var(--hairline-dark); }
[dir="rtl"] .index-grid a { transition: color .18s ease, padding-right .18s ease; }
[dir="rtl"] .index-grid a:hover { padding-left: 0; padding-right: .7rem; }
@media (max-width: 900px) {
  [dir="rtl"] .index-grid a:nth-child(4n), [dir="rtl"] .index-grid .static:nth-child(4n) { border-left: 1px solid var(--hairline); }
  [dir="rtl"] .index-grid a:nth-child(2n), [dir="rtl"] .index-grid .static:nth-child(2n) { border-left: 0; }
}
@media (max-width: 520px) { [dir="rtl"] .index-grid a, [dir="rtl"] .index-grid .static { border-left: 0; } }
/* Brand-card underline grows from the start side */
[dir="rtl"] .agency::after { left: auto; right: 0; }
/* Product matrix: frozen first column sits on the right */
[dir="rtl"] table.matrix tbody th { text-align: right; left: auto; right: 0; padding-left: 1.7rem; padding-right: 1.3rem; box-shadow: -1px 0 0 var(--hairline); }
/* Mobile call button */
@media (max-width: 880px) { [dir="rtl"] .hdr-call { margin-left: .6rem; margin-right: auto; } }
/* FAQ: plus/minus at the end of the row (left), Expand all at the end (left) */
[dir="rtl"] .faq-q summary { padding: 1.05rem 0 1.05rem 2.4rem; }
[dir="rtl"] .faq-q summary::after { right: auto; left: .2rem; }
[dir="rtl"] .faq-tools { text-align: left; }
/* Client-logo hover labels: invisible until hover but still laid out; long names
   pushed past the grid and made RTL pages scroll sideways. Keep each inside its tile. */
[dir="rtl"] .logo-wall li[data-name]::after { max-width: calc(100% - .6rem); overflow: hidden; text-overflow: ellipsis; }
/* Email addresses and phone numbers are typed left-to-right even on Arabic pages */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
