/* =========================================================
   Nafis clinic landing page
   Arabic first (RTL), phone first, nothing loaded from other sites.
   The clinic's colours arrive as CSS variables from site.js.
   Motion follows the Infinity Horizons site: only transform, opacity and
   clip-path move; entering eases out strongly; every hover sits behind
   (hover: hover); "reduce motion" keeps fades and drops movement.
   ========================================================= */

/* ---------- Fonts (served from this site) ---------- */
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("../fonts/readex-pro-arabic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("../fonts/readex-pro-arabic-600-normal.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  src: url("../fonts/readex-pro-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Readex Pro";
  src: url("../fonts/readex-pro-latin-600-normal.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens (Nafis defaults; site.js swaps the brand ones) ---------- */
:root {
  --brand: #0B6B5D;
  --brand-strong: #08544A;
  --brand-tint: #E7F3F0;
  --on-brand: #FFFFFF;
  --brand-rgb: 11, 107, 93;
  --brand-lite: #3EBFA6;          /* the clinic colour made bright enough for dark cards */
  --on-brand-lite: #06231E;
  --brand-lite-rgb: 62, 191, 166;
  --gem: #EFAC45;
  --gem-tint: #FCEFD9;
  --on-gem-tint: #8A5A00;
  --gem-rgb: 239, 172, 69;
  --deep: #0B2622;                /* hero and closing cards: the clinic colour taken to near-black */
  --deep-rgb: 11, 38, 34;

  --bg: #F6F8F7;
  --surface: #FFFFFF;
  --grey: #EDF2F0;
  --ink: #10201C;
  --ink-muted: #50605B;
  --ink-on-deep: #C9D9D5;
  --line: #D7E0DD;

  --font: "Readex Pro Arabic", "Readex Pro", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --wrap: 1180px;
  --gutter: 16px;
  --top-h: 72px;
  --band: clamp(72px, 11vw, 140px);
  --r-lg: 28px;
  --r: 22px;
  --r-sm: 14px;
  --shadow: 0 0 0 1px rgba(16, 32, 28, .05), 0 1px 2px rgba(16, 32, 28, .05), 0 14px 34px -18px rgba(16, 32, 28, .28);
}
@media (min-width: 700px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 12px);
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brand-strong); text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
button, a, [role="button"] { touch-action: manipulation; }
button, .btn { -webkit-user-select: none; user-select: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.num { font-family: "Readex Pro", var(--font); direction: ltr; unicode-bidi: isolate; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.noscript { padding: 16px; text-align: center; }

/* Until the clinic's details are written in, the sample text stays hidden (shown anyway after 2.5 s) */
.nf-wait [data-t], .nf-wait .hero-copy, .nf-wait .doc-photo { visibility: hidden; animation: nf-show 0s 2.5s forwards; }
@keyframes nf-show { to { visibility: visible; } }

/* ---------- Liquid glass ---------- */
.glass {
  background: linear-gradient(140deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5) 60%, rgba(255, 255, 255, .62));
  -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(var(--brand-rgb), .06),
    0 1px 2px rgba(16, 32, 28, .05),
    0 16px 40px -20px rgba(16, 32, 28, .3);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .96); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Type ---------- */
h2 { font-size: clamp(1.85rem, 1.15rem + 2.8vw, 3.1rem); line-height: 1.24; }
h3 { font-size: 1.2rem; }
.sub { margin-top: 16px; color: var(--ink-muted); font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.7; max-width: 36em; text-wrap: pretty; }

/* the small label above a headline; the bullet is the Nafis gem */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  color: var(--brand-strong); font-size: .95rem; font-weight: 600; line-height: 1.4;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--gem); transform: rotate(45deg); border-radius: 1.5px; }
.eyebrow-light { color: var(--brand-lite); }

.sec-head { margin-bottom: clamp(32px, 5vw, 60px); max-width: 46em; }
.sec-head h2 { max-width: 17em; }
@media (min-width: 1000px) {
  .sec-head.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: end; }
  .sec-head.split .sub { margin-top: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1.02rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 24px -12px rgba(var(--brand-rgb), .8); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: rgba(16, 32, 28, .22); }
.btn-light { background: var(--brand-lite); color: var(--on-brand-lite); box-shadow: 0 12px 30px -12px rgba(var(--brand-lite-rgb), .7); }
.btn-glass-light {
  color: #fff; border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%;
  color: var(--brand-strong); background: rgba(var(--brand-rgb), .08); border: 1px solid rgba(var(--brand-rgb), .14);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.icon-btn:active { transform: scale(.94); }

/* "احجز موعد ‹" text link */
.go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 18px; font-weight: 600; font-size: 1.05rem; color: var(--brand-strong); }
.go::after {
  content: ""; width: 8px; height: 8px; margin-top: 2px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-strong); }
  .btn-dark:hover { background: #20332E; }
  .btn-line:hover { border-color: var(--ink); background: rgba(16, 32, 28, .03); }
  .btn-light:hover { box-shadow: 0 16px 34px -12px rgba(var(--brand-lite-rgb), .9); }
  .btn-glass-light:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .55); }
  .icon-btn:hover { background: rgba(var(--brand-rgb), .14); }
  .go:hover::after { transform: translateX(-3px) rotate(45deg); }
}

