/* ==========================================================================
   Meridian Chiropractic — Stylesheet
   Design system : Trust & Authority pattern / "Soft UI Evolution" style
   Brand         : #9FB3DF periwinkle / #9EC6F3 sky / #BDDDE4 mist / #FFF1D5 cream
                   (darker steps derived from the same hues for text/UI contrast)
   Type          : Lexend (display) + Source Sans 3 (body)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand ramp — periwinkle, anchored on #9FB3DF */
  --brand-50:  #F3F6FC;
  --brand-100: #E5ECF8;
  --brand-200: #C9D7EF;
  --brand-300: #9FB3DF;   /* PALETTE — accent / highlight on dark surfaces (6.6:1 on ink-800) */
  --brand-400: #7A93CB;
  --brand-500: #4C6AAA;   /* PRIMARY — 5.3:1 with white text */
  --brand-600: #3E5991;
  --brand-700: #314672;
  --brand-800: #263756;

  /* Sky ramp — anchored on #9EC6F3 */
  --sky-200: #D3E7FA;
  --sky-300: #9EC6F3;     /* PALETTE — highlight on dark (7.8:1 on ink-800) */
  --sky-400: #6FA8E4;

  /* Mist ramp — anchored on #BDDDE4 */
  --mist-200: #DCEFF3;
  --mist-300: #BDDDE4;    /* PALETTE — soft surfaces, dividers, badges */
  --mist-400: #8FC3CE;

  /* Cream ramp — anchored on #FFF1D5 */
  --cream-100: #FFF9EC;
  --cream-200: #FFF1D5;   /* PALETTE — warm surfaces */
  --cream-300: #F5DEB2;

  /* Ink ramp for dark sections — same hue family as the periwinkle */
  --ink-950: #0E1728;
  --ink-900: #131F35;
  --ink-800: #192843;
  --ink-700: #223354;
  --ink-600: #2D4269;

  /* Semantic tokens — components reference these, never raw hex */
  --color-primary:          var(--brand-500);
  --color-primary-hov:      var(--brand-600);
  --color-on-primary:       #FFFFFF;
  --color-accent:           var(--sky-300);
  --color-bg:               #FFFFFF;
  --color-bg-alt:           var(--cream-200);
  --color-surface-sunken:   #F5F7FC;   /* form fields — reads against cream sections */
  --color-bg-dark:          var(--ink-800);
  --color-fg:               #16223A;
  --color-fg-muted:         #5A6B8C;   /* 5.4:1 on white */
  --color-fg-on-dark:       #FFFFFF;
  --color-fg-on-dark-muted: #B6C7E2;   /* 7.5:1 on ink-800 */
  --color-border:           #DFE6F3;
  --color-border-dark:      rgba(255, 255, 255, .12);
  --color-ring:             var(--brand-500);
  --color-danger:           #C2333B;
  --color-success:          #2F855A;

  /* Typography */
  --font-display: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  clamp(1.375rem, 1.10rem + 1.1vw, 1.75rem);
  --text-3xl:  clamp(1.75rem,  1.30rem + 1.9vw, 2.5rem);
  --text-4xl:  clamp(2.125rem, 1.40rem + 3.0vw, 3.25rem);
  --text-5xl:  clamp(2.5rem,   1.40rem + 4.6vw, 4.25rem);

  /* Spacing — 4/8 rhythm */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 24px;  --space-6: 32px;  --space-7: 40px;  --space-8: 48px;
  --space-9: 64px;  --space-10: 80px; --space-11: 96px; --space-12: 128px;

  --section-y: clamp(72px, 9vw, 128px);
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Elevation — softer than flat, clearer than neumorphism */
  --shadow-xs: 0 1px 2px rgba(22, 34, 58, .06);
  --shadow-sm: 0 2px 8px rgba(22, 34, 58, .06), 0 1px 2px rgba(22, 34, 58, .04);
  --shadow-md: 0 8px 24px rgba(22, 34, 58, .08), 0 2px 6px rgba(22, 34, 58, .04);
  --shadow-lg: 0 18px 48px rgba(22, 34, 58, .12), 0 4px 12px rgba(22, 34, 58, .06);
  --shadow-xl: 0 32px 72px rgba(22, 34, 58, .16), 0 8px 20px rgba(22, 34, 58, .08);
  --shadow-brand: 0 10px 28px rgba(76, 106, 170, .30);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 150ms;
  --dur: 250ms;
  --dur-slow: 400ms;

  /* Layering scale */
  --z-raised: 10;
  --z-sticky: 40;
  --z-overlay: 500;   /* mobile drawer */
  --z-header: 600;    /* above the drawer, so brand + close stay reachable */
  --z-modal: 1000;    /* lightbox + skip link */

  --header-h: 84px;
}

