/* ============================================================================
   SANAD COMPANY — shared stylesheet
   ----------------------------------------------------------------------------
   EDIT GUIDE
   • Colours      → sections 1a / 1b below. Nothing else in this file holds a
                    colour literal, so both palettes retune from one place.
   • Fonts, type scale, spacing → section 1c.
   • Section vertical rhythm    → --section-y token.
   • Everything is mobile-first; breakpoints widen with min-width media queries.

   TWO PALETTES, ONE STYLESHEET
   The site runs a different palette per language, by client request:

     English (root pages)  burgundy + gold   :root                 (1a)
     Arabic  (/ar/ pages)  deep green + cream + the SAME gold
                                             html[lang="ar"]       (1b)

   The switch is a pure custom-property swap — not one rule below section 2 is
   duplicated or language-scoped. Anything that reads a token follows
   automatically: hero tint, nav fade, cards, borders, gradients, footer,
   scrims, overlays, particle field.

   Because the selector keys off the `lang` attribute that is already in the
   served markup, the browser picks the palette before it paints. No JS, no
   class toggle, so switching EN <-> AR never flashes the wrong colours.

   Token names are semantic (--bg-base, --text, --accent) and never named
   after a hue, so neither palette leaves a variable lying about what it holds.

   IF YOU EDIT: adding a raw colour literal to a rule below breaks the Arabic
   palette silently, because the override only reaches values behind tokens.
   Check with:  grep -n '#[0-9a-fA-F]\{3,6\}\|rgba\?([0-9]' css/styles.css
   — hits should only ever appear inside sections 1a and 1b.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS  (the single source of truth for the brand system)
   -------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
   1a. ENGLISH PALETTE — burgundy + gold  (the default for every page)
   ----------------------------------------------------------------------------
   Colour tokens are semantic, never named after a hue, so the Arabic override
   further down is a pure value swap. Values here are unchanged from the
   original burgundy build — only their spelling moved into tokens.
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces --------------------------------------------------------------- */
  --bg-base: #2A0712;   /* darkest — page base                                */
  --bg-mid:  #4A0E1F;   /* primary burgundy                                   */
  --bg-lift: #5E1228;   /* raised surfaces / cards                            */

  /* Ink -------------------------------------------------------------------- */
  --text:       #F2EDE4;
  --text-dim:   rgba(242, 237, 228, .66);
  --text-faint: rgba(242, 237, 228, .40);
  --text-rgb:   242 237 228;
  --hair:       rgba(242, 237, 228, .14);   /* borders only — not text        */

  /* Accent — gold (identical in both languages) ---------------------------- */
  --accent:       #C9A24B;
  --accent-hover: #d8b463;
  --accent-rgb:   201 162 75;
  --accent-soft:  rgba(201, 162, 75, .55);
  --accent-faint: rgba(201, 162, 75, .18);

  /* Ambient glows behind heroes and CTA bands ------------------------------ */
  --glow-warm-rgb: 94 18 40;
  --glow-cool-rgb: 46 90 82;

  /* Overlay families — used as rgb(var(<token>) / <alpha>) ------------------ */
  --veil-rgb:      42 7 18;    /* hero + media tint, photo bands             */
  --veil-core-rgb: 74 14 31;   /* warmer core of the hero radial            */
  --nav-veil-rgb:  28 5 13;    /* nav top-fade gradient                     */
  --scrim-rgb:     15 3 8;     /* image scrims + vignette                   */
  --lightbox-rgb:  10 2 6;     /* lightbox backdrop (its own darker tone)   */
  --shadow-rgb:     0 0 0;
  --card-foot-rgb: 74 14 31;   /* bottom stop of the card gradient          */

  /* Veil opacity — the readability knobs for text over video/photography.
     Set 1 = home hero, set 2 = interior page heroes (busier photos).        */
  --veil-a1: .66;
  --veil-a2: .48;
  --veil-a3: .86;
  --veil-core: .48;
  --veil-edge: .80;
  --veil2-a1: .74;
  --veil2-a2: .62;
  --veil2-a3: .90;
  --veil2-core: .42;
  --veil2-edge: .86;

  /* Input surfaces --------------------------------------------------------- */
  --field-bg:       rgba(255, 255, 255, .04);
  --field-bg-focus: rgba(255, 255, 255, .06);

  /* Status ----------------------------------------------------------------- */
  --danger:       #c46a6a;
  --danger-text:  #e29393;
  --success-text: #2E5A52;

  /* Typography ------------------------------------------------------------- */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  /* Refined label face — section eyebrows + buttons. Marcellus is an elegant
     classical caps face; Cormorant is the graceful fallback. Overridden to an
     appropriate Arabic face on Arabic pages (see html[lang="ar"]). */
  --font-label:   'Marcellus', 'Cormorant Garamond', Georgia, serif;

  /* Fluid type scale (clamp: min, preferred, max) -------------------------- */
  --fs-eyebrow:  .72rem;
  --fs-small:    .875rem;
  --fs-body:     clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-lead:     clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --fs-h3:       clamp(1.25rem, 1.1rem + .8vw, 1.6rem);
  --fs-h2:       clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
  --fs-display:  clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);

  --lh-tight:   1.08;
  --lh-snug:    1.3;
  --lh-body:    1.65;
  --tracking-eyebrow: .34em;
  --tracking-label:   .18em;

  /* Spacing scale (4px base) ----------------------------------------------- */
  --space-1:  .25rem;
  --space-2:  .5rem;
  --space-3:  .75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 7.5rem;

  /* Vertical rhythm for sections — change once to retune the whole site ---- */
  --section-y: clamp(4rem, 3rem + 6vw, 8rem);
  --container: 1180px;
  --container-narrow: 820px;

  /* Misc ------------------------------------------------------------------- */
  --radius:    14px;
  --radius-sm: 8px;
  --nav-h:     76px;
  --ease:      cubic-bezier(.22, .7, .26, 1);
  --shadow:    0 24px 60px -28px rgb(var(--shadow-rgb) / .7);
}

/* ----------------------------------------------------------------------------
   1b. ARABIC PALETTE — deep green + cream, same gold accent
   ----------------------------------------------------------------------------
   Scoped to html[lang="ar"], which is already on every /ar/ page, so the
   palette is chosen by the markup the browser has *before* it paints — no JS,
   no class toggle, and therefore no flash of the wrong colours when switching
   language. Specificity (0,1,1) beats :root (0,1,0).

   This is a pure value swap: not one rule below section 2 is duplicated or
   overridden. Anything that reads a token follows automatically — hero tint,
   nav fade, cards, borders, gradients, footer, scrims, overlays.

   The gold accent is deliberately IDENTICAL to the English side; only the
   surfaces and ink change.
   -------------------------------------------------------------------------- */
