/* ============================================================
   ISIN Law Firms — style.css
   Token system per spec §3/§4. No substitutions.
   ============================================================ */

:root {
  --brown:  #262322;  /* primary text, headings (charcoal) */
  --olive:  #6E6862;  /* secondary text, 18px+ only (warm gray) */
  --sand:   #E4D3B0;  /* surface + text-on-dark ONLY (warm cream) */
  --green:  #5A1B24;  /* accent, dark sections, links (burgundy) */
  --white:  #F6F1E9;  /* soft warm surfaces, cards */
  --page:   #E9E3D9;  /* warm ground — a touch darker/softer */
  --panel:  #DED7CB;  /* deeper neutral — section panels */
  --rule:   #D5CDBF;  /* hairline */

  --font-ar: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-en: 'IBM Plex Sans', system-ui, sans-serif;

  --pad-page: clamp(20px, 5vw, 72px);
  --maxw: 1440px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-ar);
  background: var(--page);
  color: var(--brown);
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

/* Latin runs use the Latin superfamily member */
[lang="en"] { font-family: var(--font-en); }

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

/* Focus ring — 2px green, 2px offset, everywhere interactive */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Utility labels ---------- */
.util-en,
.brand-en,
.scroll-cue,
.hero-subject-en,
.area-en,
.hero-nav a {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--font-en);
}
/* Arabic utility labels: 13px, weight 500, NO tracking (never letter-space Arabic) */
.hero-nav a,
.brand-ar,
.hero-subject-ar {
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   7.1 HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 34px) var(--pad-page) clamp(28px, 5vh, 60px);
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0;
}

/* --- grid hairlines --- */
.grid-rules { position: absolute; inset: 0; pointer-events: none; }
.grid-rules .vrule,
.grid-rules .hrule { position: absolute; background: var(--rule); }
.grid-rules .vrule { inline-size: 1px; inset-block: 0; transform-origin: top; }
.grid-rules .hrule { block-size: 1px; inset-inline: 0; transform-origin: right; }
.vrule-1 { inset-inline-start: 33.333%; }
.vrule-2 { inset-inline-start: 66.666%; }
.hrule-1 { inset-block-start: 30%; }
.hrule-2 { inset-block-start: 66%; }

/* --- top bar --- */
.hero-top {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 2;
}
.brand-lockup { display: inline-flex; flex-direction: column; line-height: 1.15; }
.brand-ar { color: var(--brown); }
.brand-en { color: var(--olive); margin-block-start: 2px; }

.hero-nav { display: flex; gap: clamp(14px, 3vw, 40px); flex-wrap: wrap; }
.hero-nav a { color: var(--brown); transition: opacity .2s; }
.hero-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.scroll-cue { color: var(--olive); align-self: flex-start; }

/* --- upper-right sub-label (RTL: column 1 = rightmost) --- */
.hero-subject {
  grid-column: 1 / 2;
  grid-row: 2;
  align-self: start;
  padding-block-start: clamp(20px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
}
.hero-subject-ar { color: var(--brown); font-size: clamp(15px, 2vw, 20px); font-weight: 500; }
.hero-subject-en { color: var(--olive); }

/* --- the arch --- */
.arch-hero {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  align-self: center;
  justify-self: center;
  inline-size: clamp(180px, 22vw, 280px);
  aspect-ratio: 280 / 400;
  position: relative;
  z-index: 1;
  will-change: transform;
}
.arch-svg { inline-size: 100%; block-size: 100%; display: block; }
.arch-video {
  inline-size: 280px; block-size: 400px;
  object-fit: cover;
  filter: url(#duotone-hero);
}
.arch-outline { stroke: var(--rule); stroke-width: 1; }

/* Brand logo framed in the signature ARCH (pillars hold up arches) — gold keyline + sheen */
.arch-hero.has-logo {
  aspect-ratio: 280 / 340;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}
.logo-arch {
  inline-size: 100%;
  block-size: 100%;
  display: block;
  filter: drop-shadow(0 20px 38px rgba(20, 15, 10, 0.42));   /* shaped lift, follows the arch */
}
.logo-sheen {
  transform: translateX(-280px);
  animation: logo-sheen 6s ease-in-out infinite;
}
@keyframes logo-sheen {
  0%, 55%   { transform: translateX(-280px); }
  80%, 100% { transform: translateX(280px); }
}
@media (prefers-reduced-motion: reduce) { .logo-sheen { display: none; } }

/* ============================================================
   THEME TOGGLE + DARK MODE (black & gold) — an alternate theme.
   Light stays the default; toggling adds data-theme="dark".
   ============================================================ */
.theme-toggle {
  inline-size: 40px; block-size: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brown);
  transition: color .2s ease;
}
.theme-toggle:hover { color: var(--green); }
.theme-toggle svg { inline-size: 20px; block-size: 20px; }
.theme-toggle .ic-sun { display: none; }
.theme-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun  { display: inline; }

/* ---- Gold scroll-progress line (top of page) ---- */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  z-index: 101;                    /* just above the fixed nav */
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #A9814F, #E4C77A);
  pointer-events: none;
}