@media (max-width: 900px) { :root { --header-h: 68px; } }

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;                                   /* anchor smooth-scroll */
  scroll-padding-top: calc(var(--header-h) + 16px);          /* clears the sticky header */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;                                        /* no horizontal scroll */
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: inherit;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }

/* <picture> is an inline wrapper by default, so a child img's height:100%
   has nothing to resolve against. Make it fill any sized container. */
.hero__media picture,
.collage__main picture,
.collage__inset picture,
.gallery__item picture { display: block; width: 100%; height: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

/* Focus ring — visible everywhere, never removed */
:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--brand-300); }

::selection { background: var(--brand-200); color: var(--ink-900); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus-visible { top: var(--space-4); }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: var(--color-fg-on-dark); }
.section--dark p { color: var(--color-fg-on-dark-muted); }

.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Eyebrow: rule + number + label — the reference layout's section signature */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}
.section--dark .eyebrow { color: var(--color-accent); }
.section-head--center .eyebrow { justify-content: center; }

.section-title { font-size: var(--text-4xl); }
.section-lead {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-fg-muted);
  max-width: 62ch;
}
.section--dark .section-lead { color: var(--color-fg-on-dark-muted); }
.section-head--center .section-lead { margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 52px;                                          /* > 44px touch target */
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 2px solid transparent;
  box-shadow: var(--shadow-brand);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { transition: transform var(--dur) var(--ease); }
.btn:hover { background: var(--color-primary-hov); box-shadow: var(--shadow-lg); }
.btn:hover .icon--arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--color-fg);
  border-color: var(--color-border);
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn--on-dark {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, .28);
  box-shadow: none;
}
.btn--on-dark:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}

.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-700); box-shadow: var(--shadow-lg); }
.btn--light:hover { --btn-bg: var(--brand-50); color: var(--brand-700); }

.btn--sm { min-height: 44px; padding: var(--space-2) var(--space-5); font-size: var(--text-sm); }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .45; cursor: not-allowed; box-shadow: none; pointer-events: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  min-height: 44px;
}
.link-arrow .icon { transition: transform var(--dur) var(--ease); }
.link-arrow:hover { color: var(--color-primary-hov); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. Icons
   -------------------------------------------------------------------------- */
.icon {
  width: 24px; height: 24px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.75;                                        /* one stroke weight sitewide */
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.icon--sm { width: 18px; height: 18px; stroke-width: 2; }
.icon--lg { width: 28px; height: 28px; }

.icon-tile {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--mist-200);
  color: var(--color-primary);
  flex: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.icon-tile--dark { background: rgba(158, 198, 243, .14); color: var(--color-accent); }

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease),
              backdrop-filter var(--dur-slow) var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 31, 53, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-dark);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  pointer-events: none;
}
.site-header.is-stuck::after { opacity: 1; }

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}

/* Brand lockup */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: auto;
  min-height: 44px;
}
.brand__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
  color: #fff;
  box-shadow: var(--shadow-brand);
  flex: none;
  transition: transform var(--dur) var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-4deg) scale(1.04); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand__tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand-300);
}