/* =========================================================
   Header: a floating glass bar
   ========================================================= */
.top { position: sticky; top: 0; z-index: 60; padding: 8px 8px 0; }
.top-in {
  display: flex; align-items: center; gap: 12px;
  max-width: calc(var(--wrap) + 2 * var(--gutter) - 16px); margin-inline: auto;
  height: 56px; padding-inline: 14px 8px; border-radius: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; color: var(--ink); }
.brand img { height: 34px; width: auto; max-width: 168px; object-fit: contain; }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img + .brand-name { display: none; }
.brand .brand-mark + .brand-name { display: inline; }
.logo-plate { background: var(--deep); padding: 4px 10px; border-radius: 10px; box-sizing: content-box; }
.nav { display: none; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.top-actions .icon-btn { width: 44px; height: 44px; }
.top-actions .btn-sm { padding: 0 16px; }
@media (max-width: 380px) { .top-actions .btn-sm .ic { display: none; } }
@media (min-width: 960px) {
  .top-in { height: 60px; padding-inline: 18px 10px; }
  :root { --top-h: 76px; }
  .nav { display: flex; gap: 2px; margin-inline: auto; }
  .nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--ink); font-size: .98rem; transition: background-color 200ms ease; }
  .top-actions { margin-inline-start: 0; }
}
@media (hover: hover) and (pointer: fine) { .nav a:hover { background: rgba(var(--brand-rgb), .08); } }

/* =========================================================
   The stage: the hero card folds into the services grid
   Without JS or with "reduce motion": a normal hero, then the grid.
   With JS (html.js-stage): the stage is pinned and the card folds into
   the middle tile on the first scroll.
   ========================================================= */
.stage { position: relative; }
.stage-pin { position: relative; display: grid; gap: 12px; padding: 8px; }

.hero-card {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  min-height: min(calc(100svh - var(--top-h) - 16px), 860px);
  padding: 64px 20px 92px;
  overflow: hidden;
  border-radius: var(--r-lg);
  color: #fff; text-align: center;
  background-color: var(--deep);
  background-image:
    radial-gradient(55% 45% at 88% 8%, rgba(var(--brand-lite-rgb), .42), transparent 70%),
    radial-gradient(50% 42% at 8% 96%, rgba(var(--gem-rgb), .3), transparent 70%);
}
/* the clinic's mark: hidden while the card is big, it is what the card shows once folded */
.hero-card::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(150deg, #fff, var(--brand-tint));
  opacity: 0; pointer-events: none;
}
.hero-mark {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: calc(var(--sq, 640px) * .6); height: calc(var(--sq, 640px) * .6);
  translate: -50% -50%;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
}
.hero-mark img { width: 100%; height: 100%; object-fit: contain; }
.hero-mark .mono { font-size: calc(var(--sq, 640px) * .36); font-weight: 600; line-height: 1; color: var(--brand); }
/* decoration: the gem, drawn big and faint */
.hero-gem { position: absolute; z-index: 0; border: 1.5px solid rgba(255, 255, 255, .1); border-radius: 18%; transform: rotate(45deg); pointer-events: none; }
.hero-gem.g1 { width: 46vmin; height: 46vmin; top: -14vmin; inset-inline-start: -12vmin; }
.hero-gem.g2 { width: 22vmin; height: 22vmin; bottom: 8vmin; inset-inline-end: -6vmin; border-color: rgba(var(--gem-rgb), .22); }
.hero-copy { position: relative; z-index: 1; display: grid; justify-items: center; max-width: 820px; }
.hero-copy h1 { font-size: clamp(2.4rem, 1.2rem + 5.2vw, 4.8rem); line-height: 1.16; }
.hero-copy .lead { text-wrap: pretty; margin-top: 20px; max-width: 30em; color: var(--ink-on-deep); font-size: clamp(1.06rem, 1rem + .45vw, 1.3rem); line-height: 1.7; }
.hero-copy .cta-row { justify-content: center; margin-top: 32px; }
.hero-hint {
  position: absolute; z-index: 1; bottom: 24px; left: 50%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-on-deep); font-size: .9rem; white-space: nowrap; opacity: .85;
}
.hero-hint::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }

