/* ============================================================
   Klinik Pergigian Manjeet — styles.css
   Mobile-first. Base styles target 375px; layout switches at
   600 / 700 / 900 / 1024px. Sizes live in the tokens below as ONE
   continuous clamp each; breakpoints only switch layout.
   ============================================================ */

:root {
  /* ---------- Brand palette (sampled from the approved design) ---------- */
  --indigo-950: #0e0b2e;
  --indigo-900: #100d35;
  --indigo-850: #191147;
  --indigo-800: #1e1550;
  --indigo-750: #221859;
  --indigo-700: #271f52;
  --indigo-600: #393361;
  --gold-300:   #e7d39c;
  --gold-400:   #d8bc6c;
  --gold-500:   #c9a84c;   /* fills: buttons, lines, dots. Not for text on white (2.3:1) */
  --gold-600:   #9c7c24;   /* large gold text on white, 3.9:1 */
  --gold-700:   #876818;   /* small gold text on white, 5.2:1 */
  --white:      #ffffff;
  --indigo-050: #f6f5fa;   /* light surface on the white page */
  --mist-200:   #d9d6ea;   /* body copy on indigo */
  --mist-400:   #a9a4c8;   /* labels and meta on indigo */
  --ink-600:    #46415f;   /* body copy on white, 9.6:1 */
  --ink-500:    #5e5a78;   /* labels and meta on white, 6.5:1 */
  --field:      #f4f5f9;
  --line-light: #e3e2ec;
  --green-wa:   #25d366;
  --cyan-waze:  #33ccff;
  --green-ok:   #1f7a45;
  --red-err:    #c0392b;

  /* ---------- Semantic tokens: the white page ----------
     The navy boxes further down redefine these same tokens, so a component
     never needs to know which kind of surface it sits on. */
  --color-bg:          var(--white);
  --color-bg-alt:      var(--white);
  --color-bg-deep:     var(--white);
  --color-bg-footer:   var(--indigo-850);
  --color-surface:     var(--indigo-050);
  --color-primary:     var(--gold-500);   /* fills only */
  --color-primary-hover: var(--gold-400);
  --color-accent-text: var(--gold-700);   /* small gold text */
  --color-accent-large:var(--gold-600);   /* large gold text and gold marks */
  --color-focus:       var(--indigo-850);
  --color-text:        var(--indigo-850);
  --color-text-soft:   var(--ink-600);
  --color-text-muted:  var(--ink-500);
  --color-ink:         var(--indigo-850);
  --color-ink-muted:   var(--ink-500);
  --color-paper:       var(--white);
  --color-line:        rgba(25, 17, 71, 0.12);
  --color-tint:        rgba(25, 17, 71, 0.05);   /* icon wells, hover fills */
  --color-tint-strong: rgba(25, 17, 71, 0.08);
  --color-line-strong: rgba(25, 17, 71, 0.28);
  --color-success:     var(--green-ok);
  --color-danger:      var(--red-err);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;

  --radius-sm:   6px;
  --radius-card: 12px;
  --radius-lg:   16px;
  --shadow-card: 0 1px 2px rgba(25, 17, 71, 0.06), 0 4px 8px rgba(25, 17, 71, 0.06);
  --shadow-lift: 0 2px 4px rgba(25, 17, 71, 0.08), 0 8px 8px -2px rgba(25, 17, 71, 0.12);
  --shadow-nav:  0 4px 8px rgba(25, 17, 71, 0.08);
  --shadow-float: 0 8px 24px rgba(6, 4, 24, 0.22);

  /* z-index scale */
  --z-float: 20;
  --z-nav:   30;
  --z-skip:  40;

  /* ---------- Fluid layout ---------- */
  --container: clamp(1280px, 86vw, 1800px);
  --gutter:    clamp(20px, 2.6vw + 4px, 56px);
  --section-y: clamp(60px, 6vw + 20px, 176px);
  --nav-h:     68px;

  /* ---------- Fluid type: one clamp per size, 320px to 2560px ----------
     The display size is also capped by viewport HEIGHT so the hero, button
     included, always fits the fold on short laptop screens. */
  --fs-display: min(clamp(2.6rem, 4.6vw + 1.4rem, 9rem), 12vh);
  --fs-page:    clamp(2.3rem, 2.9vw + 1.5rem, 6rem);
  --fs-h2:      clamp(1.85rem, 1.9vw + 1.2rem, 4.25rem);
  --fs-h2-sm:   clamp(1.65rem, 1.3vw + 1.15rem, 3.25rem);
  --fs-h3:      clamp(1.05rem, 0.45vw + 0.95rem, 1.6rem);
  --fs-lead:    clamp(1rem, 0.3vw + 0.9rem, 1.4rem);
  --fs-body:    clamp(1rem, 0.15vw + 0.94rem, 1.125rem);
  --fs-small:   clamp(0.84rem, 0.12vw + 0.8rem, 0.98rem);
  --fs-label:   clamp(0.66rem, 0.08vw + 0.64rem, 0.78rem);
  --fs-stat:    clamp(1.6rem, 2.1vw + 1rem, 4.2rem);

  /* ---------- Motion (emil-design-eng) ---------- */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-fast: 0.14s var(--ease-out);   /* press */
  --t-base: 0.24s var(--ease-out);   /* hover, state */

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

@media (min-width: 960px) {
  :root { --nav-h: 76px; }
}

/* ---------- The navy boxes on the white page ----------
   The services ticker, the review cards, the clinic card and the footer.
   Each one redefines the colour tokens, so everything inside reads light on navy. */
.marquee,
.review figure,
.clinic,
.footer {
  --color-bg:          var(--indigo-850);
  --color-bg-deep:     var(--indigo-900);
  --color-surface:     var(--indigo-700);
  --color-accent-text: var(--gold-500);
  --color-accent-large:var(--gold-500);
  --color-focus:       var(--gold-500);
  --color-text:        var(--white);
  --color-text-soft:   var(--mist-200);
  --color-text-muted:  var(--mist-400);
  --color-line:        rgba(255, 255, 255, 0.12);
  --color-tint:        rgba(255, 255, 255, 0.06);
  --color-tint-strong: rgba(255, 255, 255, 0.08);
  --color-line-strong: rgba(255, 255, 255, 0.32);
  color: var(--color-text);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  /* hidden is the fallback; clip wins where supported. hidden on <body> turns
     it into a scroll container, which silently breaks position: sticky on the
     nav. clip stops sideways scroll without creating a scroll container. */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--color-primary); color: var(--color-ink); }

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--color-text);
  overflow-wrap: break-word;
  text-wrap: balance;
}
p { text-wrap: pretty; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
em.gold, .gold { color: var(--color-accent-large); font-style: italic; }
h2 em.gold { display: block; }   /* the gold phrase always takes its own line */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.1em; height: 1.1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--brand { stroke: none; }

.skip-link {
  position: absolute; top: -100px; left: var(--gutter); z-index: var(--z-skip);
  background: var(--color-primary); color: var(--color-ink);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 10px; }

.eyebrow {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: 0.9rem;
}
.eyebrow--ink { color: var(--gold-700); }

.section-head { max-width: 680px; margin-bottom: clamp(24px, 2.6vw + 10px, 64px); }
.section-head h2 + .section-head__lead { margin-top: 0.85rem; }
.section-head__lead { color: var(--color-text-soft); font-size: var(--fs-small); max-width: 52ch; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem clamp(0.95rem, 1vw + 0.6rem, 1.5rem);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 0.2vw + 0.85rem, 1rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-fast);
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 1.05em; height: 1.05em; transition: transform var(--t-base); }