/* Desktop nav */
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--space-2); }
.nav__link {
  position: relative;
  display: block;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, .82);
  border-radius: var(--radius-sm);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: var(--space-4); right: var(--space-4);
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); }
.nav__link[aria-current="true"] { color: #fff; font-weight: 600; }

/* Header utilities */
.header-actions { display: flex; align-items: center; gap: var(--space-4); }
.header-phone {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  min-height: 44px;
}
.header-phone .icon { color: var(--color-accent); }
.header-phone:hover { color: var(--color-accent); }

/* Mobile menu toggle */
.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-toggle:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255,255,255,.4); }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  background: var(--ink-900);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow) var(--ease);
}
.mobile-nav[data-open="true"] { visibility: visible; opacity: 1; }
.mobile-nav__panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-5) var(--gutter) calc(var(--space-10) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid var(--color-border-dark);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease),
              color var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.mobile-nav[data-open="true"] .mobile-nav__link { opacity: 1; transform: none; }
.mobile-nav__link .icon { color: var(--color-accent); opacity: .55; }
.mobile-nav__link:hover, .mobile-nav__link[aria-current="true"] { color: var(--color-accent); }
.mobile-nav__cta { margin-top: var(--space-6); display: grid; gap: var(--space-3); }

@media (min-width: 1080px) {
  .nav { display: block; }
  .header-phone { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Below the desktop nav breakpoint the header holds brand + CTA + toggle only,
   so tighten it up and shorten the CTA label to keep everything on one line. */
@media (max-width: 1079px) {
  .site-header .container { gap: var(--space-4); }
  .header-actions { gap: var(--space-3); }
  .header-cta { padding-inline: var(--space-4); gap: var(--space-2); }
  .header-cta__long { display: none; }
  .brand__tag { letter-spacing: .14em; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + var(--space-8));
  padding-bottom: var(--space-9);
  background: var(--ink-900);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Heavy on the left so the headline always clears 4.5:1, lifting to the
     right so the photograph actually reads. */
  background:
    radial-gradient(120% 90% at 80% 16%, rgba(76, 106, 170, .38) 0%, transparent 62%),
    linear-gradient(100deg,
      rgba(14, 23, 40, .94)  0%,
      rgba(19, 31, 53, .88)  38%,
      rgba(19, 31, 53, .64) 63%,
      rgba(34, 51, 84, .34) 100%);
}
/* On narrow screens the text sits over the whole frame, so darken evenly. */
@media (max-width: 900px) {
  .hero__scrim {
    background:
      radial-gradient(120% 70% at 70% 10%, rgba(76, 106, 170, .34) 0%, transparent 62%),
      linear-gradient(180deg, rgba(14, 23, 40, .90) 0%, rgba(19, 31, 53, .86) 60%, rgba(19, 31, 53, .92) 100%);
  }
}
.hero__inner { position: relative; width: 100%; }
.hero__content { max-width: 780px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #fff;
  margin-bottom: var(--space-6);
}
.hero__badge .pip {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(158, 198, 243, .2);
  color: var(--color-accent);
}
.hero__badge .pip .icon { width: 15px; height: 15px; }

.hero__title {
  font-size: var(--text-5xl);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero__title em { font-style: normal; color: var(--color-accent); }

.hero__lead {
  margin-top: var(--space-6);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  color: #C7D6EE;
  max-width: 56ch;
}

.hero__actions {
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Hero stat row */
.hero__stats {
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
  max-width: 780px;
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;                        /* no width jitter counting up */
}
.stat__value .suffix { color: var(--color-accent); }
.stat__label {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-fg-on-dark-muted);
  max-width: 22ch;
}

/* Scroll cue */
.hero__cue {
  position: absolute;
  left: 50%; bottom: var(--space-6);
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.hero__cue .icon { animation: cue-bob 2.4s var(--ease-in-out) infinite; }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(6px); opacity: 1; }
}
@media (min-width: 1080px) and (min-height: 760px) { .hero__cue { display: flex; } }

/* --------------------------------------------------------------------------
   8. Credentials strip
   -------------------------------------------------------------------------- */
.credentials {
  background: var(--ink-950);
  color: #fff;
  padding-block: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.credentials__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4) var(--space-8);
}
.credentials__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.credential {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, .9);
}
.credential .icon { width: 20px; height: 20px; color: var(--color-accent); }

