/* ============================================================
   Khateeb Kids Clinic — brand website
   ============================================================ */

body.site { background: var(--surface-page); overflow-x: hidden; }

/* ---------------------------------------------------- devbar
   Review-only chrome. Collapsed to a single button by default so it
   never sits on top of the design the client is actually reviewing. */
.devbar {
  position: fixed; inset-block-end: var(--s-4); inset-inline-start: var(--s-4);
  z-index: 90; display: flex; align-items: center; gap: var(--s-1); padding: 5px;
  background: rgba(24, 20, 14, .88); backdrop-filter: blur(14px);
  border-radius: var(--r-full); box-shadow: var(--shadow-lg);
  transition: background .2s var(--ease);
}
.devbar:not(.open) { background: rgba(24, 20, 14, .62); }
.devbar:not(.open):hover { background: rgba(24, 20, 14, .88); }

.devbar__toggle {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: rgba(255, 255, 255, .82);
  transition: background .16s var(--ease), transform .28s var(--ease);
}
.devbar__toggle:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.devbar.open .devbar__toggle { transform: rotate(90deg); background: rgba(255, 255, 255, .13); }

.devbar__panel {
  display: flex; gap: var(--s-1); align-items: center;
  max-inline-size: 0; opacity: 0; pointer-events: none; overflow: hidden;
  transition: max-inline-size .34s var(--ease-out), opacity .22s var(--ease);
}
.devbar.open .devbar__panel { max-inline-size: 640px; opacity: 1; pointer-events: auto; }

.devbar button, .devbar a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; min-width: 40px; padding-inline: var(--s-3); border-radius: var(--r-full);
  color: rgba(255, 255, 255, .78); font-size: 12px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.devbar__panel button:hover, .devbar__panel a:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.devbar__panel button.on { background: var(--c-amber-600); color: #fff; }

/* Sit above the sticky Call/WhatsApp/Book bar on mobile. */
@media (max-width: 860px) { .devbar { inset-block-end: 84px; } }

/* ---------------------------------------------------- header */
.hdr {
  position: sticky; inset-block-start: 0; z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px) saturate(1.4);
  border-block-end: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.hdr.stuck { border-block-end-color: var(--border-subtle); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .hdr { background: rgba(48, 40, 29, .84); }
.hdr__in { display: flex; align-items: center; gap: var(--s-4); min-height: 74px; }
.hdr__logo { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; flex: none; }
.hdr__logo img { width: 46px; height: 46px; }
.hdr__logo b { font-size: 15px; font-weight: 700; line-height: 1.2; display: block; }
.hdr__logo span { font-size: 12px; color: var(--text-muted); }
.hdr__nav { display: flex; gap: var(--s-1); margin-inline-start: auto; }
.hdr__nav a {
  padding: 12px var(--s-3); border-radius: var(--r-full);
  font-size: var(--fs-label); font-weight: 600; color: var(--text-secondary);
  text-decoration: none; transition: background .16s var(--ease), color .16s var(--ease);
}
.hdr__nav a:hover { background: var(--surface-brand-soft); color: var(--text-brand); }
.hdr__act { display: flex; align-items: center; gap: var(--s-2); flex: none; }
@media (max-width: 1000px) { .hdr__nav { display: none; } .hdr__in { min-height: 64px; } }
@media (max-width: 520px) { .hdr__logo span { display: none; } .hdr__logo img { width: 40px; height: 40px; } }

.langbtn {
  min-width: 44px; height: 44px; padding-inline: var(--s-3);
  border-radius: var(--r-full); border: 1px solid var(--border-subtle);
  font-weight: 700; font-size: 13px; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
}
.langbtn:hover { border-color: var(--border-default); background: var(--surface-sunken); }

/* ------------------------------------------------------- hero */
.hero {
  position: relative; padding-block: clamp(var(--s-6), 5vw, var(--s-9)) var(--s-8);
  /* The decorative radial fields below sit 12% outside the right edge, which
     pushed scrollWidth 43px past the viewport at 360px. `clip` contains them
     without creating a scroll container. */
  overflow-x: clip;
}
.hero::before {
  content: ""; position: absolute; inset-block-start: -140px; inset-inline-end: -12%;
  width: 62vw; height: 62vw; max-width: 820px; max-height: 820px; z-index: -1;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .15), rgba(var(--brand-rgb), 0) 66%);
}
.hero::after {
  content: ""; position: absolute; inset-block-end: -80px; inset-inline-start: -10%;
  width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; z-index: -1;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .09), rgba(var(--accent-rgb), 0) 65%);
}
.hero__grid { display: grid; gap: clamp(var(--s-5), 4vw, var(--s-8)); grid-template-columns: 1.08fr .92fr; align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display); line-height: 1.06;
  letter-spacing: -.015em; margin-block: var(--s-4) var(--s-4);
  font-weight: 800;
}
.hero__h1 span { display: block; }
/* The second line carries the resolution of the first, so it gets the colour.
   The ramp runs with the reading direction — blue where the eye lands first,
   red at the end — so it flips under RTL rather than reading backwards. */
