@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');
/* Arabic-first layout refinements. The English layout remains unchanged in LTR mode. */
.rg-language-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 13px;border:1.5px solid rgba(213,243,106,.72);border-radius:999px;background:rgba(213,243,106,.12);color:var(--lime,#d5f36a);font:700 .78rem/1.1 var(--h,Arial,sans-serif);white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s,transform .2s;z-index:5}
.rg-language-toggle:hover,.rg-language-toggle:focus-visible{background:rgba(213,243,106,.22);border-color:var(--lime,#d5f36a);transform:translateY(-1px);outline:2px solid transparent;outline-offset:3px}
.cp-nav .rg-language-toggle{margin-inline-start:8px;color:var(--pine,#244332);border-color:rgba(25,115,79,.48);background:rgba(213,243,106,.25)}
.rg-language-toggle-floating{position:fixed;top:16px;inset-inline-end:16px;color:#d5f36a;background:#10251a;border-color:#d5f36a;box-shadow:0 4px 20px #0003}
html[dir="rtl"] body{direction:rtl}
html[dir="rtl"]{text-align:right}
html[dir="rtl"] .nav,html[dir="rtl"] .cp-top,html[dir="rtl"] .cp-nav,html[dir="rtl"] .nav-actions,html[dir="rtl"] .nav-auth{direction:rtl}
html[dir="rtl"] .desktop-nav,html[dir="rtl"] .nav-index-list,html[dir="rtl"] .nav-index-account{direction:rtl}
html[dir="rtl"] .nav-chapter,html[dir="rtl"] .nav-index-topline,html[dir="rtl"] .nav-index-title{text-align:right}
html[dir="rtl"] .cp-crumb,html[dir="rtl"] .cp-foot,html[dir="rtl"] .cp-foot span{text-align:right}
html[dir="rtl"] .cp-head-copy,html[dir="rtl"] .cp-region,html[dir="rtl"] .cp-region-title,html[dir="rtl"] .pp-start-head,html[dir="rtl"] .pp-form-wrap{text-align:right}
html[dir="rtl"] .cp-skip{inset-inline-start:12px;inset-inline-end:auto}
html[dir="rtl"] .pp-list,html[dir="rtl"] .pp-check-list,html[dir="rtl"] .pp-caution ul{padding-inline-start:0;padding-inline-end:20px}
html[dir="rtl"] .pp-method{direction:rtl}
html[dir="rtl"] .pp-story{border-left:0;border-right:3px solid var(--em)}
html[dir="rtl"] .pp-module-body{padding:2px 80px 20px 22px}
html[dir="rtl"] .pp-credential,html[dir="rtl"] .pp-note-card,html[dir="rtl"] .pp-purchase{text-align:right}
html[dir="rtl"] .pp-form-aside .bubble{margin:0 22px 18px 0}
html[dir="rtl"] .pp-about-portrait figcaption{text-align:left}
html[dir="rtl"] .pp-eyebrow,html[dir="rtl"] .pp-meta,html[dir="rtl"] .pp-about-tags{direction:rtl}
html[dir="rtl"] .pp-start-shell,html[dir="rtl"] .pp-dashboard-layout,html[dir="rtl"] .pp-admin-grid{direction:rtl}
html[dir="rtl"] .pp-dash-nav{text-align:right}
html[dir="rtl"] input,html[dir="rtl"] textarea,html[dir="rtl"] select{direction:rtl;text-align:right}
html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="url"],html[dir="rtl"] input[type="tel"],html[dir="rtl"] input[type="password"]{direction:ltr;text-align:left}
html[dir="rtl"] .nav-index-panel,html[dir="rtl"] .nav-index-paper{direction:rtl;text-align:right}
html[dir="rtl"] .nav-index-close{inset-inline-end:auto;inset-inline-start:0}
html[dir="rtl"] .pp-purchase{flex-direction:row-reverse}
html[dir="rtl"] .pp-related,html[dir="rtl"] .pp-project-grid,html[dir="rtl"] .pp-faqs{direction:rtl}
html[dir="rtl"] .pp-outcomes li{grid-template-columns:1fr 20px}
html[dir="rtl"] .pp-outcomes li span{grid-column:2;grid-row:1}
html[dir="rtl"] .pp-outcomes li :not(span){grid-column:1;grid-row:1}
html[dir="rtl"] .pp-module>summary{direction:rtl}
html[dir="rtl"] .cp-top .cp-nav{justify-content:flex-start}
html[dir="rtl"] .cp-nav .cp-nav-cta{margin-inline-start:4px}
html[dir="rtl"] .sv-cta,html[dir="rtl"] .btn{direction:rtl}
html[dir="rtl"] .sv-cta span.arr,html[dir="rtl"] .btn .arr{transform:scaleX(-1)}
html[dir="rtl"] .pp-dashboard-layout{grid-template-columns:minmax(170px,.35fr) minmax(0,1fr)}
html[dir="rtl"] .pp-dash-nav{border-right:0;border-left:1px solid var(--pp-rule,rgba(0,0,0,.15))}
html[dir="rtl"] .pp-dash-nav button{text-align:right}
html[dir="rtl"] .cp-foot-back{direction:rtl}
html[dir="rtl"] .cp-foot-back::before{transform:scaleX(-1)}
html[dir="rtl"] .nav-auth{padding-left:0;padding-right:clamp(8px,1vw,16px);border-left:0;border-right:1px solid rgba(213,243,106,.2)}
@media(max-width:900px){.rg-language-toggle{min-height:34px;padding:6px 10px;font-size:.72rem}.nav-actions>.rg-language-toggle{order:2}html[dir="rtl"] .pp-start-shell{grid-template-columns:1fr}html[dir="rtl"] .pp-form-aside{position:static}}
@media(max-width:600px){.cp-nav .rg-language-toggle{margin:8px 0 0}html[dir="rtl"] .pp-module-body{padding:12px 18px 18px}html[dir="rtl"] .pp-purchase{flex-direction:column;align-items:stretch}.rg-language-toggle-floating{top:10px;inset-inline-end:10px}}

/* Arabic typography: legible body copy with the requested calligraphic sketch-note headings. */
html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select{font-family:'IBM Plex Sans Arabic',sans-serif}
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3,html[lang="ar"] h4,
html[lang="ar"] .btn,html[lang="ar"] .sv-cta,html[lang="ar"] .note{font-family:'Aref Ruqaa','IBM Plex Sans Arabic',serif;line-height:1.45}
html[lang="ar"] .rg-language-toggle{font-family:'IBM Plex Sans Arabic',sans-serif}
html[lang="ar"] p,html[lang="ar"] li,html[lang="ar"] label,html[lang="ar"] .pp-copy{line-height:1.9}

/* =====================================================================
   v62.1.1 — Arabic layout fixes (home page)
   Every rule below is scoped to Arabic / RTL. The English layout is untouched.
   ===================================================================== */

/* 1 · Fonts. The Latin faces stay first, the Arabic faces sit behind them, so every
      `font: … var(--h)` label, note and button now gets a real Arabic font instead of
      whatever the browser picks as a fallback. */
html[lang="ar"]{
  --h:'Architects Daughter','Patrick Hand','IBM Plex Sans Arabic',sans-serif;
  --b:'Patrick Hand','Architects Daughter','IBM Plex Sans Arabic',sans-serif;
  --hand:'Caveat','Patrick Hand','Aref Ruqaa','IBM Plex Sans Arabic',cursive;
}

/* 2 · Letter-spacing breaks the joins between Arabic letters. The design uses wide
      tracking on many small labels, so switch it off in Arabic. */
html[lang="ar"] body *{letter-spacing:normal!important}

/* 3 · Hero copy.
      A block with a max-width falls to the RIGHT edge in RTL, which put the headline on the
      busiest part of the picture (poster, neon sign, controller). Pin it to the dark left
      side, where the English copy sits and where the shade gradient is. */
html[dir="rtl"] .hcopy{margin-left:0;margin-right:auto}
html[dir="rtl"] .hcopy h1{max-width:none;text-wrap:balance}
html[dir="rtl"] .hcopy .row{justify-content:flex-start}
@media(min-width:1001px){
  /* On wide screens the left padding (to line up with the page grid) used to eat the
     600px column, leaving ~180px of text width: one word per line. Size the column from its content. */
  html[dir="rtl"] .hcopy{
    --hcx:max(28px,calc((100vw - 1180px)/2 + 24px));
    --hcw:min(500px,calc(100vw - var(--hcx) - 48px));
    width:calc(var(--hcx) + 24px + var(--hcw));
    max-width:none;
    padding:60px 24px 0 var(--hcx);
  }
  html[dir="rtl"] .hcopy h1{font-size:clamp(2.6rem,4.2vw,4.3rem)}
}

/* 4 · Speech bubble: Arabic needs more line height and a proper Arabic face. */
html[lang="ar"] #hero .bubble{font-family:'Aref Ruqaa','IBM Plex Sans Arabic',serif;font-weight:700;line-height:1.55;direction:rtl;text-align:center;padding:8px 18px 12px}

/* 5 · Blueprint frame + drawing labels.
      SVG text anchors to the RIGHT in RTL, so the title block (RG Technology / studio / sheet / Anis)
      and the ruler numbers slid out of their cells and overlapped. Anchor them like the English page. */
html[dir="rtl"] .hud text{direction:ltr}
/* the Arabic "QA lead, napping" label is longer than the English one: nudge it away from the title block */
html[lang="ar"] .tech .g-t text:nth-child(4){transform:translateX(-34px)}

/* 6 · Hero key rail on phones: the rail scrolls from the right in RTL, so the fade edges
      and the "more" cue must sit on the left, where the remaining keys are. */
html[dir="rtl"] .keys[data-more]{-webkit-mask-image:linear-gradient(270deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);mask-image:linear-gradient(270deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%)}
html[dir="rtl"] .keys-more{right:auto;left:11px;transform:scaleX(-1)}
html[dir="rtl"] .keys-more.is-on{animation-name:keysNudgeRtl}
@keyframes keysNudgeRtl{0%,100%{transform:scaleX(-1) translateX(0)}50%{transform:scaleX(-1) translateX(4px)}}

/* 7 · Selected Work slider.
      The exhibition rail is wider than its clipped viewport and is advanced with negative
      translate3d() offsets. In RTL, the viewport's own direction can right-align that
      oversized rail, putting its first physical slide outside the visible window. Keep the
      viewport, rail and slide geometry in one stable LTR coordinate system; only the copy
      inside each slide follows the selected language. This preserves the English left-screen /
      right-sketch composition while Arabic labels remain properly RTL. */
html[dir="rtl"] .work-rail-viewport{direction:ltr}
html[dir="rtl"] .work-rail,
html[dir="rtl"] .work-slide{direction:ltr}
html[dir="rtl"] .work-slide :is(h3,p,.work-project-overline,.work-screen-caption,.work-sketch-heading,.work-sketch-caption,.finale-gallery-label,.finale-foot,.finale-link){direction:rtl}