/* the grid */
.stage-grid { position: relative; display: grid; justify-items: center; align-content: center; gap: clamp(18px, 3vh, 30px); padding: 44px 0 24px; }
.stage-grid::before {        /* soft colour behind the glass tiles */
  content: ""; position: absolute; inset: 10% 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 70% 60%, rgba(var(--brand-rgb), .12), transparent 70%),
    radial-gradient(36% 46% at 25% 40%, rgba(var(--gem-rgb), .14), transparent 70%);
}
.stage-say { text-align: center; padding-inline: 16px; }
.stage-say .eyebrow { margin-bottom: 6px; }
.stage-say h2 { font-size: clamp(1.4rem, 1rem + 2vw, 2.4rem); max-width: 18em; margin-inline: auto; }

.tiles {
  --gap: 8px;
  --t: min(calc((100vw - 32px - 2 * var(--gap)) / 3), 128px);
  list-style: none;
  display: grid; grid-template-columns: repeat(3, var(--t)); grid-auto-rows: var(--t); gap: var(--gap);
}
.t { position: relative; width: var(--t); height: var(--t); border-radius: clamp(14px, calc(var(--t) * .17), 26px); }
.t-link {
  position: relative; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: calc(var(--t) * .07);
  width: 100%; height: 100%; border-radius: inherit;
  color: var(--ink); text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 1px rgba(255, 255, 255, .5);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}
