/* =====================================================================
   thejundi.com: site chrome + design system (single source of truth)
   Used by EVERY page, including the ported case pages under /works/<slug>/
   (those load their own case.css after this file and cannot run JS).
   Rules: every shared class is prefixed "sc-"; base element styles only
   apply under <body class="sc-page"> (case pages do not carry it).
   Usage notes: tools/DESIGN-SYSTEM.md (kept out of the deployed site).
   ===================================================================== */

/* ---------- Fonts (self-hosted, never Thmanyah) ---------- */
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-ExtraLight.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/Tajawal-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* colour (no black anywhere; navy is the darkest value) */
  --sc-bg: #FCFCFE;
  --sc-surface: #FFFFFF;
  --sc-wash-v: #F5F0FC;
  --sc-wash-t: #ECF8F8;
  --sc-line: #E4E8F0;
  --sc-rule: rgba(0, 24, 52, .14);
  --sc-ink: #001834;
  --sc-ink-2: rgba(0, 24, 52, .74);
  --sc-ink-3: rgba(0, 24, 52, .64);
  --sc-violet: #6019B4;
  --sc-violet-a: rgba(96, 25, 180, .28);
  --sc-teal: #50C8C6;
  --sc-teal-ink: #08716D;
  --sc-grad: linear-gradient(135deg, #50C8C6 0%, #5497C1 18%, #586ABC 37%, #5B47B8 55%, #5E2DB6 72%, #5F1EB4 88%, #6019B4 100%);
  --sc-shadow: 0 1px 2px rgba(0, 24, 52, .04), 0 30px 64px -34px rgba(0, 24, 52, .32);

  /* type */
  --sc-ar: "Tajawal", "Poppins", Tahoma, sans-serif;
  --sc-lat: "Poppins", "Tajawal", "Segoe UI", sans-serif;
  --sc-fs-display: clamp(2.125rem, .85rem + 5.6vw, 5.5rem);  /* 34 → 88px */
  --sc-fs-h2: clamp(1.875rem, 1.1rem + 2.6vw, 3.5rem);         /* 30 → 56px */
  --sc-fs-h3: clamp(1.3125rem, 1.05rem + .75vw, 1.75rem);       /* 21 → 28px */
  --sc-fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.25rem);         /* 17 → 20px */
  --sc-fs-body: 1.0625rem;                                      /* 17px */
  --sc-fs-small: .9375rem;                                      /* 15px */
  --sc-fs-cap: .875rem;                                         /* 14px, the floor */

  /* space */
  --sc-s1: 4px; --sc-s2: 8px; --sc-s3: 12px; --sc-s4: 16px; --sc-s5: 24px;
  --sc-s6: 32px; --sc-s7: 48px; --sc-s8: 64px; --sc-s9: 96px; --sc-s10: 128px;
  --sc-sec: clamp(64px, 6.4vw, 104px);          /* section padding (block) */
  --sc-gutter: clamp(16px, 5vw, 72px);        /* page side gutter, 16px at 320 */
  --sc-maxw: 1320px;
  --sc-gap: clamp(16px, 2.4vw, 40px);         /* 12-col column gap */
  --sc-edge: max(var(--sc-gutter), calc((100vw - var(--sc-maxw)) / 2));

  /* motion */
  --sc-ease: cubic-bezier(.2, .7, .2, 1);
  --sc-t-fast: .18s;
  --sc-t: .25s;
  --sc-t-slow: .65s;

  /* short aliases for page CSS (case pages redefine some of these names; chrome never uses them) */
  --bg: var(--sc-bg); --surface: var(--sc-surface); --wash-v: var(--sc-wash-v); --wash-t: var(--sc-wash-t);
  --line: var(--sc-line); --ink: var(--sc-ink); --ink-2: var(--sc-ink-2); --ink-3: var(--sc-ink-3);
  --violet: var(--sc-violet); --teal: var(--sc-teal); --teal-ink: var(--sc-teal-ink); --grad: var(--sc-grad);
}