.btn--gold { background: var(--color-primary); color: var(--color-ink); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-line-strong); }
.btn--line { background: transparent; color: var(--color-text); border-color: var(--color-line-strong); }
.btn--whatsapp { background: var(--green-wa); color: var(--color-ink); font-weight: 700; }
.btn--waze { background: var(--cyan-waze); color: var(--color-ink); font-weight: 700; }
.btn--sm { min-height: 44px; padding: 0.55rem 1.05rem; font-size: 0.86rem; }
.btn--block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn--gold:hover { background: var(--color-primary-hover); }
  .btn--ghost:hover, .btn--line:hover { border-color: var(--color-text); background: var(--color-tint); }
  .btn--whatsapp:hover { background: color-mix(in srgb, var(--green-wa) 88%, var(--white)); }
  .btn--waze:hover { background: color-mix(in srgb, var(--cyan-waze) 82%, var(--white)); }
  .btn:hover .icon:has(use[href="#i-arrow"]),
  .btn:hover .icon:has(use[href="#i-send"]) { transform: translateX(3px); }
}

.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading .icon { opacity: 0; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid color-mix(in srgb, var(--color-ink) 30%, transparent);
  border-top-color: var(--color-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  transition: box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
/* The bar stays solid at every width when scrolled, so page text never shows
   through behind the logo. Phones and tablets get a soft shadow; from 1024px a
   pill forms inside the bar (see the media block under .nav__inner::before). */
.nav.is-scrolled { box-shadow: var(--shadow-nav); }

.nav__inner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--nav-h);
}

.nav__inner::before {
  content: "";
  display: none;
  position: absolute;
  z-index: -1;
  inset: 8px max(4px, calc(var(--gutter) - 22px));
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  background: var(--color-bg-deep);
  box-shadow: var(--shadow-nav);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}
@media (min-width: 1024px) {
  .nav__inner::before { display: block; }
  .nav.is-scrolled { box-shadow: none; border-bottom-color: transparent; }
  .nav.is-scrolled .nav__inner::before { opacity: 1; transform: none; }
}

.brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.brand__sub {
  margin-top: 6px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

/* Mobile menu: a panel that drops from under the bar */
.nav__menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px var(--gutter) 24px;
  background: var(--color-bg-deep);
  box-shadow: var(--shadow-nav);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0s linear 0.2s;
}
.nav__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0s;
}
.nav__menu a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--color-line);
}
.nav__menu-cta { margin-top: var(--space-5); }


/* Language switch: two real pages (/ and /ms/), so each language is indexable */
.lang {
  display: inline-flex;
  margin-left: auto;
  padding: 2px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
}
.lang a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  touch-action: manipulation;
  transition: background-color var(--t-base), color var(--t-base), transform var(--t-fast);
}
.lang a:active { transform: scale(0.94); }
.lang a[aria-current="page"] { background: var(--color-primary); color: var(--color-ink); }
@media (hover: hover) and (pointer: fine) {
  .lang a:not([aria-current]):hover { color: var(--color-text); background: var(--color-tint); }
}

.nav__burger {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-left: 10px;
  background: transparent;
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  color: var(--color-text);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--t-fast), border-color var(--t-base);
}
.nav__burger:active { transform: scale(0.94); }
.nav__burger .icon { width: 22px; height: 22px; grid-area: 1 / 1; }
.nav__burger .icon--close { display: none; }
.nav__burger[aria-expanded="true"] .icon--menu { display: none; }
.nav__burger[aria-expanded="true"] .icon--close { display: block; }

/* Phones: the floating button at the bottom is the WhatsApp link, so the bar
   keeps just the logo, the language switch and the menu. */