.hero__h1 .l2, .sec__head h2 em {
  background: linear-gradient(to left, var(--c-blue-700), var(--c-blue-500) 58%, var(--c-red-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec__head h2 em { font-style: normal; }
html[dir="ltr"] .hero__h1 .l2,
html[dir="ltr"] .sec__head h2 em {
  background: linear-gradient(to right, var(--c-blue-700), var(--c-blue-500) 58%, var(--c-red-600));
  -webkit-background-clip: text; background-clip: text;
}
.hero__lede { font-size: 1.09rem; color: var(--text-secondary); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-5); }
.hero__quick { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-block-start: var(--s-5); }
.hero__quick a {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-label); font-weight: 600; color: var(--text-secondary); text-decoration: none;
  min-height: 32px;                       /* clears SC 2.5.8's 24px floor */
}
.hero__quick a:hover { color: var(--text-brand); }
.hero__quick svg { color: var(--text-brand); flex: none; }

/* portrait with the brand ring */
.hero__photo { position: relative; justify-self: center; width: min(100%, 420px); }
/* Direct child only. As a descendant selector this also matched the small
   logo inside .hero__badge, forcing it to 3:4 with object-fit:cover — the
   logo was being cropped and stretched, which is what looked "pixelated". */
.hero__photo > img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 22%;
  border-radius: 220px 220px var(--r-xl) var(--r-xl);
  box-shadow: var(--shadow-xl);
}
.hero__photo::before {
  content: ""; position: absolute; inset: -12px -12px -12px -12px;
  border-radius: 240px 240px 38px 38px;
  border: 2px solid var(--c-blue-600); border-block-end-color: var(--c-red-600);
  opacity: .28; pointer-events: none;
}
.hero__badge {
  position: absolute; inset-block-end: var(--s-5); inset-inline-start: calc(-1 * var(--s-4));
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--s-3) var(--s-4); display: flex; align-items: center; gap: var(--s-3);
  max-width: 250px;
}
.hero__badge img { width: 40px; height: 40px; flex: none; }
.hero__badge b { display: block; font-size: 13px; line-height: 1.3; }
.hero__badge span { font-size: 11.5px; color: var(--text-muted); }
@media (max-width: 900px) { .hero__badge { inset-inline-start: 0; } }

/* ------------------------------------------------- trust strip */
.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  overflow: hidden; margin-block-start: var(--s-7);
}
.trust div { background: var(--surface-card); padding: var(--s-4) var(--s-4); text-align: center; }
.trust b { display: block; font-size: 1.35rem; font-weight: 700; color: var(--text-brand); font-family: var(--font-display); line-height: 1.2; }
.trust span { font-size: var(--fs-caption); color: var(--text-muted); }
@media (max-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------- sections */
.sec { padding-block: clamp(var(--s-7), 6vw, var(--s-9)); }
.sec--tint { background: var(--c-sand-50); }
[data-theme="dark"] .sec--tint { background: var(--surface-sunken); }
.sec__head { max-width: 62ch; margin-block-end: var(--s-6); }
/* Editorial section numbering — the device that makes the page read as a
   considered document rather than a stack of marketing blocks. */
/* Not scoped to .sec__head — several sections (well-child, procedures) carry
   their kicker outside that wrapper and were losing the gap and the rule. */
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--fs-caption); font-weight: 700;
  color: var(--text-brand); letter-spacing: .06em; text-transform: uppercase;
  margin-block-end: var(--s-3);
}
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; }
.kicker__n {
  font-style: normal; font-family: var(--font-display);
  font-size: 1.5rem; line-height: 1; color: var(--c-blue-200);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.kicker::after {
  content: ""; width: 34px; height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--c-blue-400), transparent);
}
html[dir="rtl"] .kicker::after { background: linear-gradient(to left, var(--c-blue-400), transparent); }
.sec__head h2 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.15; }
.sec__head p { color: var(--text-secondary); margin-block-start: var(--s-3); }
.sec__head--center { margin-inline: auto; text-align: center; }

