/* Shapes Infinity - Arabic twins (/ar/) only. Linked last, after the page's own styles.
   Source: marketing/arabic/ar.css; served from a hashed folder /assets/v/<sha256[:8]>/css/ar.css.
   One file serves both layout options, chosen by a class that ar_build.py puts on <html>:
     html.ar-mirrored  (dir="rtl")  a normal Arabic site: rail on the right, rows run right to left
     html.ar-same      (dir="ltr")  every box where it is in English; only the words read right to left
   The English site never loads this file. */

/* ---------------------------------------------------------------- 1. the Arabic font
   The hosted Noto Kufi Arabic file is a variable font (weights 100-900), but fonts.css
   declares it only at 500 and 700, so 400 text rendered at 500 and 600 at 700. A family of
   our own name, declared over the full range, gives real weights. Same file, same origin
   (CSP font-src 'self'), Arabic letters only (unicode-range). */
@font-face {
  font-family: "SI Kufi Arabic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/v/01290c72/fonts/noto-kufi-arabic-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* Every Latin face on the site is unicode-range limited, so with the Arabic face SECOND in
   each stack, Latin (the brand, emails, digits) keeps the site's own fonts and Arabic letters
   go to Kufi. Without this, body text fell to Segoe UI / the iPhone system font and the
   italic serif accent to Tahoma. */
html[lang="ar"] {
  --font-body: "Inter", "SI Kufi Arabic", "Segoe UI", system-ui, sans-serif;
  --font-display: "General Sans", "SI Kufi Arabic", "Segoe UI", sans-serif;
  --font-serif: "General Sans", "SI Kufi Arabic", sans-serif;
  --font-ar: "General Sans", "SI Kufi Arabic", "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------- 2. Arabic typography */
/* Tracking breaks the joins between Arabic letters (Safari draws the gaps). Latin islands
   marked lang="en" keep theirs. Uppercase does nothing to Arabic and is harmless. */
html[lang="ar"] body *:not([lang="en"]):not([lang="en"] *) { letter-spacing: 0 !important; }

/* Kufi has tall ascenders and deep descenders: the English 0.98-1.1 line heights clip it. */
html[lang="ar"] :is(h1, h2, h3, .ph-title, .mega-title, .footer-hail-title, .quote-cta-title, .svc-card-name, .entries-head h2) { line-height: 1.34; }
html[lang="ar"] .paper-hero .ph-title .ph-line { line-height: 1.34; }
/* Line 1 is painted with a gradient clipped to the text (hero-light.css). English repeats a
   1.04em tile per line; Kufi descenders (the tails of م and ع, the dots under ي) reach below
   any one-line tile and below the Latin font's box, so they came out as white bars or not at
   all ("فى دبى"). Arabic gets one gradient over the whole line block, extended below the last
   line by padding that a negative margin mostly takes back; the 0.2em kept stops the dots of
   line 1 landing on the words of line 2. */
html[lang="ar"] .paper-hero .ph-title .ph-line:nth-child(1) {
  background-size: 100% 100%; background-repeat: no-repeat;
  padding-bottom: 0.4em; margin-bottom: -0.2em;   /* net +0.2em: room for the dots under ي before line 2 */
}
html[lang="ar"] .paper-hero .ph-title .ph-line:nth-child(1) .hl-dubai {
  padding-bottom: 0.4em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* The inner-page hero (hero-frame.css) paints its h1 the same way: a metallic tile of 1.06em
   per row and an orange accent clipped to the letters. Arabic rows are 1.34em, so the tile
   drifted (light and dark seams through the letters on TapKue), and the dots under ي on the
   last row fell outside the painted box ("فى دبى"). The tile follows the Arabic row height,
   and each painted box reaches below its last row by padding that a negative margin takes
   back (inline boxes: padding only, it does not move the lines). */
html[lang="ar"] .hero-ledger h1 .line > span,
html[lang="ar"] .hero-ledger h1:not(:has(.line)) { background-size: 100% 1.34em; padding-bottom: 0.4em; margin-bottom: -0.4em; }
html[lang="ar"] .hero-ledger h1 .accent { padding-bottom: 0.4em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html[lang="ar"] .hero-ledger h1 br + .accent { background-size: 100% 1.34em; padding-bottom: 0.4em; margin-bottom: -0.4em; }
/* The Learning page sets its own 1.02 / 1.05 heading line heights with id selectors. */
html[lang="ar"] #main #classes > .entries-head h1,
html[lang="ar"] #main > section:not(#classes) > .entries-head > h2 { line-height: 1.34; }
html[lang="ar"] :is(p, li, .lead, .ph-sub, .svc-card-desc, .proof-body p, .faq-body, dd) { line-height: 1.85; }
html[lang="ar"] .ph-sub { line-height: 1.9; }
html[lang="ar"] p.banner { line-height: 1.6; }

/* The italic serif accent (Instrument Serif) has no Arabic: keep its colour, drop the slant. */
html[lang="ar"] :is(.ph-accent, h1 em, h2 em, .quote-cta-title em, .footer-hail-accent, .accent-serif, .mega-title .accent) {
  font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 1em;
}
html[lang="ar"] .noir-marquee .nm-track > span { font-style: normal; font-weight: 700; }

/* Latin islands (phone, email, links that hold a URL) stay left to right inside Arabic. */
html[lang="ar"] :is(a[href^="tel:"], a[href^="mailto:"], .contact-val, [lang="en"]) { unicode-bidi: isolate; }
html[lang="ar"] a[href^="tel:"] { direction: ltr; }
html[lang="ar"] :is(input[type="tel"], input[type="email"]) { direction: ltr; }
/* phone and email read left to right but sit at the reading edge of their box, like every
   other field of an Arabic form (both options) */
html[lang="ar"] :is(input[type="tel"], input[type="email"]) { text-align: right; }
html[lang="ar"] input::placeholder { letter-spacing: 0; }
/* playground.css sets every footer contact line left to right (English labels + numbers);
   with Arabic labels that reverses the words ("Google على علينا اعثر"). Numbers stay LTR. */
html[lang="ar"] :is(.footer-contact a:not([href^="tel:"]), .footer-contact > span) { direction: rtl; }
/* the opening hours are set in the mono face, which has no Arabic */
html[lang="ar"] .contact-val--static { font-family: var(--font-body); }
/* <button>s do not inherit the page font: the chat Send button, the form's «إرسال» and the
   «اسأل» button were drawn in Arial's Arabic. Their Arabic belongs in Kufi */
html[lang="ar"] :is(.agent-send, button.btn-hero) { font-family: var(--font-display); }
/* phone: the ask button is full width; its label sits in the middle, not against one end */
@media (max-width: 599px) { html[lang="ar"] .sfaq-ask-btn { justify-content: center; } }

/* ---------------------------------------------------------------- 3. the EN / عربي switch
   A plain link to the English twin (no script, nothing remembered), shaped like the owner's
   picture: a pill with a round knob; the active language bold and orange, the knob on its
   side. Kept left to right in both layouts so EN is always on the left, as in the picture. */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-sizing: border-box; height: 34px; padding: 0 11px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 7, 13, 0.78);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: rgba(242, 240, 250, 0.6); text-decoration: none; direction: ltr;
  font: 500 11px/1 "General Sans", "Inter", sans-serif; letter-spacing: 0.06em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lang-switch:hover { border-color: rgba(255, 107, 0, 0.6); box-shadow: 0 0 18px rgba(255, 107, 0, 0.25); color: rgba(242, 240, 250, 0.85); }
.lang-switch:focus-visible { outline: 2px solid var(--orange, #ff6b00); outline-offset: 3px; }
.lang-switch .ls-opt.is-on { color: var(--orange, #ff6b00); font-weight: 700; }
.lang-switch .ls-ar { font: 700 12.5px/1 "SI Kufi Arabic", "Segoe UI", sans-serif; letter-spacing: 0; padding-bottom: 2px; }
.lang-switch .ls-track {
  position: relative; flex: 0 0 auto; width: 26px; height: 15px; border-radius: 999px;
  background: rgba(255, 107, 0, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.5);
}
.lang-switch .ls-knob {
  position: absolute; top: 2.5px; right: 2.5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange, #ff6b00); box-shadow: 0 0 8px rgba(255, 107, 0, 0.65);
}
/* computer: in the menu rail, just above "Start a project"; it takes the free space that
   pinned that button to the bottom, so the button and the social box do not move */
@media (min-width: 1100px) {
  .lang-switch--top { display: none; }
  .chip-rail > .lang-switch--rail { flex: 0 0 auto; width: 100%; margin-top: auto; }
  .chip-rail > .lang-switch--rail + .chip--cta { margin-top: 0; }
}
/* phone and tablet: in the top row, opposite the logo; the chip row below is untouched */
@media (max-width: 1099px) {
  .lang-switch--rail { display: none; }
  /* physical sides: the switch itself is left to right, so inset-inline-* would follow it,
     not the page */
  .lang-switch--top { position: absolute; top: 30px; z-index: 91; }
  html.ar-mirrored .lang-switch--top { left: 16px; }
  html.ar-same .lang-switch--top { right: 16px; }
}
@media (max-width: 599px) {
  .lang-switch--top { top: 26px; }
}
/* short computer screens: the switch adds about 40px to the rail. playground.css tightens the rail
   at 760px and 640px of screen height; with the switch the same two steps start 40px earlier, so
   "Start a project" and the social box are never cut (at 1366x768 the social box lost 4px). The social
   box keeps its own later playground.css sizes, so it is left out. */
@media (min-width: 1100px) and (max-height: 800px) {
  .chip-rail { gap: 8px; }
  .chip-rail > .chip:not(.chip-socials) { min-height: 44px; padding: 9px 12px; }
}
@media (min-width: 1100px) and (max-height: 690px) {
  .chip-rail { gap: 6px; }
  .chip-rail > .chip:not(.chip-socials) { min-height: 40px; padding: 7px 11px; font-size: 0.68rem; }
}

/* ---------------------------------------------------------------- 4. Option 1 "Mirrored" */
/* An old rule, html[dir=rtl] .page{padding:60px 0 0 16px}, beats both the computer and the
   phone padding: the page sat off-centre and lost its right gutter on the phone. */
html.ar-mirrored .page:not(.admin-page) { padding: 60px var(--pad) 0; }
@media (max-width: 1099px) { html.ar-mirrored .page:not(.admin-page) { padding: 12px 16px 0; } }

/* Old rules forced these cards left to right for English inside an RTL page; they hold
   Arabic now. */
html.ar-mirrored :is(.hub-card, .pillar-row .block-card, .masonry .block-card, .process-row .block-card, .case-card) { direction: rtl; }

/* 3D gallery: a right-to-left scroller breaks both work-rail.js (scrollLeft runs negative)
   and the view(inline) timelines (the middle card turned away at 0.25 opacity). The rail
   stays a left-to-right scroller, as in English; the words in each card are Arabic. */
html.ar-mirrored section[aria-labelledby="hcase-title"] .proof-rail { direction: ltr; }
html.ar-mirrored section[aria-labelledby="hcase-title"] .proof-rail > .proof-card { direction: rtl; }
html[lang="ar"] section[aria-labelledby="hcase-title"] .proof-body :is(p, h3, .proof-meta) { text-align: right; }
html[lang="ar"] section[aria-labelledby="hcase-title"] .proof-body[lang="en"] :is(p, h3, .proof-meta) { text-align: left; }

/* Marquee and client ribbon: a right-to-left flex track is anchored at the right and slides
   away, leaving an empty band. Run them left to right; each word still reads Arabic. */
html.ar-mirrored .noir-marquee { direction: ltr; }
html.ar-mirrored .noir-marquee .nm-track > span { direction: rtl; unicode-bidi: isolate; }
html.ar-mirrored .clients-strip { direction: ltr; }
/* With reduced motion the band stands still: start it whole on the right, words in reading order. */
@media (prefers-reduced-motion: reduce) { html.ar-mirrored .noir-marquee { direction: rtl; } }

/* Footer wordmark (Latin "shapes infinity."): mirrored to the other corner, full stop last. */
html.ar-mirrored .v2-footer .footer-grid::after { direction: ltr; right: auto; left: 0; }
@media (max-width: 1099px) { html.ar-mirrored .v2-footer .footer-grid::after { left: auto; right: 0; } }

/* Learning, phone: the numbered circles move to the right with the rows, so the guide line
   and its moving light follow them */
@media (max-width: 760px) {
  html.ar-mirrored #main .lr-steps::before { left: auto; right: 17px; }
  html.ar-mirrored #main .lr-steps::after { left: auto; right: 15px; }
}

/* the preloader line draws from the reading start */
html.ar-mirrored #si-pre .si-line span { transform-origin: 100% 50%; }

/* ---------------------------------------------------------------- 5. Option 2 "Same positions"
   The page box, rail, grids, rows, scrollers and scripts stay exactly as in English. Only
   text boxes read right to left inside themselves. */
html.ar-same :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, summary, label, legend, blockquote, figcaption, td, th, address,
  .lead, .ph-sub, .svc-card-name, .svc-card-desc, .proof-meta, .contact-key, .quote-cta-kicker,
  .footer-hail-kicker, .fc-label, .footer-col-title, .agent-msg, .agent-bubble):not([lang="en"]):not([lang="en"] *):not([dir]) { direction: rtl; unicode-bidi: isolate; }
html.ar-same :where(a, button, span, b, strong, em):not([lang="en"]):not([lang="en"] *) { unicode-bidi: plaintext; }
/* text that is left-set in English stays left-set, so every line starts where it did */
html.ar-same :is(.footer-hail, .quote-cta-text, .entries-head, .footer-brand, .footer-col, .contact-lines, .trust-bar, .svc-card-body, .footer-row) :is(h2, h3, p, span, li, label):not([lang="en"]) { text-align: left; }
html.ar-same section[aria-labelledby="hcase-title"] .proof-body :is(p, h3, .proof-meta) { text-align: left; }
/* a form field is one box: its Arabic label, its Arabic placeholder and what is typed start at
   the right edge, as do the phone and email fields (section 2) */
html.ar-same :is(.cf-field, .cf-note) { text-align: right; }
html.ar-same :is(.cf-field input:not([type="tel"]):not([type="email"]), .cf-field select, .cf-field textarea, .sfaq-ask-input) { direction: rtl; }
/* small rows of parts (dot, label, text, arrow) keep their English order; each part's own
   words read right to left */
html.ar-same :is(.live-badge, .ph-kicker) { direction: ltr; unicode-bidi: isolate; }
html.ar-same .live-badge > span { direction: rtl; unicode-bidi: isolate; }
/* the trust bar's small orange rule sits on the start side: keep the English side */
html.ar-same ul.trust-bar > li:not([lang="en"]) { direction: ltr; }
html.ar-same .trust-bar li > * { direction: rtl; unicode-bidi: isolate; }

/* breadcrumbs read from the right (الرئيسية first, the chevrons point on to the current page);
   the bar keeps its English place at the left edge */
html.ar-same nav.crumbs { direction: rtl; justify-content: flex-end; }
/* the list of delivered work: the bullets of right-to-left items hang on the right, so the
   list keeps room for them there (they sat against the phone's edge) */
html.ar-same section[aria-labelledby="shipped-title"] > ul { padding-right: 1.1em; }
/* reels plan cards: each tick sits at the reading start of its own words (reels.css puts it
   at the left, which left it up to 210px from a right-set Arabic line) */
html.ar-same .rsc-list li { padding-left: 0; padding-right: 20px; }
html.ar-same .rsc-list li::before { left: auto; right: 2px; }
/* Learning, phone: the numbered circles stay on the left, on the guide line, as in English */
@media (max-width: 760px) { html.ar-same #main .lr-steps li { direction: ltr; } }

/* ---------------------------------------------------------------- 6. both options */
/* hero stats: the English gap is a right margin on the number; Arabic needs it on the
   number's reading end ("150+مشروعاً" ran together) */
html[lang="ar"] .hero-ledger .stat b { margin: 0; margin-inline-end: 0.35em; }
/* Learning: the island cards are numbered by CSS ("Island 1") */
html[lang="ar"] .lr-isles li::before { content: "الجزيرة " counter(isle); letter-spacing: 0; text-transform: none; }
/* the orange band's WhatsApp button stays one line on the phone */
html[lang="ar"] .ph-ghost { white-space: nowrap; }
/* computer rail: «عرض سعر فوري» (86px) and «شريك Shopify» (79px) did not fit the 66px a 94px chip
   leaves for text and broke onto two lines while the other chips kept one. Kufi reads larger
   than the Latin face at the same size, so a step smaller and a narrower inset keep every
   label on one line (79px of 80px at most) */
@media (min-width: 1100px) { html[lang="ar"] .chip-rail > .chip:not(.lang-switch) { padding-inline: 6px; font-size: 0.66rem; } }
/* text drawn inside inline SVG pictures is never translated (the builder keeps <svg> whole), so it
   stays left to right; in the mirrored option it took the page's direction ("?Loved it", off the card) */
html.ar-mirrored svg text { direction: ltr; unicode-bidi: isolate; }
/* a section head with two leads (/ai-automation-uae #automate): the template puts every .lead in
   column 2, rows 1-4, so the two printed on top of each other on the computer. The second one
   goes under the first. The English page has the same overlap (integrator, 12 Nov 2026) */
html[lang="ar"] .entries-head > .lead:has(+ .lead) { grid-row: 1; }
html[lang="ar"] .entries-head > .lead + .lead { grid-row: 2; align-self: start; }