/* ---------- Global (safe on case pages too) ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html:has(body.sc-page) { scroll-behavior: smooth; } }

/* ---------- Base (only pages that opt in with <body class="sc-page">) ---------- */
:where(.sc-page), :where(.sc-page) *, :where(.sc-page) *::before, :where(.sc-page) *::after { box-sizing: border-box; }
:where(body.sc-page) {
  margin: 0; background: var(--sc-bg); color: var(--sc-ink);
  font-family: var(--sc-ar); font-size: var(--sc-fs-body); font-weight: 400; line-height: 1.95; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
:where(.sc-page) :where(h1, h2, h3, h4) { margin: 0; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-wrap: balance; }
:where(.sc-page) :where(p, li, dd, dt, figcaption, blockquote, label) { text-wrap: pretty; }
:where(.sc-page) :where(p, figure, blockquote, dl, dd) { margin: 0; }
:where(.sc-page) :where(ul, ol) { margin: 0; padding: 0; }
:where(.sc-page) img { max-width: 100%; height: auto; }
:where(.sc-page) a { color: inherit; }
:where(.sc-page) ::selection { background: var(--sc-wash-v); color: var(--sc-ink); }
:where(.sc-page) :focus-visible { outline: 2px solid var(--sc-violet); outline-offset: 3px; border-radius: 2px; }
/* zero-specificity focus ring for every page, including the ported case pages that do not carry .sc-page */
:where(a, button, summary, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--sc-violet); outline-offset: 3px; }
.sc-lat, .sc-page [lang="en"] { font-family: var(--sc-lat); }
.sc-ltr, .sc-year { direction: ltr; unicode-bidi: isolate; }
.sc-nw { white-space: nowrap; }
.sc-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sc-wrap { width: min(100% - 2 * var(--sc-gutter), var(--sc-maxw)); margin-inline: auto; }
.sc-section { padding-block: var(--sc-sec); }

/* ---------- Skip link ---------- */
.sc-skip {
  position: absolute; top: -80px; inset-inline-start: 16px; z-index: 100;
  padding: 10px 18px; border-radius: 4px; background: var(--sc-ink); color: #FFFFFF;
  font: 500 15px/1.9 var(--sc-ar); text-decoration: none; transition: top var(--sc-t) var(--sc-ease);
}
.sc-skip:focus { top: 12px; outline: 2px solid var(--sc-violet); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.sc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border: 1px solid transparent; border-radius: 4px;
  font-family: var(--sc-ar); font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: 0;
  text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--sc-t) var(--sc-ease), box-shadow var(--sc-t) var(--sc-ease), border-color var(--sc-t) var(--sc-ease), background-color var(--sc-t) var(--sc-ease), color var(--sc-t) var(--sc-ease);
}
.sc-btn:hover { transform: translateY(-2px); }
.sc-btn:active { transform: translateY(0); }
.sc-btn--primary { background: var(--sc-violet); color: #FFFFFF; }
.sc-btn--primary:hover { box-shadow: 0 14px 28px -14px rgba(96, 25, 180, .6); }
.sc-btn--ghost { background: transparent; color: var(--sc-ink); border-color: rgba(0, 24, 52, .22); }
.sc-btn--ghost:hover { border-color: var(--sc-ink); }
.sc-btn--light { background: var(--sc-surface); color: var(--sc-ink); border-color: var(--sc-line); }
.sc-btn--light:hover { border-color: var(--sc-ink); }
.sc-btn:focus-visible { outline: 2px solid var(--sc-violet); outline-offset: 3px; }
.sc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 380px) {
  /* buttons may wrap on the narrowest phones, so they get body line-height */
  .sc-btn { white-space: normal; line-height: 1.9; padding-block: 12px; }
}