/* ============================================ symptom router
   The centrepiece: parents arrive with a symptom, not a diagnosis. */
.worry {
  display: grid; grid-template-columns: 300px 1fr;
  gap: var(--s-5); align-items: start;
}
@media (max-width: 980px) { .worry { grid-template-columns: 1fr; } }

.worry__tabs { display: grid; gap: 6px; }
@media (max-width: 980px) {
  .worry__tabs { grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr);
    overflow-x: auto; padding-block-end: var(--s-2); scroll-snap-type: x mandatory; }
  .worry__tabs > * { scroll-snap-align: start; }
}
.wtab {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: 13px var(--s-4); border-radius: var(--r-md);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  text-align: start; min-height: 62px;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.wtab:hover { border-color: var(--c-blue-200); transform: translateX(-2px); }
html[dir="ltr"] .wtab:hover { transform: translateX(2px); }
.wtab[aria-selected="true"] {
  background: var(--c-blue-600); border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), .26);
}
.wtab__ic {
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface-brand-soft); color: var(--text-brand);
}
.wtab[aria-selected="true"] .wtab__ic { background: rgba(255,255,255,.2); color: #fff; }
.wtab b { display: block; font-size: var(--fs-label); font-weight: 600; line-height: 1.35; }
.wtab span { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.4; }
.wtab[aria-selected="true"] span { color: rgba(255,255,255,.8); }

.worry__panel {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: clamp(var(--s-4), 3vw, var(--s-6));
  min-height: 100%;
}
.wpanel__h { display: flex; align-items: center; gap: var(--s-3); margin-block-end: var(--s-4); }
.wpanel__h h3 { font-size: var(--fs-h2); font-family: var(--font-display); }
.wblock + .wblock { margin-block-start: var(--s-5); }
.wblock__t {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; margin-block-end: var(--s-2);
}
html[lang="ar"] .wblock__t { letter-spacing: 0; text-transform: none; font-size: var(--fs-label); }
.wblock--common .wblock__t { color: var(--text-brand); }
.wblock--flags .wblock__t { color: var(--status-error); }
.wblock--we .wblock__t { color: var(--status-success); }
.wblock p { font-size: var(--fs-label); line-height: 1.75; color: var(--text-secondary); }

.flags {
  display: grid; gap: 8px;
  background: var(--status-error-soft);
  border: 1px solid rgba(153, 2, 24, .16);
  border-radius: var(--r-md); padding: var(--s-4);
}
.flags li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: var(--fs-label); line-height: 1.6; color: var(--status-error);
}
.flags li::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--status-error); margin-block-start: 8px;
}
.wblock--we p {
  background: var(--status-success-soft); border-radius: var(--r-md);
  padding: var(--s-4); color: var(--status-success);
  border: 1px solid rgba(0, 119, 97, .14);
}

.disclaimer {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: var(--fs-caption); color: var(--text-muted);
  margin-block-start: var(--s-4); line-height: 1.6; max-width: 78ch;
}
.disclaimer svg { flex: none; margin-block-start: 2px; }

/* ------------------------------------------ why sub-specialty */
.why-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.why-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-5); position: relative; overflow: hidden;
}
/* The number is a legible label, not a watermark. The earlier ghost numeral
   at blue-50 measured ~1.1:1 and was effectively invisible. */
.why-card__head { display: flex; align-items: center; gap: var(--s-3); margin-block-end: var(--s-3); }
.why-card__n {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 800;
  color: var(--text-brand); line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.why-card__rule { flex: 1; height: 1px; background: var(--border-subtle); }
.why-card__ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface-brand-soft); color: var(--text-brand); flex: none;
}
.why-card b { display: block; font-size: var(--fs-title); font-weight: 700; margin-block-end: 7px; }
.why-card p { font-size: var(--fs-label); color: var(--text-secondary); line-height: 1.7; }