html[lang="ar"] {
  /* Refined label face for Arabic — Marcellus is Latin-only, so Arabic pages
     use IBM Plex Sans Arabic (a heavier weight is applied on the labels). */
  --font-label: 'IBM Plex Sans Arabic', 'Outfit', sans-serif;

  /* Surfaces — the same light->dark layering the burgundy build uses, so the
     gradients keep their depth rather than reading flat. */
  --bg-base: #122F2A;   /* page base — the client's deep green                */
  --bg-mid:  #16352D;   /* raised mid tone / gradient top                     */
  --bg-lift: #193E35;   /* cards & raised surfaces                            */
  /* The lift steps are tight on purpose. A lighter card (#22564C was the
     first attempt) drops gold to 3.5:1 and card body copy to 3.8:1 — both
     below AA. At #193E35 gold reads 4.9:1 and body copy 5.0:1 while still
     sitting ~1.7x brighter than the page. Depth comes from the radial glows. */

  /* Ink — milky cream ------------------------------------------------------ */
  --text:       #EFE2C6;
  --text-dim:   rgba(239, 226, 198, .74);
  --text-faint: rgba(239, 226, 198, .62);
  --text-rgb:   239 226 198;
  --hair:       rgba(239, 226, 198, .14);

  /* Accent — gold, unchanged from English ---------------------------------- */
  /* (--accent, --accent-hover, --accent-rgb, --accent-soft, --accent-faint
      all inherit from :root on purpose — do not redeclare them here.)        */

  /* Ambient glows — burgundy warmth against the green field, plus a lighter
     green lift. Keeps the hero from going flat/monochrome.                   */
  --glow-warm-rgb: 94 18 40;
  --glow-cool-rgb: 46 90 82;

  /* Overlays — green-based so the hero video reads green, not burgundy ----- */
  --veil-rgb:      12 32 28;
  --veil-core-rgb: 12 32 28;
  --nav-veil-rgb:  12 32 28;
  --scrim-rgb:      8 22 19;
  --lightbox-rgb:   6 18 15;
  --card-foot-rgb: 18 47 42;

  /* Hero veil strength — the gold accent word sits over the video, and gold
     is the hardest colour to hold against a bright frame. A lighter green
     core (#1B443C was the first attempt) dropped it to 2.68:1. Keeping the
     core the same dark green as the veil and lifting only its alpha gets gold
     to 4.8:1 while dimming the footage just ~5% more than the English hero,
     so the two languages still look like the same site. */
  --veil-core:  .62;
  --veil2-core: .55;

  /* Status ----------------------------------------------------------------- */
  --success-text: #7FC4B4;   /* #2E5A52 is invisible on the green page base   */
}

/* ----------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

/* <picture> is only a WebP/JPG switch — it must not affect layout, so the
   inner <img> participates in the parent's grid/flex exactly as before. */
picture { display: contents; }

ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: var(--bg-base);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--space-4); }

/* ----------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }

/* Alternating surface tones */
.surface-deep { background: var(--bg-base); }
.surface-base { background: var(--bg-mid); }
/* Currently unused, kept as part of the surface utility family. Uses tokens so
   it renders correctly in either palette. */
.surface-cool { background: linear-gradient(160deg, var(--bg-lift) 0%, var(--bg-base) 90%); }

/* ----------------------------------------------------------------------------
   4. TYPOGRAPHY HELPERS
   -------------------------------------------------------------------------- */
.eyebrow {
  /* Refined section-label treatment (Part F): larger, refined face, clearer
     presence than a small tag. */
  font-family: var(--font-label);
  font-size: clamp(.9rem, .82rem + .3vw, 1.1rem);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}
/* Arabic doesn't letterspace; use a defined weight instead for presence. */
html[lang="ar"] .eyebrow { letter-spacing: normal; font-weight: 600; }

/* Section / hero / CTA eyebrows read as centered section-defining labels. */
.section-head--center .eyebrow,
.page-hero .eyebrow,
.cta-band .eyebrow {
  display: block;
  text-align: center;
  margin-inline: auto;
}
.section-head .eyebrow { margin-bottom: var(--space-3); }

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: .01em;
}

/* Gold italic accent word — used sparingly inside display headings */
.accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: var(--lh-snug); }

.section-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  max-width: 18ch;
}
.section-lead {
  font-size: var(--fs-lead);
  color: var(--text-dim);
  font-weight: 300;
  max-width: 56ch;
  margin-top: var(--space-4);
}

.lead { font-size: var(--fs-lead); color: var(--text-dim); }
.muted { color: var(--text-dim); }

/* Gold hairline divider */
.gold-rule {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border: 0;
  margin-block: var(--space-5);
}
.gold-rule--center { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

.section-head { margin-bottom: var(--space-8); }
.section-head--center { text-align: center; }
.section-head--center .section-title,
.section-head--center .section-lead { margin-inline: auto; }

/* ----------------------------------------------------------------------------
   5. BUTTONS / LINKS
   -------------------------------------------------------------------------- */
.btn {
  --btn-pad-y: .85rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--btn-pad-y) var(--space-6);
  font-family: var(--font-label);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .35s var(--ease),
              color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--gold { background: var(--accent); color: var(--bg-base); }
.btn--gold:hover { background: var(--accent-hover); }

.btn--ghost { border-color: var(--accent-soft); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-faint); }

/* Animated underline-wipe text link */
.link-wipe {
  position: relative;
  display: inline-block;
  font-weight: 400;
  letter-spacing: .04em;
}
.link-wipe::after {
  content: "";
  position: absolute;
  inset-inline-start: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.link-wipe:hover::after,
.link-wipe:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--accent);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.arrow-link span { transition: transform .35s var(--ease); }
.arrow-link:hover span { transform: translateX(5px); }

/* ----------------------------------------------------------------------------
   6. NAVBAR  (transparent over hero -> solid on scroll; mobile hamburger)
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
/* Soft gradient fade instead of a solid bar with a hard bottom line.
   Two stacked layers crossfade between states — both dissolve to fully
   transparent at the bottom, so the nav never meets the page with a seam.
   The layers are taller than the bar so the fade extends past it. */
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(var(--nav-h) + 3.25rem);
  pointer-events: none;
  z-index: -1;
}
/* Always-on, subtle — keeps the logo/links legible over bright video frames
   at the top of the hero while staying minimal (no visible bar). */