/* text links */
.sc-link {
  color: var(--sc-violet); text-decoration: underline; text-decoration-color: var(--sc-violet-a);
  text-decoration-thickness: 1px; text-underline-offset: 6px; transition: text-decoration-color var(--sc-t) var(--sc-ease);
}
.sc-link:hover { text-decoration-color: var(--sc-violet); }
.sc-ext {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; min-width: 0; color: var(--sc-violet); text-decoration: none;
  font-family: var(--sc-ar); font-size: 15px; font-weight: 500; line-height: 1.9;
  border-bottom: 1px solid var(--sc-violet-a); transition: border-color var(--sc-t) var(--sc-ease);
}
.sc-ext:hover { border-bottom-color: var(--sc-violet); }
.sc-ext .sc-lat, .sc-ext[lang="en"] { font-family: var(--sc-lat); font-size: 14px; }
.sc-ext > span { min-width: 0; overflow-wrap: break-word; }
/* arrow: external links point outward (up-left in RTL), internal links point forward (left) */
.sc-ext::after {
  content: ""; flex: none; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M8.5 8.5L1.5 1.5M1.5 7V1.5H7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M8.5 8.5L1.5 1.5M1.5 7V1.5H7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sc-ext[href^="/"]::after, .sc-ext[href^="#"]::after { transform: rotate(-45deg); }

/* ---------- Blade (brand slab, 1:5, thick) ----------
   <svg class="sc-blade" viewBox="0 0 440 192" aria-hidden="true" focusable="false"><polygon points="0,104 440,0 440,88 0,192"/></svg>
   Vertical outer edges of 88 over a length of 440. Max 2–3 per page. */
.sc-blade { display: block; width: 100%; height: auto; overflow: visible; }
.sc-blade polygon { fill: var(--sc-violet); }
.sc-blade--teal polygon { fill: var(--sc-teal); }
.sc-blade--navy polygon { fill: var(--sc-ink); }
.sc-blade--grad polygon { fill: url(#sc-grad); }
.sc-blade--flip { transform: scaleX(-1); }
/* one gradient definition per page: <svg class="sc-defs" aria-hidden="true" focusable="false"><defs><linearGradient id="sc-grad" …></linearGradient></defs></svg> */
.sc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Section header ---------- */
.sc-kicker {
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-family: var(--sc-ar); font-size: 15px; font-weight: 500; line-height: 1.9; color: var(--sc-ink-2);
}
.sc-kicker__n { font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .14em; color: var(--sc-violet); }
.sc-kicker__rule { flex: none; width: 36px; height: 1px; background: var(--sc-ink); opacity: .25; }
.sc-h2 { margin: 0; font-size: var(--sc-fs-h2); font-weight: 300; line-height: 1.38; letter-spacing: 0; text-wrap: balance; }
.sc-h2 b, .sc-h2 strong { font-weight: 700; }
.sc-h3 { margin: 0; font-size: var(--sc-fs-h3); font-weight: 500; line-height: 1.5; text-wrap: balance; }
.sc-lead { margin: 0; font-size: var(--sc-fs-lead); line-height: 1.95; color: var(--sc-ink-2); text-wrap: pretty; }
.sc-sec-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-gap); row-gap: 18px;
  align-items: end; margin-bottom: clamp(32px, 3.8vw, 60px);
}
.sc-sec-head > .sc-kicker { grid-column: 1 / -1; }
.sc-sec-head > .sc-h2 { grid-column: 1 / span 7; }
.sc-sec-head > .sc-lead { grid-column: 9 / span 4; font-size: 16.5px; }
@media (max-width: 1100px) {
  .sc-sec-head > .sc-h2 { grid-column: 1 / span 10; }
  .sc-sec-head > .sc-lead { grid-column: 1 / span 9; }
}
@media (max-width: 767px) {
  .sc-sec-head > .sc-h2, .sc-sec-head > .sc-lead { grid-column: 1 / -1; }
}

/* small Latin index numbers, captions */
.sc-idx { font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .14em; line-height: 1.9; color: var(--sc-ink-3); }
.sc-cap { font-size: var(--sc-fs-cap); line-height: 1.9; color: var(--sc-ink-2); }

/* ---------- Frames (product screenshots) ---------- */
.sc-frame { overflow: hidden; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 10px; box-shadow: var(--sc-shadow); }
.sc-frame__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; direction: ltr; border-bottom: 1px solid var(--sc-line); }
.sc-frame__bar i { flex: none; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--sc-line); }
.sc-frame__url {
  margin-inline: auto; min-width: 40%; max-width: 70%; padding: 2px 14px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--sc-bg); font-family: var(--sc-lat); font-size: 14px; line-height: 1.5; text-align: center; color: var(--sc-ink-2);
}
.sc-frame__view { display: block; position: relative; aspect-ratio: 1440 / 900; overflow: hidden; }
.sc-frame__view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sc-phone { padding: 6px; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 26px; box-shadow: var(--sc-shadow); }
.sc-phone__view { display: block; overflow: hidden; aspect-ratio: 9 / 19; border-radius: 20px; }
.sc-phone__view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 599px) {
  /* phones load the -m screenshot through <picture>; show its top as a tall view */
  .sc-frame__view { aspect-ratio: 4 / 5; }
  .sc-frame__bar { height: 30px; }
  .sc-frame__url { padding-block: 1px; }
}