/* --------------------------------------------------------------------------
   9. About
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 960px) { .about__grid { grid-template-columns: 1fr 1fr; } }

/* Overlapping image collage */
.collage { position: relative; padding-bottom: 64px; padding-right: 40px; }
.collage__main {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 3 / 2;
}
.collage__main img { width: 100%; height: 100%; object-fit: cover; }
.collage__inset {
  position: absolute;
  right: 0; bottom: 0;
  width: 52%;
  max-width: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4 / 3;
}
.collage__inset img { width: 100%; height: 100%; object-fit: cover; }
.collage__chip {
  position: absolute;
  left: 0; bottom: 12px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--ink-800);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.collage__chip .icon { color: var(--color-accent); }
.collage__chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.2;
}
.collage__chip span { font-size: var(--text-sm); color: var(--color-fg-on-dark-muted); }
@media (max-width: 520px) {
  .collage { padding-right: 0; padding-bottom: 96px; }
  .collage__inset { display: none; }
  .collage__chip { left: 50%; transform: translateX(-50%); bottom: 16px; width: max-content; }
}

/* Checklist */
.checklist { margin-top: var(--space-7); display: grid; gap: var(--space-4); }
.checklist li { display: flex; gap: var(--space-4); align-items: flex-start; }
.checklist .icon-check {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--color-primary);
  flex: none;
  margin-top: 2px;
}
.checklist .icon-check .icon { width: 15px; height: 15px; stroke-width: 2.5; }
.checklist strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-fg);
}
.checklist p { color: var(--color-fg-muted); font-size: 0.9375rem; }

.about__actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* --------------------------------------------------------------------------
   10. Treatments
   -------------------------------------------------------------------------- */
.pillars {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (min-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }

.pillar {
  position: relative;
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, var(--ink-700), var(--ink-900));
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.pillar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%; right: -20%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 106, 170, .55), transparent 68%);
}
.pillar h3 { font-size: var(--text-2xl); margin-top: var(--space-5); }
.pillar p { margin-top: var(--space-4); color: var(--color-fg-on-dark-muted); }
.tags { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  padding: 6px var(--space-4);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #DCE7F8;
}

/* Treatment card grid */
.cards {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}
.card:hover .icon-tile { background: var(--color-primary); color: #fff; }
.card h3 { font-size: var(--text-lg); margin-top: var(--space-5); }
.card p { margin-top: var(--space-3); font-size: 0.9375rem; color: var(--color-fg-muted); }

/* --------------------------------------------------------------------------
   11. Your first visit — stepped timeline
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
}
@media (min-width: 760px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step { position: relative; padding-top: var(--space-7); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--color-primary);
}
.step::after {                                                /* connector rule */
  content: "";
  position: absolute;
  top: 9px; left: 44px; right: -24px;
  height: 1px;
  background: linear-gradient(90deg, var(--mist-300), transparent);
}
@media (max-width: 1079px) { .step::after { display: none; } }
.steps .step:last-child::after { display: none; }
.step h3 { font-size: var(--text-xl); }
.step p { margin-top: var(--space-3); color: var(--color-fg-muted); }
.step__meta {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}
.step__meta .icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   12. Gallery
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(150px, auto);
}
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); grid-auto-rows: 200px; }
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--tall { grid-row: span 2; }
  .gallery__item--big  { grid-column: span 2; grid-row: span 2; }
}

