/* ============================================================
   Dr. Ashraf Nageeb — cinematic bilingual build (v2)
   Arabic primary (RTL), English mirrors (LTR).
   Every layout value uses logical properties so dir flipping
   mirrors the page with no extra CSS.

   Fail-safe rule: nothing is hidden unless JS successfully arms
   motion (html.motion-armed), which only happens after the
   libraries load AND prefers-reduced-motion is not set.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --font-ar: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 76px);
  --radius: 20px;
  --radius-lg: 30px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --nav-h: 84px;

  /* transform-origin does NOT accept logical keywords (inline-start etc.),
     so growth direction is resolved through these two variables instead. */
  --flow: left;
  --flow-end: right;
}

html[dir="rtl"] { --flow: right; --flow-end: left; }

html[data-theme="night"] {
  --bg: #05100F;
  --bg-2: #08191A;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .12);
  --border-strong: rgba(255, 255, 255, .26);
  --text: #ECF5F3;
  --muted: #8EA5A4;
  --accent: #37D6C6;
  --accent-soft: rgba(55, 214, 198, .14);
  --on-accent: #03211E;
  --brand: #0B3D91;
  --warm: #E4BE86;
  --paper: #EDEFEC;          /* light panel for the white-background portraits */
  --scrim: linear-gradient(to top, #05100F 6%, rgba(5, 16, 15, .35) 55%, transparent);
}

html[data-theme="day"] {
  --bg: #F4F6F4;
  --bg-2: #FFFFFF;
  --surface: rgba(8, 40, 46, .04);
  --surface-2: rgba(8, 40, 46, .07);
  --border: rgba(8, 40, 46, .14);
  --border-strong: rgba(8, 40, 46, .3);
  --text: #062229;
  --muted: #54727A;
  --accent: #0C8B85;
  --accent-soft: rgba(12, 139, 133, .12);
  --on-accent: #FFFFFF;
  --brand: #0B3D91;
  --warm: #A8742B;
  --paper: #FFFFFF;
  --scrim: linear-gradient(to top, #F4F6F4 6%, rgba(244, 246, 244, .4) 55%, transparent);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 17px;
  line-height: 1.85;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
html[data-lang="en"] body { font-family: var(--font-en); line-height: 1.7; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.16; letter-spacing: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
figure { margin: 0; }

/* numbers, phone numbers and latin fragments always read left-to-right */
[dir="ltr"], .num, .counter, .clinic-phone, .stat-num, .service-num,
.pillar-num, .clinic-index, .chapter-num, .progress {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

.shell { width: min(1320px, 100% - (var(--gutter) * 2)); margin-inline: auto; }
.sec { padding-block: clamp(90px, 13vh, 170px); position: relative; }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.kicker::before { content: ""; inline-size: 34px; block-size: 1px; background: currentColor; opacity: .7; }
.h2 { font-size: clamp(1.85rem, 4.2vw, 3.4rem); }
.sec-head { margin-bottom: clamp(36px, 6vh, 70px); }

/* ---------- masked line reveals (Arabic-safe: whole lines, never letters) ---------- */
.line { display: block; overflow: hidden; padding-block: .07em; }
.line-i { display: block; will-change: transform; }

.hero-title em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.hero-title em::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: .05em;
  block-size: 3px; background: currentColor; opacity: .5;
  transform-origin: var(--flow) center;
}

/* ---------- fail-safe hidden states ---------- */
html.motion-armed .line-i { transform: translateY(118%); }
html.motion-armed .reveal { opacity: 0; transform: translateY(34px); }
html.motion-armed .word { opacity: .14; }
html.motion-armed .fig-mask img,
html.motion-armed .shot-mask img { transform: scale(1.16); }
html.motion-armed .hero-title em::after { transform: scaleX(0); }
html.motion-armed .hero-title.is-in em::after { transform: scaleX(1); transition: transform 1s var(--ease) .25s; }

/* curated word splitting must never break Arabic joins — words only, never letters */
.word { display: inline-block; }

/* ---------- film grain / progress / cursor ---------- */
/* No mix-blend-mode here, deliberately. A full-viewport FIXED element with a
   blend mode forces the browser to re-read and re-blend the entire backdrop on
   every scroll frame — the single most expensive thing this page could do.
   Plain low-opacity noise gives the same filmic texture for free. */
.grain {
  position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
html[data-theme="day"] .grain { opacity: .035; }

.progress { position: fixed; inset-block-start: 0; inset-inline: 0; block-size: 2px; z-index: 60; background: transparent; }
.progress-bar { display: block; block-size: 100%; inline-size: 100%; background: var(--accent); transform: scaleX(0); transform-origin: var(--flow) center; }

/* ---------- preloader curtain (element is created by JS, never in the HTML) ---------- */
body.has-curtain { overflow: hidden; }
.curtain {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center; will-change: transform;
}
.curtain-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.curtain-name { font-size: clamp(1.25rem, 3vw, 2.1rem); font-weight: 700; }
.curtain-bar { display: block; inline-size: min(260px, 42vw); block-size: 2px; background: var(--border); overflow: hidden; }
.curtain-bar i { display: block; block-size: 100%; inline-size: 100%; background: var(--accent); transform: scaleX(0); transform-origin: var(--flow) center; }
.curtain-pct { font-size: .76rem; color: var(--muted); letter-spacing: .14em; }

.cursor { position: fixed; inset-block-start: 0; inset-inline-start: 0; z-index: 70; pointer-events: none; mix-blend-mode: difference; opacity: 0; }
.cursor-dot, .cursor-ring { position: absolute; border-radius: 50%; display: block; }
.cursor-dot { inline-size: 6px; block-size: 6px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring {
  inline-size: 40px; block-size: 40px; border: 1px solid rgba(255, 255, 255, .6);
  transform: translate(-50%, -50%); transition: inline-size .35s var(--ease), block-size .35s var(--ease), opacity .3s;
}
.cursor.is-hot .cursor-ring { inline-size: 74px; block-size: 74px; }
html.motion-armed .cursor { opacity: 1; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  border-block-end: 1px solid transparent;
  transition: background-color .45s var(--ease), border-color .45s;
}
/* A backdrop-filter on a header that is stuck for the whole scroll means a
   full-width blur recomputed every frame. A near-opaque background reads the
   same at this size and costs nothing. */
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-block-end-color: var(--border);
}
.header-inner { display: flex; align-items: center; gap: 22px; padding-block: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  inline-size: 42px; block-size: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.02rem; }
.brand-text span { font-size: .7rem; color: var(--muted); }

.nav { display: flex; gap: 24px; margin-inline-start: auto; font-size: .92rem; }
.nav a { color: var(--muted); position: relative; padding-block: 4px; transition: color .3s; }
.nav a::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline-start: 0;
  block-size: 1px; inline-size: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: var(--flow-end) center; transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); transform-origin: var(--flow) center; }

.header-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.nav + .header-actions { margin-inline-start: 0; }

.toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: border-color .3s, color .3s, background-color .3s;
}
.toggle:hover { border-color: var(--border-strong); color: var(--text); }
.toggle-opt.is-active { color: var(--accent); }
.toggle-sep { opacity: .4; }
.theme-toggle { padding: 10px; }
.theme-dot {
  inline-size: 15px; block-size: 15px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); transition: transform .5s var(--ease);
}
html[data-theme="day"] .theme-dot { transform: scale(.7); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 32px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .45s var(--ease), color .35s, border-color .35s, background-color .35s, box-shadow .45s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 16px 44px -20px var(--accent); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 26px 56px -20px var(--accent); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
.header-cta { padding: 11px 22px; font-size: .88rem; }

/* ---------- chapter rail ---------- */
.chapter-rail {
  position: fixed; inset-inline-end: 24px; inset-block-start: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 15px;
}
.chapter { display: flex; align-items: center; gap: 10px; font-size: .72rem; color: var(--muted); }
.chapter-num { opacity: .55; transition: opacity .3s, color .3s; }
.chapter-label {
  display: inline-block; max-inline-size: 0; overflow: hidden; white-space: nowrap;
  opacity: 0; transition: max-inline-size .55s var(--ease), opacity .4s;
}
.chapter::after {
  content: ""; inline-size: 18px; block-size: 1px; background: currentColor; opacity: .4;
  transition: inline-size .55s var(--ease), opacity .3s;
}
.chapter.is-current { color: var(--accent); }
.chapter.is-current .chapter-num { opacity: 1; }
.chapter.is-current::after { inline-size: 38px; opacity: 1; }
.chapter:hover .chapter-label { max-inline-size: 170px; opacity: 1; }

/* ============================================================
   SCENE 01 — HERO (sticky stage over a 160vh travel)
   ============================================================ */
.hero { position: relative; block-size: 160vh; }
.hero-stage {
  position: sticky; inset-block-start: 0; block-size: 100vh; overflow: hidden;
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 20px) 30px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
/* will-change promotes each orb to its own composited layer, so the 90px blur is
   rasterised ONCE and scrolling then only translates a cached texture. Without
   it the browser re-blurs these large circles on every scroll frame. */
.hero-bg .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.orb-1 { inline-size: 48vw; block-size: 48vw; inset-inline-start: -10vw; inset-block-start: -8vw; background: var(--brand); }
.orb-2 { inline-size: 40vw; block-size: 40vw; inset-inline-end: -8vw; inset-block-start: 16%; background: var(--accent); opacity: .26; }
.orb-3 { inline-size: 30vw; block-size: 30vw; inset-inline-start: 34%; inset-block-end: -14vw; background: var(--warm); opacity: .14; }
html[data-theme="day"] .hero-bg .orb { opacity: .18; }
.hero-grid {
  position: absolute; inset: 0; opacity: .45;
  background-image:
    linear-gradient(to inline-end, var(--border) 1px, transparent 1px),
    linear-gradient(to block-end, var(--border) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 5%, transparent 70%);
}

.hero-inner { position: relative; z-index: 3; max-inline-size: 940px; }
/* Capped by viewport HEIGHT as well as width. The stage is a 100vh sticky box, so
   a width-only clamp let a four-line Arabic headline grow taller than the stage:
   the inner column overflowed to y=885 in an 870px content box and the CTA
   buttons ended up drawn underneath the trust row. */
.hero-title { font-size: clamp(2.1rem, min(6.6vw, 9.6vh), 5.8rem); line-height: 1.1; margin-block: 8px 22px; }
html[data-lang="ar"] .hero-title { line-height: 1.2; }
html[data-lang="en"] .hero-title { line-height: 1.02; letter-spacing: -.02em; }
.hero-sub { max-inline-size: 52ch; color: var(--muted); font-size: clamp(1rem, 1.32vw, 1.13rem); line-height: 1.95; }
html[data-lang="en"] .hero-sub { line-height: 1.72; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 34px; }

.hero-figure-wrap {
  position: absolute; z-index: 2;
  inset-inline-end: clamp(8px, 6vw, 110px);
  inset-block-end: 0;
  block-size: min(80vh, 740px);
  display: flex; align-items: flex-end; justify-content: center;
  will-change: transform;
}
/* Soft pool of light behind the figure so the cut-out sits in the scene instead
   of floating on it. Static gradient — no per-frame cost. */
.hero-figure-wrap::before {
  content: ""; position: absolute; inset-block-end: -4%; inset-inline: -22%;
  block-size: 62%; z-index: -1;
  background: radial-gradient(ellipse at 50% 78%, var(--accent-soft), transparent 68%);
  filter: blur(26px);
}
.hero-figure {
  block-size: 100%; inline-size: auto; max-inline-size: none;
  filter: drop-shadow(0 34px 52px rgba(0, 0, 0, .5)) saturate(1.03) contrast(1.03);
}
.hero-figure-cap {
  position: absolute; inset-block-end: 6%; inset-inline-start: -6%;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 16px; display: flex; flex-direction: column; line-height: 1.3;
}
.hero-figure-cap span { font-size: .88rem; font-weight: 600; }
.hero-figure-cap small { font-size: .68rem; color: var(--muted); }

.hero-foot {
  position: absolute; z-index: 3; inset-inline: var(--gutter); inset-block-end: 30px;
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 24px;
}
/* flex-start (not space-between) so the scroll cue sits with the trust list on the
   text side. space-between pushed it to the opposite edge, which is exactly where
   the portrait is anchored — it was drawn across the doctor's chest. */
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .82rem; color: var(--muted); max-inline-size: 56%; }
.hero-trust li { display: inline-flex; align-items: center; gap: 10px; }
.hero-trust li::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scroll-cue-line { inline-size: 46px; block-size: 1px; background: currentColor; position: relative; overflow: hidden; }
.scroll-cue-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: cue 2.6s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateX(-100%) } 60%, 100% { transform: translateX(100%) } }