.t-link::before {            /* the glass sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 46%);
}
.t-link:active { transform: scale(.96); }
.t-link .ic { position: relative; width: calc(var(--t) * .3); height: calc(var(--t) * .3); stroke-width: 1.7; }
.t-link span { position: relative; font-weight: 600; font-size: clamp(.74rem, calc(var(--t) * .105), 1rem); line-height: 1.3; padding-inline: 6px; }
.tint-brand { background: var(--brand-tint); }
.tint-brand .ic { color: var(--brand-strong); }
.tint-gem { background: var(--gem-tint); }
.tint-gem .ic { color: var(--on-gem-tint); }
.tint-grey { background: var(--grey); }
.tint-grey .ic { color: var(--ink-muted); }
.t-book { background: var(--brand); }
.t-book .t-link { color: var(--on-brand); box-shadow: 0 14px 30px -16px rgba(var(--brand-rgb), .9); }
.t-book .t-link::before { opacity: .25; }
.t-gem { display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); }
.t-gem::after { content: ""; width: 26%; height: 26%; background: var(--gem); transform: rotate(45deg); border-radius: 12%; }
@media (hover: hover) and (pointer: fine) {
  .t-link:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 1.5px rgba(var(--brand-rgb), .3); }
}

/* the core tile, shown as it is without JS; with JS the hero card lands here */
.t-core { display: grid; place-items: center; overflow: hidden; background: linear-gradient(150deg, #fff, var(--brand-tint)); box-shadow: var(--shadow); }
.t-core img { width: 64%; height: 64%; object-fit: contain; }
.t-core .mono { font-size: calc(var(--t) * .42); font-weight: 600; color: var(--brand); line-height: 1; }

/* little notes between the tiles: the old way, and what a patient gets now */
.t-note { display: grid; align-content: center; padding: calc(var(--t) * .1); overflow: hidden; font-size: clamp(.68rem, calc(var(--t) * .1), .96rem); line-height: 1.4; }
.n-paper {
  background-color: #FFFDF6;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--t) * .2 - 1px), #D6E2EA calc(var(--t) * .2 - 1px) calc(var(--t) * .2));
  background-position: 0 calc(var(--t) * .08);
  box-shadow: inset -3px 0 0 var(--gem), 0 8px 20px -14px rgba(16, 32, 28, .4);
  rotate: -2.5deg;
  color: #2B3F6B;
}
.n-paper span { font-size: calc(var(--t) * .118); line-height: 1.55; text-decoration: line-through 2px rgba(var(--gem-rgb), .95); -webkit-text-decoration: line-through rgba(var(--gem-rgb), .95); }
.n-toast { gap: 2px; }
.n-toast small { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: .86em; }
.n-toast small::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--brand); transform: rotate(45deg); border-radius: 1.5px; }
.n-toast b { font-weight: 600; }
.n-wa { background: #DCF3EC; }
.n-wa i { display: block; margin-top: 4px; color: var(--brand-strong); font-style: normal; font-size: .84em; text-align: end; }
.n-hours { text-align: center; }
.n-hours small { color: var(--brand-strong); font-weight: 600; }
.n-hours b { font-size: calc(var(--t) * .12); font-weight: 600; line-height: 1.35; }
.n-hours.is-closed small { color: var(--on-gem-tint); }

@media (min-width: 600px) {
  .stage-pin { padding: 12px; }
  .tiles {
    --gap: 12px;
    --t: min(calc((100vw - 2 * var(--gutter) - 4 * var(--gap)) / 5), 168px);
    grid-template-columns: repeat(5, var(--t));
  }
}
.tiles .t-desk { display: none; }
@media (min-width: 600px) { .tiles .t-desk { display: grid; } }

/* ----- the pinned, folding version ----- */
html.js-stage .stage { height: calc(100svh - var(--top-h) + 34svh); }
html.js-stage .stage-pin { position: sticky; top: var(--top-h); height: calc(100svh - var(--top-h)); display: block; padding: 0; }
html.js-stage .stage-grid { position: absolute; inset: 0; padding: 0 0 8px; }
html.js-stage .tiles { --t: min(calc((100vw - 32px - 2 * var(--gap)) / 3), calc((100svh - var(--top-h) - 150px - 3 * var(--gap)) / 4), 128px); }
@media (min-width: 600px) {
  html.js-stage .tiles { --t: min(calc((100vw - 2 * var(--gutter) - 4 * var(--gap)) / 5), calc((100svh - var(--top-h) - 190px - 2 * var(--gap)) / 3), 168px); }
}
html.js-stage .hero-card {
  position: absolute; inset: 8px 8px 8px; min-height: 0;
  transform-origin: 50% 50%;
  clip-path: inset(0px 0px 0px 0px round var(--r-lg));
  border-radius: 0;
  transition: transform 900ms var(--ease-in-out), clip-path 900ms var(--ease-in-out);
}
@media (min-width: 600px) { html.js-stage .hero-card { inset: 12px; } }
html.js-stage .t-core { visibility: hidden; }

html.js-stage .hero-copy, html.js-stage .hero-hint { transition: opacity 450ms var(--ease-out) 380ms, transform 450ms var(--ease-out) 380ms; }
html.js-stage .hero-card::after, html.js-stage .hero-mark { transition: opacity 500ms var(--ease-in-out) 0ms; }
html.js-stage .hero-card { transition: transform 900ms var(--ease-in-out), clip-path 900ms var(--ease-in-out), background-color 300ms ease 0ms; }
html.js-stage .hero-gem { transition: opacity 300ms ease; }
html.js-stage .stage-say, html.js-stage .t:not(.t-core) {
  opacity: 0; transform: scale(.92);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
html.js-stage .stage-say { transform: translateY(14px); }

.stage.is-collapsed .hero-card {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--s, 1));
  clip-path: inset(var(--iy, 0px) var(--ix, 0px) var(--iy, 0px) var(--ix, 0px) round var(--cr, 28px));
  pointer-events: none;
}
.stage.is-collapsed .hero-copy, .stage.is-collapsed .hero-hint { opacity: 0; transform: translateY(-14px) scale(.98); transition-duration: 220ms; transition-delay: 0ms; }
.stage.is-collapsed .hero-hint { transform: translate(0, 10px); }
.stage.is-collapsed .hero-gem { opacity: 0; }
.stage.is-collapsed .hero-card::after, .stage.is-collapsed .hero-mark { opacity: 1; transition-delay: 260ms; }
.stage.is-collapsed .hero-card { background-color: #fff; transition: transform 900ms var(--ease-in-out), clip-path 900ms var(--ease-in-out), background-color 300ms ease 600ms; }
.stage.is-collapsed .stage-say, .stage.is-collapsed .t:not(.t-core) {
  opacity: 1; transform: none; pointer-events: auto;
  transition-duration: 560ms;
  transition-delay: calc(320ms + var(--ring, 0) * 70ms);
}
.stage.is-instant, .stage.is-instant * { transition: none !important; }

/* ---------- Facts strip ---------- */
.facts { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; padding-block: clamp(40px, 6vw, 72px); }
.facts li { display: grid; gap: 2px; align-content: start; }
.facts b { font-family: "Readex Pro", var(--font); font-weight: 600; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.1; color: var(--brand-strong); direction: ltr; unicode-bidi: isolate; text-align: start; }
.facts span { color: var(--ink-muted); font-size: 1rem; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; } .facts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: var(--band); }
.section-tint { background: linear-gradient(180deg, var(--surface), var(--bg)); border-block: 1px solid var(--line); }

/* ---------- Doctor ---------- */
.doc-grid { display: grid; gap: 40px; align-items: center; }
.doc-photo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; max-width: 460px; width: 100%; margin-inline: auto; background: var(--brand-tint); box-shadow: var(--shadow); }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.doc-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(60% 50% at 80% 15%, rgba(var(--brand-lite-rgb), .4), transparent 70%),
    radial-gradient(50% 45% at 15% 90%, rgba(var(--gem-rgb), .3), transparent 70%),
    var(--deep);
}
.doc-ph-tile {
  display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 26%;
  background: linear-gradient(150deg, #fff, var(--brand-tint));
  box-shadow: inset 0 1px 0 #fff, 0 30px 60px -24px rgba(0, 0, 0, .55);
  translate: 0 -12%;
}
.doc-ph-tile img { width: 66%; height: 66%; object-fit: contain; }
.doc-ph-tile .mono { font-size: clamp(3rem, 12vw, 5.5rem); font-weight: 600; line-height: 1; color: var(--brand); }
.doc-photo.has-photo .doc-ph { display: none; }
.doc-badge { position: absolute; inset-inline: 14px; bottom: 14px; display: grid; gap: 0; padding: 12px 16px; border-radius: 18px; }
.doc-photo .doc-badge.glass { background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .78)); }
.doc-badge strong { font-size: 1.08rem; }
.doc-badge span { color: var(--ink-muted); font-size: .95rem; }
.doc-text h2 { max-width: 14em; }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.skills li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .96rem; }
.skills li::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--gem); transform: rotate(45deg); border-radius: 1.5px; }
@media (min-width: 900px) {
  .doc-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 110px); }
  .doc-photo { max-width: none; }
}