.lang, .nav__burger { flex-shrink: 0; }
@media (max-width: 599px) {
  .nav__inner { gap: 8px; }
  .nav__burger { margin-left: 0; }
  .nav__cta { display: none; }
}
/* the narrowest phones: tighter tracking keeps "KLINIK PERGIGIAN" on one line */
@media (max-width: 359px) {
  .brand__sub { letter-spacing: 0.16em; white-space: nowrap; }
}
@media (min-width: 600px) {
  .nav__cta { margin-left: 12px; }
}

@media (min-width: 1024px) {
  .nav__menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: clamp(14px, 2.4vw - 10px, 44px);
    margin-left: auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .brand__sub { white-space: nowrap; }
  .nav__menu a:not(.btn) {
    position: relative;
    min-height: 44px;
    white-space: nowrap;
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--color-text-soft);
    border: 0;
    transition: color var(--t-base);
  }
  .nav__menu a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 8px;
    height: 1.5px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-base);
  }
  .nav__menu a[aria-current] { color: var(--color-text); }
  .nav__menu a[aria-current]::after { transform: scaleX(1); }
  .nav__menu-cta { display: none; }
  .lang { margin-left: clamp(8px, 1.6vw - 4px, 32px); }
  .nav__cta { margin-left: 12px; }
  .nav__burger { display: none; }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nav__menu a:not(.btn):hover { color: var(--color-text); }
  .nav__menu a:not(.btn):hover::after { transform: scaleX(1); }
}

/* ============================================================
   HERO: the photo fills the first screen and blends into the white page.
   Copy on top, the three numbers along the foot. Below 768px the crop
   is portrait and the copy sits low, so the face stays clear of it.
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
  min-height: min(calc(100svh - var(--nav-h)), 1320px);
  overflow: hidden;
  background: var(--color-bg-deep);
}

.hero__photo {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: -1;
  height: min(68%, 460px);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 88%;
}
/* The blend: page colour washes over the photo from the copy's side, and the
   foot melts into the marquee below. */
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      var(--color-bg-deep) 0%,
      color-mix(in srgb, var(--color-bg-deep) 92%, transparent) 36%,
      color-mix(in srgb, var(--color-bg) 66%, transparent) 58%,
      color-mix(in srgb, var(--color-bg) 18%, transparent) 76%,
      color-mix(in srgb, var(--color-bg) 10%, transparent) 100%);
}

.hero__inner {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding-block: clamp(132px, 38vw, 300px) clamp(16px, 2vw + 8px, 40px);
}

.hero__text { position: relative; min-width: 0; }
/* Phones: a veil anchored to the copy rather than to the screen height, so the
   gold kicker and the headline stay readable over the pale mask on every phone. */
@media (max-width: 767px) {
  .hero__text::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -44px calc(var(--gutter) * -1) 0;
    background: linear-gradient(to bottom,
      transparent,
      color-mix(in srgb, var(--color-bg-deep) 92%, transparent) 44px,
      var(--color-bg-deep) 110px);
  }
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: clamp(14px, 1.4vw + 6px, 32px);
}
.hero__kicker {
  display: block;
  margin-bottom: clamp(12px, 1.2vw + 4px, 28px);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
@media (max-width: 479px) { .hero__kicker { letter-spacing: 0.09em; } }
.hero__line { display: block; }
.hero__line--gold em { color: var(--color-accent-large); font-style: italic; letter-spacing: -0.03em; }

.hero__sub {
  max-width: 44ch;
  margin-bottom: clamp(18px, 2vw + 6px, 40px);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--color-text-soft);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* the outline button needs a little body to read over the photograph */
.hero .btn--ghost { background: color-mix(in srgb, var(--color-bg) 78%, transparent); }

@media (min-width: 768px) {
  .hero__photo { inset: 0; height: auto; }
  .hero__photo img { object-position: 67% 10%; }
  .hero__photo::after {
    background:
      linear-gradient(to top,
        var(--color-bg-deep) 0%,
        color-mix(in srgb, var(--color-bg-deep) 78%, transparent) 16%,
        transparent 38%),
      linear-gradient(to right,
        var(--color-bg) 0%,
        color-mix(in srgb, var(--color-bg) 97%, transparent) 44%,
        color-mix(in srgb, var(--color-bg) 78%, transparent) 54%,
        color-mix(in srgb, var(--color-bg) 36%, transparent) 68%,
        color-mix(in srgb, var(--color-bg) 12%, transparent) 100%);
  }
  .hero__inner { align-items: center; padding-block: clamp(24px, 3vh, 48px); }
  .hero__text { max-width: clamp(22rem, 48vw, 62rem); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__photo::after {
    background:
      linear-gradient(to top,
        var(--color-bg-deep) 0%,
        color-mix(in srgb, var(--color-bg-deep) 78%, transparent) 16%,
        transparent 38%),
      linear-gradient(to right,
        var(--color-bg) 0%,
        color-mix(in srgb, var(--color-bg) 94%, transparent) 46%,
        color-mix(in srgb, var(--color-bg) 42%, transparent) 66%,
        color-mix(in srgb, var(--color-bg) 22%, transparent) 100%);
  }
}

@media (min-width: 1024px) {
  .hero__photo img { object-position: 50% 14%; }
  /* thin gold rule to the left of the copy, as in the original design */
  .hero__text::before {
    content: "";
    position: absolute;
    left: calc(var(--gutter) * -0.55);
    top: 6%; bottom: 6%;
    width: 1.5px;
    background: linear-gradient(to bottom, transparent, var(--color-primary) 30%, var(--color-primary) 70%, transparent);
    opacity: 0.7;
  }
}

/* ============================================================
   MARQUEE (signature detail)
   ============================================================ */
.marquee {
  overflow: hidden;
  background: var(--color-bg-deep);
  border-block: 1px solid var(--color-line);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee__list { display: flex; flex-shrink: 0; }
.marquee__list li {
  display: flex;
  align-items: center;
  gap: clamp(22px, 1.6vw + 10px, 44px);
  padding: 0.8rem 0 0.8rem clamp(22px, 1.6vw + 10px, 44px);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.05rem, 0.7vw + 0.85rem, 1.65rem);
  white-space: nowrap;
}
.marquee__list li::after {
  content: "";
  width: 6px; height: 6px;
  background: var(--color-primary);
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: var(--section-y) 0; }

.about__inner { display: grid; gap: var(--space-6); }

.about__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.about__text h2 { margin-bottom: 0.6em; }
/* the client wants this heading on one line: the gold phrase stays inline here */
.about__text h2 em.gold { display: inline; }
.about__text p:not(.eyebrow) {
  max-width: 62ch;
  margin-bottom: 1em;
  color: var(--color-text-soft);
}
.about__text strong { color: var(--color-text); font-weight: 600; }
.about__text .btn { margin-top: 0.75rem; }

@media (min-width: 768px) {
  .about__inner {
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 120px);
    align-items: center;
  }
  .about__media { position: relative; }
  .about__media::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
    border-radius: 14px;
    transform: translate(14px, 14px);
  }
  .about__media img { position: relative; aspect-ratio: 4 / 3; }
}

