/* Arabic (right-to-left). Loaded after style.css on /ar pages only, so the English stylesheet is untouched.
   Flex and grid layouts mirror by themselves; this file fixes what does not: Arabic type settings, absolute
   left/right placements, hover nudges, arrow directions and gradients. */

body.rtl, body.rtl.home { --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif; }

/* ---- Type: Arabic letters join, so no tracking, and the lines need more height ---- */
.rtl *, .rtl *::before, .rtl *::after { letter-spacing: 0 !important; text-transform: none !important; }
.rtl h1, .rtl h2, .rtl h3, .rtl .h2, .rtl .h3l, .rtl .lead, .rtl .statement { line-height: 1.3; }
.rtl .h2 { font-size: clamp(32px, 4.7vw, 76px); line-height: 1.22; max-width: 17ch; }
.rtl .h3l { line-height: 1.3; }
.rtl .phero h1 { line-height: 1.2; }
.rtl p, .rtl li, .rtl .lead, .rtl .stage-p { line-height: 1.85; }
.rtl .kicker { font-size: 13px; font-weight: 500; }
.rtl .kicker.sm { font-size: 12px; }
.rtl .nav a, .rtl .header-link { font-size: 14.5px; }
.rtl .pill { font-size: 15px; }
.rtl .panel h3, .rtl .pillar h3, .rtl .step h3, .rtl .tile h3, .rtl .row h3, .rtl .person h3, .rtl .post h3, .rtl .tier-head h3 { line-height: 1.3; }
.rtl .pillar h3 { font-size: clamp(22px, 2vw, 32px); }
.rtl .sig-pillars .pillar h3 { min-height: 0; }
.rtl .sig-pillars .pillar > p { min-height: 0; }
.rtl .step h3 { font-size: clamp(26px, 2.6vw, 40px); }
.rtl .why .step h3 { font-size: clamp(22px, 1.9vw, 30px); }
.rtl .post h3, .rtl .tile h3 { font-size: clamp(22px, 2vw, 30px); }
.rtl .art h2 { font-size: clamp(25px, 2.4vw, 34px); line-height: 1.35; }
.rtl .art p, .rtl .art li { font-size: 18px; line-height: 1.9; }
.rtl .lang-switch { font-family: "Inter", system-ui, sans-serif; }

/* The brand wordmark and numbers stay left-to-right Latin */
.rtl .wordmark, .rtl .wordmark * { letter-spacing: -0.025em !important; }
.rtl .wordmark { font-family: 'Archivo', "Inter", system-ui, sans-serif; }
.rtl [dir="ltr"] { unicode-bidi: isolate; }

/* ---- Header ---- */
.rtl .nav a::after { transform-origin: right; }
.rtl .header-link:hover svg { transform: translateX(-4px); }
@media (min-width: 901px) {
  .rtl .header .header-link { transform: translateX(-8px); }
  .rtl .header.is-scrolled .header-link { transform: none; }
}
.rtl .nav .lang-switch { font-size: 13.5px; padding-inline-start: clamp(14px, 1.6vw, 22px); border-inline-start: 1px solid var(--line); }
.nav .lang-switch { color: var(--accent); }
@media (max-width: 900px) {
  .rtl .header .nav a { font-size: 30px; font-weight: 300; }
  .rtl .header .nav .lang-switch { margin-top: 10px; padding-inline-start: 0; border-inline-start: 0; font-size: 22px; }
}

/* ---- Mega menu ---- */
.rtl .mega-sig { border-right: 0; border-left: 0; }
.rtl .mega-big { padding: 20px 4px 20px 46px; transition: padding-right 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease; }
.rtl .mega-big i { right: auto; left: 6px; }
.rtl .mega-big:hover { padding-left: 46px; padding-right: 16px; background: linear-gradient(270deg, rgba(216, 188, 133, 0.11), transparent 85%); }
.rtl .mega-big:hover i { transform: translateX(-5px); }
.rtl .mega-conv { padding: 22px 24px 14px; }
.rtl .mega-item:hover { padding-left: 4px; padding-right: 14px; background: linear-gradient(270deg, rgba(216, 188, 133, 0.1), transparent 80%); }
.rtl .mega-item:hover i { transform: translateX(-5px); }
.rtl .mega-all:hover { padding-left: 4px; padding-right: 12px; }
.rtl .mega-all:hover svg, .rtl .mega .kicker-link:hover svg { transform: translateX(-5px); }
.rtl .mega-cta { border-left: 0; border-right: 2px solid var(--accent); padding: 16px 18px 16px 6px; background: linear-gradient(270deg, rgba(216, 188, 133, 0.13), transparent 90%); }
.rtl .mega-cta:hover em { transform: translateX(-5px); }