/* ---------- Explorer: the steps on one side, the phone on the other ---------- */
.explorer { display: grid; gap: 32px; }
.ex-list { list-style: none; border-top: 1px solid var(--line); }
.ex-item { border-bottom: 1px solid var(--line); }
.ex-btn {
  display: flex; align-items: center; gap: 16px; width: 100%;
  min-height: 68px; padding: 14px 0; border: 0; background: none; cursor: pointer;
  color: var(--ink-muted); font: inherit; font-weight: 600; font-size: clamp(1.12rem, 1rem + .5vw, 1.4rem); text-align: start;
  transition: color 200ms ease;
}
.ex-btn .ex-n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px;
  font-family: "Readex Pro", var(--font); font-size: .85rem; color: var(--ink-muted); background: var(--grey);
  transition: color 200ms ease, background-color 200ms ease;
}
.ex-btn::after {
  content: ""; width: 10px; height: 10px; margin-inline-start: auto; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform 250ms var(--ease-out);
}
.ex-item.is-open .ex-btn { color: var(--ink); }
.ex-item.is-open .ex-btn .ex-n { color: var(--on-brand); background: var(--brand); }
.ex-item.is-open .ex-btn::after { transform: translateY(3px) rotate(225deg); }
@media (hover: hover) and (pointer: fine) { .ex-btn:hover { color: var(--ink); } }

