/* ENSŌ.7 — Arabic pages (html[lang="ar"][dir="rtl"]). Loaded only by /ar/ pages, after style.css.
   Latin text keeps the site's own fonts; Arabic letters fall through to the Arabic faces. */
:root[dir="rtl"] {
  --f-display: "Roboto Flex", "Noto Kufi Arabic", "Inter", system-ui, sans-serif;
  --f-body: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Cormorant Garamond", "Noto Naskh Arabic", Georgia, serif;
}

/* Arabic letters must join: no tracking anywhere; Arabic has no italic */
html[dir="rtl"] body, html[dir="rtl"] body *, html[dir="rtl"] body *::before, html[dir="rtl"] body *::after { letter-spacing: 0 !important; }
html[dir="rtl"] em { font-style: normal; font-size: 1em; }
html[dir="rtl"] body { line-height: 1.85; }

/* display type: Arabic needs taller lines and a little less size than the wide Latin face */
html[dir="rtl"] .d-xl { font-size: clamp(44px, 8.6vw, 168px); line-height: 1.22; font-weight: 300; }
html[dir="rtl"] .d-l { font-size: clamp(34px, 5.6vw, 100px); line-height: 1.25; font-weight: 300; }
html[dir="rtl"] .d-m { font-size: clamp(28px, 3.6vw, 60px); line-height: 1.3; font-weight: 300; }
html[dir="rtl"] .d-xl em, html[dir="rtl"] .d-l em, html[dir="rtl"] .d-m em, html[dir="rtl"] .statement em { font-weight: 500; font-size: 1em; }
html[dir="rtl"] .statement { line-height: 1.55; font-weight: 300; }
html[dir="rtl"] .loader__count { line-height: 1; }
html[dir="rtl"] .w > span { transform-origin: right bottom; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .lbl { font-size: 13px; }

/* images and text shades: the text sits on the right now */
html[dir="rtl"] .hero__shade {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 28%),
    linear-gradient(to left, rgba(6, 6, 5, .42), rgba(6, 6, 5, 0) 62%),
    linear-gradient(to top, rgba(6, 6, 5, .82), rgba(6, 6, 5, .25) 48%, rgba(6, 6, 5, 0) 72%);
}
html[dir="rtl"] .proj-hero__shade {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 30%),
    linear-gradient(to left, rgba(6, 6, 5, .45), rgba(6, 6, 5, 0) 60%),
    linear-gradient(to top, rgba(6, 6, 5, .88), rgba(6, 6, 5, .25) 50%, rgba(6, 6, 5, 0) 72%);
}

/* positions that name a side */
html[dir="rtl"] .skip { left: auto; right: 16px; }
html[dir="rtl"] .hero__cap { left: auto; right: 0; }
html[dir="rtl"] .roll > span::after { left: auto; right: 0; }
html[dir="rtl"] ul.ls li { padding: 10px 22px 10px 0; }
html[dir="rtl"] ul.ls li::before { left: auto; right: 0; }
html[dir="rtl"] .nav a::before { left: auto; right: -12px; }
html[dir="rtl"] .hero__scroll { right: auto; left: var(--gutter); }
html[dir="rtl"] .cta__enso { right: auto; left: calc(var(--gutter) * -1); }
html[dir="rtl"] .sus-note__enso { right: auto; left: -6%; }
html[dir="rtl"] .loader__count { left: auto; right: var(--gutter); }
html[dir="rtl"] .loader__word { right: auto; left: var(--gutter); }
html[dir="rtl"] .lb__prev { left: auto; right: var(--gutter); }
html[dir="rtl"] .lb__next { right: auto; left: var(--gutter); }
html[dir="rtl"] .lb__close { right: auto; left: var(--gutter); }
html[dir="rtl"] .lb__prev svg, html[dir="rtl"] .lb__next svg { transform: scaleX(-1); }
html[dir="rtl"] .dock { right: auto; left: var(--gutter); }
html[dir="rtl"] .locsel::after { right: auto; left: 18px; }
html[dir="rtl"] .steps__dot { left: auto; right: 0; }