/* ---- Arrows and hover nudges point the other way ---- */
.rtl .arrow-link:hover svg, .rtl a.panel:hover .arrow-link svg, .rtl .tile:hover .arrow-link svg, .rtl .post:hover .arrow-link svg,
.rtl a.panel:hover .panel-link svg, .rtl a.pillar:hover .panel-link svg, .rtl .hero-sig a:hover svg, .rtl .side-row:hover svg { transform: translateX(-6px); }
.rtl .pill:hover .chip svg { transform: translateX(-5px); }
.rtl .pill::before { transform: translateX(120%); }
.rtl .pill:hover::before { transform: translateX(-120%); }
.rtl .post-row:hover i { transform: translateX(-6px); }
.rtl .post-row i { margin-right: 0; margin-left: clamp(0px, 5vw, 96px); }
@media (max-width: 900px) { .rtl .post-row i { margin-left: 0; } }
.rtl .stage-item:hover .stage-cta svg { transform: translateX(-6px); }
.rtl .stage-go { transform: translateX(10px); }
.rtl .stage-item.is-active .stage-go { transform: none; }
.rtl .why .step p a::after { content: "\2190"; margin-left: 0; margin-right: 0.3em; }
.rtl .why .step p a:hover::after { transform: translateX(-3px); }
.rtl a.pill:hover, .rtl a.pill:focus-visible, .rtl button.pill:hover, .rtl .foot a.pill:hover, .rtl .foot-brand a.pill:hover { padding-left: 0; padding-right: 22px; }

/* ---- Rows, lists and hovers that used padding-left ---- */
.rtl .pillar li:hover { padding-left: 0; padding-right: 9px; }
.rtl .row:hover { padding-left: 0; padding-right: 14px; }
@media (max-width: 900px) { .rtl .row:hover { padding-right: 0; } }
.rtl .foot-cols a:hover { padding-left: 0; padding-right: 6px; }
.rtl .hero-sig a:hover { padding-left: 0; padding-right: 10px; }
.rtl .chat-opt:hover { padding-left: 0; padding-right: 4px; background: linear-gradient(270deg, rgba(216, 188, 133, 0.1), transparent 85%); }
.rtl .chat-opt > svg:last-child { transform: translateX(6px); }
.rtl .chat-opt:hover svg { transform: translateX(-4px); }
.rtl .side-row:hover { padding-left: 0; padding-right: 10px; }
.rtl .tag, .rtl .row .tag { margin-left: 0; margin-right: 12px; }
.rtl .flow li i { margin-right: 0; margin-left: 9px; }
.rtl .flow li:not(:last-child)::after { margin: 0 10px 0 12px; }
.rtl .intel .flow li small { margin-left: 0; margin-right: auto; }

/* ---- Steps, timeline and dotted lines ---- */
.rtl .step::before { left: auto; right: 0; }
.rtl .step { padding-right: 0; padding-left: clamp(16px, 2vw, 36px); }
.rtl .flow-lg li::before { left: auto; right: 0; }
.rtl .flow-lg li:not(:last-child)::after { left: 6px; right: 18px; background: linear-gradient(270deg, var(--accent), rgba(216, 188, 133, 0.12)); }
@media (max-width: 900px) { .rtl .flow-lg li:not(:last-child)::after { left: auto; right: 3.5px; background: linear-gradient(180deg, var(--accent), rgba(216, 188, 133, 0.12)); } }
.rtl .panel .flow li i { left: auto; right: 0; }
.rtl .panel .flow li:not(:last-child)::after { left: auto; right: 2.5px; }

/* ---- Article and legal lists ---- */
.rtl .art li { padding: 16px 34px 16px 0; }
.rtl .art li::before { left: auto; right: 2px; }
.rtl .legal ul { padding-left: 0; padding-right: 20px; }