.ex-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms var(--ease-out); }
.ex-item.is-open .ex-panel { grid-template-rows: 1fr; }
.ex-panel-in { min-height: 0; overflow: hidden; }
.ex-panel-in > * { opacity: 0; transition: opacity 200ms ease; }
.ex-item.is-open .ex-panel-in > * { opacity: 1; transition: opacity 300ms ease 80ms; }
.ex-panel p { color: var(--ink-muted); max-width: 30em; padding-inline-start: 46px; }
.ex-before { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-bottom: 22px; padding-inline-start: 46px; }
.ex-before small { color: var(--ink-muted); font-size: .88rem; }
.ex-before .strike { color: #2B3F6B; font-size: 1.05rem; text-decoration: line-through 2px var(--gem); -webkit-text-decoration: line-through var(--gem); }
.ex-item .phone { margin: 4px auto 28px; }
.ex-stage { display: none; }

@media (min-width: 900px) {
  .explorer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .ex-stage {
    display: grid; place-items: center; position: sticky; top: calc(var(--top-h) + 24px);
    min-height: 620px; border-radius: var(--r-lg); overflow: hidden;
    background:
      radial-gradient(60% 50% at 85% 15%, rgba(var(--brand-rgb), .2), transparent 70%),
      radial-gradient(55% 45% at 15% 90%, rgba(var(--gem-rgb), .22), transparent 70%),
      var(--grey);
  }
  .ex-item .phone { display: none; }
}

/* ---------- Phone mockup + screens ---------- */
.phone {
  --pw: 236px;
  position: relative; width: var(--pw); aspect-ratio: 9 / 18.6;
  padding: 9px; border-radius: 40px;
  background: #0C1A17;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 30px 60px -28px rgba(16, 32, 28, .6);
}
@media (min-width: 900px) { .phone { --pw: 286px; } }
.phone::before { content: ""; position: absolute; top: 17px; left: 50%; translate: -50% 0; z-index: 3; width: 30%; height: 18px; border-radius: 99px; background: #0C1A17; }
.screen-set { position: relative; width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: var(--bg); }
.scr {
  position: absolute; inset: 0; padding: 40px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: calc(var(--pw) * .047); line-height: 1.45; color: var(--ink);
  opacity: 0; filter: blur(6px); transform: scale(.97);
  transition: opacity 260ms ease, filter 260ms ease, transform 260ms var(--ease-out);
}
.scr.is-on { opacity: 1; filter: none; transform: none; }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s-top strong { font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.s-top span { color: var(--ink-muted); font-size: .84em; white-space: nowrap; }
.s-label { color: var(--ink-muted); font-size: .82em; font-weight: 600; margin-top: 2px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.s-chips span { padding: 5px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .9em; }
.s-chips .on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.s-note { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-strong); font-size: .82em; }
.s-note .ic { width: 1.3em; height: 1.3em; margin-top: 1px; }
.s-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.s-days span { display: grid; justify-items: center; padding: 5px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .78em; color: var(--ink-muted); }
.s-days b { font-size: 1.3em; color: var(--ink); font-weight: 600; }
.s-days .on { background: var(--brand); border-color: var(--brand); color: rgba(255, 255, 255, .8); }
.s-days .on b { color: var(--on-brand); }
.s-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.s-slots span { padding: 6px 0; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-weight: 600; font-size: .88em; }
.s-slots .off { color: #A9B6B2; text-decoration: line-through; background: transparent; }
.s-slots .on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.s-btn { margin-top: auto; padding: 10px; border-radius: 99px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-align: center; }
.s-sum { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.s-sum b { font-size: 1.05em; }
.s-sum small { color: var(--ink-muted); font-size: .84em; }
.s-input { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--line); font-size: .92em; }
.s-ltr { direction: ltr; text-align: left; display: flex; gap: 8px; }
.s-ltr span { color: var(--ink-muted); }
.s-chat { margin-top: 4px; display: grid; gap: 6px; align-content: start; }
.s-day { justify-self: center; padding: 2px 10px; border-radius: 99px; background: var(--grey); color: var(--ink-muted); font-size: .78em; }
.s-msg { max-width: 88%; padding: 8px 10px 4px; border-radius: 14px; font-size: .9em; white-space: pre-line; }
.s-msg i { display: block; font-style: normal; font-size: .76em; color: var(--ink-muted); text-align: end; direction: ltr; }
.s-out { justify-self: start; background: #DCF3EC; border-start-start-radius: 4px; }
.s-in { justify-self: end; background: var(--surface); border-start-end-radius: 4px; }
.s-chat-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.s-chat-head small { display: block; color: var(--ink-muted); font-size: .8em; }
.s-av { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: var(--brand-tint); color: var(--brand-strong); font-weight: 600; flex: none; }

/* ---------- Services rail (swipe; arrows on computers) ---------- */
.rail-wrap { position: relative; }
.rail {
  list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 320px); gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; scroll-padding-inline: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; }
.svc {
  display: grid; align-content: start; gap: 10px; height: 100%; min-height: 230px;
  padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease, border-color 200ms ease;
}
.svc:active { transform: scale(.98); }
.svc-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--brand-tint); color: var(--brand-strong); }
.svc-ic .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.rail > li:nth-child(3n+2) .svc-ic { background: var(--gem-tint); color: var(--on-gem-tint); }
.rail > li:nth-child(3n) .svc-ic { background: var(--grey); color: var(--ink-muted); }
.svc h3 { font-size: 1.18rem; margin-top: 6px; }
.svc p { color: var(--ink-muted); font-size: .98rem; line-height: 1.65; }
.svc .go { margin-top: auto; padding-top: 6px; font-size: .98rem; }
.rail-nav { display: none; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.rail-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: opacity 200ms ease, transform 160ms var(--ease-out); }
.rail-btn:active { transform: scale(.94); }
.rail-btn[disabled] { opacity: .35; cursor: default; }
@media (min-width: 900px) { .rail-nav { display: flex; } .rail { grid-auto-columns: 300px; } }
@media (hover: hover) and (pointer: fine) {
  .svc:hover { box-shadow: var(--shadow); border-color: rgba(var(--brand-rgb), .25); }
  .svc:hover .go::after { transform: translateX(-3px) rotate(45deg); }
}

/* ---------- Hours + place ---------- */
.visit { position: relative; overflow: hidden; }
.visit::before {
  content: ""; position: absolute; inset: 20% -10% -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 40% at 25% 40%, rgba(var(--brand-rgb), .14), transparent 70%),
    radial-gradient(35% 35% at 80% 70%, rgba(var(--gem-rgb), .16), transparent 70%);
}
.visit-grid { display: grid; gap: 16px; }
.hours { padding: 22px; border-radius: var(--r-lg); }
.hours h3, .place h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hours h3 .ic { color: var(--brand-strong); }
.hours-list { list-style: none; display: grid; }
.hours-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 12px; }
.hours-list li + li { border-top: 1px solid rgba(16, 32, 28, .07); }
.hours-list .d { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.hours-list .h { color: var(--ink-muted); font-size: .98rem; }
.hours-list .off .h { color: var(--on-gem-tint); }
.hours-list .today { background: rgba(var(--brand-rgb), .09); border-top-color: transparent; border-radius: 14px; }
.hours-list .today + li { border-top-color: transparent; }
.hours-list .today .h { color: var(--brand-strong); font-weight: 600; }
.today-tag { padding: 1px 9px; border-radius: 99px; background: var(--brand); color: var(--on-brand); font-size: .78rem; font-weight: 600; }
.hours-break { margin-top: 10px; padding-inline: 12px; color: var(--ink-muted); font-size: .95rem; }
.closures { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--gem-tint); color: var(--on-gem-tint); font-size: .95rem; }
.closures b { display: block; margin-bottom: 2px; }
.closures ul { list-style: none; display: grid; gap: 2px; }