/* ------------------------------------------------------ scope */
.scope { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.scope__col {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.scope__col h3 {
  font-size: var(--fs-title); font-weight: 700; margin-block-end: var(--s-3);
  padding-block-end: var(--s-3); border-block-end: 1px solid var(--border-subtle);
}
.scope__col li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: var(--fs-label); color: var(--text-secondary);
  padding-block: 7px; line-height: 1.55;
}
.scope__col li svg { flex: none; margin-block-start: 3px; color: var(--c-blue-500); }

/* ------------------------------------------------ well-child */
.wellsec {
  background: linear-gradient(165deg, var(--c-blue-50), var(--surface-page) 62%);
  border-block: 1px solid var(--border-subtle);
}
[data-theme="dark"] .wellsec { background: linear-gradient(165deg, var(--c-blue-950), var(--surface-page) 62%); }
.well { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(var(--s-5), 4vw, var(--s-8)); align-items: center; }
@media (max-width: 940px) { .well { grid-template-columns: 1fr; } }
.well__intro h2 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.14; margin-block-end: var(--s-3); }
.well__intro p { color: var(--text-secondary); margin-block-end: var(--s-5); }
.well__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 520px) { .well__grid { grid-template-columns: 1fr; } }
.well__card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-4);
}
.well__card span.ic {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--status-success-soft); color: var(--status-success); margin-block-end: var(--s-3);
}
.well__card b { display: block; font-size: var(--fs-title); font-weight: 700; margin-block-end: 5px; }
.well__card p { font-size: var(--fs-label); color: var(--text-secondary); line-height: 1.65; }

/* Reframed closing line under the red-flag list: converts a triage list into
   a prioritisation list, so the absence of a flag never reads as "all clear". */
.flags__always {
  display: flex; gap: 9px; align-items: flex-start;
  margin-block-start: var(--s-3); padding-block-start: var(--s-3);
  border-block-start: 1px dashed rgba(153, 2, 24, .22);
  font-size: var(--fs-label); line-height: 1.6; color: var(--text-secondary);
}
.flags__always svg { flex: none; margin-block-start: 2px; color: var(--text-brand); }

/* ------------------------------------------------ procedures */
.proc { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(var(--s-5), 4vw, var(--s-7)); align-items: start; }
@media (max-width: 900px) { .proc { grid-template-columns: 1fr; } }
.proc__aside img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r-lg); box-shadow: var(--shadow-md); margin-block-start: var(--s-4);
}
.proc__aside h2 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.15; }
.proc__aside p { color: var(--text-secondary); margin-block-start: var(--s-3); }
.proc__list { display: grid; gap: var(--s-3); }
.proc__item {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-5);
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start;
}
.proc__q {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--surface-brand-soft); color: var(--text-brand);
  font-variant-numeric: tabular-nums;
}
.proc__item b { display: block; font-size: var(--fs-title); font-weight: 700; margin-block-end: 6px; }
.proc__item p { font-size: var(--fs-label); color: var(--text-secondary); line-height: 1.75; }

