/* =====================================================================
   thejundi.com: English (LTR) overrides.
   Load after /assets/site-chrome.css (and after the page CSS, e.g. home.css).
   Part 1 works on any English page (<html lang="en" dir="ltr">, header and
   footer carry dir="ltr"). Part 2 mirrors the home page (home.css) for LTR.
   Arabic runs inside English pages (lang="ar") keep Tajawal and a line-height
   of at least 1.9.
   ===================================================================== */

/* ---------------- 1. Any English page ---------------- */

/* Poppins first: every shared rule that asks for the Arabic stack gets Poppins, Tajawal stays as the fallback */
html[lang="en"] {
  --sc-ar: "Poppins", "Tajawal", "Segoe UI", sans-serif;
  --sc-fs-display: clamp(2.125rem, 1rem + 4.6vw, 5.25rem);   /* 34 → 84px */
  --sc-fs-h2: clamp(1.75rem, 1.08rem + 2.2vw, 3.125rem);      /* 28 → 50px */
}
html[lang="en"] [lang="ar"] { font-family: "Tajawal", "Poppins", Tahoma, sans-serif; letter-spacing: 0; }

/* the chrome is RTL by default; the English header and footer are LTR */
.sc-header[dir="ltr"], .sc-footer[dir="ltr"] { direction: ltr; }
html[lang="en"] .sc-nav__link::after { transform-origin: left; }
html[lang="en"] .sc-lang[lang="ar"] { font-size: 15px; font-weight: 500; letter-spacing: 0; padding: 0 10px; }
html[lang="en"] .sc-menu__list a[lang="ar"] { font-size: 19px; text-align: left; }
html[lang="en"] .sc-footer__col a[lang="ar"] { font-size: 15px; }

/* Latin rhythm: Poppins sets tighter than Tajawal */
html[lang="en"] body.sc-page { line-height: 1.7; }
html[lang="en"] .sc-lead { line-height: 1.7; }
html[lang="en"] .sc-h2 { line-height: 1.2; }
html[lang="en"] .sc-h3 { line-height: 1.35; }
html[lang="en"] .sc-card__text,
html[lang="en"] .sc-row__sub,
html[lang="en"] .sc-footer__brand p { line-height: 1.7; }
/* room for "A creative technologist and fast learner," on the first line */
html[lang="en"] .sc-footer__brand p { max-width: 25.5rem; }

/* arrows: forward points right, outward points up-right */
html[lang="en"] .sc-ext::after { transform: scaleX(-1); }
html[lang="en"] .sc-ext[href^="/"]::after,
html[lang="en"] .sc-ext[href^="#"]::after { transform: scaleX(-1) rotate(-45deg); }

/* quiet "(in Arabic)" marker next to links that open Arabic pages */
.ar-note { color: var(--sc-ink-3); white-space: nowrap; }

/* ---------------- 2. English home (mirrors home.css) ---------------- */