.place { display: grid; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.place-art {
  position: relative; min-height: 170px;
  background-color: #EAF1EE;
  background-image:
    linear-gradient(28deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%),
    linear-gradient(118deg, transparent 46%, #fff 46%, #fff 51%, transparent 51%),
    linear-gradient(0deg, transparent 63%, rgba(255, 255, 255, .8) 63%, rgba(255, 255, 255, .8) 66%, transparent 66%),
    linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, .8) 30%, rgba(255, 255, 255, .8) 33%, transparent 33%),
    radial-gradient(30% 40% at 78% 30%, rgba(var(--brand-rgb), .16), transparent 70%),
    radial-gradient(26% 36% at 20% 75%, rgba(var(--gem-rgb), .2), transparent 70%);
}
.pin {
  position: absolute; left: 50%; top: 50%; translate: -50% -60%;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50% 50% 50% 4px; rotate: -45deg;
  background: var(--brand); color: var(--on-brand); box-shadow: 0 14px 26px -12px rgba(var(--brand-rgb), .9);
}
.pin .ic { rotate: 45deg; width: 26px; height: 26px; }
.place-in { padding: 22px; }
.place-addr { color: var(--ink-muted); margin-bottom: 18px; }
.place .btn { min-height: 48px; }
@media (min-width: 900px) {
  .visit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .hours, .place-in { padding: 30px; }
  .place { grid-template-rows: minmax(220px, 1fr) auto; }
}

/* ---------- Closing card (bookends the hero) ---------- */
.closing-wrap { padding: 0 8px var(--band); }
@media (min-width: 600px) { .closing-wrap { padding-inline: 12px; } }
.closing {
  position: relative; overflow: hidden;
  display: grid; justify-items: center; text-align: center;
  padding: clamp(64px, 10vw, 128px) 20px;
  border-radius: var(--r-lg);
  color: #fff;
  background:
    radial-gradient(55% 50% at 12% 10%, rgba(var(--brand-lite-rgb), .36), transparent 70%),
    radial-gradient(50% 45% at 90% 95%, rgba(var(--gem-rgb), .3), transparent 70%),
    var(--deep);
}
.closing .hero-gem.g1 { width: 36vmin; height: 36vmin; top: -22vmin; inset-inline-start: auto; inset-inline-end: -12vmin; }
.closing .hero-gem.g2 { bottom: -10vmin; inset-inline-end: auto; inset-inline-start: -8vmin; }
.closing h2 { position: relative; font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.2rem); }
.closing .sub { position: relative; color: var(--ink-on-deep); margin-inline: auto; }
.closing .cta-row { position: relative; justify-content: center; margin-top: 30px; }

/* =========================================================
   Footer
   ========================================================= */