.nav::before {
  background: linear-gradient(180deg,
              rgb(var(--nav-veil-rgb) / .50) 0%,
              rgb(var(--nav-veil-rgb) / .22) 45%,
              rgb(var(--nav-veil-rgb) / 0) 100%);
}
/* Stronger fade for scrolled / internal-page state — fades in smoothly. */
.nav::after {
  background: linear-gradient(180deg,
              rgb(var(--nav-veil-rgb) / .97) 0%,
              rgb(var(--nav-veil-rgb) / .88) 38%,
              rgb(var(--nav-veil-rgb) / .52) 70%,
              rgb(var(--nav-veil-rgb) / 0) 100%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.nav.is-solid::after { opacity: 1; }
/* Readability safeguard over bright backgrounds in the minimal (top) state */
.nav__links a { text-shadow: 0 1px 10px rgb(var(--shadow-rgb) / .28); }
.nav__logo img { filter: drop-shadow(0 1px 8px rgb(var(--shadow-rgb) / .3)); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.nav__logo img { height: 30px; width: auto; }
.nav__logo { display: flex; align-items: center; }

.nav__links {
  display: none;
  align-items: center;
  gap: clamp(1.4rem, 2.5vw, 2.6rem);
}
.nav__links a {
  font-size: var(--fs-small);
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--text-dim);
  transition: color .3s var(--ease);
  position: relative;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline-start: 0; bottom: -7px;
  width: 100%; height: 1px;
  background: var(--accent);
}
.nav__cta { display: none; }

/* Hamburger */
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  margin-inline-end: -10px;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 1.5px;
  margin-inline: auto;
  background: var(--text);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile slide-in menu */
.nav__mobile {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: linear-gradient(165deg, var(--bg-mid) 0%, var(--bg-base) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-12) var(--space-6);
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  visibility: hidden;
}
.nav__mobile.is-open { transform: translateX(0); visibility: visible; }
.nav__mobile a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--text);
  letter-spacing: .01em;
}
.nav__mobile a[aria-current="page"] { color: var(--accent); }
/* CTA is also an <a>, so re-assert button sizing (not the big menu font) */
.nav__mobile a.btn {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  margin-top: var(--space-4);
  align-self: flex-start;
}
body.no-scroll { overflow: hidden; }

@media (min-width: 880px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .nav__mobile { display: none; }
}

/* ----------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
/* Layered ambient burgundy field behind the particle canvas */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 72% 18%, rgb(var(--glow-warm-rgb) / .60), transparent 60%),
    radial-gradient(55% 60% at 18% 82%, rgb(var(--glow-cool-rgb) / .34), transparent 62%),
    radial-gradient(130% 130% at 50% 40%, var(--bg-mid) 0%, var(--bg-base) 72%);
}
/* Full-bleed background video — sits behind everything; gradient is the fallback */
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -3; opacity: 0; transition: opacity 1.2s ease;
}
.hero__video.is-ready { opacity: 1; }
.hero__tint {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  /* Slightly darker overlay for stronger text readability over the video. */
  background:
    linear-gradient(180deg,
      rgb(var(--veil-rgb) / var(--veil-a1)) 0%,
      rgb(var(--veil-rgb) / var(--veil-a2)) 45%,
      rgb(var(--veil-rgb) / var(--veil-a3)) 100%),
    radial-gradient(120% 120% at 50% 40%,
      rgb(var(--veil-core-rgb) / var(--veil-core)) 0%,
      rgb(var(--veil-rgb) / var(--veil-edge)) 75%);
}
.hero.has-video .hero__bg { opacity: 0; transition: opacity 1.2s ease; }

.hero__canvas { position: absolute; inset: 0; z-index: -1; opacity: .55; }
.hero__vignette {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 240px 50px rgb(var(--scrim-rgb) / .8);
}
.hero__inner { padding: calc(var(--nav-h) + var(--space-8)) var(--space-5) var(--space-12); max-width: 940px; }

.hero__mark { height: clamp(58px, 12vw, 86px); width: auto; margin-inline: auto; margin-bottom: var(--space-6);
  filter: drop-shadow(0 8px 40px rgb(var(--shadow-rgb) / .4)); }
.hero__eyebrow {
  font-size: clamp(1.25rem, .9rem + 1.6vw, 2.1rem);
  color: var(--text);
  letter-spacing: .16em;
  margin-bottom: var(--space-2);
}
.hero__pillars {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  /* ~15–25% larger than --fs-eyebrow (.72rem) on desktop; stays compact on phones */
  font-size: clamp(.72rem, .62rem + .42vw, .9rem);
  margin-bottom: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .1em .7em;
}
.hero__pillar {
  color: var(--accent);
  text-decoration: none;
  padding: .4em .3em;            /* gives a comfortable tap target height */
  transition: color .3s var(--ease), opacity .3s var(--ease);
}
.hero__pillar:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: .3em; }
.hero__pillar-sep { color: var(--accent-soft); pointer-events: none; }

/* Phones: stack the three names, drop the separators, enlarge tap targets.
   Avoids a cramped/overflowing single line and stranded "•" dividers. */
@media (max-width: 600px) {
  .hero__pillars { flex-direction: column; gap: 0; }
  .hero__pillar-sep { display: none; }
  .hero__pillar { padding: 1.1em .6em; }
}
.hero__title { font-size: var(--fs-display); }
/* Demoted hero message — styled like the supporting sub line, not a display heading */
.hero__lede {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  color: var(--text-dim);
  font-weight: 300;
  line-height: var(--lh-snug);
  max-width: 60ch;
  margin: 0 auto;
}
.hero__sub {
  font-size: var(--fs-lead);
  color: var(--text-dim);
  font-weight: 300;
  max-width: 52ch;
  margin: var(--space-6) auto 0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; margin-top: var(--space-8); }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: var(--space-6);
  transform: translateX(-50%);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
}
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); opacity: .4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }

/* Compact page header (non-home pages) */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + var(--space-12)) 0 var(--space-12);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
/* Header media layers — static image now, video-ready later (added by main.js).
   Both sit behind .hero__bg, which becomes a readable burgundy tint over them. */
.page-hero__media,
.page-hero__video {
  position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%;
  pointer-events: none;
}
.page-hero__media img,
.page-hero__video { object-fit: cover; display: block; }
.page-hero__media img { width: 100%; height: 100%; }
.page-hero__video { z-index: -2; opacity: 0; transition: opacity 1.2s var(--ease); }
.page-hero__video.is-ready { opacity: 1; }
/* With media behind it the gradient becomes a translucent tint (text stays readable) */
.page-hero.has-media .hero__bg {
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgb(var(--veil-rgb) / var(--veil2-a1)) 0%,
      rgb(var(--veil-rgb) / var(--veil2-a2)) 45%,
      rgb(var(--veil-rgb) / var(--veil2-a3)) 100%),
    radial-gradient(120% 120% at 50% 25%,
      rgb(var(--veil-core-rgb) / var(--veil2-core)) 0%,
      rgb(var(--veil-rgb) / var(--veil2-edge)) 78%);
}

.page-hero .hero__bg { background:
  radial-gradient(70% 80% at 50% 0%, rgb(var(--glow-warm-rgb) / .55), transparent 60%),
  linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-base) 100%); }
.page-hero__title { font-size: clamp(2.2rem, 1.5rem + 3.4vw, 4rem); }
.page-hero__lead { font-size: var(--fs-lead); color: var(--text-dim); max-width: 54ch; margin: var(--space-5) auto 0; }