/* ============================================================
   SCENE 02 — TICKER
   ============================================================ */
.ticker { border-block: 1px solid var(--border); padding-block: 20px; overflow: hidden; background: var(--bg-2); }
.ticker-track { display: flex; align-items: center; gap: 38px; width: max-content; will-change: transform; }
.ticker-item { font-size: clamp(1.05rem, 2vw, 1.6rem); font-weight: 600; color: var(--muted); white-space: nowrap; }
.ticker-sep { color: var(--accent); font-size: .75rem; }

/* ============================================================
   SCENE 03 — STATEMENT (word-by-word scrub)
   ============================================================ */
.statement-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(34px, 5vw, 90px); align-items: start; }
.statement-text {
  font-size: clamp(1.4rem, 3.1vw, 2.75rem);
  line-height: 1.6; font-weight: 500; margin-block: 10px 30px;
}
html[data-lang="en"] .statement-text { line-height: 1.35; letter-spacing: -.01em; }
.statement-note { color: var(--muted); font-size: 1.05rem; max-inline-size: 52ch; }

.portrait-card { position: relative; }
.portrait-mask {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--paper);
  aspect-ratio: 4 / 5;
}
.portrait-mask img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 8%; }
.portrait-card figcaption { margin-block-start: 14px; font-size: .8rem; color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-block-start: clamp(50px, 8vh, 90px);
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg); padding: 26px 22px; }
.stat-num { display: block; font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 700; color: var(--accent); line-height: 1; }
.stat-num::after { content: "+"; font-size: .5em; vertical-align: super; opacity: .5; }
.stat-label { display: block; font-size: .82rem; color: var(--muted); margin-block-start: 10px; }