/* ---- Forms ---- */
.rtl .field select, .rtl .filter-select select { background-position: left 16px center; padding: 0 16px 0 44px; }
.rtl .field input[dir="ltr"], .rtl .field input[type="email"], .rtl .field input[type="tel"] { text-align: right; }
.rtl .field input[dir="ltr"]::placeholder { text-align: right; }

/* ---- Contact photo: fade from the right so the form side stays calm ---- */
.rtl.calm .bg::after {
  background:
    linear-gradient(270deg, rgba(5, 28, 34, 0.86) 0%, rgba(5, 28, 34, 0.62) 42%, rgba(5, 28, 34, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 28, 34, 0.5) 0%, rgba(5, 28, 34, 0.05) 26%, rgba(5, 28, 34, 0.3) 62%, rgba(5, 28, 34, 0.9) 100%);
}

/* ---- Chat ---- */
.rtl .chat { right: auto; left: max(18px, 2.2vw); align-items: flex-start; }
.rtl .chat-panel { right: auto; left: 0; transform-origin: bottom left; }
@media (max-width: 560px) { .rtl .chat { right: auto; left: 14px; } }
@media (max-width: 900px) { .rtl .chat { right: auto; left: 14px; } }

/* ---- Footer ---- */
.rtl .foot-legal a:lang(en) { font-family: "Inter", system-ui, sans-serif; }

/* ---- Home stage (variant) ---- */
.rtl .stage-item h3 { letter-spacing: 0 !important; }
.rtl .stage-item.is-active h3, .rtl .stage-item:focus-visible h3 { transform: translateX(-10px); }
.rtl .stage-tags li { padding-left: 0; padding-right: 18px; }
.rtl .stage-tags li::before { left: auto; right: 0; }
.rtl .stage-view .rings { left: auto; right: 26px; }

/* ---- Arabic reads smaller than Latin at the same size: lift the small text, tame the very large headings ---- */
.rtl .phero h1 { font-size: clamp(42px, 7vw, 104px); }
.rtl .row h3 { font-size: clamp(22px, 2.15vw, 31px); }
.rtl .row p, .rtl .row small, .rtl .tier-head p { font-size: 17px; }
.rtl .tag, .rtl .row .tag { font-size: 12.5px; }
.rtl .duo p { font-size: clamp(19px, 1.7vw, 23px); }
.rtl .crumb { font-size: 14px; }
.rtl .foot-note, .rtl .side-note { font-size: 14px; }
.rtl .foot-cols a, .rtl .foot-brand p { font-size: 16.5px; }
.rtl .foot-base span, .rtl .foot-base a { font-size: 14px; }
.rtl .chat-opt strong { font-size: 15.5px; }
.rtl .chat-opt small, .rtl .side-row small { font-size: 13px; }
.rtl .tile .arrow-link, .rtl .post .arrow-link, .rtl .post-meta { font-size: 14.5px; }
.rtl .pillar p, .rtl .pillar li, .rtl .sig-pillars .pillar li, .rtl .sig-pillars .pillar > p { font-size: 16.5px; }
.rtl .step p, .rtl .person p, .rtl .person .bio { font-size: 16px; }
.rtl .panel-link, .rtl .stage-cta, .rtl .arrow-link { font-size: 15px; }
.rtl .aside p { font-size: clamp(16px, 1.25vw, 19px); }
.rtl .hero-sig a { font-size: clamp(18px, 1.5vw, 23px); }
.rtl .mega-big strong { font-size: 24px; }
.rtl .mega-item strong { font-size: 18px; }
.rtl .mega-item span, .rtl .mega-big span { font-size: 14px; }
@media (max-width: 900px) {
  .rtl .header .nav .sub a { font-size: 20px; font-weight: 400; padding: 7px 0; }
  .rtl .nav-item.open .sub { margin: 12px 2px 8px 0; }
}