/* ----------------------------------------------------------------------------
   8. GRIDS & CARDS
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-5); }
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Pillar / feature card with gold hairline draw on hover */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-lift) 0%, rgb(var(--card-foot-rgb) / .55) 100%);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: var(--space-6);
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none; /* decorative hairline must not intercept clicks on links inside the card */
  border-top: 1px solid transparent;
  background: linear-gradient(90deg, var(--accent), transparent) top left / 0 1px no-repeat;
  transition: background-size .55s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--accent-faint); box-shadow: 0 22px 48px -24px rgb(var(--shadow-rgb) / .6); }
.card:hover::before { background-size: 100% 1px; }
/* Stretched link — makes the whole card clickable via a link inside it.
   The link's ::after overlays the (position:relative) card. */
.card__stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* While a tilt card is being actively tilted, JS drives the transform inline;
   suppress the CSS hover translate so they don't fight. */
[data-tilt].is-tilting { transition: transform .12s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease); }

.card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
}
/* Part A — star marker replacing 01/02/03 on the Services discipline blocks */
.card__num--star {
  font-style: normal;
  font-size: 2rem;
  line-height: 1;
  display: block;
}
/* Part A — the three discipline sub-headers, noticeably larger */
.eyebrow--discipline {
  font-size: clamp(1.25rem, 1rem + 1.4vw, 2rem);
  color: var(--text);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  margin-top: var(--space-2);
}
html[lang="ar"] .eyebrow--discipline { font-weight: 700; }
/* Arabic buttons: no Latin-style letterspacing; a defined weight instead. */
html[lang="ar"] .btn { letter-spacing: normal; font-weight: 600; }

/* ---- Founder's message (SANAD page) — photo beside message --------------- */
.founder__grid { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 820px) {
  .founder__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--space-12); }
}
.founder__photo {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--hair); background: var(--bg-lift);
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 5; }
.founder__message {
  margin: var(--space-5) 0 0;                 /* reset <blockquote> UA margins */
  display: grid; gap: var(--space-4);
  color: var(--text-dim); font-size: var(--fs-lead); line-height: 1.85;
}
/* Quotation treatment — a large, soft gold quote mark hanging at the start. */
.founder__quote { position: relative; padding-top: var(--space-6); }
.founder__quote::before {
  content: '\201C';                            /* opening double quote */
  position: absolute; top: -0.18em; inset-inline-start: -0.06em;
  font-family: var(--font-display);
  font-size: 4.5rem; line-height: 1;
  color: var(--accent-soft); pointer-events: none;
}
html[lang="ar"] .founder__quote::before { content: '\00AB'; font-size: 3.6rem; top: 0.05em; }
.founder__quote p { margin: 0; }
.founder__quote p:first-of-type { text-indent: 2.2rem; }   /* clear the quote mark */
html[lang="ar"] .founder__quote p:first-of-type { text-indent: 2.6rem; }
.founder__sign { margin-top: var(--space-6); }
.founder__name { font-family: var(--font-label); font-size: var(--fs-h3); letter-spacing: .08em; color: var(--text); }
html[lang="ar"] .founder__name { letter-spacing: normal; }
.founder__title {
  color: var(--accent); font-size: var(--fs-small);
  letter-spacing: .14em; text-transform: uppercase; margin-top: var(--space-1);
}
html[lang="ar"] .founder__title { letter-spacing: normal; }

/* ---- Company-profile flip-book (Home) ----------------------------------- */
/* Book navigation is LOCKED to LTR so the buttons never mirror between EN and
   AR: the left button is always "previous", the right always "next" — same
   physical position and same action in both languages. Only the surrounding
   page text stays RTL. */
.flipbook-wrap {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  perspective: 2400px;              /* gives StPageFlip's page-curl real depth */
}
.flipbook {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1160px;
  min-height: 240px;               /* reserve space before init to avoid jump */
  margin-inline: auto;
}
.flipbook.is-ready { min-height: 0; }
.flipbook .stf__parent { margin-inline: auto; }

/* The book sits in space: a soft contact shadow + a deep cast shadow. */
.flipbook.is-ready {
  border-radius: 2px;
  box-shadow:
    0 2px 6px rgb(var(--shadow-rgb) / .28),
    0 30px 55px -20px rgb(var(--shadow-rgb) / .7);
}
/* Page-stack thickness along the outer edges (stacked-paper look). */
.flipbook.is-ready::before,
.flipbook.is-ready::after {
  content: ""; position: absolute; top: 3%; height: 94%; width: 7px;
  z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg,
    rgb(var(--shadow-rgb) / .16) 0 1px, rgba(255, 255, 255, .5) 1px 2.5px);
}
.flipbook.is-ready::before { left: -7px;  border-radius: 3px 0 0 3px; box-shadow: -3px 0 8px rgb(var(--shadow-rgb) / .32); }
.flipbook.is-ready::after  { right: -7px; border-radius: 0 3px 3px 0; box-shadow:  3px 0 8px rgb(var(--shadow-rgb) / .32); }

/* Centre spine / gutter shadow — only in the two-page spread. */
.flipbook__spine { display: none; }
.flipbook--spread .flipbook__spine {
  display: block; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 46px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0,
    rgb(var(--shadow-rgb) / .04) 34%,
    rgb(var(--shadow-rgb) / .26) 50%,
    rgb(var(--shadow-rgb) / .04) 66%,
    transparent 100%);
}

.flipbook-nav {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgb(var(--text-rgb) / .05);
  color: var(--text);
  font-size: 1.7rem; line-height: 1;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), opacity .3s var(--ease);
}
.flipbook-nav:hover { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-faint); }
.flipbook-nav:disabled { opacity: .3; cursor: default; }
.flipbook-actions { text-align: center; margin-top: var(--space-8); }

/* Fallback strip (used only if the library fails) */
.flipbook-strip {
  display: flex; gap: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-3);
}
.flipbook-strip img {
  scroll-snap-align: center;
  height: auto; width: min(88%, 900px); flex: 0 0 auto;
  border-radius: var(--radius-sm); border: 1px solid var(--hair);
}

@media (max-width: 520px) {
  .flipbook-wrap { gap: var(--space-2); }
  .flipbook-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  /* thinner page-edge so nothing spills past the viewport on phones */
  .flipbook.is-ready::before,
  .flipbook.is-ready::after { width: 4px; }
  .flipbook.is-ready::before { left: -4px; }
  .flipbook.is-ready::after  { right: -4px; }
}
.card__icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: var(--space-4); }
.card__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.25; }
.card__title { font-size: var(--fs-h3); margin-top: var(--space-3); }
.card__text { color: var(--text-dim); margin-top: var(--space-3); font-size: var(--fs-small); }