/* ============================================================
   SCENE 04 — SPECIALTIES (horizontal travel)
   ============================================================ */
.pillars-h { position: relative; block-size: 320vh; }
.pillars-viewport {
  position: sticky; inset-block-start: 0; block-size: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
}
.pillars-head { flex: none; }
.pillars-track { display: flex; gap: clamp(16px, 1.8vw, 30px); padding-inline: var(--gutter); width: max-content; will-change: transform; }
/* Panel width IS the horizontal travel: four ~1/3-viewport panels left only
   ~650px of slide spread across a 320vh section, which read as "stuck" rather
   than cinematic. Bigger slides give the scrub something to travel through. */
/* flex:none is load-bearing, not cosmetic. In rail mode the track is a flex row
   with overflow-x:auto, and flex items shrink by default — which squashed these
   slides to ~120px on a phone and left the gallery rail unable to scroll at all,
   putting every shot past the first out of reach. */
.pillar-panel {
  flex: none;
  inline-size: clamp(290px, 44vw, 660px);
  padding: clamp(28px, 3vw, 46px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-2), transparent 70%);
  display: flex; flex-direction: column; gap: 16px; min-block-size: min(54vh, 520px);
}
.pillar-panel h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); margin-block-start: auto; }
.pillar-panel p { color: var(--muted); font-size: .98rem; line-height: 1.9; }
.pillar-num { font-size: .78rem; color: var(--accent); letter-spacing: .12em; }
.pillars-progress { position: absolute; inset-inline: var(--gutter); inset-block-end: 8vh; block-size: 1px; background: var(--border); }
.pillars-progress-bar { display: block; block-size: 100%; inline-size: 100%; background: var(--accent); transform: scaleX(0); transform-origin: var(--flow) center; }