/* ---- Brand intro veil (plays once per browsing session) ---- */
.intro-veil {
  position: fixed; inset: 0; z-index: 9999;
  background: #0F0C0A;
  display: grid; place-items: center;
  animation: veil-out .6s ease 1.5s forwards;
}
.intro-logo {
  inline-size: clamp(150px, 30vw, 250px);
  block-size: auto;
  filter: drop-shadow(0 0 30px rgba(201, 162, 75, 0.25));
  animation: veil-logo .8s ease both;
}
@keyframes veil-logo { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes veil-out  { to { opacity: 0; visibility: hidden; } }
.intro-seen .intro-veil { display: none; }
@media (prefers-reduced-motion: reduce) { .intro-veil { display: none; } }

/* Animated theme switch — circular reveal driven by JS (View Transitions API).
   New theme sits on top and its clip-path circle is expanded from the toggle. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }
::view-transition-old(root) { z-index: 0; }

/* ---- Dark palette (matches the logo's black ground) ---- */
:root[data-theme="dark"] {
  --brown:  #ECE3D2;   /* primary text -> warm cream */
  --olive:  #ADA089;   /* secondary   -> muted warm */
  --sand:   #E4D3B0;   /* cream, text on dark bands */
  --green:  #7A2531;   /* accent / dark bands -> brighter burgundy for black */
  --white:  #1C1712;   /* cards */
  --page:   #0F0C0A;   /* near-black (logo ground) */
  --panel:  #17120F;   /* lifted panel */
  --rule:   #38302A;   /* dark hairline */
}

/* subtle carbon-fibre weave on the dark ground */
:root[data-theme="dark"] body {
  background-color: var(--page);
  background-image:
    repeating-linear-gradient(45deg,  rgba(201, 162, 75, 0.030) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.020) 0 1px, transparent 1px 3px);
  background-size: 4px 4px;
}

