/* ============================================================
   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;
  --gold-700:   #876818;   /* gold that passes 4.5:1 on white */
  --white:      #ffffff;
  --mist-200:   #d9d6ea;   /* body copy on indigo */
  --mist-400:   #a9a4c8;   /* labels and meta on indigo */
  --ink-500:    #5e5a78;   /* body copy on white */
  --field:      #f4f5f9;
  --line-light: #e3e2ec;
  --green-wa:   #25d366;
  --green-ok:   #1f7a45;
  --red-err:    #c0392b;

  /* ---------- Semantic tokens ---------- */
  --color-bg:          var(--indigo-850);
  --color-bg-alt:      var(--indigo-800);
  --color-bg-deep:     var(--indigo-900);
  --color-bg-footer:   var(--indigo-950);
  --color-surface:     var(--indigo-700);
  --color-surface-2:   var(--indigo-750);
  --color-surface-soft:var(--indigo-600);
  --color-primary:     var(--gold-500);
  --color-primary-hover: var(--gold-400);
  --color-text:        var(--white);
  --color-text-soft:   var(--mist-200);
  --color-text-muted:  var(--mist-400);
  --color-ink:         var(--indigo-850);
  --color-ink-muted:   var(--ink-500);
  --color-paper:       var(--white);
  --color-line:        rgba(255, 255, 255, 0.12);
  --color-tint:        rgba(255, 255, 255, 0.06);   /* icon wells, hover fills */
  --color-tint-strong: rgba(255, 255, 255, 0.08);
  --color-ghost:       rgba(255, 255, 255, 0.06);   /* decorative numerals */
  --color-line-strong: rgba(255, 255, 255, 0.32);
  --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 2px 6px rgba(8, 5, 30, 0.18), 0 10px 28px rgba(8, 5, 30, 0.22);
  --shadow-lift: 0 4px 10px rgba(8, 5, 30, 0.22), 0 22px 48px rgba(8, 5, 30, 0.38);
  --shadow-nav:  0 10px 30px rgba(6, 4, 24, 0.35);
  --shadow-float: 0 8px 24px rgba(6, 4, 24, 0.45);

  /* 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-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);

  /* ---------- 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; }
}

/* ============================================================
   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-primary); 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-primary); 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-primary);
  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--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: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: 0 6px 8px rgba(6, 4, 24, 0.35);
  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-primary);
}

/* 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(20px, 1.6vw + 4px, 44px);
    margin-left: auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .nav__menu a:not(.btn) {
    position: relative;
    min-height: 44px;
    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="location"] { color: var(--color-text); }
  .nav__menu a[aria-current="location"]::after { transform: scaleX(1); }
  .nav__menu-cta { display: none; }
  .lang { margin-left: clamp(16px, 1.6vw, 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: copy on the left, the booking form on the right.
   Stacked below 1024px (copy, buttons, then the form).
   ============================================================ */
.hero {
  padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 5vw, 72px);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
}

.hero__text { position: relative; }

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: clamp(16px, 1.4vw + 6px, 32px);
}
.hero__kicker {
  display: block;
  margin-bottom: clamp(14px, 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-primary);
}
.hero__line { display: block; }
.hero__line--gold em { color: var(--color-primary); font-style: italic; letter-spacing: -0.03em; }

.hero__sub {
  max-width: 44ch;
  margin-bottom: clamp(22px, 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; }

.hero .booking { width: 100%; max-width: 600px; }

/* the seal: a slowly turning ring of text around the 30+, worn on the form card.
   Inside the card's corner on phones, riding over the corner from 1024px. */
.hero__badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 66px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-bg-deep);
  border: 1px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
  color: var(--color-text);
}
.hero__badge-ring {
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  overflow: visible;
  animation: seal-turn 36s linear infinite;
}
.hero__badge-ring text {
  font-family: var(--font-body);
  font-size: 9.4px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--color-primary);
}
@keyframes seal-turn { to { transform: rotate(360deg); } }
.hero__badge-num {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.2rem, 0.9vw + 0.9rem, 2.1rem);
  line-height: 1;
}
.hero__badge-num sup { font-size: 0.5em; vertical-align: 0.9em; margin-left: 1px; color: var(--color-primary); }

@media (min-width: 1024px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(84vh, 900px);
    padding-block: clamp(24px, 3vh, 48px);
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.82fr);
    gap: clamp(32px, 4vw, 96px);
    align-items: center;
  }
  /* 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;
  }
  .hero .booking { justify-self: end; max-width: 560px; }
  .hero__badge {
    width: clamp(104px, 2vw + 80px, 132px);
    top: clamp(-58px, -2vw - 22px, -46px);
    right: clamp(-40px, -1.4vw - 12px, -26px);
  }
}

/* ============================================================
   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 clamp(28px, 2.4vw + 12px, 64px); }

.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; max-width: 16ch; }
.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 (continues the About section visually)
   ============================================================ */
.stats { padding-bottom: var(--section-y); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--color-line);
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: clamp(18px, 1.4vw + 10px, 40px) clamp(14px, 1.8vw + 6px, 40px);
}
.stat:nth-child(even) { border-left: 1px solid var(--color-line); }
.stat:nth-child(n + 3) { border-top: 1px solid var(--color-line); }
.stat__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 2.4vw + 1.2rem, 4.6rem);
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
}
.stat__unit {
  margin-left: 0.2em;
  font-size: 0.45em;
  font-weight: 400;
  color: var(--color-primary);
}
.stat__label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.stat--gold .stat__value { color: var(--color-primary); }   /* one accent in the row */