/* ============================================================
   SCENE 05 — SERVICES
   ============================================================ */
.services-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(34px, 5vw, 90px); align-items: start; }
.services-sticky { position: sticky; inset-block-start: 16vh; }
.services-copy { color: var(--muted); margin-block-start: 20px; max-inline-size: 42ch; }
.service-figure { margin-block-start: 34px; }
.fig-mask { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; }
.fig-mask img { inline-size: 100%; block-size: 100%; object-fit: cover; filter: saturate(.7) contrast(1.05); }

.service-list { border-block-start: 1px solid var(--border); }
.service-row {
  display: grid; grid-template-columns: 62px 1fr; gap: 6px 22px;
  padding-block: clamp(22px, 3vh, 34px);
  border-block-end: 1px solid var(--border);
  position: relative;
}
.service-row::after {
  content: ""; position: absolute; inset-block-end: -1px; inset-inline-start: 0;
  block-size: 1px; inline-size: 0; background: var(--accent);
}
.service-num { font-size: .76rem; color: var(--muted); letter-spacing: .1em; padding-block-start: 6px; }
.service-row h3 { font-size: clamp(1.06rem, 1.6vw, 1.35rem); }
.service-row p { grid-column: 2; color: var(--muted); font-size: .94rem; line-height: 1.9; max-inline-size: 62ch; }
.service-row:hover::after { inline-size: 100%; transition: inline-size .6s var(--ease); }
.service-row:hover .service-num { color: var(--accent); }