/* ============================================================
   STATS: the foot of the hero. Three across at every width.
   The digits count up from zero (script.js); the + and "nd" wait
   until the number has landed, so "0nd" never shows.
   ============================================================ */
.stats { position: relative; flex-shrink: 0; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--color-line-strong);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-block: clamp(14px, 1vw + 8px, 32px);
}
.stat + .stat {
  padding-left: clamp(10px, 2.4vw, 56px);
  border-left: 1px solid var(--color-line);
}
.stat__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-stat);
  line-height: 1;
  white-space: nowrap;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
}
.stat__unit {
  margin-left: 0.06em;
  font-size: 0.62em;
  color: var(--color-accent-text);
  transition: opacity var(--t-base);
}
.stat__unit--pre { margin: 0 0.06em 0 0; }
.stat.is-counting .stat__unit { opacity: 0; }
.stat__label {
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.stat--gold .stat__value { color: var(--color-accent-large); }   /* one accent in the row */

/* Services: all eight listed, two per row from the smallest phone up. The card
   internals scale with the column (see .svc below) instead of reflowing. */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 700px) {
  .services__grid { gap: clamp(16px, 1.6vw, 32px); }
}
@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: var(--section-y) 0;
  background: var(--color-bg-alt);
}

.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(5px, 0.3vw + 4px, 8px);
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--line-light);
  border-radius: clamp(12px, 0.4vw + 10px, 16px);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.svc__img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: clamp(8px, 0.2vw + 7px, 10px);
}
.svc__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(10px, 1vw + 6px, 24px) clamp(6px, 0.8vw + 3px, 18px) clamp(2px, 0.6vw, 12px);
}
.svc__title {
  margin-bottom: 0.4em;
  font-size: clamp(0.95rem, 0.6vw + 0.85rem, 1.6rem);
  color: var(--color-ink);
}
.svc__desc {
  margin-bottom: 6px;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.98rem);
  line-height: 1.5;
  color: var(--color-ink-muted);
}
.svc__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  font-size: clamp(0.64rem, 0.15vw + 0.6rem, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
}
.svc__link { width: 100%; justify-content: space-between; }
/* the whole card is the link's hit area */
.svc__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.svc__link .icon {
  width: clamp(30px, 0.6vw + 28px, 36px); height: clamp(30px, 0.6vw + 28px, 36px);
  padding: clamp(8px, 0.2vw + 7px, 10px);
  border-radius: 50%;
  background: var(--field);
  transition: background-color var(--t-base), color var(--t-base), transform var(--t-base);
}
.svc__link:focus-visible { outline: none; }
.svc:focus-within { outline: 2px solid var(--color-focus); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
  .svc:hover .svc__link .icon { background: var(--color-ink); color: var(--color-primary); transform: translateX(2px); }
}

@media (min-width: 900px) {
  .services .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    align-items: end;
    column-gap: 48px;
    max-width: none;
  }
  .services .section-head h2 + .section-head__lead { margin-top: 0; justify-self: end; max-width: 44ch; }
}

/* ============================================================
   WHY CHOOSE US — the legacy line
   Four chapters strung on one gold line that draws itself as the
   visitor scrolls (script.js). Up to 1099px: a vertical line with round
   photo "nodes". From 1100px: a horizontal line, staggered chapters and
   oversized numerals that overlap each photograph.
   Everything is fully visible without JS; the dimmed "not yet reached"
   state only exists under .motion.
   ============================================================ */
.why {
  padding: var(--section-y) 0;
  background: var(--color-bg-deep);   /* flat, so the labels can mask the line invisibly */
  overflow: hidden;
}

.legacy {
  position: relative;
  --thumb: clamp(72px, 9vw + 40px, 128px);
}

.legacy__track {
  position: absolute;
  top: calc(var(--thumb) / 2);
  bottom: 0;
  left: calc(var(--thumb) / 2 - 1px);
  width: 2px;
  background: var(--color-line);
}
.legacy__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--color-primary) 70%, transparent);
  transform-origin: top;
}

.legacy__list {
  position: relative;          /* paints above the track */
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2vw + 16px, 40px);
}

.chapter {
  display: grid;
  grid-template-columns: var(--thumb) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(14px, 1.5vw + 8px, 28px);
}
.chapter__node { display: none; }