/* Hero */
.en .hero__title { line-height: 1.14; }
.en .hero__lead { line-height: 1.7; max-width: 38rem; }
.en .hero__lead strong { margin-bottom: 4px; text-wrap: balance; }
@media (min-width: 480px) {
  /* the positioning line breaks at its comma, never mid-phrase */
  .en .hero__pos { display: block; }
}
@media (min-width: 900px) {
  /* English lines run long on the start side, so the slab sits beside the short last line
     and the lead + actions stack under the title, keeping the end side free for the slab */
  .en .hero__blade { top: calc(52px + 1.3 * var(--sc-fs-display)); width: clamp(300px, 38vw, 600px); }
  .en .hero__foot { grid-template-columns: minmax(0, 38rem); justify-content: start; align-items: start; gap: 28px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .en .hero__blade { width: 30vw; }
}
@media (max-width: 559px) {
  /* narrow phones: one flowing, balanced sentence instead of three hard lines */
  .en .hero__line { display: inline; }
}
@media (prefers-reduced-motion: no-preference) {
  .en .hero__blade { animation-name: en-slab; }
  .en .strip__track { animation-name: en-drift; }
}
@keyframes en-slab { from { opacity: 0; transform: translateX(8%); } to { opacity: 1; transform: none; } }
@keyframes en-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* Works strip: LTR flow and drift to the left */
.en .strip__view { direction: ltr; }
.en .strip__state:checked ~ .strip__bar .strip__ico { clip-path: polygon(0 0, 0 100%, 100% 50%); }
.en .strip__label { line-height: 1.7; }

/* Teaser band */
.en .band__title { line-height: 1.6; }

/* Proof: the word cell keeps the numbers' line box, with a smaller word */
.en .proof__word { font-size: .62em; font-weight: 300; }
.en .proof__label { line-height: 1.6; }

/* Proof screens strip: LTR flow, drifts to the right (the works strip drifts left) */
.en .pstrip__view { direction: ltr; }
.en .pstrip__state:checked ~ .pstrip__bar .pstrip__ico { clip-path: polygon(0 0, 0 100%, 100% 50%); }
.en .pstrip__label { line-height: 1.7; }
.en .pf figcaption { line-height: 1.7; }
@media (prefers-reduced-motion: no-preference) {
  .en .pstrip__track { animation-name: en-pdrift; }
}
@keyframes en-pdrift { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }

/* Tools */
.en .tk__title { line-height: 1.45; }

/* Identity works + rows */
.en .feat__title { line-height: 1.4; }
.en .feat__sub { line-height: 1.6; }
.en .sc-row__title { line-height: 1.45; }
.en .sc-row .sc-tag { white-space: normal; line-height: 1.7; }
@media (max-width: 479px) {
  /* too long for one line beside the thumbnail: keep the violet note, drop the box */
  .en .sc-row .sc-tag { padding: 0; border: 0; font-size: 14px; }
  /* English titles run wider: the year moves under the text so the title gets the full column */
  .en .sc-row { grid-template-columns: auto minmax(0, 1fr); }
  .en .sc-row__thumb { grid-row: span 2; }
  .en .sc-row__meta { grid-column: 2; }
}

/* Tech */
.en .tf__title { line-height: 1.3; }
.en .tf__line, .en .tw__line { line-height: 1.7; }
.en .tf__note, .en .tl__line, .en .tl__also { line-height: 1.7; }
.en .tw__title { line-height: 1.4; }
.en .tl__title { line-height: 1.35; }
.en .tl__name { line-height: 1.5; }
@media (max-width: 359px) {
  /* the longest address (droos-jeddah.thejundi.com) keeps one line beside a slimmer thumbnail */
  .en .tl__item { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; }
}

/* Logos: captions stay on one line; a narrow cell shows the short name (the alt keeps the full one) */
.en .lw__note p { line-height: 1.7; }
.en .lw__note .sc-ext { white-space: nowrap; }
@media (max-width: 420px) {
  .en .lw__note { padding-inline: 14px; }
}
.en .lw__cell { container-type: inline-size; }
@media (max-width: 1199px) {
  .en .lw__cell { padding-inline: 12px; }
}
@container (max-width: 141px) {
  .en .lw__more { display: none; }
}

/* Workshop */
.en .ws__ar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 16px; line-height: 1.9; }
.en .ws__ar-k {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-teal-ink); white-space: nowrap;
}
.en .ws__ar-k::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sc-teal); }
.en .ws__ar-t { font-size: 17px; font-weight: 500; line-height: 1.9; color: var(--sc-ink-2); }
.en .ws__lead { margin-top: 14px; line-height: 1.7; }
.en .ws__tile-t { line-height: 1.6; }
.en .ws__panel-h { line-height: 1.35; }
.en .ws__paths li { line-height: 1.6; }
.en .ws__cert, .en .ws__later { line-height: 1.7; }

/* Consult */
.en .cs__go::after { border-left: 0; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.en .cs__type:hover .cs__go::after { transform: translateX(3px) rotate(45deg); }
.en .ladder__rung { grid-template-columns: 7.5rem minmax(0, 1fr) 7.5rem; }
.en .ladder__dur { line-height: 1.6; }
.en .cs__note, .en .cs__alt { line-height: 1.7; }
@media (max-width: 599px) {
  .en .ladder__rung { grid-template-columns: 6.2rem minmax(0, 1fr) 6.2rem; gap: 12px; }
}

/* About + honors */
.en .about__text { line-height: 1.75; }
.en .fact dd { line-height: 1.6; }
.en .aw__name { line-height: 1.45; }
.en .aw__meta { line-height: 1.7; }
.en .hon__qh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin: clamp(56px, 5.6vw, 88px) 0 22px; }
.en .hon__qh .hon__h { margin: 0; }
.en .hon__qnote { font-size: 14px; line-height: 1.7; color: var(--sc-ink-2); }

/* Quotes: the Arabic original (right to left), then its translation */
.en .quote blockquote { text-align: start; }
.en .quote blockquote p { line-height: 1.95; }
.en .quote__tr { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--sc-line); font-size: 16px; line-height: 1.7; color: var(--sc-ink-2); }
.en .quote__tr-k { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; line-height: 1.7; color: var(--sc-teal-ink); }
.en .quote figcaption b { line-height: 1.6; }
.en .quote figcaption span { line-height: 1.6; }

/* Final call */
.en .final__h { max-width: 18em; font-size: clamp(2rem, 1rem + 3.4vw, 4.375rem); line-height: 1.16; }
@media (max-width: 719px) { .en .final__h { font-weight: 300; } }
@media (min-width: 900px) {
  .en .final__blade { width: clamp(260px, 28vw, 480px); }
}
@media (min-width: 1600px) {
  .en .final__blade { inset-inline-end: calc(-1 * var(--sc-edge) - 8%); }
}

/* Reduced motion: still strip scrolls left to right */
@media (prefers-reduced-motion: reduce) {
  .en .strip__view { direction: ltr; }
}