/* black & gold: gold wordmark + section headings in dark mode */
:root[data-theme="dark"] .display-word,
:root[data-theme="dark"] .section-heading { color: #C9A24B; }

/* gold glow to separate the black logo arch from the dark page */
:root[data-theme="dark"] .logo-arch {
  filter: drop-shadow(0 0 20px rgba(201, 162, 75, 0.45))
          drop-shadow(0 14px 30px rgba(0, 0, 0, 0.60));
}

/* gold CTAs in dark mode */
:root[data-theme="dark"] .wa-button { background: #C9A24B; color: #14100E; }
:root[data-theme="dark"] .wa-button:hover { background: #D9B45E; }
:root[data-theme="dark"] .wa-float { background: #C9A24B; }
:root[data-theme="dark"] .wa-float:hover { background: #D9B45E; }

/* ---- Dark-mode hint toast (bottom-left, clear of the WhatsApp button) ---- */
.theme-hint {
  position: fixed;
  inset-block-end: clamp(18px, 3vh, 28px);
  left: clamp(18px, 3vw, 28px);
  z-index: 95;
  display: flex;
  align-items: stretch;
  max-inline-size: calc(100vw - 96px);
  background: #14100E;
  color: #E4D3B0;
  border: 1px solid rgba(201, 162, 75, 0.5);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: hint-in .5s ease both, hint-pulse 2.4s ease-in-out 1.1s 2;
}
.theme-hint[hidden] { display: none; }
.theme-hint-main {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; color: inherit;
  font-family: var(--font-ar); font-size: 14px; font-weight: 500;
  padding: 12px 18px;
}
.theme-hint-main svg { inline-size: 18px; block-size: 18px; color: #C9A24B; flex: none; }
.theme-hint-text { white-space: nowrap; }
.theme-hint-main:hover { background: rgba(201, 162, 75, 0.12); }
.theme-hint-close {
  display: inline-flex; align-items: center; justify-content: center;
  inline-size: 40px; flex: none;
  background: none; border: 0; border-inline-start: 1px solid rgba(201, 162, 75, 0.25);
  color: inherit; cursor: pointer;
}
.theme-hint-close svg { inline-size: 14px; block-size: 14px; }
.theme-hint-close:hover { background: rgba(201, 162, 75, 0.12); }
.theme-hint button:focus-visible { outline: 2px solid #C9A24B; outline-offset: -3px; }

@keyframes hint-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hint-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
  50%      { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 5px rgba(201, 162, 75, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  .theme-hint { animation: none; }
}

/* --- display line --- */
.hero-display {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: start;   /* RTL: start = right edge */
  text-align: start;
  position: relative;
  z-index: 2;
}
.display-word {
  font-family: var(--font-ar);
  font-size: clamp(72px, 14vw, 180px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--green);           /* burgundy wordmark — makes أيسن / ISIN pop */
}
.display-inner { display: inline-block; }
.firm-full {
  color: var(--olive);
  font-size: 18px;
  font-weight: 400;
  max-inline-size: 30ch;
  margin-block-start: clamp(8px, 1.4vh, 16px);
}

/* --- lower-left EN paragraph (RTL: column 3 = leftmost) --- */
.hero-lede {
  grid-column: 3 / 4;
  grid-row: 3;
  align-self: end;
  max-inline-size: 34ch;
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.6;
  color: var(--brown);
  position: relative;
  z-index: 2;
}
.hero-lede .accent { color: var(--green); }

/* ============================================================
   Section shell
   ============================================================ */
.section-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(64px, 12vh, 140px) var(--pad-page);
}
.section-heading {
  font-family: var(--font-ar);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--green);           /* burgundy headings — match the ISIN wordmark */
}

/* ---------------- 7.2 About ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
/* natural DOM order: head first = right column in RTL, body = left */
.about-body { display: flex; flex-direction: column; gap: 1.4em; }
.about-body p { color: var(--brown); font-size: 18px; line-height: 1.9; max-inline-size: 46ch; }

/* ---------------- 7.3 Director ---------------- */
.director { background: var(--panel); }
.director-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.director-name {
  font-family: var(--font-ar);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--brown);
}
.director-role { color: var(--olive); font-size: 18px; margin-block-start: 8px; }

.cred-block { margin-block-start: clamp(28px, 4vh, 48px); }
.cred-title {
  font-family: var(--font-ar);
  font-size: 13px; font-weight: 500;
  color: var(--olive);
  margin-block-end: 14px;
}
.cred-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cred-list li {
  font-size: 18px; color: var(--brown);
  padding-inline-start: 18px;
  position: relative;
}
.cred-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.85em;
  inline-size: 6px; block-size: 6px; background: var(--olive);
}

/* timeline — rule on the RIGHT edge (RTL = inline-start) */
.timeline {
  list-style: none;
  position: relative;
  padding-inline-start: clamp(18px, 3vw, 32px);
  margin-inline-start: 2px;
}
.timeline::before {
  content: ""; position: absolute;
  inset-inline-start: 0; inset-block: 4px;
  inline-size: 0.5px; background: var(--rule);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 7ch 1fr;
  gap: 14px;
  align-items: baseline;
  padding-block: 10px;
}
.timeline-item::before {
  content: ""; position: absolute;
  inset-inline-start: calc(clamp(18px, 3vw, 32px) * -1 - 3px);
  inset-block-start: 1.15em;
  inline-size: 6px; block-size: 6px; border-radius: 50%;
  background: var(--brown);
}
.timeline-date {
  color: var(--brown); font-weight: 500; font-size: 16px;
  text-align: start; font-variant-numeric: normal;
}
.timeline-role { color: var(--olive); font-size: 18px; line-height: 1.5; }
.timeline-item--undated .timeline-date { color: var(--olive); }

/* left column: portrait stacked over an atmospheric clip */
.director-media {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 44px);
  align-items: start;                        /* RTL start = right, toward the bio */
}

/* portrait — an elegant matted frame; rectangular (no radius, no arch) */
.director-portrait {
  align-self: start;
  max-inline-size: clamp(190px, 23vw, 280px);
  position: relative;
  padding: clamp(10px, 1vw, 16px);          /* the mat */
  background: var(--white);
  border: 1px solid var(--olive);          /* the frame edge */
  /* warm sand backing block, peeking toward the outer-lower edge */
  box-shadow: -18px 18px 0 0 var(--sand);
}
.director-portrait img {
  inline-size: 100%; block-size: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(0.15) contrast(1.02);
  border: 1px solid var(--rule);           /* keyline between mat and photo */
}

/* atmospheric consultation clip — duotone-graded, looped, muted */
.director-clip {
  margin: 0;
  max-inline-size: clamp(200px, 24vw, 300px);
}
.clip-video {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: url(#duotone-hero);              /* brown→sand grade, matches the hero arch */
}
.clip-cap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-block-start: 10px;
}
.clip-cap-ar { font-family: var(--font-ar); font-size: 13px; font-weight: 500; color: var(--brown); }
.clip-cap-en {
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--olive);
}

/* ---------------- 7.4 Practice areas ---------------- */
.areas-head { margin-block-end: clamp(32px, 6vh, 64px); }
.areas-sub { color: var(--olive); font-size: 18px; margin-block-start: 10px; }
.areas-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-block-start: 0.5px solid var(--rule);
  border-inline-start: 0.5px solid var(--rule);
}
.area-card {
  background: var(--white);
  border-inline-end: 0.5px solid var(--rule);
  border-block-end: 0.5px solid var(--rule);
  padding: clamp(24px, 2.4vw, 40px);
  min-block-size: clamp(150px, 18vh, 210px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.area-card:hover {
  border-color: var(--rule);
  background-color: color-mix(in srgb, var(--white) 88%, #C5A05A 12%);
  box-shadow: inset 0 -3px 0 0 #C5A05A;          /* gold accent bar on hover */
}
.area-card:hover .area-en { color: #C5A05A; }
.area-ar { font-size: clamp(17px, 1.5vw, 20px); font-weight: 500; color: var(--brown); line-height: 1.5; }
.area-ar[lang="en"] { font-family: var(--font-en); }   /* English-page cards use the Latin superfamily */
.area-en { color: var(--olive); }

/* ---------------- 7.5 Video field ---------------- */
.videofield {
  position: relative;
  background: var(--green);
  block-size: 100vh;
  overflow: hidden;
}
.videofield-stage { position: absolute; inset: 0; }
.videofield-video {
  position: absolute; inset: 0;
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  filter: url(#duotone-video);
}
.videofield-mask {
  position: absolute; inset: 0;
  inline-size: 100%; block-size: 100%;
}
.videofield-mask rect[fill] { fill: var(--green); }
.videofield-line {
  position: absolute;
  inset-block-end: 12%;
  inset-inline: 0;
  text-align: center;                    /* direction-agnostic centering */
  font-family: var(--font-ar);
  font-size: clamp(28px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--sand);                    /* sand on green — the one allowed place */
  white-space: nowrap;
  will-change: transform;
}

/* ---------------- 7.6 Contact ---------------- */
.contact { background: var(--panel); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: stretch;
}
.contact-list { margin-block-start: clamp(28px, 4vh, 44px); }
.contact-row { display: grid; grid-template-columns: 12ch 1fr; gap: 16px; padding-block: 16px; border-block-end: 1px solid var(--rule); }
.contact-row dt { color: var(--olive); font-size: 16px; }
.contact-row dd { color: var(--brown); font-size: 18px; }
.contact-row a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.contact-row a:hover { text-decoration-thickness: 2px; }

.wa-button {
  display: inline-flex; align-items: center; justify-content: center;
  margin-block-start: clamp(24px, 4vh, 40px);
  padding: 16px 32px;
  background: var(--brown);              /* green reserved for the 3 accents */
  color: var(--page);
  font-family: var(--font-ar);
  font-size: 18px; font-weight: 500;
  transition: background .2s;
}
.wa-button:hover { background: #171412; }

.contact-map {
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: clamp(28px, 5vw, 56px);
  min-block-size: 260px;
  transition: border-color .2s;
}
.contact-map:hover { border-color: var(--olive); }
.map-label { color: var(--olive); font-size: 13px; font-weight: 500; }
.map-address { color: var(--brown); font-size: 18px; }
.map-cta { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; font-size: 16px; margin-block-start: 4px; }
.contact-map:hover .map-cta { text-decoration: underline; }

/* ---------------- 7.7 Footer ---------------- */
.site-footer {
  background: var(--green);
  color: var(--sand);
  text-align: center;
  padding: clamp(32px, 6vh, 56px) var(--pad-page);
}
.site-footer p { font-size: 15px; color: var(--sand); }

/* ---------------- maker's-mark colophon ---------------- */
.credit {
  background-color: #14130F;                       /* deep warm ink */
  background-image: repeating-linear-gradient(     /* faint grain */
    45deg, rgba(228, 211, 176, 0.03) 0 1px, transparent 1px 7px);
  padding: 14px var(--pad-page);
  text-align: center;
}
.credit-line {
  font-family: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: rgba(228, 211, 176, 0.6);                 /* muted sand — quiet but legible */
}
.credit-name {
  font-family: var(--font-ar);
  letter-spacing: 0;                               /* never letter-space Arabic */
  color: rgba(228, 211, 176, 0.78);
}
.credit-sep { opacity: 0.4; margin-inline: 4px; }
.credit-line a { color: rgba(228, 211, 176, 0.78); text-decoration: none; }
.credit-line a:hover { color: var(--sand); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Editorial additions: mastheads, hero marginalia, pull-quote
   ============================================================ */

/* Section masthead: index + eyebrow + arch tick on a hairline */
.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block-end: 14px;
  margin-block-end: clamp(28px, 5vh, 56px);
  border-block-end: 1px solid var(--rule);
}
.masthead-index {
  font-family: var(--font-ar);
  font-size: 14px; font-weight: 600;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
}
.masthead-label {
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--olive);
}
.masthead-tick {
  margin-inline-start: auto;         /* pushes the arch to the far (left) end in RTL */
  inline-size: 22px; block-size: 16px;
  overflow: visible;
}
.masthead-tick path { stroke: var(--olive); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Hero marginalia — real info populating the empty cells */
.hero-geo {
  grid-column: 3 / 4;                /* leftmost cell in RTL */
  grid-row: 2;
  align-self: end;
  display: flex; flex-direction: column; gap: 3px;
  position: relative; z-index: 2;
  padding-block-end: clamp(12px, 4vh, 44px);
}
.hero-geo-city { font-family: var(--font-ar); font-size: 13px; font-weight: 500; color: var(--brown); }
.hero-geo-coords { font-family: var(--font-en); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; color: var(--olive); }

.hero-vlabel {
  position: absolute;
  /* physical left/top: the element's own vertical writing-mode makes logical
     insets resolve against its vertical axis, so we pin it physically here */
  left: clamp(4px, 1.2vw, 16px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--olive);
  z-index: 1; pointer-events: none;
}

/* Pull-quote — one large declarative line anchoring the About section */
.pull-quote {
  margin-block-start: clamp(48px, 8vh, 96px);
  max-inline-size: 32ch;
  font-family: var(--font-ar);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--brown);
  position: relative;
  padding-inline-start: 22px;        /* room for the start-side (right) bar in RTL */
}
.pull-quote::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;             /* right edge in RTL */
  inset-block: 8px;
  inline-size: 2px;
  background: var(--olive);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about-grid,
  .director-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-head { order: 1; }
  .about-body { order: 2; }
  .director-media { order: -1; }
  .director-portrait { max-inline-size: 260px; }
  .director-clip { max-inline-size: 320px; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }

  /* hero: clean vertical stack on ALL phone / landscape / foldable widths,
     so the desktop 3-column grid can never crowd the أيسن wordmark. The
     ≤560 block below further refines sizes for small phones. */
  .grid-rules { display: none; }
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    gap: 4px;
    padding-block-start: 20px;
  }
  .hero-nav { display: none; }
  .hero-subject { align-self: stretch; padding-block-start: 16px; }
  .arch-hero { align-self: center; inline-size: clamp(170px, 30vw, 240px); margin-block: 28px; }
  .hero-display { align-self: stretch; }
  .hero-lede { position: static; max-inline-size: none; margin-block-start: 24px; }
  .display-word { font-size: clamp(56px, 11vw, 104px); }
  .firm-full { font-size: 16px; }
  .hero-vlabel { display: none; }
  .hero-geo { align-self: start; padding-block-end: 0; margin-block-start: 20px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }

  /* tighter vertical rhythm on phones */
  .section-inner { padding-block: clamp(48px, 9vh, 72px); }

  /* hero: a clean vertical stack instead of the 3-col grid */
  .grid-rules { display: none; }          /* rules disappear on phones (spec §12) */
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    gap: 4px;
    padding-block-start: 20px;
  }
  .hero-nav { display: none; }
  .hero-subject { align-self: stretch; padding-block-start: 16px; }
  .arch-hero {
    align-self: center;
    inline-size: clamp(150px, 46vw, 190px);
    margin-block: 28px;
  }
  .hero-display { align-self: stretch; }
  .hero-lede { position: static; max-inline-size: none; margin-block-start: 24px; }

  /* make the big thing smaller: the display word no longer dominates */
  .display-word { font-size: clamp(52px, 16vw, 82px); }
  .firm-full { font-size: 16px; }

  /* make the small things bigger: labels & subtitles get legible sizes */
  .brand-en, .scroll-cue, .hero-subject-en, .area-en { font-size: 12px; letter-spacing: 0.1em; }
  .brand-ar, .hero-subject-ar { font-size: 15px; }

  /* headings sized for narrow screens */
  .section-heading { font-size: clamp(28px, 8vw, 36px); }
  .director-name { font-size: clamp(26px, 7.5vw, 34px); }
  .areas-sub, .director-role { font-size: 16px; }

  /* practice areas: one column, comfortable cards, larger subtitle */
  .areas-grid { grid-template-columns: 1fr; }
  .area-card { min-block-size: auto; padding: 22px; gap: 10px; }
  .area-ar { font-size: 18px; }

  /* contact: stacked rows + full-width tap target */
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
  .contact-row dt { font-size: 13px; }
  .wa-button { inline-size: 100%; }
  .contact-map { min-block-size: 200px; }

  /* editorial additions on phones */
  .hero-vlabel { display: none; }                 /* vertical spine has no room */
  .hero-geo { align-self: start; padding-block-end: 0; margin-block-start: 20px; }
  .hero-geo-city, .brand-ar, .hero-subject-ar { font-size: 15px; }
  .masthead { margin-block-end: 28px; }
  .pull-quote { max-inline-size: none; margin-block-start: 40px; padding-inline-start: 16px; }
}

/* Reduced motion: nothing transforms; video still plays (handled in JS too) */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ============================================================
   NAVIGATION (additive — remove this block + the <header>/drawer
   markup + the nav JS block to restore the original site)
   ============================================================ */
.site-nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  block-size: 72px;
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  padding-inline: var(--pad-page);
  /* subtle over the hero: page bg at ~90% + blur, hero shows faintly through */
  background-color: color-mix(in srgb, var(--page) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-block-end: 0.5px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.site-nav.is-solid {                       /* scrolled past the hero */
  background-color: var(--page);
  border-block-end: 0.5px solid var(--rule);
}

/* logo — inline-start (right in RTL) */
.nav-logo { display: inline-flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.nav-logo-ar { font-family: var(--font-ar); font-size: 20px; font-weight: 600; letter-spacing: 0; color: var(--brown); }
.nav-logo-en { font-family: var(--font-en); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--olive); margin-block-start: 1px; }

/* desktop links — flow to the inline-end, RTL order preserved by source */
.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); margin-inline-start: auto; }
.nav-link {
  font-family: var(--font-ar);
  font-size: 16px; font-weight: 500;
  color: var(--olive);
  text-decoration: none;
  padding-block: 6px;
  position: relative;
  transition: color .2s ease;
}
.nav-link:hover { color: var(--brown); }
.nav-link.is-active { color: var(--brown); font-weight: 600; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  block-size: 2px;
  background: var(--green);           /* accent — one of its permitted uses */
}

/* focus rings on every new interactive element */
.nav-logo:focus-visible,
.nav-link:focus-visible,
.nav-burger:focus-visible,
.nav-close:focus-visible,
.nav-dlink:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* hamburger — desktop hidden */
.nav-burger { display: none; }

/* scrim */
.nav-scrim {
  position: fixed; inset: 0; z-index: 110;
  background: color-mix(in srgb, var(--green) 35%, transparent);
  opacity: 0; transition: opacity .3s ease;
}
.nav-scrim.is-open { opacity: 1; }
.nav-scrim[hidden] { display: none; }

/* drawer — anchored to the inline-start (right) edge, slides in from the right */
.nav-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 120;
  inline-size: 82vw; max-inline-size: 420px;
  background: var(--panel);
  padding: clamp(24px, 6vw, 48px);
  display: flex; flex-direction: column;
  transform: translateX(100%);          /* off-screen toward the start (right) edge */
  transition: transform .34s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.nav-drawer.is-open { transform: translateX(0); }
/* LTR (English page): the drawer's start edge is the LEFT, so it must hide off
   the left — translateX(100%) would push it INTO view on an LTR layout. */
[dir="ltr"] .nav-drawer { transform: translateX(-100%); }
[dir="ltr"] .nav-drawer.is-open { transform: translateX(0); }
.nav-close {
  align-self: flex-end;                 /* RTL: end = left → top-left of the drawer */
  inline-size: 44px; block-size: 44px;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.nav-close span {
  position: absolute; inset-block-start: 50%; inset-inline-start: 50%;
  inline-size: 22px; block-size: 1.5px; background: var(--brown);
}
.nav-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.nav-close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }
.nav-drawer-links {
  display: flex; flex-direction: column;
  align-items: flex-start;              /* RTL: start = right → right-aligned */
  gap: clamp(20px, 4vh, 36px);
  margin-block-start: clamp(32px, 8vh, 64px);
}
.nav-dlink {
  font-family: var(--font-ar);
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 500;
  color: var(--brown);
  text-decoration: none;
  position: relative;
}
.nav-dlink.is-active { font-weight: 600; }
.nav-dlink.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0; inset-block-end: -4px;
  block-size: 2px; background: var(--green);
}

/* anchor targets clear the fixed bar when jumped to */
#about, #areas, #director, #contact { scroll-margin-block-start: 84px; }

/* body scroll lock while the drawer is open */
body.nav-open { overflow: hidden; }

/* mobile: solid bar + hamburger, desktop links hidden */
@media (max-width: 900px) {
  .site-nav {
    block-size: 60px;
    background-color: var(--page);
    border-block-end: 0.5px solid var(--rule);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-links { display: none; }
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 5px;
    inline-size: 44px; block-size: 44px;
    margin-inline-start: auto;
    padding: 0; background: none; border: 0; cursor: pointer;
  }
  .nav-burger span {
    display: block; inline-size: 24px; block-size: 1.5px;
    background: var(--brown); margin-inline-start: auto;
  }
  #about, #areas, #director, #contact { scroll-margin-block-start: 72px; }
}

/* reduced motion: drawer appears/disappears without sliding */
@media (prefers-reduced-motion: reduce) {
  .nav-drawer, .nav-scrim, .site-nav { transition: none; }
}

/* ============================================================
   EXPANDED CONTENT — added categories.
   Additive only: built from existing tokens, RTL-safe. No token,
   color, or font changes. (grouped practice, why-us, industries,
   insights, speak-with-lawyers CTA, footer columns)
   ============================================================ */

/* ---- Practice: grouped ---- */
.areas-group { margin-block-start: clamp(40px, 6vh, 72px); }
.areas-group:first-of-type { margin-block-start: 0; }
.areas-group-title {
  font-family: var(--font-ar);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--brown);
  margin-block-end: 20px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--rule);
  display: flex; align-items: baseline; gap: 12px;
}
.areas-group-title .en {
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive);
  margin-inline-start: auto;
}