.chapter__when {
  grid-column: 2; grid-row: 1;
  align-self: center;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.chapter__num {
  grid-column: 2; grid-row: 1;
  justify-self: end;
  align-self: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 1.2vw + 1.4rem, 2.6rem);
  line-height: 1;
  color: var(--color-accent-large);
  font-variant-numeric: lining-nums;
}
.chapter__num sup { font-size: 0.45em; vertical-align: 0.9em; margin-left: 0.04em; }

.chapter__media {
  grid-column: 1; grid-row: 1 / span 3;
  align-self: start;
  position: relative;
  width: var(--thumb);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  /* a ring of page colour so the line seems to pass behind the photo */
  box-shadow: 0 0 0 6px var(--color-bg-deep);
  background: var(--color-bg-deep);
  transition: border-color 0.4s var(--ease-out);
}
.chapter__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.chapter__title {
  grid-column: 2; grid-row: 2;
  margin: 6px 0 6px;
  font-size: clamp(1.15rem, 1vw + 0.95rem, 2.1rem);
  line-height: 1.15;
}
.chapter__text {
  grid-column: 2; grid-row: 3;
  max-width: 46ch;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--color-text-soft);
}

/* Not yet reached by the line (motion only): photo dims, ring goes quiet. */
.motion .chapter:not(.is-lit) .chapter__media { border-color: var(--color-line-strong); }
.motion .chapter:not(.is-lit) .chapter__media img { opacity: 0.45; }

@media (min-width: 1100px) {
  .legacy { padding-top: 2px; }
  .legacy__track {
    top: 12px;
    bottom: auto;
    left: 0;
    right: calc(var(--gutter) * -1);   /* runs on past the last chapter: the legacy continues */
    width: auto;
    height: 2px;
  }
  .legacy__fill {
    background: linear-gradient(to right, var(--color-primary) 85%, transparent);
    transform-origin: left;
  }
  .legacy__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(22px, 2.6vw, 64px);
    align-items: start;
  }
  .chapter {
    display: block;
    max-width: none;
    position: relative;
    padding-top: clamp(52px, 2vw + 32px, 72px);
  }
  .chapter__node {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 0 0 6px var(--color-bg-deep), 0 0 0 7px color-mix(in srgb, var(--color-primary) 35%, transparent);
    transition: background-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  }
  .motion .chapter:not(.is-lit) .chapter__node {
    background: var(--color-bg-deep);
    box-shadow: 0 0 0 6px var(--color-bg-deep);
  }
  /* the label sits on the line like a marker, masking it behind */
  .chapter__when {
    position: absolute;
    top: 0; left: 36px;
    padding: 0 12px 0 8px;
    line-height: 26px;
    background: var(--color-bg-deep);
  }
  .chapter__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 14px;
    box-shadow: none;
  }
  /* a soft scrim of page colour at the foot of each photo, so the numeral reads where it overlaps */
  .chapter__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, color-mix(in srgb, var(--color-bg-deep) 62%, transparent), transparent 40%);
    pointer-events: none;
  }
  /* every second chapter steps down, breaking the row */
  .chapter:nth-child(even) .chapter__media { margin-top: clamp(32px, 3vw, 88px); }

  .chapter__num {
    display: block;
    position: relative;
    z-index: 1;
    margin: -0.58em -0.04em 0 0;
    text-align: right;               /* tucks into the photo's lower right corner */
    font-size: clamp(3.4rem, 3vw + 1.3rem, 7.5rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
  }
  .chapter__title { margin: 0.3em 0 0.45em; }
}

@media (hover: hover) and (pointer: fine) {
  .chapter:hover .chapter__media img { transform: scale(1.04); }
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews { padding: var(--section-y) 0; }

.reviews__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: clamp(28px, 2.6vw + 10px, 64px);
}
.reviews__head .section-head { margin-bottom: 0; }
@media (max-width: 359px) {
  .reviews { padding-block: 44px; }
  .reviews__head { gap: 14px; margin-bottom: 18px; }
  .rating { padding: 8px 8px 8px 14px; gap: 6px 14px; }
  .review figure { gap: 10px; }
  .review__quote p { line-height: 1.5; }
}

.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  align-self: flex-start;
  padding: 10px 10px 10px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 14px;
}
.rating__source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.rating__source .icon { width: 18px; height: 18px; }
.rating__score { display: inline-flex; align-items: center; gap: 10px; }
.rating__num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.7rem, 0.6vw + 1.5rem, 2.4rem);
  line-height: 1;
}
.rating__count { font-size: 0.8rem; color: var(--color-text-muted); }

.stars { display: inline-flex; gap: 2px; color: var(--color-accent-large); }
.stars svg { width: 14px; height: 14px; fill: currentColor; }

@media (min-width: 900px) {
  .reviews__head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .rating { align-self: auto; border-radius: 999px; }
}

/* The carousel: one slow, constant, endless row at every width.
   script.js adds .is-loop and a copy of the cards on each side, then moves the
   whole row in one piece. It stays a real scroll row, so a swipe takes over at
   once. Without JS, or with reduced motion, it is a plain swipe row with snap. */