.card__list { margin-top: var(--space-5); display: grid; gap: var(--space-2); }
.card__list li {
  position: relative;
  padding-inline-start: var(--space-5);
  font-size: var(--fs-small);
  color: var(--text-dim);
}
.card__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: .65em;
  width: 9px; height: 1px;
  background: var(--accent);
}
/* Detailed variant: sub-service name + description (Services page pillars) */
.card__list--detailed { gap: var(--space-5); }
.card__list--detailed li { font-size: var(--fs-body); }
.card__list--detailed li::before { top: .85em; }
.card__list--detailed li strong { display: block; color: var(--text); font-weight: 500; }
.card__list--detailed li span { display: block; margin-top: var(--space-1); color: var(--text-dim); font-size: var(--fs-small); }

/* ----------------------------------------------------------------------------
   9. IMAGE PLACEHOLDERS  (CSS/SVG — replace with real assets later)
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 120% at 30% 20%, var(--bg-lift), var(--bg-base) 80%);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text-faint);
}
.ph::after {
  content: attr(data-label);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-align: center;
  padding: var(--space-3);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 14px, var(--accent-faint) 14px 15px);
  opacity: .5;
}
.ph--wide { aspect-ratio: 16 / 9; }
.ph--tall { aspect-ratio: 3 / 4; }

/* A real <img> reusing the .ph sizing classes: fill the box, cover-crop, no hatch */
img.ph { width: 100%; height: 100%; object-fit: cover; color: transparent; }
img.ph::before, img.ph::after { content: none; }
/* Map embed reusing .ph--wide sizing */
.map-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; }

/* ----------------------------------------------------------------------------
   10. WORK / CASE-STUDY GRID
   -------------------------------------------------------------------------- */
.work-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 720px) { .work-grid { grid-template-columns: 1fr 1fr; } }

.work-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--bg-base);
  transition: transform .5s var(--ease), border-color .5s var(--ease);
}
.work-card:hover { transform: translateY(-6px); border-color: var(--accent-faint); }
.work-card--feature { grid-column: 1 / -1; }

.work-card .ph { border: 0; border-radius: 0; aspect-ratio: 16 / 10; }
.work-card--feature .ph { aspect-ratio: 21 / 9; }
.work-card__body {
  padding: var(--space-5) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.work-card__tag { font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent); }
.work-card__title { font-size: var(--fs-h3); }
.work-card__meta { font-size: var(--fs-small); color: var(--text-dim); }
.work-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgb(var(--scrim-rgb) / .75) 100%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.work-card:hover .work-card__overlay { opacity: 1; }

/* ----------------------------------------------------------------------------
   11. INDUSTRIES STRIP
   -------------------------------------------------------------------------- */
.industries { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.industry-chip {
  font-size: var(--fs-small);
  letter-spacing: .04em;
  color: var(--text-dim);
  border: 1px solid var(--hair);
  border-radius: 100px;
  padding: var(--space-2) var(--space-5);
  transition: border-color .35s var(--ease), color .35s var(--ease), background-color .35s var(--ease);
}
.industry-chip:hover { border-color: var(--accent-soft); color: var(--text); background: var(--accent-faint); }

/* Partners & clients logo wall — placeholder tiles until real logos arrive.
   Replace .logo-wall__tile spans with <img> logos when supplied. */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.logo-wall__tile {
  height: 96px;
  border: 1px dashed var(--accent-faint);
  border-radius: var(--radius, 14px);
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgb(var(--accent-rgb) / .05) 12px 13px),
    var(--bg-lift);
}
.logo-wall { align-items: center; justify-items: center; }
.logo-wall img {
  max-height: 56px; max-width: 100%; width: auto; object-fit: contain;
  opacity: .8;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.logo-wall img:hover { opacity: 1; transform: translateY(-3px); }
/* Dark logos sit on a subtle light tile so they read on the dark scheme. */
.logo-wall__chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: var(--radius, 14px);
  background: #f3f1ec;
  box-shadow: 0 1px 0 rgb(255 255 255 / .06) inset, 0 6px 18px rgb(0 0 0 / .18);
  transition: transform .35s var(--ease);
}
.logo-wall__chip img { max-height: 44px; opacity: 1; }
.logo-wall__chip:hover { transform: translateY(-3px); }
.logo-wall__chip:hover img { transform: none; }
@media (max-width: 520px) {
  .logo-wall img { max-height: 44px; }
  .logo-wall__chip { padding: 9px 14px; }
  .logo-wall__chip img { max-height: 34px; }
}

/* ----------------------------------------------------------------------------
   12. SPLIT / STAT / THESIS BLOCKS
   -------------------------------------------------------------------------- */
.split { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-12); }
  .split--reverse > :first-child { order: 2; } }

.thesis { max-width: 60ch; }
.thesis p + p { margin-top: var(--space-4); }
/* Larger, more readable body copy (About / Our Journey / How We Work) */
.thesis--lg p { font-size: var(--fs-lead); color: var(--text-dim); font-weight: 300; line-height: 1.75; }
.thesis--lg p + p { margin-top: var(--space-5); }

/* Emphasised section titles (SANAD / About page) */
.section-title--lg {
  font-size: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  max-width: none;
}

/* About — full-width feature band (image), narrow intro/closing, discipline cards */
.about-intro, .about-closing { max-width: 70ch; margin-inline: auto; }
.about-closing { margin-top: var(--space-8); }
.about-band {
  position: relative;
  margin: var(--space-10) auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--accent-faint);
  aspect-ratio: 16 / 6;
}
.about-band img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s var(--ease); }
.about-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(var(--veil-rgb) / .12) 0%, rgb(var(--veil-rgb) / .5) 100%);
  pointer-events: none;
}
.about-band:hover img { transform: scale(1.04); }
@media (max-width: 620px) { .about-band { aspect-ratio: 16 / 11; } }

.disciplines-grid { margin-top: var(--space-8); }
.discipline-card { text-align: start; }
.discipline-card__title { color: var(--accent); margin-top: var(--space-4); }

/* Our Journey — vertical timeline (gold line, revealing nodes) */
.timeline { position: relative; margin-top: var(--space-8); list-style: none; padding: 0; }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: 7px; top: .5em; bottom: .5em; width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--accent-soft) 10%, var(--accent-soft) 90%, transparent 100%);
}
.timeline__item { position: relative; padding-inline-start: var(--space-8); padding-bottom: var(--space-8); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__node {
  position: absolute; inset-inline-start: 0; top: .4em; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-base); border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .07);
}
.timeline__node::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
  transform: scale(0); transition: transform .55s var(--ease) .12s;
}
.timeline__item.is-visible .timeline__node::after { transform: scale(1); }
.timeline__text { margin: 0; font-size: var(--fs-lead); color: var(--text-dim); font-weight: 300; line-height: 1.75; }

/* Optional pointer-driven 3D tilt on key cards (added by main.js, desktop only) */
[data-tilt] { transform-style: preserve-3d; }