/* --------------------------------------------- slogan sheet */
.slogan-sheet {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(24, 18, 10, .5); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: var(--s-4);
}
.slogan-sheet[hidden] { display: none; }
.slogan-sheet__in {
  background: var(--surface-card); border-radius: var(--r-xl);
  width: min(100%, 560px); max-height: 84dvh; overflow-y: auto;
  box-shadow: var(--shadow-xl); padding: var(--s-5);
}
.slogan-sheet__h { display: flex; align-items: center; margin-block-end: var(--s-4); }
.slogan-sheet__h b { font-size: var(--fs-h3); font-family: var(--font-display); }
.slogan-sheet__h button {
  margin-inline-start: auto; width: 36px; height: 36px; border-radius: 50%;
  color: var(--text-muted); font-size: 15px;
}
.slogan-sheet__h button:hover { background: var(--surface-sunken); }
.slogopt {
  display: block; width: 100%; text-align: start;
  border: 1.5px solid var(--border-subtle); border-radius: var(--r-lg);
  padding: var(--s-4); margin-block-end: var(--s-3);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.slogopt:hover { border-color: var(--c-blue-300); }
.slogopt.on { border-color: var(--c-blue-600); background: var(--surface-brand-soft); }
.slogopt__t {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 800;
  line-height: 1.2; margin-block-end: 6px;
}
.slogopt__t i { font-style: normal; color: var(--text-brand); display: block; }
.slogopt__n { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.slogopt__rec {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  background: var(--status-success-soft); color: var(--status-success);
  padding: 2px 8px; border-radius: var(--r-full); margin-block-end: 7px;
}

/* --------------------------------------------------- services */
.svc-groups { display: grid; gap: var(--s-6); }
.svc-group > h3 {
  font-size: var(--fs-h3); margin-block-end: var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
}
.svc-group > h3::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.svc-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.svc {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-4);
  display: flex; gap: var(--s-3); align-items: flex-start;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.svc:hover { border-color: var(--c-blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.svc__ico {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--surface-brand-soft); color: var(--text-brand);
}
.svc b { display: block; font-size: var(--fs-title); font-weight: 600; margin-block-end: 3px; }
.svc p { font-size: var(--fs-label); color: var(--text-secondary); line-height: 1.5; }

/* ---------------------------------------------------- doctor */
.doc { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(var(--s-5), 4vw, var(--s-8)); align-items: start; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } }
.doc__media { display: grid; gap: var(--s-3); align-content: start; }
.doc__media img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
/* Cap the lead photo so the media column stays level with the bio column
   instead of running a full 3:4 portrait the whole width. */
.doc__media > img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 24%; }
.doc__media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.doc__media .pair img { aspect-ratio: 1; object-fit: cover; }
.doc__body p + p { margin-block-start: var(--s-3); }
.doc__body p { color: var(--text-secondary); }

.cv { margin-block-start: var(--s-5); display: grid; gap: 0; }
.cv li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); padding-block: var(--s-3); position: relative; }
.cv li + li { border-block-start: 1px solid var(--border-subtle); }
.cv .yr {
  font-weight: 700; color: var(--text-brand); font-size: var(--fs-label);
  font-variant-numeric: tabular-nums; min-width: 4ch;
}
.cv b { display: block; font-size: var(--fs-title); font-weight: 600; }
.cv span { font-size: var(--fs-label); color: var(--text-muted); }

/* ------------------------------------------------------- app */
.appsec { background: linear-gradient(160deg, var(--c-blue-700), var(--c-blue-600) 55%, var(--brand-deep)); color: #fff; position: relative; overflow: hidden; }
.appsec::before {
  content: ""; position: absolute; inset-block-start: -30%; inset-inline-end: -10%;
  width: 55vw; height: 55vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.11), transparent 62%);
}
.appsec .sec__head .kicker { color: rgba(255, 255, 255, .82); }
.appsec .sec__head h2, .appsec .sec__head p { color: #fff; }
.appsec .sec__head p { opacity: .88; }
.app__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s-5), 4vw, var(--s-8)); align-items: center; position: relative; }
@media (max-width: 880px) { .app__grid { grid-template-columns: 1fr; } }
.app__feats { display: grid; gap: var(--s-3); margin-block: var(--s-5); }
.app__feats li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-label); }
.app__feats svg { flex: none; margin-block-start: 2px; opacity: .9; }
.app__get { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-block-start: var(--s-5); }
.app__note { font-size: var(--fs-caption); opacity: .72; margin-block-start: var(--s-3); }

/* store badges — official artwork proportions, drawn inline so nothing 404s */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px;                       /* > Apple's 40px minimum */
  padding-inline: 16px; border-radius: 9px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .3);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.badge:hover { transform: translateY(-2px); }
.badge small { display: block; font-size: 9.5px; line-height: 1.15; opacity: .85; letter-spacing: .02em; }
.badge b { display: block; font-size: 15px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
.badge__txt { text-align: start; }
.badge-wrap { display: inline-flex; padding: 13px; }   /* clear space = 1/4 badge height */
.qr {
  width: 118px; height: 118px; border-radius: var(--r-md); background: #fff; padding: 8px;
  box-shadow: var(--shadow-lg); flex: none;
}
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }

/* phone mock inside the app section */
.app__phone {
  width: min(100%, 290px); margin-inline: auto; position: relative;
  border-radius: 40px; background: #14100c; padding: 9px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .12);
}
.app__phone-screen {
  border-radius: 32px; overflow: hidden; aspect-ratio: 9/19.3; position: relative;
  background: linear-gradient(180deg, #FAF8F5, #F4F1EC);
  color: #1B1710; text-align: start;
}
/* Dynamic-Island stand-in, seated inside the screen like the real thing */
.app__phone-screen::before {
  content: ""; position: absolute; inset-block-start: 9px; inset-inline-start: 50%;
  transform: translateX(-50%); z-index: 5;
  width: 84px; height: 24px; border-radius: 14px; background: #14100c;
}
html[dir="rtl"] .app__phone-screen::before { transform: translateX(50%); }

.peek { padding: 44px 14px 12px; display: grid; gap: 10px; font-family: var(--font-ui); }
.peek__top { display: flex; align-items: center; gap: 9px; }
.peek__hi { flex: 1; min-width: 0; line-height: 1.25; }
.peek__hi span { display: block; font-size: 9.5px; color: #8A7A63; }
.peek__hi b { font-size: 12.5px; font-weight: 700; }
.peek__bell {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; color: #5A4E3E;
  box-shadow: 0 1px 3px rgba(27,23,16,.08);
}
.peek__bell i { position: absolute; inset-block-start: 6px; inset-inline-end: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-red-600); }

.peek__kids { display: flex; gap: 6px; }
.peek__kid {
  font-size: 10px; font-weight: 600; padding: 5px 10px; border-radius: 20px;
  background: #fff; color: #5A4E3E; box-shadow: inset 0 0 0 1px rgba(27,23,16,.09);
}
.peek__kid.on { background: var(--c-blue-600); color: #fff; box-shadow: none; }

.peek__next {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-deep), var(--c-blue-600) 55%, var(--brand-lift));
  color: #fff; border-radius: 18px; padding: 13px;
  box-shadow: 0 8px 18px rgba(var(--brand-rgb), .3);
}
.peek__next-glow {
  position: absolute; inset-block-start: -60%; inset-inline-end: -20%;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%);
}
.peek__pill {
  display: inline-block; font-size: 8.5px; font-weight: 700; letter-spacing: .03em;
  background: rgba(255,255,255,.2); padding: 3px 8px; border-radius: 20px;
}
.peek__next b { display: block; font-size: 15px; font-weight: 700; margin-block: 7px 3px; font-family: var(--font-display); }
.peek__meta { display: block; font-size: 10px; opacity: .9; }
.peek__next-act { display: flex; gap: 6px; margin-block-start: 11px; position: relative; }
.peek__next-act span {
  flex: 1; text-align: center; font-size: 10px; font-weight: 700;
  background: #fff; color: var(--c-blue-700); border-radius: 20px; padding: 7px 0;
}
.peek__ghost {
  background: transparent !important; color: #fff !important;
  box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, .62);
}