/* ---------- List rows (index lists) ---------- */
.sc-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sc-line); }
.sc-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 20px;
  padding-block: 16px; border-bottom: 1px solid var(--sc-line); color: inherit; text-decoration: none;
  transition: background-color var(--sc-t) var(--sc-ease);
}
a.sc-row:hover .sc-row__title { color: var(--sc-violet); }
.sc-row__thumb { display: block; width: 112px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: var(--sc-wash-v); }
.sc-row__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--sc-t-slow) var(--sc-ease); }
a.sc-row:hover .sc-row__thumb img { transform: scale(1.04); }
.sc-row__title { display: block; font-size: 18px; font-weight: 500; line-height: 1.6; transition: color var(--sc-t) var(--sc-ease); }
.sc-row__sub { display: block; font-size: var(--sc-fs-small); line-height: 1.9; color: var(--sc-ink-2); }
.sc-row__meta { font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .06em; line-height: 1.9; color: var(--sc-ink-2); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.sc-tag {
  display: inline-block; padding: 1px 10px; border: 1px solid var(--sc-violet-a); border-radius: 2px;
  font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-violet); white-space: nowrap;
}
@media (max-width: 479px) {
  .sc-row { column-gap: 14px; }
  .sc-row__thumb { width: 84px; }
}
@media (max-width: 419px) {
  /* the year moves under the text, so the title and line get the whole column */
  .sc-row { grid-template-columns: auto minmax(0, 1fr); }
  .sc-row > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .sc-row > .sc-row__thumb { grid-column: 1; grid-row: 1 / span 2; }
  .sc-row > .sc-row__meta { grid-column: 2; grid-row: 2; justify-self: start; }
}

/* ---------- Cards ---------- */
.sc-card {
  display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.4vw, 32px);
  background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 4px; color: inherit; text-decoration: none;
  transition: border-color var(--sc-t) var(--sc-ease), transform var(--sc-t) var(--sc-ease), box-shadow var(--sc-t) var(--sc-ease);
}
a.sc-card:hover { border-color: rgba(0, 24, 52, .32); transform: translateY(-2px); box-shadow: var(--sc-shadow); }
.sc-card__title { font-size: 20px; font-weight: 700; line-height: 1.6; }
.sc-card__text { font-size: var(--sc-fs-small); line-height: 1.95; color: var(--sc-ink-2); }

/* lists that show markers: a small teal dash at the start (right in RTL) */
.sc-dash { margin: 0; padding: 0; list-style: none; }
.sc-dash > li { position: relative; padding-inline-start: 24px; line-height: 1.95; }
.sc-dash > li::before { content: ""; position: absolute; inset-inline-start: 0; top: .95em; width: 12px; height: 2px; background: var(--sc-teal); }

/* ---------- Header ---------- */
.sc-header, .sc-footer {
  font-family: var(--sc-ar); font-size: 16px; font-weight: 400; line-height: 1.9; letter-spacing: 0;
  color: var(--sc-ink); direction: rtl; text-align: start;
}
.sc-header *, .sc-header *::before, .sc-header *::after,
.sc-footer *, .sc-footer *::before, .sc-footer *::after { box-sizing: border-box; }
.sc-header {
  position: sticky; top: 0; z-index: 60; background: var(--sc-bg);  /* opaque: nothing shows through the header */
  border-bottom: 1px solid var(--sc-line);
}
.sc-header__in { display: flex; align-items: center; gap: 12px; min-height: 80px; }
.sc-logo { display: inline-flex; flex: none; align-items: center; text-decoration: none; }
.sc-logo img { display: block; width: auto; height: 36px; max-width: none; }
.sc-nav { margin-inline-start: auto; }
.sc-nav__list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); margin: 0; padding: 0; list-style: none; }
.sc-nav__list > li { margin: 0; padding: 0; }
.sc-nav__link {
  position: relative; display: inline-block; padding-block: 8px; color: var(--sc-ink-2); text-decoration: none;
  font-size: 15px; font-weight: 500; line-height: 1.9; transition: color var(--sc-t) var(--sc-ease);
}
.sc-nav__link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 1px; background: var(--sc-violet);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--sc-ease);
}
.sc-nav__link:hover { color: var(--sc-ink); }
.sc-nav__link:hover::after { transform: scaleX(1); }
.sc-lang {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: 4px;
  font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .08em; line-height: 1; color: var(--sc-ink-2); text-decoration: none;
  transition: color var(--sc-t) var(--sc-ease), background-color var(--sc-t) var(--sc-ease);
}
.sc-lang:hover { color: var(--sc-ink); background: var(--sc-wash-v); }
.sc-header .sc-btn { line-height: 1.5; }