/* Equal-height cards in a grid, plus a slightly larger card body option */
.grid--stretch { align-items: stretch; }
.grid--stretch > .card { height: 100%; }
.card__text--lg { font-size: var(--fs-body); }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); margin-top: var(--space-8); }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat__num { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: var(--accent); line-height: 1; }
.stat__label { font-size: var(--fs-small); color: var(--text-dim); margin-top: var(--space-2); }

.value-list { display: grid; gap: var(--space-5); }
.value-list li { display: grid; gap: var(--space-2); padding-bottom: var(--space-5); border-bottom: 1px solid var(--hair); }
.value-list h3 { font-size: var(--fs-h3); display: flex; align-items: baseline; gap: var(--space-3); }
.value-list .value-list__idx { font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.value-list p { color: var(--text-dim); font-size: var(--fs-small); }

/* ----------------------------------------------------------------------------
   13. CTA BAND
   -------------------------------------------------------------------------- */
.cta-band { text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band .hero__bg { background:
  radial-gradient(60% 90% at 50% 0%, rgb(var(--glow-cool-rgb) / .35), transparent 60%),
  linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-base) 100%); }
.cta-band__title { font-size: var(--fs-h2); max-width: 20ch; margin-inline: auto; }
.cta-band .btn { margin-top: var(--space-6); }

/* ----------------------------------------------------------------------------
   14. CONTACT / FORMS
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--space-10); }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }

.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-dim);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent-soft); background: var(--field-bg-focus); }
.field textarea { resize: vertical; min-height: 140px; }
.field--invalid input,
.field--invalid textarea { border-color: var(--danger); }
.field__error { font-size: var(--fs-small); color: var(--danger-text); min-height: 1.1em; display: none; }
.field--invalid .field__error { display: block; }

.form__status { font-size: var(--fs-small); min-height: 1.4em; }
.form__status.is-error { color: var(--danger-text); }
.form__status.is-success { color: var(--success-text); }
.form__note { font-size: var(--fs-small); color: var(--text-faint); }
.form__note code { color: var(--accent); background: rgb(var(--accent-rgb) / .1); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

.contact-detail { display: grid; gap: var(--space-6); }
.contact-detail dt { font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--space-1); }
.contact-detail dd { font-size: var(--fs-lead); color: var(--text); }
.contact-detail a { transition: color .3s var(--ease); }
.contact-detail a:hover { color: var(--accent); }

.social-row { display: flex; gap: var(--space-4); margin-top: var(--space-2); }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--hair); border-radius: 50%;
  color: var(--text-dim);
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.social-row a:hover { color: var(--accent); border-color: var(--accent-soft); transform: translateY(-3px); }
.social-row svg { width: 18px; height: 18px; fill: currentColor; }

/* ----------------------------------------------------------------------------
   15. FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--bg-base); border-top: 1px solid var(--hair); padding-block: var(--space-10) var(--space-6); }
.footer__top { display: grid; gap: var(--space-8); }
@media (min-width: 760px) { .footer__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__logo { margin-bottom: var(--space-4); }
.footer__brand img { height: 30px; }
.footer__brand p { color: var(--text-dim); font-size: var(--fs-small); max-width: 34ch; }
.footer__tagline {
  font-family: var(--font-label);
  color: var(--text) !important;
  font-size: var(--fs-body);
  letter-spacing: .04em;
  margin-bottom: var(--space-1);
}
html[lang="ar"] .footer__tagline { letter-spacing: normal; font-weight: 600; }
.footer__desc { margin-top: 0; }
.footer__brand .social-row { margin-top: var(--space-5); }
/* Compact map under the Get in Touch details (kept small so it never dominates) */
.footer__map {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 200px;
  margin-top: var(--space-5);
  border: 0;
  border-radius: var(--radius);
  display: block;
}
.footer__col h4 { font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--space-4); font-family: var(--font-body); font-weight: 500; }
.footer__col ul { display: grid; gap: var(--space-3); }
.footer__col a { color: var(--text-dim); font-size: var(--fs-small); transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  justify-content: space-between; align-items: center;
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--hair);
  font-size: var(--fs-small);
  color: var(--text-faint);
}
.footer__credit { text-align: center; }
.footer__credit a { color: var(--accent); text-decoration: none; }
.footer__credit a:hover { text-decoration: underline; }

/* ----------------------------------------------------------------------------
   16. SCROLL-REVEAL  (driven by IntersectionObserver in main.js)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
/* Stagger children when parent has data-stagger */
[data-stagger] > .reveal { transition-delay: calc(var(--i, 0) * 90ms); }

/* ----------------------------------------------------------------------------
   17. NOSCRIPT FALLBACK  (nav/footer injected by JS; this shows if JS is off)
   -------------------------------------------------------------------------- */
.nojs-bar {
  background: var(--bg-base);
  border-bottom: 1px solid var(--hair);
  padding: var(--space-3) var(--space-4);
  text-align: center;
}
.nojs-bar a { color: var(--accent); margin-inline: var(--space-2); font-size: var(--fs-small); }

/* ----------------------------------------------------------------------------
   18. PORTFOLIO GRID  (interactive Work page — generated by js/work-grid.js)
   -------------------------------------------------------------------------- */
.portfolio-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 720px) { .portfolio-grid { grid-template-columns: 1fr 1fr; } }

.portfolio-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--bg-base);
  isolation: isolate;
  min-height: 280px;
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.portfolio-card--feature { grid-column: 1 / -1; }
.portfolio-card:hover,
.portfolio-card:focus-visible { transform: translateY(-5px); border-color: var(--accent-faint); box-shadow: var(--shadow); }

.portfolio-card__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.portfolio-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.portfolio-card:hover .portfolio-card__media img,
.portfolio-card:focus-visible .portfolio-card__media img { transform: scale(1.06); }

/* Burgundy overlay that fades in on hover */
.portfolio-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(var(--veil-core-rgb) / .30) 0%, rgb(var(--veil-rgb) / .78) 100%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.portfolio-card:hover .portfolio-card__overlay,
.portfolio-card:focus-visible .portfolio-card__overlay { opacity: 1; }

/* Always-visible bottom scrim so title/tag stay readable over any image */
.portfolio-card__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent 38%, rgb(var(--scrim-rgb) / .82) 100%);
}

.portfolio-card__body {
  position: relative;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  min-height: 280px;
  justify-content: flex-end;
}
.portfolio-card--feature .portfolio-card__body { min-height: 360px; }
@media (min-width: 720px) {
  .portfolio-card__body { min-height: 320px; }
  .portfolio-card--feature .portfolio-card__body { min-height: 440px; }
}
.portfolio-card__tag {
  font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--accent);
}
.portfolio-card__title { font-size: var(--fs-h3); line-height: var(--lh-snug); }