.reviews__rail {
  --card: clamp(280px, 12vw + 240px, 520px);
  --gap: clamp(12px, 1.2vw, 28px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 2px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}
.reviews__rail:focus-visible { outline-offset: -3px; }
.reviews__grid {
  display: flex;
  gap: var(--gap);
  width: max-content;
  padding-inline: var(--gutter);
}
.reviews__grid > li { flex: 0 0 var(--card); scroll-snap-align: start; }

/* Whole-pixel cards and gaps: every copy of a card lands on the same pixel grid,
   so the frames either side of the wrap are identical, text edges included. */
@supports (width: round(down, 1px, 1px)) {
  .reviews__rail {
    --card: round(down, clamp(280px, 12vw + 240px, 520px), 1px);
    --gap: round(down, clamp(12px, 1.2vw, 28px), 1px);
  }
}

.reviews__rail.is-loop {
  scroll-snap-type: none;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, var(--white) var(--fade), var(--white) calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to right, transparent, var(--white) var(--fade), var(--white) calc(100% - var(--fade)), transparent);
  --fade: clamp(16px, 5vw, 120px);
}
.reviews__rail.is-loop::-webkit-scrollbar { display: none; }
.reviews__rail.is-loop .reviews__grid { padding-inline: 0; will-change: transform; }

.reviews__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.reviews__controls[hidden] { display: none; }
.reviews__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.reviews__hint .icon { width: 16px; height: 16px; }
/* the smallest phones keep the button and the hint on one line */
@media (max-width: 359px) { .reviews__hint .icon { display: none; } }
/* a mouse stops the row by hovering, so only touch screens need the hint */
@media (hover: hover) and (pointer: fine) { .reviews__hint { display: none; } }
.reviews__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color var(--t-base), color var(--t-base), transform var(--t-fast);
}
.reviews__toggle:active { transform: scale(0.97); }
.reviews__toggle .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.reviews__toggle .icon--play,
.reviews__toggle .reviews__toggle-off { display: none; }
.reviews__toggle[aria-pressed="true"] .icon--pause,
.reviews__toggle[aria-pressed="true"] .reviews__toggle-on { display: none; }
.reviews__toggle[aria-pressed="true"] .icon--play { display: block; }
.reviews__toggle[aria-pressed="true"] .reviews__toggle-off { display: inline; }
@media (hover: hover) and (pointer: fine) {
  .reviews__toggle:hover { border-color: var(--color-text); color: var(--color-text); }
}

.review { display: flex; }
.review figure {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: clamp(18px, 1vw + 12px, 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 16px;
}
.review__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review__quote { flex: 1; }
.review__quote p {
  font-size: var(--fs-small);
  font-style: italic;
  line-height: 1.65;
  color: var(--color-text-soft);
}
.review__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--color-line);
}
.review__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 700;
}
.review__who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.review__who cite { font-style: normal; font-weight: 600; font-size: 0.92rem; }
.review__date { font-size: 0.75rem; color: var(--color-text-muted); }
.review__src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-soft);
}
.review__src .icon { width: 16px; height: 16px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding: var(--section-y) 0;
  background: var(--color-bg-deep);
  overflow: hidden;
}
.faq__inner { display: grid; gap: var(--space-6); }

.faq__intro { position: relative; }
.faq__intro > :not(.faq__ghost) { position: relative; }
.faq__intro h2 { margin-bottom: 0.5em; }
.faq__lead { max-width: 40ch; margin-bottom: var(--space-5); color: var(--color-text-soft); font-size: var(--fs-small); }
.faq__ghost { display: none; }

.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item:first-child { border-top: 1px solid var(--color-line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 60px;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.02rem, 0.45vw + 0.92rem, 1.5rem);
  line-height: 1.3;
  touch-action: manipulation;
  transition: color var(--t-base);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  width: 22px; height: 22px;
  color: var(--color-accent-text);
  transition: transform var(--t-base);
}
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item__a { padding: 0 clamp(8px, 3vw, 48px) 20px 0; }
.faq-item__a p { max-width: 62ch; font-size: var(--fs-small); line-height: 1.7; color: var(--color-text-soft); }
.motion .faq-item[open] .faq-item__a { animation: faq-in 0.24s var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

@media (hover: hover) and (pointer: fine) {
  .faq-item summary:hover { color: var(--color-accent-text); }
}

@media (min-width: 900px) {
  .faq__inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(40px, 6vw, 140px);
    align-items: start;
  }
  .faq__intro { position: sticky; top: calc(var(--nav-h) + 32px); }
  .faq__ghost {
    display: block;
    position: absolute;
    right: 4%;
    top: -0.32em;
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(12rem, 14vw, 26rem);
    line-height: 1;
    color: color-mix(in srgb, var(--color-primary) 9%, transparent);
    pointer-events: none;
    user-select: none;
  }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: var(--section-y) 0; background: var(--color-bg-alt); }

/* Booking card (light), under the clinic card. The fields are one grid so the
   same markup can pair up differently on phones and on desktop. */
.booking {
  display: grid;
  gap: clamp(14px, 2vw + 6px, 64px);
  margin-top: clamp(16px, 1.6vw + 8px, 40px);
  padding: clamp(20px, 1.8vw + 12px, 48px);
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.booking__title {
  margin-bottom: 0.3em;
  font-size: clamp(1.45rem, 1.1vw + 1.15rem, 3rem);
  color: var(--color-ink);
}
.booking__lead { max-width: 44ch; font-size: var(--fs-small); line-height: 1.55; color: var(--color-ink-muted); }
.booking__lead .req { color: var(--gold-700); font-weight: 700; }
.booking :focus-visible { outline-color: var(--color-ink); }

.booking__form { display: grid; gap: 14px; }

.booking__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "name    phone"
    "service service"
    "date    email"
    "message message";
  gap: 12px;
}
.field--name    { grid-area: name; }
.field--phone   { grid-area: phone; }
.field--service { grid-area: service; }
.field--date    { grid-area: date; }
.field--email   { grid-area: email; }
.field--message { grid-area: message; }
@media (max-width: 359px) {
  .booking__fields { grid-template-columns: 1fr; grid-template-areas: "name" "phone" "service" "date" "email" "message"; }
}
@media (min-width: 900px) {
  .booking { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); }
}
@media (min-width: 1100px) {
  .booking__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "name phone service"
      "date email message";
    gap: 14px 16px;
  }
}

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink);
}
.field .req { color: var(--gold-700); }

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  font-size: 1rem;              /* 16px: anything smaller makes iOS Safari zoom */
  color: var(--color-ink);
  background: var(--field);
  border: 0;
  border-bottom: 2px solid var(--line-light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--t-base), background-color var(--t-base);
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--color-ink-muted); opacity: 1; }
.field input[type="date"] { color-scheme: light; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 2px; padding: 0; cursor: pointer; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--color-paper);
  border-bottom-color: var(--color-ink);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-bottom-color: var(--color-danger); }