@media (min-width: 768px) {
  .stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(n + 3) { border-top: 0; }
  .stat + .stat { border-left: 1px solid var(--color-line); }
  .stat:first-child { padding-left: 0; }
}

/* ============================================================
   SHARED: swipe rail on phones, grid from 700px
   Eight services or six reviews stacked 2-up still run past the
   1.5-screen limit with their full text, so phones get a snap rail
   that shows the next card peeking in. Nothing is hidden.
   ============================================================ */
.reviews__grid {
  display: grid;
  grid-auto-flow: column;
  gap: 12px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}
.reviews__grid  { grid-auto-columns: min(84vw, 340px); }
.reviews__grid > li { scroll-snap-align: start; }

/* Phones: the reviews drift past slowly and never run out. script.js adds
   .is-loop and a copy of the cards on each side, then moves the row about
   15px a second. It is still a real scroll row, so a swipe takes over at once
   in either direction; snapping is off so the drift and the swipe never fight.
   Without JS, or with reduced motion, this stays the snap rail above. */
@media (max-width: 699px) {
  .reviews__grid.is-loop {
    grid-auto-columns: min(80vw, 320px);
    padding-inline: 0;
    scroll-snap-type: none;
    scrollbar-width: none;
  }
  .reviews__grid.is-loop::-webkit-scrollbar { display: none; }
  /* the part of a pixel the browser could not scroll, so the drift stays smooth */
  .reviews__grid.is-loop > li { translate: var(--drift, 0px) 0; }
}

.reviews__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 4px;
}
.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; } }
.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 (min-width: 700px) { .reviews__controls { display: none; } }

/* 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;
}
.reviews__grid:focus-visible { outline-offset: -2px; border-radius: var(--radius-card); }

@media (min-width: 700px) {
  .services__grid { gap: clamp(16px, 1.6vw, 32px); }
  .reviews__grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 1.6vw, 32px);
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
}
@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reviews__grid  { grid-template-columns: repeat(3, 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-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-primary); 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
   Three chapters strung on one gold line that draws itself as the
   visitor scrolls (script.js). Phones: a vertical line with round photo
   "nodes". From 900px: 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;
  max-width: 720px;
  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-primary);
}
.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-primary);
  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: 900px) {
  .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(3, minmax(0, 1fr));
    gap: clamp(28px, 3.4vw, 80px);
    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;
  }
  /* soft indigo scrim 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) 75%, transparent), transparent 42%);
    pointer-events: none;
  }
  /* the middle chapter steps down, breaking the row */
  .chapter:nth-child(2) .chapter__media { margin-top: clamp(40px, 4vw, 104px); }

  .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(4rem, 3.6vw + 1.6rem, 9rem);
    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; }

.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-primary); }
.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; }
}

/* masonry from 700px: cards keep their natural height */
@media (min-width: 700px) {
  .reviews__grid { display: block; columns: 2; column-gap: clamp(16px, 1.6vw, 32px); }
  .reviews__grid > li { break-inside: avoid; margin-bottom: clamp(16px, 1.6vw, 32px); }
  .review figure { height: auto; }
}
@media (min-width: 1024px) {
  .reviews__grid { columns: 3; }
}

.review figure {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: clamp(18px, 1vw + 12px, 32px);
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 16px;
}
.review figure::before {
  content: "\201C";
  position: absolute;
  top: 6px; right: 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 4.5rem;
  line-height: 1;
  color: color-mix(in srgb, var(--color-primary) 55%, transparent);
  pointer-events: none;
}
.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: 5px;
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.review__src .icon { width: 13px; height: 13px; }

/* ============================================================
   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-primary);
  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(--gold-300); }
}

@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). It sits in the hero; the fields are one grid so the
   same markup can pair up differently on phones and on desktop. */
.booking {
  position: relative;
  padding: clamp(20px, 1.4vw + 12px, 36px);
  background: var(--color-paper);
  color: var(--color-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.booking__title {
  margin-bottom: 0.3em;
  padding-right: 74px;            /* clear of the seal in the card's corner on phones */
  font-size: clamp(1.45rem, 0.8vw + 1.15rem, 2.3rem);
  color: var(--color-ink);
}
.booking__lead { max-width: 52ch; margin-bottom: 18px; font-size: 0.86rem; 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: 1024px) {
  .booking__title { padding-right: 0; }
  .booking__fields {
    grid-template-areas:
      "name    phone"
      "service date"
      "email   message";
    gap: 12px 14px;
  }
}

.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; }

.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 (dark), 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(.clinic__directions) {
  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__directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-primary);
}
.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(.clinic__directions):hover { color: var(--color-primary); text-decoration-color: currentColor; }
  .clinic__directions:hover .icon { transform: translateX(3px); }
}
.clinic__directions .icon { transition: transform var(--t-base); }

@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-primary);
}
.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; }
}

/* ============================================================
   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), visibility 0s;
}
/* 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(--color-text);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--t-fast);
}
.wa-float__close::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--color-bg-deep);
  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(--color-surface); }
}
@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); }
.motion [data-hero-visual]  { opacity: 0; transform: translateY(16px); }
.motion [data-hero-badge]   { opacity: 0; transform: scale(0.9); }

@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, .hero__badge-ring { 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
   call to action stays above the fold. */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { padding-block: 44px 12px; }   /* room above the card for the seal */
  .hero__title { margin-bottom: 14px; }
  .hero__kicker { margin-bottom: 12px; }
  .hero__sub { margin-bottom: 20px; max-width: 46ch; }
  .booking { padding: 22px 26px; }
  .booking__lead { margin-bottom: 12px; }
  .booking__fields { gap: 10px 12px; }
  .field input, .field select { min-height: 44px; padding-block: 10px; }
}