.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-50);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 23, 40, .72) 0%, rgba(14, 23, 40, .12) 45%, transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.gallery__item:hover { box-shadow: var(--shadow-lg); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after, .gallery__item:focus-visible::after { opacity: 1; }

.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { opacity: 1; transform: none; }
.gallery__caption .icon { width: 20px; height: 20px; opacity: .9; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(14, 23, 40, .92);                          /* strong scrim: 92% */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow) var(--ease);
}
.lightbox[data-open="true"] { visibility: visible; opacity: 1; }
.lightbox__figure {
  margin: 0;
  max-width: min(1100px, 100%);
  transform: scale(.96);
  transition: transform var(--dur-slow) var(--ease-out);
}
.lightbox[data-open="true"] .lightbox__figure { transform: none; }
.lightbox__figure img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.lightbox__caption {
  margin-top: var(--space-4);
  text-align: center;
  color: #DCE7F8;
  font-size: var(--text-sm);
}
.lightbox__btn {
  position: absolute;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn:active { transform: scale(.94); }
.lightbox__btn--close { top: var(--space-5); right: var(--space-5); }
.lightbox__btn--prev  { left: var(--space-4);  top: 50%; margin-top: -26px; }
.lightbox__btn--next  { right: var(--space-4); top: 50%; margin-top: -26px; }
@media (max-width: 640px) {
  .lightbox__btn--prev { left: var(--space-4);  top: auto; bottom: var(--space-6); margin-top: 0; }
  .lightbox__btn--next { right: var(--space-4); top: auto; bottom: var(--space-6); margin-top: 0; }
}

/* --------------------------------------------------------------------------
   13. Patient portal / booking band
   -------------------------------------------------------------------------- */
.portal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(140deg, var(--brand-700), var(--ink-900) 62%);
  color: #fff;
}
.portal::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: 55%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158, 198, 243, .28), transparent 65%);
}
.portal__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .portal__grid { grid-template-columns: 1.15fr 1fr; } }
.portal__title { font-size: var(--text-3xl); }
.portal__lead { margin-top: var(--space-5); color: #C7D6EE; max-width: 52ch; }
.portal__actions { margin-top: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-4); }
.portal__note {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, .62);
  display: flex; align-items: center; gap: var(--space-2);
}
.portal__note .icon { width: 16px; height: 16px; }

.portal__card {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xl);
}
.portal__card h3 { font-size: var(--text-xl); }
.portal__list { margin-top: var(--space-5); display: grid; gap: var(--space-4); }
.portal__list li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 0.9375rem; color: #DCE7F8; }
.portal__list .icon { width: 20px; height: 20px; color: var(--color-accent); margin-top: 2px; }

/* --------------------------------------------------------------------------
   14. Testimonials
   -------------------------------------------------------------------------- */
.reviews { position: relative; overflow: hidden; }
.reviews__viewport { position: relative; min-height: 320px; }
.review {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease),
              visibility var(--dur-slow) var(--ease);
}
.review[data-active="true"] { opacity: 1; transform: none; visibility: visible; }
.review__stars { display: flex; gap: var(--space-1); color: var(--color-accent); }
.review__stars .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.review__quote {
  margin-top: var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 30ch;
}
.review__person { margin-top: var(--space-7); display: flex; align-items: center; gap: var(--space-4); }
.review__avatar {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-400), var(--brand-600));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .04em;
  flex: none;
}
.review__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  text-align: left;
  line-height: 1.3;
}
.review__meta {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-fg-on-dark-muted);
  text-align: left;
  line-height: 1.4;
}

.reviews__controls {
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}
.reviews__arrow {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.reviews__arrow:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255,255,255,.45); }
.reviews__arrow:active { transform: scale(.94); }
.reviews__dots { display: flex; align-items: center; gap: var(--space-2); }
/* The button carries the tap target (24x44 min); a pseudo-element draws the dot,
   so the target never shrinks to the 8px visual. */