/* Description + cue: hidden by default, rise in on hover (desktop) */
.portfolio-card__reveal {
  display: grid;
  gap: var(--space-3);
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  overflow: hidden;
  transition: max-height .4s var(--ease), opacity .4s var(--ease), transform .4s var(--ease);
}
.portfolio-card:hover .portfolio-card__reveal,
.portfolio-card:focus-visible .portfolio-card__reveal {
  max-height: 160px; opacity: 1; transform: none;
}
.portfolio-card__desc { color: var(--text-dim); font-size: var(--fs-small); max-width: 48ch; }
.portfolio-card__cue {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--accent); font-size: var(--fs-small);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.portfolio-card__cue span { transition: transform .35s var(--ease); }
.portfolio-card:hover .portfolio-card__cue span { transform: translateX(5px); }

/* Touch / no-hover devices: always show the description + tap cue */
@media (hover: none) {
  .portfolio-card__reveal { max-height: 160px; opacity: 1; transform: none; }
  .portfolio-card__overlay { opacity: .55; }
}

/* ----------------------------------------------------------------------------
   19. CASE-STUDY PAGES  (work-<slug>.html — rendered by js/case-study.js)
   -------------------------------------------------------------------------- */
.cs-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-5); }
.cs-tag {
  font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--hair); border-radius: 100px;
  padding: var(--space-1) var(--space-4);
}
.cs-facts {
  display: grid; gap: var(--space-5);
  grid-template-columns: 1fr 1fr;
  max-width: 720px; margin: var(--space-8) auto 0;
  text-align: start;
}
@media (min-width: 720px) { .cs-facts { grid-template-columns: repeat(4, 1fr); } }
.cs-facts dt { font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--space-1); }
.cs-facts dd { font-size: var(--fs-small); color: var(--text); }

.cs-block { max-width: 64ch; }
.cs-block + .cs-block { margin-top: var(--space-8); }
.cs-block__h { font-size: var(--fs-h3); color: var(--text); margin-bottom: var(--space-3); }
.cs-block__h::before {
  content: ""; display: block; width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent); margin-bottom: var(--space-4);
}
.cs-block p { color: var(--text-dim); }

/* Gallery */
/* --- Featured project block on a service page -----------------------------
   Whole block is one link. Stacks on mobile, side-by-side from 780px. */
.sd-featured {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-lift) 0%, var(--bg-mid) 100%);
  transition: transform .45s var(--ease), border-color .45s var(--ease),
              box-shadow .45s var(--ease);
}
.sd-featured:hover {
  transform: translateY(-4px);
  border-color: var(--accent-faint);
  box-shadow: 0 22px 48px -24px rgb(var(--shadow-rgb) / .6);
}
.sd-featured__media { overflow: hidden; aspect-ratio: 3 / 2; }
.sd-featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.sd-featured:hover .sd-featured__media img { transform: scale(1.04); }
.sd-featured__body { padding: 0 var(--space-6) var(--space-6); }
.sd-featured__title { font-size: var(--fs-h3); margin-top: var(--space-2); }
.sd-featured__text { color: var(--text-dim); margin-top: var(--space-4); }
.sd-featured__cue { margin-top: var(--space-5); display: inline-flex; }
@media (min-width: 780px) {
  .sd-featured { grid-template-columns: 1.1fr 1fr; }
  .sd-featured__media { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .sd-featured__body { padding: var(--space-8) var(--space-8) var(--space-8) 0; }
  [dir="rtl"] .sd-featured__body { padding: var(--space-8) 0 var(--space-8) var(--space-8); }
}

/* --- Case-study project video (portrait 9:16) -----------------------------
   Sized by HEIGHT, not width, so a tall clip can never take over a small
   screen: the frame is capped at 68vh (and 620px), and the width follows from
   the aspect ratio. At 360px wide that lands ~330x587 — large enough to read,
   short enough to leave the page scrollable around it. */
.cs-video { margin: 0; }
.cs-video__frame {
  /* Derive WIDTH from the height cap, then let aspect-ratio set the height.
     Doing it this way (rather than height + max-width) keeps the box exactly
     9:16 at every size — a clamped width with a fixed height would leave
     object-fit:cover shaving a sliver off the frame on narrow phones. */
  width: min(100%, calc(min(68vh, 620px) * 9 / 16));
  aspect-ratio: 9 / 16;
  margin-inline: auto;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-base);
}
/* Landscape variant (16:9) — used by DCCP's expo walkthrough. */
.cs-video__frame--wide {
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
}
.cs-video__el { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-video__caption {
  margin-top: var(--space-4);
  text-align: center;
  color: var(--text-dim);
  font-size: var(--fs-small);
}
/* Very short viewports (landscape phones): cap harder so the clip still fits. */
@media (max-height: 520px) {
  .cs-video__frame { width: min(100%, 240px); }
}

.cs-gallery { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .cs-gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .cs-gallery { grid-template-columns: repeat(3, 1fr); } }
.cs-gallery__item {
  position: relative; padding: 0; border: 1px solid var(--hair); background: var(--bg-base);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 3 / 2;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.cs-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cs-gallery__item:hover { border-color: var(--accent-faint); }
.cs-gallery__item:hover img { transform: scale(1.05); }

/* Next / back nav */
.cs-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-5);
  justify-content: space-between; align-items: center;
  border-top: 1px solid var(--hair); padding-top: var(--space-8); margin-top: var(--space-10);
}
.cs-next { text-align: end; }
.cs-next__label { display: block; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); }
.cs-next__title { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--text); transition: color .3s var(--ease); }
.cs-next:hover .cs-next__title { color: var(--accent); }

/* ----------------------------------------------------------------------------
   20. LIGHTBOX  (vanilla — built by js/case-study.js)
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgb(var(--lightbox-rgb) / .92);
  backdrop-filter: blur(6px);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox__stage { max-width: min(1100px, 92vw); max-height: 86vh; display: flex; flex-direction: column; gap: var(--space-3); margin: 0; }
.lightbox__img { max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__caption { text-align: center; color: var(--text-dim); font-size: var(--fs-small); }
.lightbox__close {
  position: absolute; top: clamp(.75rem, 3vw, 1.5rem); inset-inline-end: clamp(.75rem, 3vw, 1.5rem);
  width: 48px; height: 48px; font-size: 2rem; line-height: 1;
  background: none; border: 0; color: var(--text); cursor: pointer; transition: color .3s var(--ease);
}
.lightbox__close:hover { color: var(--accent); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; font-size: 2rem; line-height: 1;
  background: rgb(var(--text-rgb) / .06); border: 1px solid var(--hair); border-radius: 50%;
  color: var(--text); cursor: pointer; transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.lightbox__nav:hover { background: var(--accent-faint); border-color: var(--accent-soft); }
.lightbox__prev { inset-inline-start: clamp(.5rem, 3vw, 2rem); }
.lightbox__next { inset-inline-end: clamp(.5rem, 3vw, 2rem); }

/* ----------------------------------------------------------------------------
   21. SERVICE-DETAIL PAGES  (service-<pillar>.html — rendered by service-detail.js)
   -------------------------------------------------------------------------- */