/* ---- Home hero (Arabic): mirror the composition and give the Arabic copy room ---- */
@media (min-width: 901px) {
  .rtl .aside { width: min(100%, 470px); gap: 20px; }
  .rtl .aside p.tagline { font-size: clamp(30px, 2.9vw, 50px); font-weight: 300; line-height: 1.3; text-wrap: balance; }
  .rtl .aside p:not(.tagline) { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.8; text-wrap: balance; color: var(--soft); max-width: 36ch; }
  .rtl .hero-sig { width: min(100%, 430px); }
  .rtl .hero-sig .eyebrow { font-size: 13.5px; margin-bottom: 14px; }
  .rtl .hero-sig a { padding: 14px 0; }
  /* the Latin wordmark sits flush with the right edge, like the logo and the services list */
  .rtl .word { text-align: right; padding-right: 0; }
  .rtl h1.wordmark { justify-content: flex-end; }
}
@media (max-width: 900px) {
  .rtl .aside p.tagline { font-size: clamp(28px, 8vw, 36px); line-height: 1.3; }
  .rtl .aside p:not(.tagline) { font-size: 17px; line-height: 1.8; text-wrap: balance; }
}

/* ---- Version 3 home (Arabic): the hero copy sits on the right, accordions and lists mirror ---- */
.rtl .gate-copy { left: auto; right: var(--pad); justify-items: start; text-align: right; }
.rtl .gate-copy::before { inset: -64px -70px -48px -90px; background: radial-gradient(ellipse 80% 78% at 64% 56%, rgba(6, 30, 38, 0.62), rgba(6, 30, 38, 0.34) 55%, rgba(6, 30, 38, 0) 82%); }
.rtl .gate-scrim { background:
  linear-gradient(270deg, rgba(6, 30, 38, 0.80) 0%, rgba(6, 30, 38, 0.60) 20%, rgba(6, 30, 38, 0.28) 38%, rgba(6, 30, 38, 0.05) 54%, rgba(6, 30, 38, 0) 62%),
  linear-gradient(0deg, rgba(6, 30, 38, 0.66) 0%, rgba(6, 30, 38, 0.28) 20%, rgba(6, 30, 38, 0) 42%),
  linear-gradient(180deg, rgba(6, 30, 38, 0.38) 0%, rgba(6, 30, 38, 0) 16%); }
.rtl .gate-copy h1 { font-size: clamp(34px, 3.6vw, 62px); line-height: 1.28; max-width: 15ch; }
.rtl .gate-copy .kicker { white-space: normal; font-size: 13.5px; }
.rtl .gate-actions .text-link { flex-direction: row; }
.rtl .gate-actions .text-link:hover svg { transform: translateX(-5px); }

/* accordions */
.rtl .acc-head { text-align: right; }
.rtl .acc-title { font-size: clamp(26px, 2.8vw, 42px); line-height: 1.3; }
.rtl .acc-item.is-open .acc-title { transform: translateX(-8px); }
.rtl .acc-short { font-size: 17.5px; line-height: 1.85; }
.rtl .acc-list li { padding-left: 0; padding-right: 18px; }
.rtl .acc-list li::before { left: auto; right: 0; }
.rtl .acc-list b { font-size: 18.5px; line-height: 1.5; }
.rtl .acc-list span { font-size: 16px; line-height: 1.8; }
.rtl .acc-cta:hover svg { transform: translateX(-6px); }
.rtl .acc-faq .acc-title { font-size: clamp(19px, 1.8vw, 26px); }
.rtl .acc-text p { font-size: 17.5px; line-height: 1.95; }

/* sections */
.rtl .who-item h3 { font-size: clamp(21px, 1.9vw, 28px); line-height: 1.4; }
.rtl .who-item p { font-size: 16px; line-height: 1.85; }
.rtl .notice p { font-size: 14px; line-height: 1.95; }
.rtl .notice a { font-family: "Inter", system-ui, sans-serif; }
@media (max-width: 900px) {
  .rtl .gate-copy { right: auto; }
  .rtl .gate-copy h1 { max-width: none; font-size: clamp(30px, 8vw, 44px); }
  .rtl .gate-scrim { background: linear-gradient(0deg, #0A3340 0%, rgba(10, 51, 64, 0.82) 14%, rgba(10, 51, 64, 0) 38%), linear-gradient(180deg, rgba(10, 51, 64, 0.45) 0%, rgba(10, 51, 64, 0) 16%); }
  .rtl .acc-title { font-size: clamp(26px, 8vw, 34px); }
}

/* page-hero art and tags in Arabic */
.rtl .ph-meta { letter-spacing: 0 !important; font-size: 14px; }
.rtl .ph-tags li { font-size: 14px; }
@media (min-width: 1000px) { .rtl .ring-art { inset-inline-end: auto; inset-inline-start: 0; left: 0; right: auto; } }