.foot { background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-muted); padding-top: 52px; font-size: .96rem; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand .brand img { height: 40px; max-width: 200px; }
.foot-tag { margin-top: 12px; color: var(--ink); font-weight: 600; }
.foot-brand p:not(.foot-tag) { margin-top: 4px; max-width: 30em; }
.foot-col h2 { font-size: .96rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.foot-col ul { list-style: none; display: grid; gap: 2px; }
.foot-col a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-muted); }
.foot-col a .ic { width: 18px; height: 18px; color: var(--brand-strong); }
@media (min-width: 900px) and (hover: hover) { .foot-col a { min-height: 36px; } }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin-top: 40px; padding-block: 18px calc(100px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); font-size: .9rem;
}
/* "built by Infinity Horizons" */
.ih { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px 6px 8px; border-radius: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); transition: border-color 200ms ease, transform 160ms var(--ease-out); }
.ih:active { transform: scale(.98); }
.ih-mark { width: 54px; height: 32px; flex: none; }
.ih-text { display: grid; line-height: 1.25; }
.ih-text small { color: var(--ink-muted); font-size: .8rem; }
.ih-text b { font-family: "Readex Pro", var(--font); font-weight: 600; font-size: .98rem; color: #0D2B3E; letter-spacing: .01em; }
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
  .foot-brand { grid-column: auto; }
  .foot-bottom { padding-bottom: 28px; }
}
@media (hover: hover) and (pointer: fine) {
  .foot-col a:hover { color: var(--ink); }
  .ih:hover { border-color: rgba(0, 207, 189, .6); }
}

/* ---------- Phones: glass bottom bar. Computers: a floating button ---------- */
.dock {
  position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 24px;
  transform: translateY(calc(100% + 24px));
  transition: transform 220ms var(--ease-out);
}
.dock.is-on { transform: none; transition: transform 420ms var(--ease-drawer); }
.dock .btn { flex: 1; min-height: 50px; }
.fab {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 50;
  display: none; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 999px;
  color: var(--brand-strong); font-weight: 600;
  opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.fab.is-on { opacity: 1; transform: none; pointer-events: auto; transition-duration: 300ms; }
.fab:active { transform: scale(.96); }
@media (min-width: 700px) { .dock { display: none; } .fab { display: inline-flex; } }

/* =========================================================
   Reveal on scroll: once per element (motion.js adds html.rv-on, then .is-in)
   ========================================================= */
html.rv-on .rv { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
html.rv-on .rv.is-in { opacity: 1; transform: none; }
html.rv-on .rv-media { clip-path: inset(7% 7% 7% 7% round var(--r-lg)); opacity: 0; transition: clip-path 800ms var(--ease-in-out), opacity 400ms ease; }
html.rv-on .rv-media > * { transform: scale(1.08); transition: transform 900ms var(--ease-out); }
html.rv-on .rv-media.is-in { clip-path: inset(0 0 0 0 round var(--r-lg)); opacity: 1; }
html.rv-on .rv-media.is-in > * { transform: none; }
html.rv-on .doc-photo.rv-media > .doc-badge { transform: translateY(20px); }
html.rv-on .doc-photo.rv-media.is-in > .doc-badge { transform: none; transition-delay: 300ms; }

/* headlines rise word by word out of a clipped line: words, never letters (Arabic letters join) */
.w { display: inline-block; overflow: clip; vertical-align: top; padding-block: .2em; margin-block: -.2em; }
.wi { display: inline-block; }
html.rv-on .rv-words .wi { transform: translateY(calc(100% + .3em)); transition: transform 750ms var(--ease-out); transition-delay: calc(var(--d, 0ms) + var(--wd, 0ms)); }
html.rv-on .rv-words.is-in .wi { transform: none; }

/* ---------- Reduce motion: fewer and gentler, not zero ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; }
  html.rv-on .rv, html.rv-on .rv-words .wi, html.rv-on .rv-media, html.rv-on .rv-media > * { transform: none !important; clip-path: none !important; }
  html.rv-on .rv { transition: opacity 200ms ease !important; }
  .scr { transition: opacity 200ms ease !important; filter: none !important; transform: none !important; }
  .btn:active, .t-link:active, .svc:active { transform: none; }
}

/* ---------- Print: the details, without the decoration ---------- */
@media print {
  .top, .dock, .fab, .hero-hint, .rail-nav, .ex-stage, .hero-gem { display: none !important; }
  .hero-card, .closing { color: #000; background: none !important; border: 1px solid #ccc; }
  .rv, .rv-media, .rv-words .wi { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