/* ---- Why choose ISIN ---- */
.why { background: var(--panel); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-block-start: clamp(28px, 4vh, 44px);
}
.why-card {
  background: var(--page);
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 12px;
}
.why-num {
  font-family: var(--font-en);
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em;
  color: var(--green);
}
.why-title { font-family: var(--font-ar); font-size: clamp(19px, 2vw, 24px); font-weight: 600; color: var(--brown); }
.why-text { color: var(--olive); font-size: 17px; line-height: 1.8; }

/* ---- Legal insights ---- */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  margin-block-start: clamp(28px, 4vh, 44px);
}
.insight-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(24px, 2.4vw, 36px);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s;
}
.insight-card:hover { border-color: var(--olive); }
.insight-kicker {
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive);
}
.insight-title { font-family: var(--font-ar); font-size: 20px; font-weight: 600; color: var(--brown); line-height: 1.5; }
.insight-text { color: var(--olive); font-size: 16px; line-height: 1.8; }

/* ---- Speak with our lawyers (CTA band) ---- */
.speak { background: var(--green); }
.speak .section-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: clamp(24px, 4vw, 56px);
}
.speak-copy { max-inline-size: 42ch; }
.speak-title {
  font-family: var(--font-ar);
  font-size: clamp(28px, 4vw, 48px); font-weight: 500;
  letter-spacing: -0.01em; color: var(--sand);
}
.speak-text { color: var(--sand); opacity: 0.85; font-size: 18px; line-height: 1.8; margin-block-start: 12px; }
.speak-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.speak-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px; font-family: var(--font-ar);
  font-size: 18px; font-weight: 500; transition: background .2s, color .2s;
}
.speak-btn-primary { background: var(--sand); color: var(--green); }
.speak-btn-primary:hover { background: var(--white); }
.speak-btn-ghost { border: 1px solid var(--sand); color: var(--sand); }
.speak-btn-ghost:hover { background: var(--sand); color: var(--green); }
.speak-btn:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }

/* ---- Footer columns ---- */
.site-footer { padding: 0; }
.footer-grid {
  max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(40px, 7vh, 72px) var(--pad-page) clamp(28px, 4vh, 40px);
  text-align: start;
}
.footer-col-title {
  font-family: var(--font-en);
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sand); opacity: 0.7;
  margin-block-end: 16px;
}
.footer-col p { color: var(--sand); font-size: 15px; line-height: 1.7; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--sand); font-size: 15px; line-height: 1.7; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 18px; margin-block-start: 14px; }
.footer-social a {
  color: var(--sand);
  font-family: var(--font-en); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-social a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  border-block-start: 0.5px solid rgba(228, 211, 176, 0.25);
  text-align: center; padding: 20px var(--pad-page);
}
.footer-bottom p { color: var(--sand); font-size: 15px; }

/* ---- Floating WhatsApp button (brand brown, cream glyph) ---- */
.wa-float {
  position: fixed;
  inset-block-end: clamp(18px, 3vh, 28px);
  right: clamp(18px, 3vw, 28px);     /* physical right — stays bottom-right in RTL too */
  z-index: 90;                       /* above content, below nav drawer + scrim */
  inline-size: 56px; block-size: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brown);
  color: var(--page);                /* cream glyph via currentColor */
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(20, 19, 15, 0.28);
  transition: transform .2s ease, background .2s ease;
}
.wa-float:hover { background: #171412; transform: scale(1.06); }
.wa-float svg { inline-size: 30px; block-size: 30px; display: block; }
.wa-float:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: clamp(28px, 5vh, 40px); }
  .speak .section-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: none; }
  .wa-float:hover { transform: none; }
}