.field__error { font-size: 0.78rem; line-height: 1.4; color: var(--color-danger); }
.field__error:empty { display: none; }

.select { position: relative; }
.select select { padding-right: 44px; cursor: pointer; }
.select select:invalid { color: var(--color-ink-muted); }
.select::after {
  content: "";
  position: absolute;
  right: 18px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.hp { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.booking .btn--block { min-height: 52px; margin-top: 4px; }
@media (min-width: 900px) { .booking .btn--block { width: auto; justify-self: start; min-width: 240px; } }

.form-status { font-size: 0.9rem; font-weight: 600; color: var(--color-success); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--color-danger); }

/* Clinic info: one of the navy boxes, across the full width with the map beside it */
.clinic {
  display: grid;
  gap: clamp(20px, 2vw + 8px, 48px);
  padding: clamp(20px, 1.8vw + 12px, 48px);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}
.clinic__info { display: flex; flex-direction: column; gap: 24px; }
.clinic__title {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
  font-weight: 600;
  font-size: clamp(1.3rem, 0.5vw + 1.15rem, 1.9rem);
}
.clinic__list { display: grid; gap: 18px; }
.clinic__list > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.clinic__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--color-tint);
  color: var(--color-primary);
}
.clinic__list .clinic__label {
  margin-bottom: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.clinic__list p, .clinic__list address { font-size: 0.97rem; line-height: 1.55; }
.clinic__list a:not(.btn) {
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 3px;
  transition: color var(--t-base), text-decoration-color var(--t-base);
}
.clinic__sep { margin: 0 6px; color: var(--color-text-muted); }
.clinic__go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hours { display: grid; gap: 2px; font-size: 0.95rem; }
.hours div { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 12px; max-width: 320px; }
.hours dt, .hours dd { white-space: nowrap; }   /* the time drops under the day rather than splitting */
.hours dt { color: var(--color-text-soft); }
.hours dd { font-weight: 600; }

.clinic__map {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
}
.clinic__map iframe { display: block; width: 100%; height: 240px; border: 0; }

@media (hover: hover) and (pointer: fine) {
  .clinic__list a:not(.btn):hover { color: var(--color-primary); text-decoration-color: currentColor; }
}

@media (min-width: 768px) {
  .clinic__map iframe { height: 320px; }
}
@media (min-width: 900px) {
  .clinic { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: stretch; }
  .clinic__map { min-height: 380px; }
  .clinic__map iframe { height: 100%; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: clamp(48px, 4vw + 24px, 96px) 0 20px;
  background: var(--color-bg-footer);
  font-size: 0.88rem;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
}
.footer__brand { grid-column: 1 / -1; }
.footer__brand p { max-width: 32ch; margin: 12px 0 16px; color: var(--color-text-muted); }
.footer__wa {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-tint-strong);
  color: var(--color-primary);
  transition: background-color var(--t-base), color var(--t-base), transform var(--t-fast);
}
.footer__wa:active { transform: scale(0.94); }
.footer__title {
  margin-bottom: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.footer__col ul { display: grid; gap: 0; }
.footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--color-text-soft);
  transition: color var(--t-base);
}
.footer__contact address,
.footer__contact p:not(.footer__title) { color: var(--color-text-soft); line-height: 1.6; }
.footer__contact p:not(.footer__title) { margin-top: 6px; }
.footer__contact a { min-height: 0; display: inline; }
.footer__contact a[href^="tel:"], .clinic__list a[href^="tel:"] { white-space: nowrap; }   /* never split a phone number at its hyphen */

/* Copyright and credit sit together on the left, so the bottom-right corner
   stays free for the floating WhatsApp button. */
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: clamp(32px, 3vw + 12px, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
/* RegenReach credit: understated but legible (white at 60% keeps it above 4.5:1) */
.footer__credit { font-size: 0.85rem; opacity: 0.6; color: var(--color-text); }
.footer__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* phones: the lines wrap short of the button column */
@media (max-width: 599px) { .footer__bar { padding-right: 72px; } }

@media (hover: hover) and (pointer: fine) {
  .footer__col a:hover { color: var(--color-text); }
  .footer__wa:hover { background: var(--color-primary); color: var(--color-ink); }
}

@media (min-width: 600px) { .footer__cols { gap: 28px 32px; } }
@media (min-width: 900px) {
  .footer__cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1.3fr); gap: 40px; }
  .footer__brand { grid-column: auto; }
}

/* ============================================================
   PANELS PAGE: just the logos, on white tiles like the service cards.
   Two across on phones, three from 768px, four from 1100px. A short
   last row sits in the middle rather than hanging off to the left.
   ============================================================ */
.panels { padding: clamp(36px, 4vw + 16px, 112px) 0 var(--section-y); }
.panels__head { max-width: 680px; margin-bottom: clamp(24px, 2.6vw + 10px, 64px); }
.panels__title {
  font-size: var(--fs-page);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}