.reviews__dot {
  display: grid;
  place-items: center;
  width: 24px; height: 44px;
  padding: 0;
  background: none;
  transition: width var(--dur) var(--ease);
}
.reviews__dot::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .28);
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}
.reviews__dot[aria-selected="true"] { width: 44px; }
.reviews__dot[aria-selected="true"]::after { width: 28px; background: var(--color-accent); }

/* --------------------------------------------------------------------------
   15. FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: var(--space-3); }
.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq__item[data-open="true"] { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  min-height: 64px;
  padding: var(--space-5) var(--space-6);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-fg);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.faq__trigger:hover { color: var(--color-primary); background: var(--brand-50); }
.faq__icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--color-primary);
  flex: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.faq__item[data-open="true"] .faq__icon { transform: rotate(180deg); background: var(--brand-100); }
/* Height animation without JS measurement */
.faq__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease);
}
.faq__item[data-open="true"] .faq__body { grid-template-rows: 1fr; }
.faq__body > div { overflow: hidden; }
.faq__body p {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-fg-muted);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   16. Contact
   -------------------------------------------------------------------------- */
.contact__grid { display: grid; gap: clamp(40px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1.1fr; } }

.contact-rows { display: grid; gap: var(--space-5); }
.contact-row { display: flex; align-items: center; gap: var(--space-4); min-height: 52px; }
.contact-row__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}
.contact-row__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-fg);
}
a.contact-row:hover .contact-row__value { color: var(--color-primary); }
a.contact-row:hover .icon-tile { background: var(--color-primary); color: #fff; }

.hours {
  margin-top: var(--space-7);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.hours h3 { font-size: var(--text-lg); display: flex; align-items: center; gap: var(--space-3); }
.hours h3 .icon { color: var(--color-accent); }
.hours__list { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.hours__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 0.9375rem;
  color: var(--color-fg-on-dark-muted);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.hours__list li:last-child { border-bottom: none; padding-bottom: 0; }
.hours__list b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.hours__badge {
  margin-top: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: rgba(47, 133, 90, .18);
  border: 1px solid rgba(47, 133, 90, .4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #A7E0C1;
}
.hours__badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  flex: none;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .22);
}

/* Form card */
.form-card {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
}
.form-card h3 { font-size: var(--text-2xl); }
.form-card > p { margin-top: var(--space-3); color: var(--color-fg-muted); font-size: 0.9375rem; }

.form { margin-top: var(--space-7); display: grid; gap: var(--space-5); }
.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--space-2); }
.field__label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-fg);
}
.field__label .req { color: var(--color-danger); margin-left: 2px; }
.field__control {
  width: 100%;
  min-height: 52px;                                          /* touch-friendly */
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);                               /* 16px — no iOS auto-zoom */
  color: var(--color-fg);
  background: var(--color-surface-sunken);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
textarea.field__control { min-height: 132px; resize: vertical; line-height: 1.6; }
.field__control::placeholder { color: #93A2BE; }
.field__control:hover { border-color: var(--brand-200); }
.field__control:focus {
  outline: none;
  background: var(--color-bg);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(76, 106, 170, .16);
}
.field__hint { font-size: var(--text-sm); color: var(--color-fg-muted); }
.field__error {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-danger);
}
.field__error .icon { width: 16px; height: 16px; }
.field[data-invalid="true"] .field__error { display: flex; }
.field[data-invalid="true"] .field__control {
  border-color: var(--color-danger);
  background: #FDF4F4;
}
.field[data-invalid="true"] .field__control:focus { box-shadow: 0 0 0 4px rgba(194, 51, 59, .16); }

/* Checkbox */
.checkbox { display: flex; align-items: flex-start; gap: var(--space-3); }
.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px; height: 24px;                                 /* WCAG 2.2 minimum target */
  margin: 0;
  flex: none;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-sunken);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