/* ============================================================
   SCENE 06 — AWARENESS (sticky stage)
   ============================================================ */
.awareness { position: relative; block-size: 200vh; background: #04161A; color: #ECF5F3; }
.awareness-stage {
  position: sticky; inset-block-start: 0; block-size: 100vh; overflow: hidden;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(55, 214, 198, .16), transparent 58%),
    linear-gradient(150deg, #041417, #06282E 55%, #041417);
}
.awareness-media { position: absolute; inset: 0; z-index: 0; }
.awareness-figure { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 52%; overflow: hidden; }
.awareness-figure img { inline-size: 100%; block-size: 100%; object-fit: cover; filter: saturate(.55) brightness(.42) contrast(1.1); }
.awareness-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to inline-start, #04161A 8%, transparent 70%); }
.awareness-inner { position: relative; z-index: 2; max-inline-size: 760px; }
.awareness-icon { inline-size: clamp(44px, 5vw, 66px); block-size: auto; margin-bottom: 22px; filter: invert(1) brightness(1.5); opacity: .85; }
.aware-title { font-size: clamp(2rem, 6vw, 4.9rem); line-height: 1.1; margin-block: 0 24px; }
.aware-line { inline-size: 100%; block-size: 8px; color: #37D6C6; display: block; margin-block: 6px 28px; opacity: .85; }
.aware-text { max-inline-size: 60ch; color: rgba(236, 245, 243, .74); font-size: 1.04rem; line-height: 1.95; }
.aware-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-block-start: 38px; }
.aware-phone { display: inline-flex; flex-direction: column; gap: 2px; }
.aware-phone-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #37D6C6; }
.aware-phone-num { font-size: 1.3rem; font-weight: 600; }
.aware-video-note { margin-block-start: 30px; font-size: .78rem; color: rgba(236, 245, 243, .45); }

/* ============================================================
   SCENE 07 — GALLERY (horizontal travel)
   ============================================================ */
.gallery { position: relative; block-size: 340vh; }
.gallery-viewport {
  position: sticky; inset-block-start: 0; block-size: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 34px;
}
.gallery-head { flex: none; }
.gallery-track { display: flex; gap: clamp(14px, 1.4vw, 24px); padding-inline: var(--gutter); width: max-content; will-change: transform; }
.shot { flex: none; inline-size: clamp(230px, 32vw, 460px); }
.shot-mask { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface); }
.shot-mask img { inline-size: 100%; block-size: 100%; object-fit: cover; filter: saturate(.75) contrast(1.05); }
.shot figcaption { margin-block-start: 12px; font-size: .78rem; color: var(--muted); }
.gallery-note { margin-block-start: 22px; font-size: .74rem; color: var(--muted); opacity: .8; }