/* mobile menu: native <details>, works without JavaScript */
.sc-menu { display: none; position: static; }
.sc-menu__btn {
  display: grid; place-items: center; width: 48px; height: 48px; margin-inline-end: -8px; border-radius: 4px;
  list-style: none; cursor: pointer; color: var(--sc-ink);
}
.sc-menu__btn::-webkit-details-marker { display: none; }
.sc-menu__btn::marker { content: ""; }
.sc-menu__ico { display: grid; gap: 6px; width: 22px; }
.sc-menu__ico i { display: block; height: 2px; background: var(--sc-ink); transition: transform .3s var(--sc-ease), width .3s var(--sc-ease); }
.sc-menu__ico i:last-child { width: 14px; }
.sc-menu[open] .sc-menu__ico i:first-child { transform: translateY(4px) rotate(45deg); }
.sc-menu[open] .sc-menu__ico i:last-child { width: 22px; transform: translateY(-4px) rotate(-45deg); }
.sc-menu__panel {
  position: absolute; inset-inline: 0; top: 100%; padding: 8px var(--sc-gutter) 28px;
  max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--sc-bg); border-bottom: 1px solid var(--sc-line); box-shadow: 0 30px 40px -30px rgba(0, 24, 52, .2);
}
.sc-menu__list { margin: 0; padding: 0; list-style: none; }
.sc-menu__list a {
  display: block; padding: 13px 0; border-bottom: 1px solid var(--sc-line);
  font-size: 19px; font-weight: 500; line-height: 1.9; color: var(--sc-ink); text-decoration: none;
}
.sc-menu__list a:hover { color: var(--sc-violet); }
.sc-menu__list a[lang="en"] { font-family: var(--sc-lat); font-size: 17px; }
.sc-header :focus-visible, .sc-footer :focus-visible { outline: 2px solid var(--sc-violet); outline-offset: 3px; border-radius: 2px; }
.sc-menu__btn:focus-visible { outline-offset: -2px; }
@media (max-width: 899px) {
  .sc-nav__wide { display: none; }
  .sc-menu { display: block; }
  .sc-header__in { min-height: 72px; }
  .sc-logo img { height: 31px; }
}
@media (max-width: 359px) {
  .sc-logo img { height: 27px; }
  .sc-header .sc-btn { padding-inline: 18px; }
}