/* Tick drawn with a background image — reliable on a replaced element,
   unlike ::before / ::after which browsers may not render on <input>. */
.checkbox input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
}
/* The label is the large, comfortable target that goes with it. */
.checkbox label {
  font-size: 0.9375rem;
  color: var(--color-fg-muted);
  cursor: pointer;
  padding-block: 2px;
}
.checkbox label a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.field[data-invalid="true"] .checkbox input { border-color: var(--color-danger); }

/* Form status */
.form__status {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}
.form__status[data-state="success"] {
  display: flex;
  background: #EAF6EF;
  border: 1px solid #B7DFC8;
  color: #1E5C3F;
}
.form__status[data-state="error"] {
  display: flex;
  background: #FDF0F1;
  border: 1px solid #F0C2C5;
  color: #8E252C;
}
.form__status .icon { flex: none; margin-top: 2px; }

/* Button loading spinner */
.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn[data-loading="true"] .btn__spinner { display: block; }
.btn[data-loading="true"] .btn__label,
.btn[data-loading="true"] .icon--arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-950);
  color: #fff;
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
}
.footer__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  padding-bottom: var(--space-8);
}
@media (min-width: 640px)  { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

.footer__about p {
  margin-top: var(--space-5);
  font-size: 0.9375rem;
  color: var(--color-fg-on-dark-muted);
  max-width: 34ch;
}
.socials { margin-top: var(--space-6); display: flex; gap: var(--space-3); }
.social {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.social:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.social .icon { width: 20px; height: 20px; }

.footer__title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}
.footer__links { display: grid; gap: var(--space-1); }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--color-fg-on-dark-muted);
}
.footer__links a:hover { color: var(--color-accent); }

.footer__bar {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, .55);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__legal a:hover { color: var(--color-accent); }
.footer__disclaimer {
  margin-top: var(--space-5);
  font-size: 0.8125rem;                                      /* 13px — legal text stays readable */
  line-height: 1.6;
  color: rgba(255, 255, 255, .56);                           /* 6.2:1 on ink-950 */
  max-width: 90ch;
}

/* --------------------------------------------------------------------------
   18. Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom));
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease),
              visibility var(--dur-slow) var(--ease), background var(--dur) var(--ease);
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--color-primary-hov); }
.to-top:active { transform: scale(.94); }

/* Keep the floating button clear of the carousel controls on narrow screens */
@media (max-width: 640px) {
  .to-top { width: 46px; height: 46px; right: 12px; }
  .to-top .icon { width: 20px; height: 20px; }
  .reviews__controls { gap: var(--space-4); padding-inline: 56px; }
}

/* --------------------------------------------------------------------------
   19. Scroll-reveal animation
   Transform + opacity only — never layout properties (no CLS, GPU friendly)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);                /* stagger across a group */
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(.96); }
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Hero entrance — plays on load, not scroll */
.hero [data-hero] {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 900ms var(--ease-out) forwards;
  animation-delay: calc(160ms + var(--i, 0) * 110ms);
}
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* Slow ken-burns on the hero photograph */
.hero__media img { animation: ken-burns 26s var(--ease-in-out) infinite alternate; }
@keyframes ken-burns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.09) translate3d(-1.2%, -1%, 0); }
}

/* --------------------------------------------------------------------------
   20. Reduced motion — everything still readable and reachable
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero [data-hero] { opacity: 1; transform: none; animation: none; }
  .hero__media img { animation: none; }
  .hero__cue .icon { animation: none; }
  .gallery__item:hover img { transform: none; }
  .gallery__caption { opacity: 1; transform: none; }
  .mobile-nav__link { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   21. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .mobile-nav, .to-top, .lightbox, .hero__cue,
  .reviews__controls, .form { display: none !important; }
  .hero, .section--dark, .portal, .site-footer {
    background: #fff !important;
    color: #000 !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