.peek__q { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.peek__qc {
  background: #fff; border-radius: 13px; padding: 9px 3px; text-align: center;
  font-size: 8.5px; font-weight: 600; color: #3A3126;
  box-shadow: 0 1px 3px rgba(27,23,16,.06);
}
.peek__qc span {
  display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 4px;
  border-radius: 10px; background: var(--c-blue-100); color: var(--c-blue-700);
}

.peek__card { background: #fff; border-radius: 15px; padding: 11px; box-shadow: 0 1px 3px rgba(27,23,16,.06); }
.peek__card-h { display: flex; align-items: center; justify-content: space-between; margin-block-end: 4px; }
.peek__card-h b { font-size: 10.5px; font-weight: 700; }
.peek__tag { font-size: 8.5px; font-weight: 700; background: #DFF1EA; color: #00614F; padding: 2px 7px; border-radius: 20px; }
.peek__chart { width: 100%; height: 46px; display: block; }
/* 7.5px axis labels still need the full 4.5:1 — #A99C87 measured 2.69:1. */
.peek__axis { display: flex; justify-content: space-between; font-size: 7.5px; color: #71624D; padding-inline: 4px; direction: ltr; }

.peek__task {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border-radius: 15px; padding: 10px 11px;
  box-shadow: 0 1px 3px rgba(27,23,16,.06);
}
.peek__check {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 12px;
  background: #DFF1EA; color: #00614F;
}
.peek__task span span { display: block; }
.peek__task b { font-size: 10.5px; font-weight: 600; display: block; }
.peek__task span span:last-child { font-size: 9px; color: #6B5D48; }
.peek__chev { margin-inline-start: auto; color: #C3B8A6; }
html[dir="rtl"] .peek__chev { transform: scaleX(-1); }

.peek__tabs {
  position: absolute; inset-inline: 0; inset-block-end: 0; display: flex;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-block-start: 1px solid rgba(27,23,16,.07); padding: 7px 4px 13px;
}
.peek__tab { flex: 1; text-align: center; font-size: 8px; font-weight: 600; color: #8A7A63; }
.peek__tab.on { color: var(--c-blue-600); }
.peek__tab-ic { display: grid; place-items: center; height: 22px; }
.peek__tab.on .peek__tab-ic {
  background: var(--c-blue-200); border-radius: 12px; width: 40px; margin: 0 auto 2px;
}

/* -------------------------------------------------- reviews */
.rev-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rev { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: var(--s-5); }
.rev__stars { color: var(--c-amber-500); display: flex; gap: 2px; margin-block-end: var(--s-3); }
.rev p { font-size: var(--fs-label); line-height: 1.65; }
.rev footer { margin-block-start: var(--s-4); font-size: var(--fs-caption); color: var(--text-muted); font-weight: 600; }

/* ------------------------------------------------- locations */
.branch-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.branch { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; }
.branch__map {
  position: relative; aspect-ratio: 16/9; overflow: hidden; cursor: pointer;
  background: var(--c-sand-100); display: block; width: 100%; border: 0; padding: 0;
}
.branch__map svg { width: 100%; height: 100%; display: block; }
.branch__map-cta {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(var(--brand-rgb), .1); transition: background .2s var(--ease);
}
.branch__map:hover .branch__map-cta { background: rgba(var(--brand-rgb), .18); }
.branch__map-cta span {
  background: #fff; color: var(--text-brand); font-weight: 700; font-size: var(--fs-caption);
  padding: 9px var(--s-4); border-radius: var(--r-full); box-shadow: var(--shadow-md);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.branch__map-cta span svg { flex: none; }
.branch__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.branch__body h3 { font-size: var(--fs-h3); }
.branch__addr { font-size: var(--fs-label); color: var(--text-secondary); line-height: 1.6; }
.branch__wayfind {
  font-size: var(--fs-caption); color: var(--text-brand); background: var(--surface-brand-soft);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); display: flex; gap: 7px; align-items: flex-start;
}
.hours { width: 100%; border-collapse: collapse; font-size: var(--fs-label); }
.hours th, .hours td { padding: 7px 0; text-align: start; border-block-end: 1px solid var(--border-subtle); }
.hours th { font-weight: 600; color: var(--text-secondary); }
.hours td { text-align: end; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.hours tr:last-child th, .hours tr:last-child td { border-block-end: 0; }
.hours .closed td { color: var(--text-muted); }
.hours .today th, .hours .today td { color: var(--text-brand); font-weight: 700; }
.branch__acts { display: flex; gap: var(--s-2); margin-block-start: auto; padding-block-start: var(--s-2); flex-wrap: wrap; }
.branch__acts .btn { flex: 1; min-width: 118px; }

.openstate { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-caption); font-weight: 700; }
.openstate i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.openstate.is-open { color: var(--status-success); }
.openstate.is-closed { color: var(--text-muted); }

/* ------------------------------------------------------- faq */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: var(--s-2); }
.faq details {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); overflow: hidden;
}
.faq details[open] { border-color: var(--c-blue-200); box-shadow: var(--shadow-sm); }
.faq summary {
  padding: var(--s-4) var(--s-5); cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: var(--s-3); list-style: none;
  min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; inline-size: 9px; block-size: 9px; margin-inline-start: auto; flex: none;
  border-inline-end: 2.2px solid var(--text-muted); border-block-end: 2.2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform .22s var(--ease); margin-block-end: 3px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-block: 5px 0; }
.faq .ans { padding: 0 var(--s-5) var(--s-5); color: var(--text-secondary); font-size: var(--fs-label); line-height: 1.65; }

/* ------------------------------------------------ final cta */
.cta-final {
  background: var(--c-sand-950); color: var(--c-sand-50);
  border-radius: var(--r-xl); padding: clamp(var(--s-6), 5vw, var(--s-8));
  text-align: center; position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset-block-start: -50%; inset-inline-start: 50%;
  transform: translateX(-50%); width: 120%; height: 200%;
  background: radial-gradient(ellipse at center top, rgba(var(--brand-rgb), .30), transparent 58%);
}
.cta-final > * { position: relative; }
.cta-final h2 { font-family: var(--font-display); font-size: var(--fs-h1); margin-block-end: var(--s-3); }
.cta-final p { opacity: .8; max-width: 52ch; margin-inline: auto; }
.cta-final .row { justify-content: center; flex-wrap: wrap; margin-block-start: var(--s-5); }

/* ---------------------------------------------------- footer */
.ftr { background: var(--c-sand-950); color: rgba(248, 247, 246, .68); padding-block: var(--s-7) var(--s-5); margin-block-start: var(--s-8); }
.ftr__grid { display: grid; gap: var(--s-6); grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 820px) { .ftr__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr__grid { grid-template-columns: 1fr; } }
.ftr h4 { color: #fff; font-size: var(--fs-label); margin-block-end: var(--s-3); }
/* inline-block + vertical padding lifts these past the 24px minimum
   target size of WCAG 2.2 SC 2.5.8 */
.ftr a {
  color: rgba(248, 247, 246, .68); text-decoration: none; font-size: var(--fs-label);
  display: inline-block; padding-block: 5px;
}
.ftr a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ftr ul { display: grid; gap: var(--s-2); }
.ftr__brand { display: flex; align-items: center; gap: var(--s-3); margin-block-end: var(--s-3); }
.ftr__brand img { width: 52px; height: 52px; }
.ftr__brand b { color: #fff; font-size: var(--fs-title); display: block; }
.ftr__legal {
  margin-block-start: var(--s-6); padding-block-start: var(--s-4);
  border-block-start: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  justify-content: space-between; font-size: var(--fs-caption); opacity: .8;
}

/* -------------------------------------------- sticky mobile bar */
.mobar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 70;
  display: none; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  padding-block-end: calc(var(--s-2) + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
  border-block-start: 1px solid var(--border-subtle);
  transform: translateY(110%); transition: transform .3s var(--ease-out);
}
.mobar.show { transform: translateY(0); }
.mobar .btn { flex: 1; min-height: 48px; }
[data-theme="dark"] .mobar { background: rgba(48, 40, 29, .94); }
@media (max-width: 860px) { .mobar { display: flex; } body.site { padding-block-end: 76px; } }

/* ============================================== craft details
   Four restrained effects only. No parallax, no scroll-jacking, no
   glass, no 3D — for a medical brand those read as agency template
   and cost credibility with a referring physician. Every one below
   is gated on .js-motion and prefers-reduced-motion. */

/* 1. Reading-progress hairline. Useful, not decorative. */
.progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0;
  height: 2.5px; width: 0; z-index: 100; pointer-events: none;
  background: linear-gradient(to right, var(--c-blue-600), var(--c-blue-400), var(--c-red-600));
  transition: width .08s linear;
}
html[dir="rtl"] .progress { inset-inline-start: auto; inset-inline-end: 0; }

/* 2. Fine grain over the hero — stops the gradients banding and adds
      the tactile quality that separates print-grade work from flat CSS. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .34; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.30'/%3E%3C/svg%3E");
  /* keep the red radial from the original ::after */
  background-color: transparent;
}

/* 3. Staggered entrance for card grids — the single cheapest thing that
      makes a page feel authored rather than dumped. */
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .stagger.in > * { animation: riseIn .5s var(--ease-out) both; }
  html.js-motion .stagger.in > *:nth-child(2) { animation-delay: .06s; }
  html.js-motion .stagger.in > *:nth-child(3) { animation-delay: .12s; }
  html.js-motion .stagger.in > *:nth-child(4) { animation-delay: .18s; }
  html.js-motion .stagger.in > *:nth-child(5) { animation-delay: .24s; }
  html.js-motion .stagger.in > *:nth-child(n+6) { animation-delay: .3s; }
  @keyframes riseIn { from { opacity: 0; transform: translateY(16px); } }

  /* 4. Cross-fade when the symptom panel swaps, so switching reads as
        one considered surface rather than a hard content replace. */
  .worry__panel.swap { animation: panelIn .32s var(--ease-out); }
  @keyframes panelIn { from { opacity: 0; transform: translateY(6px); } }
}

/* ------------------------------------------------ reveal anim
   Gated on .js-motion, which JS only adds when an IntersectionObserver
   exists and the user has not asked for reduced motion. Content is
   therefore visible by default -- with JS off, in print, or on a
   full-page capture nothing can get stranded at opacity:0. */
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  }
  html.js-motion .reveal.in { opacity: 1; transform: none; }
}
