/* ==========================================================================
   VERTKL | lang.css
   Loaded (after site.css) by every page of a build that carries the English version.
   1. the language switch in the header, for both languages;
   2. the left-to-right page: site.css is written for right to left with logical properties, so only the few physical rules and the
      arrows need turning. Every rule of part 2 is scoped to html[dir=ltr], so the Arabic pages ignore it.
   ========================================================================== */

/* ---------- 1. the language switch ---------- */
.lang{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:42px;padding:.1em 1em .2em;
  border:1.5px solid rgba(196,249,255,.42);border-radius:99px;color:var(--mist);text-decoration:none;white-space:nowrap;
  font:700 1rem/1.3 var(--f-display);transition:background-color .2s,color .2s,border-color .2s}
.lang:hover{background:var(--ice);color:var(--ink);border-color:var(--ice)}
.brand+.lang{margin-inline-start:auto}       /* the header with the logo alone (the choosing page): the switch goes to the far end */
.lang__short{display:none}
.cta__short{display:none}
@media (max-width:519.98px){.cta__full{display:none}.cta__short{display:inline}}
@media (max-width:719.98px){
  .lang{width:42px;padding:0}
  .lang__full{display:none}
  .lang__short{display:inline;font-size:.95rem;letter-spacing:.02em}
  .header__in:has(.lang){gap:10px}
}

/* ---------- 2. left to right ---------- */
/* English labels are longer than the Arabic ones: the menu words never break, and between 900px (where the full menu appears) and 1160px the
   header uses the short twins (the short label of the button, the compact chip of the switch) so that everything fits on one line */
[dir=ltr] .nav a{white-space:nowrap}
@media (min-width:900px) and (max-width:1159.98px){
  [dir=ltr] .nav{gap:clamp(12px,1.6vw,22px);margin-inline-start:clamp(4px,1.5vw,20px)}
  [dir=ltr] .nav a{font-size:1rem}
  [dir=ltr] .cta__full{display:none}
  [dir=ltr] .cta__short{display:inline}
  [dir=ltr] .lang{width:42px;padding:0}
  [dir=ltr] .lang__full{display:none}
  [dir=ltr] .lang__short{display:inline;font-size:.95rem;letter-spacing:.02em}
}
/* English runs shorter lines of text than Arabic does, so the tall Arabic line heights are brought down */
[dir=ltr] body{line-height:1.7}
[dir=ltr] .hero__h1{line-height:1.12}
[dir=ltr] .sec__title,[dir=ltr] .page-hero__h1,[dir=ltr] .choose__h1{line-height:1.18}
[dir=ltr] .hero__sub{line-height:1.6}

/* arrows: site.css draws them pointing left (forward in Arabic); ui.icon() gives them ic--flip on the English pages */
[dir=ltr] .ic--flip{transform:scaleX(-1)}
[dir=ltr] .more:hover .ic--flip,[dir=ltr] .work:hover .work__go .ic--flip{transform:scaleX(-1) translateX(-5px)}
@media (hover:hover){[dir=ltr] .choose__c:hover .choose__go{transform:translateX(4px)}}

/* decoration that was placed on a physical side */
[dir=ltr] .cta-band__curve{transform:translateX(-50%) rotate(-7deg)}
[dir=ltr] .steps__curve{left:auto;right:-24%}
[dir=ltr] .float-wa{left:auto;right:16px;padding:.2em 1em .2em 1.2em}

/* the veil behind the text of the heroes: the text sits on the left now, so the dark side is the left */
@media (min-width:960px){
  [dir=ltr] .hero--wall .wall__veil{background:linear-gradient(to right,rgba(3,47,60,.93) 0%,rgba(3,47,60,.88) 54%,rgba(3,47,60,0) 80%)}
  [dir=ltr] .choose-sec .wall__veil{background:linear-gradient(to right,rgba(3,47,60,.94) 0%,rgba(3,47,60,.9) 46%,rgba(3,47,60,0) 74%)}
}

/* the sliders of the calculator: the track starts on the left */
[dir=ltr] .calc__range{direction:ltr}
[dir=ltr] .calc__range::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--ink) calc(var(--th)/2 + (100% - var(--th))*var(--q)),#fff 0)}
[dir=ltr] .calc__range::-moz-range-track{background:linear-gradient(to right,var(--ink) calc(var(--th)/2 + (100% - var(--th))*var(--q)),#fff 0)}

/* "Previous / Next project" under a work: an English reader expects Previous on the left and Next on the right.
   The markup is [next, previous]; the Arabic page puts the first card on the right. On a narrow screen they stack, both left aligned. */
[dir=ltr] .pn__a--prev{text-align:start}
@media (min-width:640px){
  [dir=ltr] .pn{direction:rtl}
  [dir=ltr] .pn__a{direction:ltr;text-align:end}
  [dir=ltr] .pn__a--prev{text-align:start}
}

/* the courtesy-translation note at the top of the English terms and privacy pages */
[dir=ltr] .prose__courtesy{margin-bottom:22px;padding:12px 18px;border:1px solid var(--mist-2);border-radius:12px;background:var(--paper);color:var(--ink);font-size:1rem;line-height:1.7}
[dir=ltr] .prose__courtesy a{color:inherit;font-weight:700;text-decoration:underline;text-underline-offset:.2em}

/* narrow phones: the logo, the short button, the switch and the menu button need about 325px, and the row has 280px at 320px wide up to 320px at 360px
   wide, so each gives a little (the menu button never shrinks: a squeezed one used to stick out of the page) */
[dir=ltr] .nav-toggle{flex:none}
@media (max-width:364.98px){
  [dir=ltr] .header__in{gap:8px}
  [dir=ltr] .brand__logo{width:88px}
  [dir=ltr] .header__cta{padding-inline:.85em;font-size:.95rem}
  [dir=ltr] .lang{width:40px}
}
@media (max-width:339.98px){
  [dir=ltr] .brand__logo{width:80px}
  [dir=ltr] .header__cta{padding-inline:.75em;font-size:.92rem}
  [dir=ltr] .nav-toggle{padding-inline:.55em}
}

/* the four ticks under the first button: English lines are longer than the Arabic ones, so on a phone they stack in one column instead of wrapping over three lines each */
@media (max-width:479.98px){
  [dir=ltr] .assure{grid-template-columns:minmax(0,1fr);gap:10px}
}