@media print {
  .wa-float { display: none; }
}

/* ---- Lead contact form (inside the Speak band) ---- */
.speak .section-inner { align-items: start; }
.speak-copy { flex: 1 1 320px; }
.speak-direct { display: flex; flex-wrap: wrap; gap: 16px; margin-block-start: clamp(20px, 3vh, 32px); }

/* visually-hidden (accessible labels) */
.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.lead-form {
  flex: 1 1 440px;
  max-inline-size: 560px;
  background: var(--white);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 14px;
}
.lead-input, .lead-textarea {
  inline-size: 100%;
  font-family: var(--font-ar);
  font-size: 16px; color: var(--brown);
  background: var(--page);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .2s;
}
.lead-input::placeholder, .lead-textarea::placeholder { color: var(--olive); }
.lead-input:focus, .lead-textarea:focus { border-color: var(--green); }
.lead-input:focus-visible, .lead-textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lead-textarea { min-block-size: 150px; resize: vertical; line-height: 1.7; }
.lead-submit {
  margin-block-start: 4px;
  padding: 16px 28px;
  background: var(--green); color: var(--sand);
  font-family: var(--font-ar); font-size: 18px; font-weight: 500;
  border: 0; border-radius: 10px; cursor: pointer;
  transition: background .2s;
}
.lead-submit:hover { background: #40121A; }
.lead-submit:disabled { opacity: .6; cursor: default; }
.lead-submit:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lead-status { font-size: 15px; line-height: 1.6; min-block-size: 1.2em; margin: 0; color: var(--olive); }
.lead-status.ok   { color: var(--green); font-weight: 500; }
.lead-status.err  { color: #a3341f; font-weight: 500; }
.lead-status.warn { color: var(--brown); font-weight: 500; }

/* ---- Language toggle (عربي / EN) ---- */
.nav-link.nav-lang {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding-inline: 12px;
  color: var(--brown);
}
.nav-link.nav-lang:hover { border-color: var(--olive); }
.nav-dlink.nav-lang {
  align-self: flex-start;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 6px 18px;
  font-size: clamp(18px, 4vw, 24px);
}