/* ---------- Header: quick links to his accounts (2026-11-26) ---------- */
.sc-soc { display: none; align-items: center; gap: 2px; margin-inline-start: calc(-1 * clamp(6px, 1vw, 16px)); }
.sc-soc__a {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; color: var(--sc-ink-2);
  transition: color var(--sc-t) var(--sc-ease), background-color var(--sc-t) var(--sc-ease);
}
.sc-soc__a:hover { color: var(--sc-violet); background: var(--sc-wash-v); }
@media (min-width: 900px) { .sc-nav__list > .sc-soc { display: flex; } }
.sc-soc__ic { display: block; width: 17px; height: 17px; fill: currentColor; }
.sc-menu__soc { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.sc-menu__soc a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--sc-line); border-radius: 4px;
  font-family: var(--sc-lat); font-size: 15px; font-weight: 500; line-height: 1; color: var(--sc-ink); text-decoration: none;
}
.sc-menu__soc a:hover { color: var(--sc-violet); border-color: currentColor; }
.sc-menu__soc .sc-soc__ic { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.sc-footer { background: var(--sc-bg); border-top: 1px solid var(--sc-line); padding-top: clamp(56px, 7vw, 96px); }
.sc-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px var(--sc-gap); }
.sc-footer__brand .sc-logo img { height: 38px; }
.sc-footer__brand p { margin: 18px 0 0; max-width: 23rem; font-size: 15px; line-height: 1.95; color: var(--sc-ink-2); text-wrap: balance; }
.sc-footer__h { margin: 0 0 10px; font-family: var(--sc-ar); font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-ink-3); letter-spacing: 0; }
.sc-footer__col ul { margin: 0; padding: 0; list-style: none; }
.sc-footer__col li { margin: 0; }
.sc-footer__col a {
  display: inline-block; padding-block: 4px; color: var(--sc-ink); text-decoration: none;
  font-size: 15px; line-height: 1.9; transition: color var(--sc-t) var(--sc-ease);
}
.sc-footer__col a:hover { color: var(--sc-violet); }
.sc-footer__col a[lang="en"], .sc-footer .sc-ltr { font-family: var(--sc-lat); font-size: 14.5px; }
.sc-footer__base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: clamp(48px, 6vw, 72px); padding-block: 24px 28px; border-top: 1px solid var(--sc-line);
  font-size: 14px; line-height: 1.9; color: var(--sc-ink-2);
}
.sc-footer__base p { margin: 0; }
.sc-footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.sc-footer__base a { color: var(--sc-ink-2); text-decoration: none; transition: color var(--sc-t) var(--sc-ease); }
.sc-footer__base a:hover { color: var(--sc-violet); }
@media (max-width: 899px) {
  .sc-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sc-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .sc-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .sc-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- Reveal (added by /assets/js/site.js to [data-reveal] blocks below the fold) ---------- */
.sc-rv { opacity: 0; transform: translateY(22px); transition: opacity var(--sc-t-slow) var(--sc-ease), transform var(--sc-t-slow) var(--sc-ease); }
.sc-rv.is-in { opacity: 1; transform: none; }
.sc-rv--d1 { transition-delay: .08s; }
.sc-rv--d2 { transition-delay: .16s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sc-btn, .sc-nav__link::after, .sc-menu__ico i, .sc-card, .sc-row__thumb img, .sc-skip { transition: none; }
  .sc-rv { opacity: 1; transform: none; transition: none; }
  .sc-btn:hover, a.sc-card:hover { transform: none; }
}

/* ---------- Ported identity case pages (body without .sc-page) ----------
   Their case.css comes from the port step and loads after this file; these guards use
   body:not(.sc-page) so they outrank it and never touch any other page. */
/* type floor: nothing below 14px */
body:not(.sc-page) :is(.meta dt, .tag, .cap small, .evo .yr, .evo .nm, .sw .rgb, .sw .src, .series__row figcaption, .facts b, .hero__bar) { font-size: 14px; }
body:not(.sc-page) .ramp span { font-size: 14px; padding-inline: 5px; letter-spacing: 0; }
/* short Arabic lines never end on one word */
body:not(.sc-page) :is(.meta dd, .sw h3, .sw p, .case-foot span, .colour-note, figcaption) { text-wrap: balance; }
/* no black: the darkest value is navy */
body:not(.sc-page) .sign-night { background: #001834; }
body:not(.sc-page) .screen { background: #001834; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 50px rgba(0, 24, 52, .35); }
body:not(.sc-page):has(.sign-night) .hero__logo { filter: drop-shadow(0 18px 40px rgba(0, 24, 52, .18)); }
body:not(.sc-page) .sw i { box-shadow: inset 0 0 0 1px rgba(0, 24, 52, .12); }
body:not(.sc-page) .hero__stage--two img { box-shadow: 0 24px 60px rgba(0, 24, 52, .28); }
/* logo tiles (three versions in a row): keep every tile inside its column, never stretched by a taller caption */
body:not(.sc-page) .family__row > figure { min-width: 0; }
body:not(.sc-page) .family__row > figure:has(> .tile) { align-self: start; grid-template-rows: auto auto; }
body:not(.sc-page) .family__row > figure > .tile { width: 100%; }
/* a no-wrap phrase may wrap on the narrowest phones rather than leave its swatch column */
@media (max-width: 360px) {
  body:not(.sc-page) .sw .nw { white-space: normal; }
  body:not(.sc-page) .swatches .sw :is(h3, h4) { font-size: 16px; }
}
/* meta values get the full width on phones, so 2–3-word values never leave one word on the last line */
@media (max-width: 440px) {
  /* two swatch columns: one even gap instead of padding on both sides, so a bound two-word name fits its column */
  body:not(.sc-page) .swatches { column-gap: 20px; }
  body:not(.sc-page) .swatches > .sw { padding-inline: 0; }
  body:not(.sc-page) dl.meta { grid-template-columns: minmax(0, 1fr); }
  body:not(.sc-page) dl.meta > div, body:not(.sc-page) dl.meta > div + div { grid-column: auto; padding: 12px 0 14px; border-inline-start: 0; }
  body:not(.sc-page) dl.meta > div + div { border-top: 1px solid var(--sc-line); }
}

/* ---------- Ported case pages: one light ground, navy text ----------
   The source pages ran full-width brand-dark bands. Here the page stays light: the brand ink becomes navy, the
   dark sections and the closing credit sit on the page ground, and the hero logo keeps its brand ground on ONE
   framed plate (content width, radius 4px). The plate colour is --case-plate, set per page in
   tools/port_config.json (navy where the brand ground is near-black). */
body:not(.sc-page) {
  --ink: var(--sc-ink); --ink-soft: var(--sc-ink-2); --line: var(--sc-line);
  background: var(--sc-bg); color: var(--sc-ink);
}
body:not(.sc-page) .hero { background: var(--sc-bg); color: var(--sc-ink); }
body:not(.sc-page) .hero::before, body:not(.sc-page) .hero::after,
body:not(.sc-page) :is(.hero__pattern, .hero__glow, .hero__star) { display: none; }
body:not(.sc-page) .hero__stage {
  margin-top: clamp(20px, 3.4vw, 48px); padding: clamp(28px, min(4.5vw, 6vh), 72px) clamp(16px, 4vw, 56px);
  border-radius: 4px; background: var(--case-plate, #001834); overflow: hidden;
}
/* the logo keeps its ratio inside a capped box, so the title below the plate reaches the first screen (1280x720 up) */
body:not(.sc-page) .hero__stage > img:is(.hero__logo, .hero__mark) { width: auto; height: auto; max-width: min(760px, 82%); max-height: min(40vh, 380px); }
@media (min-width: 600px) and (max-width: 900px) {
  body:not(.sc-page) .hero__stage--two { grid-template-columns: 1.4fr 1fr; }
}
body:not(.sc-page) .hero__copy { padding-top: clamp(28px, 3vw, 44px); }
body:not(.sc-page) .hero__copy h1 { color: var(--sc-ink); }
body:not(.sc-page) .hero__copy h1 :is(span, .en) { color: var(--sc-ink-2); }
body:not(.sc-page) .hero__copy :is(p, .sub) { color: var(--sc-ink-2); }
body:not(.sc-page) .hero__copy .lead { color: var(--sc-ink); }
body:not(.sc-page) .hero__bar { color: var(--sc-ink-2); }
body:not(.sc-page) .hero__bar :is(a, strong) { color: var(--sc-violet); }
body:not(.sc-page) .meta, body:not(.sc-page) .meta > div { border-color: var(--sc-line); }
body:not(.sc-page) .meta dt { color: var(--sc-ink-3); }
body:not(.sc-page) .meta dd { color: var(--sc-ink); }
body:not(.sc-page) .hero__strip { width: min(100% - 2 * var(--sc-gutter), var(--sc-maxw)); margin-inline: auto; border-radius: 4px; }
/* section and list numbers: the site's violet, the one accent */
body:not(.sc-page) .head .idx, body:not(.sc-page) :is(.idea__lines, .lines) > li::before { color: var(--sc-violet); }
/* former dark bands: page ground, a hairline above, navy text */
body:not(.sc-page) :is(section.dark, section.night) { background: var(--sc-bg); color: var(--sc-ink); border-top: 1px solid var(--sc-line); }
body:not(.sc-page) :is(.dark, .night) :is(h2, h3, h4, b, strong) { color: var(--sc-ink); }
body:not(.sc-page) :is(.dark, .night) :is(p, li, figcaption, .cap, .sym__cap) { color: var(--sc-ink-2); }
body:not(.sc-page) :is(.dark, .night) :is(.cap small, figcaption small) { color: var(--sc-ink-3); }
/* caption pills: three kinds (port_cases.py gives every pill one of them), the same colours in every section:
   real photo = navy, delivered file = teal, imagined scene = violet; small chips keep the site's 2px corner */
body:not(.sc-page) :is(main, .dark, .night) .tag { border-radius: 2px; }
body:not(.sc-page) :is(main, .dark, .night) .tag.tag--file { background: var(--sc-wash-t); color: var(--sc-teal-ink); }
body:not(.sc-page) :is(main, .dark, .night) .tag.tag--scene { background: var(--sc-wash-v); color: var(--sc-violet); }
body:not(.sc-page) :is(main, .dark, .night) .tag.tag--real { background: var(--sc-ink); color: #FFFFFF; }
/* a dark surface that must stay (a light logo or pattern on it) is navy, framed at content width */
body:not(.sc-page) :is(.tile--deep, .pat__strip, .brands .mark--night) { background: #001834; }
body:not(.sc-page) .phone { border-color: #001834; }
/* closing credit: a quiet line on the page ground (the brand logo already leads the page) */
body:not(.sc-page) .case-foot { background: var(--sc-bg); color: var(--sc-ink-2); border-top: 1px solid var(--sc-line); }
body:not(.sc-page) .case-foot img { display: none; }

/* ---------- Ported case pages: one site, one system ----------
   The 11 ported pages share the column, type scale, accents and closing parts of the generated case pages. */
/* the content column starts exactly at the logo edge, like every other page */
body:not(.sc-page) { --wrap: var(--sc-maxw); --gutter: var(--sc-gutter); --r: 4px; }
/* type: light display sizes, start-aligned hero copy, section rhythm of the site */
body:not(.sc-page) section[id] { padding-block: var(--sc-sec); }
body:not(.sc-page) .hero__copy { text-align: start; max-width: none; margin: 0; }
body:not(.sc-page) .hero__copy h1 { font-size: clamp(2.125rem, 1.25rem + 3.4vw, 4.375rem); font-weight: 300; line-height: 1.38; }
body:not(.sc-page) .hero__copy h1 > span { text-align: right; margin-top: 6px; font-size: clamp(1.0625rem, .95rem + .6vw, 1.375rem); font-weight: 500; line-height: 1.9; }
body:not(.sc-page) .hero__copy :is(p, .sub, .lead) { max-width: 46rem; }
body:not(.sc-page) .hero__copy .ct-crumbs { margin: 0 0 12px; }
body:not(.sc-page) .hero__copy .status { padding: 1px 10px; border-color: var(--sc-violet-a); border-radius: 2px; color: var(--sc-violet); }
body:not(.sc-page) :is(.head h2, .case-kicker + h2) { font-size: var(--sc-fs-h2); font-weight: 300; line-height: 1.38; }
body:not(.sc-page) :where(#main) :is(h3, h4) { font-weight: 500; }
body:not(.sc-page) .case-kicker { margin-bottom: 10px; }
body:not(.sc-page) .head .idx { font-family: var(--sc-lat); font-size: 14px; letter-spacing: .14em; }
/* Latin text and numbers (hex, RGB, sizes, English names) in Poppins, as on every other page */
body:not(.sc-page) :is(.num, .rgb, .code, .en, [lang="en"]) { font-family: var(--sc-lat); }
/* accents: navy, violet and teal only (brand colours stay inside the work: swatches, plates, images) */
body:not(.sc-page) :is(.tint, section.light) { background: var(--sc-surface); border-block: 1px solid var(--sc-line); }
/* palette strips: an outer edge the swatches cannot paint over, so a white swatch still reads on a white section */
body:not(.sc-page) .bar { box-shadow: none; border: 1px solid rgba(0, 24, 52, .16); border-radius: 4px; }
/* call-outs: teal wash and rule (qaf's plain footnotes have no ground: port_config.json keeps them plain) */
body:not(.sc-page) p.note { background-color: var(--sc-wash-t); border-color: var(--sc-teal); }
/* bold labels inside captions and fact lists: navy */
body:not(.sc-page) :is(.cap, figcaption, .sub, .facts) b { color: var(--sc-ink); }
/* «من تصميمي» box (ruaana): violet wash instead of the client's teal and lime */
body:not(.sc-page) .mine { background: var(--sc-wash-v); border-color: var(--sc-violet-a); color: var(--sc-ink); }
body:not(.sc-page) .mine :is(h3, h4) { color: var(--sc-ink); }
body:not(.sc-page) .mine p { color: var(--sc-ink-2); }
body:not(.sc-page) .mine h3 span { color: var(--sc-violet); }
/* block-level numbers (a period, a hex line) sit on the right edge with their Arabic label */
body:not(.sc-page) :is(dd.num, .swatch .num, .sw .num, .idx.num) { text-align: right; }
body:not(.sc-page) .evo .yr { color: var(--sc-ink-2); }
body:not(.sc-page) a.more { color: var(--sc-violet); }
body:not(.sc-page) a.more.sc-ext { display: inline-flex; border-bottom-color: var(--sc-violet-a); }
body:not(.sc-page) a.more.sc-ext:hover { color: var(--sc-violet); border-bottom-color: var(--sc-violet); }
/* one corner for photos and plates: 4px (browser frames 10px, phones 26px) */
body:not(.sc-page) :is(.frame, .tile, .bar, .boards img, .sketch img, .idea__mark, .hero__stage, .hero__stage--two img, .mark, .gl__panel, .stage) { border-radius: 4px; }
body:not(.sc-page) :is(.scenes img, .sym__row img, .family__row figure, .slides img, .logo-row figure, .logo-stage, .coupon, .print .pad, .print .pad img,
  .print img, .ig img, .mk img, .spread, .spread img, .paper-frame, .sign-night, .pat__strip, .awards__row figure, .pages img, .role > div,
  .cards .frame img, .stage .card) { border-radius: 4px; }
body:not(.sc-page) .grid3 img:first-child { border-radius: 4px 0 0 4px; }
body:not(.sc-page) .grid3 img:last-child { border-radius: 0 4px 4px 0; }
body:not(.sc-page) .sw .src { border-radius: 2px; }
/* phones: a caption's leading pill sits on its own line, so the caption text balances by itself */
@media (max-width: 440px) {
  body:not(.sc-page) figcaption > .tag:first-child { display: block; width: fit-content; margin: 0 0 6px; }
}
/* the closing parts come from case-tech.css (next work, consultation call); keep them off the case.css element rules */
body:not(.sc-page) :is(.ct-next, .ct-cta) { color: var(--sc-ink); font-family: var(--sc-ar); }
body:not(.sc-page) :is(.ct-next, .ct-cta) img { max-width: none; }