.sd-num {
  display: block;
  font-size: clamp(3rem, 2rem + 6vw, 6rem);
  line-height: 1;
  color: var(--accent);
  font-style: italic;
  opacity: .9;
  margin-bottom: var(--space-3);
}
.sd-hero .eyebrow { margin-bottom: var(--space-4); }

/* Sub-service cards reuse .card; this just lays them out and tightens type */
.sd-subservices { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 620px) { .sd-subservices { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .sd-subservices { grid-template-columns: repeat(3, 1fr); } }
.sd-sub__title { font-size: var(--fs-h3); margin-top: var(--space-2); }

/* Gallery */
.sd-gallery { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .sd-gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .sd-gallery { grid-template-columns: repeat(3, 1fr); } }
.sd-shot {
  margin: 0; border: 1px solid var(--hair); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-base); aspect-ratio: 3 / 2;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.sd-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.sd-shot:hover { transform: translateY(-4px); border-color: var(--accent-faint); }
.sd-shot:hover img { transform: scale(1.05); }

/* Other-pillars nav */
.sd-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-5);
  justify-content: space-between; align-items: center;
  border-top: 1px solid var(--hair); padding-top: var(--space-8); margin-top: var(--space-10);
}
.sd-others { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.sd-other__label { display: block; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-faint); }
.sd-other__name { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--text); transition: color .3s var(--ease); }
.sd-other:hover .sd-other__name { color: var(--accent); }

/* Core-service blocks (heading + description + "Includes" bullet list) */
.sd-core-grid { align-items: start; }
.sd-core { display: flex; flex-direction: column; }
.sd-core__title { font-size: var(--fs-h3); margin-top: var(--space-2); }
.sd-core__label {
  margin-top: var(--space-6);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}
.sd-core__list {
  margin-top: var(--space-3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-5);
}
.sd-core__list li {
  position: relative;
  padding-inline-start: var(--space-4);
  font-size: var(--fs-small);
  color: var(--text-dim);
}
.sd-core__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: .55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 520px) { .sd-core__list { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   22. REDUCED MOTION — disable particle field + reveals + smooth scroll
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-cue i { animation: none; }
  .hero__canvas { display: none; }
  .hero__video { display: none; }
  /* No header video for reduced-motion users — the static image stays */
  .page-hero__video { display: none; }
  .hero.has-video .hero__bg { opacity: 1; }
  /* Show portfolio card detail without relying on hover animation */
  .portfolio-card__reveal { max-height: 160px; opacity: 1; transform: none; }
  .portfolio-card__media img,
  .portfolio-card:hover .portfolio-card__media img,
  .cs-gallery__item:hover img { transform: none; }
}

/* ----------------------------------------------------------------------------
   23. ARABIC / RTL LAYER
   ----------------------------------------------------------------------------
   Everything above uses logical properties (margin-inline, padding-inline,
   inset-inline-*, text-align:start/end) so the layout mirrors automatically.
   This block only handles what logical properties CANNOT flip:
     • direction-baked gradients          • transform-origin / translateX
     • the off-canvas mobile drawer       • directional arrow glyphs
   …plus Arabic typography (font, line-height, letter-spacing).
   Scoped entirely to [dir="rtl"] — the English site is untouched.
   -------------------------------------------------------------------------- */

/* --- Arabic typography ---------------------------------------------------- */
[dir="rtl"] {
  /* Latin first so "SANAD", numbers and +964… keep the brand face;
     Arabic glyphs fall through to IBM Plex Sans Arabic. */
  --font-body:    'Outfit', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-display: 'IBM Plex Sans Arabic', 'Outfit', system-ui, sans-serif;

  /* Arabic needs more vertical breathing room than Latin */
  --lh-tight: 1.35;
  --lh-snug:  1.55;
  --lh-body:  1.95;

  /* Arabic script is cursive — letter-spacing breaks the joins. Kill it. */
  --tracking-eyebrow: 0;
  --tracking-label:   0;

  /* Arabic reads slightly small at Latin sizes — nudge up */
  --fs-small: .95rem;
  --fs-body:  clamp(1.05rem, 1rem + .25vw, 1.2rem);
  --fs-lead:  clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
}
/* Any hard-coded tracking must also be neutralised for Arabic */
[dir="rtl"] .display,
[dir="rtl"] .accent,
[dir="rtl"] .hero__eyebrow,
[dir="rtl"] .hero__pillars,
[dir="rtl"] .nav__links a,
[dir="rtl"] .btn,
[dir="rtl"] .eyebrow { letter-spacing: normal; }
/* Arabic has no true italic — faux-slanting looks broken */
[dir="rtl"] .accent { font-style: normal; font-weight: 600; }
[dir="rtl"] .display,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-weight: 600; }
/* Keep Latin runs (brand name, numbers, email, +964…) rendering LTR inside RTL */
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] a[href^="tel:"], [dir="rtl"] a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* --- Gradients that encode a direction ------------------------------------ */
[dir="rtl"] .gold-rule { background: linear-gradient(270deg, var(--accent), transparent); }
[dir="rtl"] .cs-block__h::before { background: linear-gradient(270deg, var(--accent), transparent); }
[dir="rtl"] .card::before { background: linear-gradient(270deg, var(--accent), transparent) top right / 0 1px no-repeat; }

/* --- transform-origin / directional motion -------------------------------- */
[dir="rtl"] .link-wipe::after { transform-origin: left; }
[dir="rtl"] .link-wipe:hover::after,
[dir="rtl"] .link-wipe:focus-visible::after { transform-origin: right; }

/* --- Off-canvas mobile drawer slides in from the right in RTL ------------- */
[dir="rtl"] .nav__mobile { transform: translateX(-100%); }
[dir="rtl"] .nav__mobile.is-open { transform: translateX(0); }

/* --- Directional glyphs: mirror arrows/chevrons --------------------------- */
[dir="rtl"] .arrow-link span,
[dir="rtl"] .portfolio-card__cue span,
[dir="rtl"] .cs-next__title span,
[dir="rtl"] .sd-other__name span { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .arrow-link:hover span { transform: scaleX(-1) translateX(5px); }
[dir="rtl"] .portfolio-card:hover .portfolio-card__cue span { transform: scaleX(-1) translateX(5px); }
/* Lightbox prev/next chevrons swap sides via inset-inline-*, flip the glyph too */
[dir="rtl"] .lightbox__nav { transform: scaleX(-1); }

/* --- Language switcher ---------------------------------------------------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-inline-start: var(--space-5);
}
.lang-switch a { color: var(--text-faint); transition: color .3s var(--ease); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch .is-active { color: var(--text); }
.lang-switch__sep { opacity: .45; }
[dir="rtl"] .lang-switch { letter-spacing: .08em; }
.nav__mobile .lang-switch { margin-inline-start: 0; margin-top: var(--space-6); font-size: var(--fs-small); }
.footer__col .lang-switch { margin-inline-start: 0; margin-top: var(--space-4); }