.panels__lead { max-width: 52ch; font-size: var(--fs-lead); color: var(--color-text-soft); }

.panels__grid {
  --cols: 2;
  --gap: clamp(10px, 1.4vw + 4px, 32px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.panel-logo {
  --pad: clamp(16px, 2.2vw + 6px, 56px);
  position: relative;
  flex: 0 0 calc((100% - var(--gap) * (var(--cols) - 1)) / var(--cols));
  aspect-ratio: 16 / 10;
  background: var(--color-paper);
  border: 1px solid var(--line-light);
  border-radius: clamp(12px, 0.4vw + 10px, 16px);
  box-shadow: var(--shadow-card);
}
.panel-logo img {
  position: absolute;
  inset: var(--pad);
  width: calc(100% - var(--pad) * 2);
  height: calc(100% - var(--pad) * 2);
  object-fit: contain;
}
@media (max-width: 359px) {
  .panels { padding-block: 24px 32px; }
  .panels__head { margin-bottom: 16px; }
  .panels__cta { margin-top: 16px; }
  .panel-logo { --pad: 10px; aspect-ratio: 2 / 1; }
}
@media (min-width: 768px) { .panels__grid { --cols: 3; } }
@media (min-width: 1100px) { .panels__grid { --cols: 4; } }

.panels__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: clamp(24px, 2.6vw + 10px, 56px);
}
.panels__cta p { flex: 1 1 100%; color: var(--color-text-soft); font-size: var(--fs-small); }

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: var(--z-float);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity var(--t-base), transform var(--t-base), translate var(--t-base), visibility 0s;
}
/* While the hero's numbers are on screen it rides just above them, so it never
   covers a figure (script.js adds .is-lifted and measures --lift). Phones have
   no spare room on that screen, so there the note waits until they have passed. */
.wa-float.is-lifted { translate: 0 calc(var(--lift, 0px) * -1); }
@media (max-width: 767px) {
  .wa-float.is-lifted .wa-float__note {
    filter: opacity(0);
    translate: 10px 0;
    visibility: hidden;
    transition: filter var(--t-base), translate var(--t-base), visibility 0s 0.24s;
  }
}
/* Phones and tablets: steps aside while a form field has focus, so it never
   sits over the field or the keyboard (script.js adds .is-tucked). */
.wa-float.is-tucked {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-base), transform var(--t-base), visibility 0s 0.24s;
}
.wa-float__btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-wa);
  color: var(--white);
  box-shadow: var(--shadow-float);
  touch-action: manipulation;
  transition: transform var(--t-fast);
}
.wa-float__btn .icon { width: 30px; height: 30px; }
.wa-float__btn:active { transform: scale(0.94); }

.wa-float__note {
  position: relative;
  max-width: min(212px, calc(100vw - 118px));
  border-radius: 14px;
  background: var(--color-paper);
  color: var(--color-ink);
  box-shadow: var(--shadow-float);
  transform-origin: right center;
  animation: wa-note-in 0.4s var(--ease-out) 1.2s both;
  transition: filter var(--t-base), translate var(--t-base), visibility 0s;
}
/* Once the footer is on screen the note steps back (script.js adds .is-quiet),
   so it never sits over the last lines. filter and translate are used so this
   never fights the entrance animation, which owns opacity and transform. */
.wa-float.is-quiet .wa-float__note {
  filter: opacity(0);
  translate: 10px 0;
  visibility: hidden;
  transition: filter var(--t-base), translate var(--t-base), visibility 0s 0.24s;
}
.wa-float__note[hidden] { display: none; }
/* the tail points at the button */
.wa-float__note::after {
  content: "";
  position: absolute;
  top: 50%; right: -5px;
  width: 12px; height: 12px;
  border-radius: 2px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}
.wa-float__msg {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-radius: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--color-ink-muted);
  touch-action: manipulation;
}
.wa-float__msg strong { font-size: 0.9rem; font-weight: 700; color: var(--color-ink); }
/* a 44px button; the visible dot is the 24px circle drawn inside it */
.wa-float__close {
  position: absolute;
  top: -19px; left: -19px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--t-fast);
}
.wa-float__close::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--indigo-900);
  transition: background-color var(--t-base);
}
.wa-float__close .icon { position: relative; width: 12px; height: 12px; stroke-width: 2.5; }
.wa-float__close:active { transform: scale(0.9); }
@keyframes wa-note-in { from { opacity: 0; transform: translateX(10px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .wa-float__note { animation: none; } }
@media (hover: hover) and (pointer: fine) {
  .wa-float__msg:hover strong { text-decoration: underline; text-underline-offset: 2px; }
  .wa-float__close:hover::before { background: var(--indigo-700); }
}
@media (min-width: 1024px) { .wa-float { right: 28px; bottom: 28px; } }

/* ============================================================
   MOTION: initial states. Only applied when JS has run AND the
   visitor allows motion (the .motion class), so content can never
   be stuck invisible. script.js removes .motion if GSAP fails.
   ============================================================ */
.motion [data-reveal]       { opacity: 0; transform: translateY(18px); }
.motion [data-hero]         { opacity: 0; transform: translateY(22px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track { animation: none; }
}

/* ============================================================
   VIEWPORT ADAPTATION — KEEP THIS BLOCK LAST.
   Layout only. Font sizes stay in the tokens.
   ============================================================ */

/* Short desktop screens (1366x768 laptops): compress the hero so the
   buttons and the numbers both stay above the fold. */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero__inner { padding-block: 16px; }
  .hero__title { margin-bottom: 14px; }
  .hero__kicker { margin-bottom: 12px; }
  .hero__sub { margin-bottom: 18px; max-width: 46ch; }
  .stat { padding-block: 12px; }
}