/* ============================================================
   SCENE 08 — VOICES (stacking deck)
   ============================================================ */
.voice-deck { display: flex; flex-direction: column; gap: 22px; }
.voice-card {
  position: sticky; inset-block-start: 18vh;
  margin: 0; padding: clamp(28px, 3.4vw, 52px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, .5);
}
.voice-card p { font-size: clamp(1.15rem, 2.1vw, 1.75rem); line-height: 1.75; }
.voice-card cite { display: block; margin-block-start: 20px; font-style: normal; font-size: .84rem; color: var(--muted); }
.voice-mark { font-family: var(--font-en); font-size: 4.4rem; line-height: 1; color: var(--accent); opacity: .25; display: block; }

/* ============================================================
   SCENE 09 — CLINICS
   ============================================================ */
.clinic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.clinic-card {
  padding: clamp(30px, 3.2vw, 48px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .5s var(--ease), border-color .4s, background-color .4s;
}
.clinic-card:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--surface-2); }
.clinic-index { font-size: .74rem; color: var(--accent); letter-spacing: .12em; }
.clinic-tag { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.clinic-addr { color: var(--muted); font-size: .97rem; line-height: 1.9; }
.clinic-phone { font-size: 1.24rem; font-weight: 600; color: var(--accent); }
.clinic-link { font-size: .86rem; color: var(--muted); border-block-end: 1px solid var(--border-strong); align-self: flex-start; padding-block-end: 3px; transition: color .3s, border-color .3s; }
.clinic-link:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   SCENE 10 — CTA + giant wordmark
   ============================================================ */
.cta { position: relative; padding-block: clamp(90px, 14vh, 180px) 0; overflow: hidden; border-block-start: 1px solid var(--border); }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-title { font-size: clamp(1.9rem, 5vw, 4rem); }
.cta-sub { color: var(--muted); margin-block-start: 18px; font-size: 1.06rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-block-start: 34px; }
.cta-note { color: var(--muted); font-size: .82rem; margin-block-start: 32px; max-inline-size: 64ch; opacity: .85; }
.cta-wordmark {
  margin-block-start: clamp(40px, 8vh, 90px);
  line-height: .82; text-align: center; overflow: hidden;
  padding-inline: var(--gutter);
}
.cta-wordmark span {
  display: block;
  font-size: clamp(3.4rem, 17vw, 15rem);
  font-weight: 700; letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  background: linear-gradient(to top, var(--accent), transparent 70%);
  -webkit-background-clip: text; background-clip: text;
}

.site-footer { border-block-start: 1px solid var(--border); padding-block: 38px; background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { font-size: 1rem; }
.footer-brand span, .footer-meta { font-size: .8rem; color: var(--muted); }
.footer-meta { display: inline-flex; gap: 12px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  .nav { display: none; }
  .chapter-rail { display: none; }
  .statement-grid, .services-grid { grid-template-columns: 1fr; }
  .services-sticky { position: static; }
  .hero-figure-wrap { inset-inline-end: 4vw; block-size: min(64vh, 600px); opacity: .9; }
  .hero-inner { max-inline-size: 100%; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-trust { max-inline-size: 100%; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .clinic-grid { grid-template-columns: 1fr; }

  /* the horizontal travel becomes a native swipe rail */
  .pillars-h, .gallery { block-size: auto; }
  .pillars-viewport, .gallery-viewport { position: static; block-size: auto; padding-block: clamp(70px, 11vh, 120px); }
  .pillars-track, .gallery-track {
    width: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-block-end: 18px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pillars-track::-webkit-scrollbar, .gallery-track::-webkit-scrollbar { display: none; }
  .pillar-panel { scroll-snap-align: center; min-block-size: auto; }
  .shot { scroll-snap-align: center; }
  .pillars-progress { display: none; }

  /* pinned cinematic stages become normal flowing sections on phones */
  .hero, .awareness { block-size: auto; }
  /* position:relative rather than static. Left static, these stages stop being
     the containing block for their absolutely-positioned background layers, so
     the decorative orbs escape the stage's own overflow:hidden and push the
     whole document ~9px wider than the viewport. */
  .hero-stage, .awareness-stage { position: relative; block-size: auto; padding-block: calc(var(--nav-h) + 40px) 60px; }
  .awareness-figure { position: relative; inline-size: 100%; block-size: 46vh; }
  .awareness-figure::after { background: linear-gradient(to top, #04161A 10%, transparent 70%); }
  .awareness-inner { margin-block-start: -12vh; }
  .voice-card { position: static; }

  /* mobile is where these visitors arrive: drop the GPU-heavy layers */
  .grain { display: none; }
  .cursor { display: none; }
  .hero-bg .orb { filter: blur(52px); }
  .site-header.is-stuck { backdrop-filter: none; background: color-mix(in srgb, var(--bg) 95%, transparent); }
  /* The phone portrait is deliberately a faint background layer, so keep it well
     under the scroll cue and trust text that share the bottom of the hero. */
  .hero-figure-wrap { block-size: 42vh; inset-inline-end: 0; inset-block-end: calc(var(--nav-h) * -0.2); opacity: .4; }
  .hero-figure-cap { display: none; }
  .cta-wordmark span { -webkit-text-stroke-width: 1px; }
}

@media (max-width: 560px) {
  .header-inner { gap: 10px; padding-block: 13px; }
  .brand-text span { display: none; }
  .brand-text strong { white-space: nowrap; font-size: .95rem; }
  .brand-mark { inline-size: 38px; block-size: 38px; }
  .toggle { padding: 7px 11px; font-size: .78rem; }
  .theme-toggle { padding: 8px; }
  .hero-title { font-size: clamp(2rem, 11vw, 3.4rem); }
}

/* ---------- reduced motion: everything readable, nothing hidden ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.motion-armed .line-i, html.motion-armed .reveal, html.motion-armed .fig-mask img,
  html.motion-armed .shot-mask img { transform: none !important; }
  html.motion-armed .reveal { opacity: 1 !important; }
  html.motion-armed .word { opacity: 1 !important; }
}

/* ============================================================
   NO-JS / MOTION-OFF FALLBACK (desktop)
   The pinned stages and the horizontal tracks only exist because a script
   drives them. If that script never arms — JS blocked, or reduced motion —
   a 340vh sticky stage is 340vh of dead scroll, and everything past the first
   viewport of a horizontal track is unreachable content. So the travel
   sections collapse to normal flow and the tracks become native scroll rails.
   Phones are already handled by the max-width:860px block above.
   ============================================================ */
@media (min-width: 861px) {
  html:not(.motion-armed) .hero,
  html:not(.motion-armed) .pillars-h,
  html:not(.motion-armed) .awareness,
  html:not(.motion-armed) .gallery { block-size: auto; }

  html:not(.motion-armed) .hero-stage,
  html:not(.motion-armed) .pillars-viewport,
  html:not(.motion-armed) .awareness-stage,
  html:not(.motion-armed) .gallery-viewport {
    position: static; block-size: auto; overflow: visible;
    padding-block: calc(var(--nav-h) + 40px) 60px;
  }

  html:not(.motion-armed) .pillars-track,
  html:not(.motion-armed) .gallery-track {
    inline-size: auto; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-block-end: 18px; scrollbar-width: none;
  }
  html:not(.motion-armed) .pillars-track::-webkit-scrollbar,
  html:not(.motion-armed) .gallery-track::-webkit-scrollbar { display: none; }
  html:not(.motion-armed) .pillar-panel,
  html:not(.motion-armed) .shot { scroll-snap-align: center; }
  html:not(.motion-armed) .pillars-progress { display: none; }
}