/* side margins and alignment */
html[dir="rtl"] .hero__total { margin-left: 0; margin-right: 6px; }
html[dir="rtl"] .phero__sup { margin-left: 0; margin-right: .3em; }
html[dir="rtl"] .filter sup { margin-left: 0; margin-right: 2px; }
html[dir="rtl"] .hero__proof span + span::before { margin-right: 0; margin-left: 18px; }
html[dir="rtl"] .dl-link__meta { margin-left: 0; margin-right: -6px; }
html[dir="rtl"] .disc__no { padding-left: 0; padding-right: 4px; }
html[dir="rtl"] .letter__inner, html[dir="rtl"] .faq__list { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .hs__more { text-align: right; }
html[dir="rtl"] .pcard__meta, html[dir="rtl"] .prow__tags, html[dir="rtl"] .prog__w { text-align: left; }
html[dir="rtl"] .world__links svg { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
html[dir="rtl"] .world__links li + li a { padding-left: 0; border-left: 0; padding-right: 18px; border-right: 1px solid var(--line); }

/* growing lines start from the right */
html[dir="rtl"] .hero__bar i, html[dir="rtl"] .prin__item::before, html[dir="rtl"] .steps::after,
html[dir="rtl"] .pbar__seg, html[dir="rtl"] .field::after { transform-origin: right; }
html[dir="rtl"] .prin__item::before { left: auto; right: 0; }
html[dir="rtl"] .ftr__mail, html[dir="rtl"] .cdetails dd a { background-position: right bottom; }

/* arrows point the reading way */
html[dir="rtl"] .hero__arrows svg, html[dir="rtl"] .arrow-link__i svg, html[dir="rtl"] .back svg, html[dir="rtl"] .disc__arrow svg, html[dir="rtl"] .next__link svg { transform: scaleX(-1); }
html[dir="rtl"] .arrow-link:hover .arrow-link__i svg { transform: scaleX(-1) translateX(3px); }
html[dir="rtl"] .back:hover svg { transform: scaleX(-1) translateX(-4px); }
html[dir="rtl"] .disc__row:hover .disc__name { transform: translateX(-18px); }
html[dir="rtl"] .prow a:hover .prow__name { transform: translateX(-16px); }
html[dir="rtl"] .next__link:hover .next__title { transform: translateX(-24px); }
html[dir="rtl"] .world__links a:hover svg { transform: scaleX(-1) translateX(5px); }

/* time runs from right to left, like the reading: the bars are placed with left:% in the page, so the tracks are mirrored */
html[dir="rtl"] .prog__track, html[dir="rtl"] .gantt__track { transform: scaleX(-1); }
html[dir="rtl"] .gantt__head > div span { box-shadow: inset 1px 0 0 var(--bg); }
/* the city ticker starts at the right edge and runs to the right */
html[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* the pinned gallery starts at the right edge and moves to the right (main-ar.js), its bar fills from the right */
html[dir="rtl"] .hs__bar i { transform-origin: right; }

/* parts that stay left-to-right: the map, the switch and the clock */
html[dir="rtl"] .world__map, html[dir="rtl"] .lang, html[dir="rtl"] .clock { direction: ltr; }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"], html[dir="rtl"] .phone__num { direction: ltr; text-align: right; }

@media (max-width: 900px) {
  html[dir="rtl"] .dock { left: 0; right: 0; }
  html[dir="rtl"] .prow__loc, html[dir="rtl"] .prow__type, html[dir="rtl"] .prow__tags { text-align: right; }
}
@media (max-width: 600px) {
  html[dir="rtl"] .world__links li + li a { padding-right: 0; border-right: 0; }
  html[dir="rtl"] .world__links li:nth-child(even) a { padding-left: 0; border-left: 0; padding-right: 14px; border-right: 1px solid var(--line); }
}

/* the contact form's hidden spam field: off to the right, because overflow to the left scrolls in right-to-left pages */
html[dir="rtl"] .cform__extra { left: auto; right: -9999px; }
