/* ==========================================================================
   Slack Tide Spa — Homepage (version 2: audit recommendations)
   Palette from brand identity: Charcoal · Ash · Stone · Mushroom · Bone · Warm Grey
   ========================================================================== */

:root {
  --bone: #EEE7DD;
  --bone-2: #E6DDCF;
  --sand: #D9CCB8;
  --stone: #B6A591;
  --gold: #BDA683;
  --mushroom: #8D7760;
  --umber: #6B5C4D;
  --ash: #57524C;
  --charcoal: #1D1A17;
  --ink: #2A241F;
  --ink-soft: #554C43;
  --line-light: rgba(238, 231, 221, .16);

  /* ---- theme tokens (light = default) ---- */
  --bg: #EEE7DD;          --bg-rgb: 238, 231, 221;
  --bg-2: #E6DDCF;
  --hero-bg: #E8E0D3;
  --fg: #2A241F;          --fg-rgb: 42, 36, 31;
  --fg-strong: #1D1A17;
  --fg-soft: #554C43;     /* v2: a step darker for long paragraphs */
  --accent: #8D7760;      /* mushroom */
  --accent-deep: #6B5C4D; /* umber */
  --label: #725F4D;       /* small caps labels: mushroom deepened to pass WCAG AA on bone */
  --muted: #B6A591;       /* stone (decorative only) */
  --muted-text: #766350;  /* inactive tabs and steps: readable but quieter than --fg */
  --surface: #D9CCB8;     /* sand */
  --line: rgba(42, 36, 31, .14);
  --deep: #1D1A17;        --deep-rgb: 29, 26, 23;   /* the dark sections */
  --btn-bg: #1D1A17;      --btn-fg: #EEE7DD;
  --btn-fill: #8D7760;    --btn-fill-fg: #EEE7DD;
  --sand-o: .2;           /* page grain strength */
  --stone-o: .18;         /* sandstone on light sections (v2: a little stronger) */
  --stone-deep-o: .4;     /* sandstone on the dark booking section */

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4.5vw, 72px);
  --max: 1360px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--bone); }

/* keyboard focus: a quiet gold ring, only for keyboard users */
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.btn:focus-visible, .reserve__cta:focus-visible { outline-offset: 5px; }
main:focus { outline: none; }
.skip {
  position: fixed; left: 16px; top: 16px; z-index: 1001; padding: 14px 22px;
  background: var(--btn-bg); color: var(--btn-fg); font: 400 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  transform: translateY(-160%); transition: transform .4s var(--ease);
}
.skip:focus { transform: none; }

/* fine sand grain over the whole page */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: url("../img/tex-sand.svg") 0 0 / 320px 320px repeat;
  opacity: var(--sand-o); mix-blend-mode: soft-light;
}

/* ---------- Sandstone strata (section texture) ----------
   Faded in and out at the top and bottom so it never creates an edge. */
.tex {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/tex-sandstone.svg") center top / max(100%, 1800px) auto no-repeat; /* scale follows width only, so content height changes never shift it */
  /* hard-light shows the stone's shadows on pale backgrounds; sepia keeps it warm */
  mix-blend-mode: hard-light; filter: sepia(.7); opacity: var(--stone-o);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 240px, #000 calc(100% - 240px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 240px, #000 calc(100% - 240px), transparent 100%);
}
.tex--deep { mix-blend-mode: soft-light; filter: none; opacity: var(--stone-deep-o); }
html[data-theme="dark"] .tex { mix-blend-mode: soft-light; filter: none; }
.tex ~ .wrap { position: relative; z-index: 1; }
.menu-sec, .mem, .mean { position: relative; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type primitives ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font: 400 12px/1.3 var(--sans); letter-spacing: .3em; text-transform: uppercase;
  color: var(--label); margin: 0 0 28px;
}
.eyebrow i { display: block; width: 40px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow .muted { opacity: .55; }
.eyebrow--light { color: var(--gold); }

.sec-title {
  font: 300 clamp(40px, 5.6vw, 84px)/1.02 var(--serif);
  letter-spacing: -.015em; margin: 0 0 32px; color: var(--fg);
}
.sec-title em { color: var(--accent); font-weight: 300; }
.sec-title--light { color: var(--bone); }
.sec-title--light em { color: var(--gold); }

.sec-head { max-width: 760px; margin-bottom: clamp(48px, 7vw, 96px); }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }
.sec-intro { font-size: 17px; color: var(--fg-soft); max-width: 620px; margin: 0; }
.sec-head--center .sec-intro { margin: 0 auto; }
.sec-intro--light { color: rgba(238, 231, 221, .7); }
.cc .sec-head { max-width: 1000px; } /* "Contrast Therapy Circuit" stays on one line on desktop */

/* no lone last word: headings balance their lines, body text avoids a single-word last line
   (browsers without support simply wrap as before) */
h1, h2, h3, .sec-title, .reserve__title, .philo__line, .mean__quote, .svc__tag, .mem__desc { text-wrap: balance; }
p, li, dd, .sec-intro { text-wrap: pretty; }

/* split words (JS) */
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split-w > span { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 58px; padding: 0 34px; overflow: hidden; isolation: isolate;
  font: 400 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  transform: translateY(101%); border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  transition: transform .7s var(--ease), border-radius .7s var(--ease);
}
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn--sm { height: 46px; padding: 0 24px; font-size: 12px; }
.btn--solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn--solid::before { background: var(--btn-fill); }
.btn--solid:hover { color: var(--btn-fill-fg); }
.btn--line { border: 1px solid rgba(var(--fg-rgb), .35); color: var(--fg); }
.btn--line::before { background: var(--fg); }
.btn--line:hover { color: var(--bg); border-color: var(--fg); }
.btn--ghost-light { border: 1px solid rgba(238, 231, 221, .4); color: var(--bone); }
.btn--ghost-light::before { background: var(--bone); }
.btn--ghost-light:hover { color: var(--charcoal); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 0; padding: 16px 0; /* 44px tall tap area */
  font: 400 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--label);
}
.link-arrow::after { content: ""; width: 34px; height: 1px; background: currentColor; transition: width .5s var(--ease); }
.link-arrow:hover::after { width: 58px; }

/* ---------- Logo (mask so it inherits colour) ---------- */
.logo {
  display: block; width: 210px; aspect-ratio: 222 / 20; background: currentColor;
  -webkit-mask: url("../img/sts-logo.svg") center / contain no-repeat;
          mask: url("../img/sts-logo.svg") center / contain no-repeat;
}

/* ==========================================================================
   Loader
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 22px;
}
.loader__waves { width: 120px; }
.loader__waves path { stroke: var(--accent); stroke-width: .7; stroke-dasharray: 140; stroke-dashoffset: 140; }
.loader__word { font: 300 13px/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: var(--accent-deep); opacity: 0; }
html:not(.js) .loader, html.intro-seen .loader { display: none; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 26px var(--gutter); color: var(--fg);
  /* padding never animates (layout changes made the logo snap between pixels);
     the compact state is done with transforms only, which stay smooth */
  transition: color .5s var(--ease), transform .6s var(--ease);
  will-change: transform;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(var(--bg-rgb), .72); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line); transition: opacity .6s var(--ease), background .5s, transform .6s var(--ease);
}
/* compact: lift everything 12px, and the glass panel a further 12px so its
   bottom edge sits 14px under the content, same as the old padding change */
.nav.is-scrolled { transform: translateY(-12px); }
.nav.is-scrolled::before { opacity: 1; transform: translateY(-12px); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-dark { color: var(--bone); }
.nav.is-dark::before { background: rgba(var(--deep-rgb), .6); border-color: var(--line-light); }
.nav.is-dark .btn--solid { background: var(--bone); color: var(--charcoal); }
.nav.is-dark .btn--solid:hover { color: var(--bone); }
body.menu-open .nav { color: var(--bone); transform: none; }
body.menu-open .nav::before { opacity: 0; }
body.menu-open .nav .btn--solid { background: var(--bone); color: var(--charcoal); }

.nav__left { justify-self: start; display: flex; align-items: center; gap: 26px; }
.nav__menu { display: inline-flex; align-items: center; gap: 16px; }
.nav__burger { position: relative; width: 30px; height: 12px; }
.nav__burger i { position: absolute; left: 0; height: 1px; background: currentColor; transition: transform .6s var(--ease), width .6s var(--ease), top .6s var(--ease); }
.nav__burger i:first-child { top: 0; width: 30px; }
.nav__burger i:last-child { top: 11px; width: 20px; }
.nav__menu:hover .nav__burger i:last-child { width: 30px; }
body.menu-open .nav__burger i:first-child { top: 6px; transform: rotate(45deg); }
body.menu-open .nav__burger i:last-child { top: 6px; width: 30px; transform: rotate(-45deg); }
.nav__label { font: 400 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; }
.nav__logo .logo { width: clamp(150px, 15vw, 220px); }
.nav__right { justify-self: end; display: flex; align-items: center; gap: 32px; }
.nav__phone { font: 400 13px/1 var(--sans); letter-spacing: .16em; opacity: .85; transition: opacity .3s; }
.nav__phone:hover { opacity: 1; }

/* ---------- Fullscreen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--charcoal); color: var(--bone);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 1s var(--ease-io), visibility 0s 1s;
}
body.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 1s var(--ease-io), visibility 0s; }
.menu__media { position: relative; overflow: hidden; }
.menu__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transform: scale(1.12); transition: transform 1.6s var(--ease), opacity .5s; }
body.menu-open .menu__media img { transform: scale(1); }
.menu__list { align-self: center; display: flex; flex-direction: column; padding: 120px var(--gutter) 80px; }
.menu__list a {
  display: flex; align-items: baseline; gap: 22px; padding: 10px 0;
  font: 300 clamp(34px, 4.4vw, 64px)/1.1 var(--serif); color: rgba(238, 231, 221, .9);
  opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .8s var(--ease), color .4s, padding .5s var(--ease);
}
.menu__list a em { font: 400 12px/1 var(--sans); letter-spacing: .2em; color: var(--gold); font-style: normal; }
.menu__list:hover a { color: rgba(238, 231, 221, .35); }
.menu__list a:hover { color: var(--bone); padding-left: 18px; }
body.menu-open .menu__list a { opacity: 1; transform: none; }
body.menu-open .menu__list a:nth-child(1) { transition-delay: .35s; }
body.menu-open .menu__list a:nth-child(2) { transition-delay: .4s; }
body.menu-open .menu__list a:nth-child(3) { transition-delay: .45s; }
body.menu-open .menu__list a:nth-child(4) { transition-delay: .5s; }
body.menu-open .menu__list a:nth-child(5) { transition-delay: .55s; }
body.menu-open .menu__list a:nth-child(6) { transition-delay: .6s; }
.menu__foot { position: absolute; left: calc(100% * 5 / 12 + var(--gutter)); right: var(--gutter); bottom: 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; font-size: 12px; letter-spacing: .14em; color: rgba(238, 231, 221, .6); }
.menu__info { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 8px 40px; }
.menu__social { display: flex; gap: 10px; }
.menu__social a { width: 42px; height: 42px; border: 1px solid rgba(238, 231, 221, .2); border-radius: 50%; display: grid; place-items: center; transition: background .4s, border-color .4s; }
.menu__social a:hover { background: var(--bone); border-color: var(--bone); }
.menu__social a:hover svg { fill: var(--charcoal); }
.menu__social svg { width: 19px; height: 19px; fill: var(--bone); opacity: .55; transition: fill .4s, opacity .4s; }
.menu__social a:hover svg, .menu__social a:focus-visible svg { opacity: 1; }
.menu__foot a { transition: color .3s; }
.menu__foot a:hover { color: var(--bone); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center; background: var(--hero-bg);
}
/* Vimeo background film — sized to always cover (16:9 source) */
.hero__video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: var(--hero-bg); }
.hero__video iframe {
  position: absolute; left: 50%; top: 50%; border: 0;
  width: max(100%, 177.78vh); height: max(100%, 56.25vw);
  transform: translate(-50%, -50%) scale(1.02);
  opacity: 0; transition: opacity 1.8s var(--ease);
}
.hero__video.is-playing iframe { opacity: 1; }
/* soft overall wash + left-side legibility veil */
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), .72) 0%, rgba(var(--bg-rgb), .38) 40%, rgba(var(--bg-rgb), .08) 72%),
    rgba(var(--bg-rgb), .18);
}
/* long eased fade into the page colour — no seam into the next section */
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 42%; pointer-events: none;
  background: linear-gradient(0deg,
    var(--bg) 0%, rgba(var(--bg-rgb), .97) 12%, rgba(var(--bg-rgb), .86) 26%,
    rgba(var(--bg-rgb), .62) 44%, rgba(var(--bg-rgb), .32) 66%, rgba(var(--bg-rgb), .1) 85%, rgba(var(--bg-rgb), 0) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 140px var(--gutter) 120px; }
.hero__eyebrow { margin-bottom: 36px; }
.hero__title {
  font: 300 clamp(52px, 8.4vw, 138px)/.94 var(--serif);
  letter-spacing: -.025em; margin: 0 0 40px; color: var(--fg-strong);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { color: var(--accent-deep); }
.hero__lede { max-width: 520px; font-size: 17px; color: var(--fg-soft); margin: 0 0 48px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.gauge {
  position: absolute; right: var(--gutter); top: 50%; z-index: 2; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font: 400 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-deep);
}
.gauge__label { writing-mode: vertical-rl; transform: rotate(180deg); opacity: .7; }
.gauge__track { position: relative; width: 1px; height: 140px; background: rgba(var(--fg-rgb), .2); }
.gauge__dot { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--accent-deep); box-shadow: 0 0 0 5px rgba(107, 92, 77, .14); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 34px; z-index: 2; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font: 400 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--accent-deep);
}
.hero__scroll i { width: 1px; height: 46px; background: linear-gradient(var(--accent-deep), transparent); transform-origin: top; animation: drip 2.6s var(--ease) infinite; }
/* pause / play for the background film (accessibility: moving content can be stopped) */
.hero__pause {
  position: absolute; left: var(--gutter); bottom: 34px; z-index: 3; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--accent-deep);
  border: 1px solid rgba(var(--fg-rgb), .22); opacity: .7; transition: opacity .4s, border-color .4s;
}
.hero__pause[hidden] { display: none; }
.hero__pause:hover { opacity: 1; border-color: currentColor; }
.hero__pause svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.hero__pause .vp-play { display: none; }
.hero__pause[aria-pressed="true"] .vp-play { display: block; }
.hero__pause[aria-pressed="true"] .vp-pause { display: none; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ==========================================================================
   Philosophy — pinned
   ========================================================================== */
.philo { position: relative; height: 200vh; } /* v2: two screens of scroll instead of three */
.philo__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 0 var(--gutter);
}
.philo__eyebrow { position: absolute; top: 18vh; }
.philo__wave { position: absolute; left: 0; width: 100%; height: 120px; top: calc(50% - 60px); opacity: .55; pointer-events: none; }
.philo__wave path { fill: none; stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }
.philo__wave path + path { opacity: .5; }
.philo__stage { position: relative; width: min(980px, 100%); height: 46vh; display: grid; place-items: center; }
.philo__line {
  position: absolute; margin: 0; padding: 0 2vw;
  font: italic 300 clamp(26px, 3.4vw, 50px)/1.28 var(--serif); color: var(--fg);
  background: var(--bg); box-shadow: 0 0 60px 40px var(--bg);
  opacity: 0; transform: translateY(24px); filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
}
.philo__line.is-active { opacity: 1; transform: none; filter: none; }
.tilde { color: var(--accent); font-style: normal; margin-right: .2em; }
.philo__steps { position: absolute; bottom: 12vh; display: flex; gap: 46px; font: 400 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted-text); }
.philo__steps button { position: relative; padding: 18px 4px 8px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: color .6s; }
.philo__steps button:hover { color: var(--accent-deep); }
.philo__steps button:hover::before { transform: scale(1.4); }
.philo__steps button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.philo__steps button::before { content: ""; position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; transition: transform .6s var(--ease); }
.philo__steps button.is-active { color: var(--accent-deep); }
.philo__steps button.is-active::before { transform: scale(1.8); }

/* ==========================================================================
   Gallery ribbon
   ========================================================================== */
.ribbon { overflow: hidden; padding: 4vh 0 14vh; }
.ribbon__track { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); width: max-content; padding: 0 var(--gutter); will-change: transform; }
.ribbon figure { margin: 0; overflow: hidden; flex: none; }
.ribbon img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.r1 { width: clamp(180px, 18vw, 280px); aspect-ratio: 4/5; }
.r2 { width: clamp(260px, 28vw, 440px); aspect-ratio: 3/2; margin-top: 12vh !important; }
.r3 { width: clamp(200px, 20vw, 320px); aspect-ratio: 3/4; margin-top: -8vh !important; }
.r4 { width: clamp(240px, 24vw, 380px); aspect-ratio: 4/3; margin-top: 10vh !important; }
.r5 { width: clamp(200px, 20vw, 300px); aspect-ratio: 4/5; }
.r6 { width: clamp(200px, 18vw, 290px); aspect-ratio: 4/5; margin-top: 14vh !important; }
.r7 { width: clamp(220px, 22vw, 340px); aspect-ratio: 4/5; margin-top: -6vh !important; }

/* ==========================================================================
   Experiences — expanding panels
   ========================================================================== */
.exp { padding: 4vh 0 16vh; }
.panels {
  /* width of an open panel — text and images are laid out at this fixed width so nothing reflows mid-transition */
  --open-w: calc((min(100vw, var(--max)) - 2 * var(--gutter) - 42px) * .5); /* four slides: open = 3 / (3 + 1 + 1 + 1) */
  display: flex; gap: 14px; height: clamp(480px, 72vh, 720px);
}
.panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--bone); outline: none;
  transition: flex-grow 1.1s cubic-bezier(.65, 0, .35, 1);
}
.panel.is-open { flex-grow: 3; }
/* image is always as wide as an open panel and centred, so it is revealed rather than re-scaled */
.panel img {
  position: absolute; top: 0; left: 50%; height: 100%; width: max(100%, var(--open-w)); max-width: none; object-fit: cover;
  transform: translateX(-50%) scale(1.04); filter: saturate(.85) brightness(.78);
  transition: transform 1.6s var(--ease), filter 1.1s var(--ease);
}
.panel.is-open img { transform: translateX(-50%) scale(1); filter: saturate(.95) brightness(.9); }
.panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 17, 14, 0) 35%, rgba(20, 17, 14, .78) 100%); }

/* collapsed state: a quiet vertical label */
.panel__label {
  position: absolute; left: clamp(22px, 2.4vw, 36px); bottom: clamp(24px, 3vw, 44px); z-index: 2;
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; gap: 18px; white-space: nowrap;
  font: 300 clamp(22px, 2vw, 30px)/1 var(--serif); color: var(--bone);
  opacity: 1; transition: opacity .5s var(--ease) .45s;
}
.panel__label em { font: 400 12px/1 var(--sans); font-style: normal; letter-spacing: .3em; color: var(--gold); }
.panel.is-open .panel__label { opacity: 0; transition: opacity .25s var(--ease) 0s; }

/* open state: full body, fixed width, fades up once the panel has mostly opened */
.panel__body {
  position: absolute; left: 0; bottom: 0; z-index: 2; width: var(--open-w); padding: clamp(24px, 3vw, 44px);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.panel.is-open .panel__body { opacity: 1; transform: none; transition: opacity .8s var(--ease) .5s, transform 1s var(--ease) .5s; }
.panel:not(.is-open) { cursor: pointer; }
.panel:focus-visible { box-shadow: inset 0 0 0 1px var(--gold); }
/* meta on the left, button on the right; the button is the only link in the slide */
.panel__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; max-width: 560px; margin-top: 22px; }
.panel__foot .panel__meta { margin-top: 0; }
.panel__cta { visibility: hidden; transition: visibility 0s .25s; }
.panel.is-open .panel__cta { visibility: visible; pointer-events: auto; transition: visibility 0s .5s; }
.panel__num { display: block; font: 400 12px/1 var(--sans); letter-spacing: .3em; color: var(--gold); margin-bottom: 18px; }
.panel h3 { font: 300 clamp(28px, 2.8vw, 44px)/1.05 var(--serif); margin: 0; }
.panel p { max-width: 380px; margin: 14px 0 0; font-size: 15px; color: rgba(238, 231, 221, .78); }
.panel__meta { display: inline-block; font: 400 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(238, 231, 221, .25); }

/* ==========================================================================
   Treatment menu
   ========================================================================== */
/* starts in the page bone and eases into the deeper sand tone — no visible edge */
.menu-sec { padding: 14vh 0 18vh; background: linear-gradient(180deg, var(--bg) 0, var(--bg-2) 38vh, var(--bg-2) 100%); }
.tabs { position: relative; display: flex; justify-content: center; gap: clamp(20px, 4vw, 56px); margin: 0 auto 72px; border-bottom: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs button { padding: 0 0 20px; font: 400 clamp(17px, 1.6vw, 22px)/1 var(--serif); color: var(--muted-text); transition: color .4s; white-space: nowrap; }
.tabs button[aria-selected="true"], .tabs button:hover { color: var(--fg); }
.tabs__ink { position: absolute; bottom: -1px; height: 1px; background: var(--fg); transition: left .7s var(--ease), width .7s var(--ease); }

.tm { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 100px); align-items: start; }
.tm__lists { position: relative; }
.tm__list { list-style: none; margin: 0; padding: 0; display: none; }
.tm__list.is-active { display: block; animation: fadeUp .9s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.svc { border-bottom: 1px solid var(--line); }
.svc__head {
  position: relative; width: 100%; text-align: left; display: grid;
  grid-template-columns: 1fr auto 28px; grid-template-areas: "name price plus" "tag tag tag";
  column-gap: 24px; row-gap: 6px; padding: 30px 0;
}
.svc__name { grid-area: name; font: 400 clamp(24px, 2.2vw, 32px)/1.1 var(--serif); color: var(--fg); transition: transform .6s var(--ease), color .4s; }
.svc__tag { grid-area: tag; font: italic 300 17px/1.45 var(--serif); color: var(--fg-soft); max-width: 520px; }
.svc__price { grid-area: price; align-self: center; font: 400 14px/1 var(--sans); letter-spacing: .06em; color: var(--fg); white-space: nowrap; }
.svc__price b { font-weight: 400; font-size: 12px; letter-spacing: .1em; color: var(--label); margin: 0 6px 0 14px; }
.svc__price b:first-child { margin-left: 0; }
.svc__price b::after { content: " min"; }
.svc__price small { font-size: 12px; color: var(--fg-soft); margin-left: 2px; }
.svc__plus { grid-area: plus; position: relative; align-self: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; transition: background .4s, border-color .4s, transform .6s var(--ease); }
.svc__plus::before, .svc__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1px; margin: 0 0 0 -5px; background: var(--fg); transition: transform .5s var(--ease), background .4s; }
.svc__plus::after { transform: rotate(90deg); }
.svc:hover .svc__name { transform: translateX(10px); }
.svc:hover .svc__plus { border-color: var(--fg); }
.svc.is-open .svc__plus { background: var(--fg); border-color: var(--fg); transform: rotate(180deg); }
.svc.is-open .svc__plus::before, .svc.is-open .svc__plus::after { background: var(--bg); }
.svc.is-open .svc__plus::after { transform: rotate(0); }
.svc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.svc__body > div { overflow: hidden; }
.svc.is-open .svc__body { grid-template-rows: 1fr; }
.svc__body p { margin: 0 0 16px; max-width: 600px; color: var(--fg-soft); font-size: 15.5px; }
.svc__body .link-arrow { margin-bottom: 32px; }

.tm__note { padding: 28px 0 0; font: italic 300 16px/1.6 var(--serif); color: var(--fg-soft); max-width: 600px; }
.tm__note--top { padding: 0 0 18px; }
.tm__list--extras.is-active { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.tm__list--extras .tm__note { grid-column: 1 / -1; }
.xtra { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.xtra span { font: 400 21px/1.2 var(--serif); }
.xtra span small { font: 400 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--label); margin-left: 6px; }
.xtra i { height: 1px; border-bottom: 1px dotted var(--muted); transform: translateY(-4px); }
.xtra b { font: 400 15px/1 var(--sans); }
.xtra p { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--fg-soft); }

.tm__visual { position: relative; } /* v2: no longer pinned while scrolling (it jittered) */
.tm__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.tm__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1s var(--ease), transform 1.6s var(--ease); }
.tm__frame img.is-on { opacity: 1; transform: scale(1); }
.tm__caption { margin: 18px 0 0; font: italic 300 15px/1.4 var(--serif); color: var(--fg-soft); }

/* ==========================================================================
   Head Spa — dark
   ========================================================================== */
.hs { position: relative; background: var(--deep); color: var(--bone); padding: 0 0 14vh; overflow: hidden; }
.hs__media { position: relative; height: 92vh; overflow: hidden; }
.hs__media img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; filter: brightness(.82) saturate(.9); }
.hs__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--deep-rgb), .2) 0%, rgba(var(--deep-rgb), 0) 40%, var(--deep) 90%, var(--deep) 100%); }
.hs__grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 120px); margin-top: -26vh; }
.hs__lede { font-size: 17px; color: rgba(238, 231, 221, .72); max-width: 520px; margin: 0 0 36px; }
.hs__price { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; font: 300 26px/1 var(--serif); color: var(--gold); }
.hs__price .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.ritual { list-style: none; margin: 0; padding: 0; align-self: end; }
.ritual li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 26px 0; border-top: 1px solid var(--line-light); }
.ritual li:last-child { border-bottom: 1px solid var(--line-light); }
.ritual b { font: 400 12px/2.2 var(--sans); letter-spacing: .2em; color: var(--gold); }
.ritual h3 { margin: 0 0 6px; font: 400 26px/1.1 var(--serif); }
.ritual p { margin: 0; font-size: 15px; color: rgba(238, 231, 221, .7); }

/* ==========================================================================
   Contrast circuit — dark, interactive
   ========================================================================== */
.cc {
  --tint: 196, 74, 52;
  position: relative; background: var(--deep); color: var(--bone); padding: 6vh 0 16vh; overflow: hidden;
  transition: --tint 1s;
}
.cc[data-temp="steam"] { --tint: 196, 160, 120; }
.cc[data-temp="cold"] { --tint: 92, 128, 156; }
.cc[data-temp="rain"] { --tint: 140, 156, 160; }
.cc[data-temp="rest"] { --tint: 189, 166, 131; }
.cc__glow {
  position: absolute; width: 90vw; height: 90vw; left: 50%; top: 40%; transform: translate(-30%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--tint), .26), rgba(var(--tint), 0));
  filter: blur(20px); pointer-events: none; transition: background 1.2s var(--ease);
}
.cc .wrap { position: relative; z-index: 2; }
/* fades the coloured glow out toward the top edge so it melts into the Head Spa section above */
.cc::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60vh; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, var(--deep) 0%, rgba(var(--deep-rgb), .85) 30%, rgba(var(--deep-rgb), 0) 100%);
}
.cc__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.cc__dial { position: relative; width: min(100%, 480px); aspect-ratio: 1; margin: 0 auto; }
.cc__dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cc__ring { fill: none; stroke: var(--line-light); stroke-width: 1; }
.cc__ring-prog { fill: none; stroke: rgb(var(--tint)); stroke-width: 1.5; stroke-dasharray: 1056; stroke-dashoffset: 1056; transition: stroke-dashoffset 1.2s var(--ease), stroke 1s; }
.cc__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cc__temp { font: 300 clamp(64px, 8vw, 116px)/1 var(--serif); letter-spacing: -.02em; }
.cc__temp-label { margin-top: 12px; font: 400 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: rgba(238, 231, 221, .6); }
.cc__node {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: rotate(var(--a)) translateX(calc(min(100%, 480px) * 0 + 42%)) ; /* overwritten by JS for accuracy */
}
.cc__node::before {
  content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--deep); border: 1px solid rgba(238, 231, 221, .5); transition: background .5s, border-color .5s, transform .5s var(--ease), box-shadow .5s;
}
.cc__node span {
  position: absolute; white-space: nowrap; font: 400 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(238, 231, 221, .55);
  transition: color .4s;
}
.cc__node:hover::before { transform: scale(1.3); border-color: var(--bone); }
.cc__node.is-active::before { background: rgb(var(--tint)); border-color: rgb(var(--tint)); transform: scale(1.4); box-shadow: 0 0 0 8px rgba(var(--tint), .18); }
.cc__node.is-active span, .cc__node:hover span { color: var(--bone); }

.cc__img { aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 34px; background: #000; }
.cc__img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s, transform 1.4s var(--ease); }
.cc__detail h3 { font: 300 clamp(28px, 2.8vw, 40px)/1.12 var(--serif); margin: 0 0 16px; }
.cc__detail p { margin: 0 0 30px; color: rgba(238, 231, 221, .68); max-width: 480px; }
.cc__progress { height: 1px; background: var(--line-light); max-width: 480px; }
.cc__progress span { display: block; height: 100%; width: 0; background: rgb(var(--tint)); }

.cc__pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14vh; }
.price-card { padding: 34px 28px; border: 1px solid var(--line-light); display: flex; flex-direction: column; gap: 10px; transition: border-color .5s, background .5s; }
.price-card:hover { border-color: rgba(238, 231, 221, .4); }
.price-card span { font: 400 12px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(238, 231, 221, .6); }
.price-card b { font: 300 52px/1 var(--serif); }
.price-card small { font-size: 14px; color: rgba(238, 231, 221, .66); }
.price-card--feature { background: rgba(189, 166, 131, .1); border-color: rgba(189, 166, 131, .45); }
.price-card--feature b { color: var(--gold); }
.cc__note { margin: 36px 0 0; max-width: 680px; font: italic 300 18px/1.6 var(--serif); color: rgba(238, 231, 221, .7); }

/* ==========================================================================
   Membership
   ========================================================================== */
.mem { padding: 18vh 0; }
.mem__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 8vw, 140px); align-items: center; }
.mem__card {
  position: relative; padding: clamp(36px, 4vw, 60px); overflow: hidden;
  background: linear-gradient(150deg, #2A2520 0%, #1B1815 100%); color: var(--bone);
  box-shadow: 0 50px 100px -40px rgba(42, 36, 31, .55);
}
.mem__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 0%), rgba(189, 166, 131, .22), transparent 45%); pointer-events: none; }
.mem__waves { position: absolute; right: -40px; top: 30px; width: 260px; fill: var(--gold); opacity: .22; }
.mem__kicker { font: 400 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 40px; }
.mem__price { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.mem__price b { font: 300 clamp(72px, 7vw, 104px)/1 var(--serif); }
.mem__price span { font-size: 14px; color: rgba(238, 231, 221, .6); }
.mem__desc { font: italic 300 22px/1.4 var(--serif); color: rgba(238, 231, 221, .82); margin: 18px 0 34px; }
.mem__card ul { list-style: none; margin: 0 0 44px; padding: 0; }
.mem__card li { padding: 14px 0; border-top: 1px solid var(--line-light); font-size: 15px; color: rgba(238, 231, 221, .78); }
.mem__card .btn--solid { background: var(--bone); color: var(--charcoal); }
.mem__card .btn--solid:hover { color: var(--bone); }
.mem__copy p { color: var(--fg-soft); max-width: 560px; }
.insurers { list-style: none; padding: 0; margin: 36px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.insurers li { padding: 22px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; font: 400 19px/1.2 var(--serif); color: var(--accent-deep); transition: background .4s, color .4s; }
.insurers li:hover { background: var(--fg); color: var(--bg); }
.small { font-size: 14px; }

/* ==========================================================================
   Meaning — tide chart
   ========================================================================== */
.mean { padding: 4vh 0 18vh; }
.chart { position: relative; height: clamp(180px, 24vw, 300px); margin: 0 0 12vh; cursor: crosshair; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart__fill { fill: url(#tideFill); }
.chart__line { fill: none; stroke: var(--accent-deep); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.chart__mid { stroke: var(--line); stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.chart__mark { position: absolute; transform: translate(-50%, -150%); font: 400 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--label); white-space: nowrap; }
.chart__mark--low { transform: translate(-50%, 120%); }
.chart__mark::after { content: ""; position: absolute; left: 50%; top: calc(100% + 8px); width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; border: 1px solid var(--accent-deep); background: var(--bg); }
.chart__mark--low::after { top: auto; bottom: calc(100% + 8px); }
.chart__cursor { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: rgba(var(--fg-rgb), .3); pointer-events: none; opacity: 0; transition: opacity .3s; }
.chart:hover .chart__cursor { opacity: 1; }
.chart__cursor i { position: absolute; left: -6px; width: 13px; height: 13px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 6px rgba(var(--fg-rgb), .12); }
.chart__cursor span { position: absolute; top: -34px; left: 12px; white-space: nowrap; font: italic 400 18px/1 var(--serif); color: var(--fg); }
.mean__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 120px); }
.mean__quote { margin: 0; padding-left: 32px; border-left: 1px solid var(--gold); font: italic 300 clamp(28px, 3vw, 44px)/1.3 var(--serif); color: var(--fg); }
.mean__copy p { margin: 0 0 20px; color: var(--fg-soft); }

/* ==========================================================================
   Reserve + footer
   ========================================================================== */
.reserve { position: relative; background: var(--deep); color: var(--bone); padding: 22vh 0 16vh; overflow: hidden; text-align: center; }
.reserve__waves { position: absolute; left: -5%; width: 110%; bottom: -10%; height: 70%; fill: var(--gold); opacity: .07; }
.reserve .eyebrow { justify-content: center; }
.reserve__title { font: 300 clamp(60px, 11vw, 180px)/.92 var(--serif); letter-spacing: -.03em; margin: 0 0 64px; }
.reserve__title em { color: var(--gold); }
.reserve__cta {
  display: inline-flex; align-items: center; gap: 22px; height: 84px; padding: 0 46px; border-radius: 84px;
  border: 1px solid rgba(238, 231, 221, .35); font: 400 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  transition: background .6s var(--ease), color .6s var(--ease), border-color .6s;
}
.reserve__cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .6s var(--ease); }
.reserve__cta:hover { background: var(--bone); color: var(--charcoal); border-color: var(--bone); }
.reserve__cta:hover svg { transform: translateX(6px); }
.reserve__info { list-style: none; margin: 44px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 0; font-size: 14px; letter-spacing: .06em; color: rgba(238, 231, 221, .66); }
.reserve__info li + li::before { content: "·"; margin: 0 18px; color: var(--gold); }
.reserve__info a { transition: color .3s; }
.reserve__info a:hover { color: var(--bone); }

.foot { background: var(--deep); color: rgba(238, 231, 221, .66); padding: 0 0 36px; font-size: 14px; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line-light); }
.foot__brand .logo { width: 200px; color: var(--bone); }
.foot__brand p { font: italic 300 17px/1.4 var(--serif); margin: 18px 0 26px; }
.foot__social { display: flex; gap: 12px; margin-top: 28px; }
.foot__social a { width: 42px; height: 42px; border: 1px solid var(--line-light); border-radius: 50%; display: grid; place-items: center; transition: background .4s, border-color .4s; }
.foot__social a:hover { background: var(--bone); border-color: var(--bone); }
.foot__social a:hover svg, .foot__social a:focus-visible svg { fill: var(--charcoal); opacity: 1; }
.foot__social svg { width: 19px; height: 19px; fill: var(--bone); opacity: .55; transition: fill .4s, opacity .4s; }
.foot__h { margin: 0 0 18px; font: 400 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.foot p { margin: 0; line-height: 1.9; }
.foot a:hover { color: var(--bone); }
.foot__grid p a { text-decoration: underline; text-decoration-color: rgba(238, 231, 221, .2); text-underline-offset: 4px; transition: color .3s, text-decoration-color .3s; }
.foot__grid p a:hover { text-decoration-color: currentColor; }
.hours { margin: 0; display: grid; grid-template-columns: auto auto; gap: 8px 20px; }
.hours dt { color: var(--bone); }
.hours dd { margin: 0; text-align: right; }
.foot__base { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; letter-spacing: .1em; color: rgba(238, 231, 221, .6); }

/* ---------- Mobile book ---------- */
.mbook {
  display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  height: 54px; align-items: center; justify-content: center;
  background: var(--btn-bg); color: var(--btn-fg); font: 400 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  transform: translateY(150%); transition: transform .6s var(--ease);
}
.mbook.is-on { transform: none; }


/* ==========================================================================
   Theme toggle
   ========================================================================== */
.theme-toggle {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 30%, transparent);
  display: grid; place-items: center; transition: border-color .4s, background .4s;
}
.theme-toggle:hover { border-color: currentColor; }
.theme-toggle:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.theme-toggle svg { width: 17px; height: 17px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }
.theme-toggle .tt-sun, .theme-toggle .tt-moon { transform-origin: 12px 12px; transition: transform .8s var(--ease), opacity .5s var(--ease); }
.theme-toggle .tt-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.theme-toggle .tt-moon { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .tt-sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .tt-moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* ==========================================================================
   Dark mode — "night tide"
   ========================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191612;          --bg-rgb: 25, 22, 18;
  --bg-2: #201C18;
  --hero-bg: #191612;
  --fg: #E9E1D5;          --fg-rgb: 233, 225, 213;
  --fg-strong: #F2EBE1;
  --fg-soft: #A79B8C;
  --accent: #BDA683;      /* gold */
  --accent-deep: #CDB792;
  --label: #BDA683;
  --muted: #6F6356;
  --muted-text: #958877;
  --surface: #2A2520;
  --line: rgba(233, 225, 213, .12);
  --deep: #191612;        --deep-rgb: 25, 22, 18;
  --btn-bg: #E9E1D5;      --btn-fg: #1D1A17;
  --btn-fill: #BDA683;    --btn-fill-fg: #1D1A17;
  --sand-o: .14;
  --stone-o: .3;
  --stone-deep-o: .34;
}
html[data-theme="dark"] .hero__video iframe { filter: brightness(.62) saturate(.8) contrast(1.05); }
html[data-theme="dark"] .hero__veil {
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), .78) 0%, rgba(var(--bg-rgb), .42) 42%, rgba(var(--bg-rgb), .12) 75%),
    rgba(var(--bg-rgb), .2);
}
/* treatment section eases back to the page tone before the Head Spa section */
html[data-theme="dark"] .menu-sec { background: linear-gradient(180deg, var(--bg) 0, var(--bg-2) 38vh, var(--bg-2) 70%, var(--bg) 100%); }
html[data-theme="dark"] .mem__card { background: linear-gradient(150deg, #2B2621 0%, #211D19 100%); border: 1px solid rgba(189, 166, 131, .18); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .foot__grid { border-top-color: var(--line); }
/* covers the photo's top pixel row, which can peek through on fractional scroll positions */
html[data-theme="dark"] .hs::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--deep); z-index: 1; pointer-events: none; }
/* the section above is dark too, so the Head Spa photo fades in from the top instead of starting on a hard edge */
html[data-theme="dark"] .hs__media::after { background: linear-gradient(180deg, var(--deep) 0%, var(--deep) 4%, rgba(var(--deep-rgb), .82) 14%, rgba(var(--deep-rgb), .45) 26%, rgba(var(--deep-rgb), .12) 38%, rgba(var(--deep-rgb), 0) 48%, rgba(var(--deep-rgb), 0) 52%, var(--deep) 90%, var(--deep) 100%); }
html[data-theme="dark"] .chart__fill { opacity: .6; }
html[data-theme="dark"] .ribbon img, html[data-theme="dark"] .tm__frame img { filter: brightness(.88); }

/* mode change: circular "tide" reveal from the toggle (View Transitions), with a cross-fade fallback */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .7s var(--ease), color .7s var(--ease), border-color .7s var(--ease), fill .7s, stroke .7s !important;
}

/* ---------- Reveal defaults (JS adds motion) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js.no-motion [data-reveal] { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav__phone { display: none; }
  .tm { grid-template-columns: 1fr; }
  .tm__visual { display: none; }
  .cc__pricing { grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .hs__grid, .mem__grid, .mean__grid, .cc__grid { grid-template-columns: 1fr; }
  .hs__grid { margin-top: -18vh; }
}
@media (max-width: 760px) {
  .nav { padding: 18px var(--gutter); }
  .nav.is-scrolled, .nav.is-scrolled::before { transform: translateY(-6px); }
  .nav__label { display: none; }
  .nav__logo { justify-self: center; }
  .nav__right .btn { display: none; }
  .menu { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .menu__media { display: none; }
  .menu__list { flex: 1 0 auto; justify-content: center; align-self: stretch; padding: 110px var(--gutter) 40px; }
  .menu__foot { position: static; flex-direction: column; align-items: flex-start; gap: 16px; padding: 0 var(--gutter) 32px; }
  .menu__info { grid-template-columns: 1fr; gap: 6px; }
  .hero__inner { padding-top: 120px; }
  .hero__veil { background: linear-gradient(180deg, rgba(var(--bg-rgb), .25) 0%, rgba(var(--bg-rgb), .55) 60%); }
  .hero__fade { height: 55%; }
  .hero__inner { align-self: flex-end; padding-bottom: 110px; }
  .gauge, .hero__scroll { display: none; }
  .cc__dial { width: 74%; }
  .btn { height: 54px; padding: 0 26px; }
  .philo__steps { gap: 24px; }
  .panels { flex-direction: column; height: auto; }
  .panel { min-height: 120px; transition: min-height 1s cubic-bezier(.65, 0, .35, 1); }
  .panel.is-open { min-height: 440px; }
  .panel img { width: 100%; }
  .panel__body { width: auto; right: 0; }
  .panel__label { writing-mode: horizontal-tb; transform: none; bottom: 26px; left: 24px; }
  /* deeper shade on phones, where the text sits over more of the photo */
  .panel::after { background: linear-gradient(180deg, rgba(20, 17, 14, .1) 0%, rgba(20, 17, 14, .35) 30%, rgba(20, 17, 14, .86) 100%); }
  .exp { padding-bottom: 8vh; }
  .menu-sec { padding-top: 8vh; }
  .tabs { margin-bottom: 36px; }
  .svc__head { padding: 24px 0; }
  .hero__pause { left: auto; right: var(--gutter); bottom: 28px; }
  .reserve__info { flex-direction: column; align-items: center; gap: 12px; }
  .reserve__info li + li::before { content: none; }
  .reserve__cta { height: 72px; padding: 0 34px; }
  .svc__head { grid-template-columns: 1fr 28px; grid-template-areas: "name plus" "tag tag" "price price"; }
  .svc__price { margin-top: 6px; }
  .tm__list--extras.is-active { grid-template-columns: 1fr; }
  .tabs { gap: 18px; overflow-x: auto; justify-content: flex-start; }
  .tabs button { font-size: 16px; }
  .hs__media { height: 70vh; }
  .cc__pricing { grid-template-columns: 1fr; }
  .cc__node span { font-size: 9px; letter-spacing: .16em; }
  .insurers { grid-template-columns: 1fr 1fr; }
  .chart__mark { font-size: 8px; letter-spacing: .18em; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__base { flex-direction: column; padding-bottom: 70px; }
  .mbook { display: flex; }
  .ribbon { padding-bottom: 8vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .philo { height: auto; }
  .philo__pin { position: relative; height: auto; padding: 16vh var(--gutter); }
  .philo__eyebrow, .philo__steps, .philo__wave { position: static; }
  .philo__stage { height: auto; display: block; }
  .philo__line { position: static; opacity: 1; transform: none; filter: none; margin: 0 0 40px; box-shadow: none; }
}

/* ==========================================================================
   Version 2 additions (audit recommendations)
   ========================================================================== */

/* placeholders: content still to come from the spa, deliberately visible during review */
.ph { font-style: italic; color: var(--label); text-decoration: underline dashed rgba(var(--fg-rgb), .35); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ph--light { color: var(--gold); text-decoration-color: rgba(238, 231, 221, .35); }
.inline-link { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(var(--fg-rgb), .3); text-underline-offset: 4px; transition: text-decoration-color .3s; }
.inline-link:hover { text-decoration-color: currentColor; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* bone button for dark sections */
.btn--light { background: var(--bone); color: var(--charcoal); }
.btn--light::before { background: var(--gold); }
.btn--light:hover { color: var(--charcoal); }

/* header: a 44px tap area round the menu button without changing its look */
.nav__menu { padding: 16px 10px; margin: -16px -10px; }
.theme-toggle--menu { display: none; color: var(--bone); width: 42px; height: 42px; }

/* menu now has eight items */
.menu__list a { font-size: clamp(30px, 3.8vw, 56px); padding: 8px 0; }
body.menu-open .menu__list a:nth-child(7) { transition-delay: .65s; }
body.menu-open .menu__list a:nth-child(8) { transition-delay: .7s; }

/* philosophy: the step name sits above its line */
.philo__line blockquote { margin: 0; }
.philo__name { display: block; margin: 0 0 22px; font: 400 12px/1 var(--sans); font-style: normal; letter-spacing: .34em; text-transform: uppercase; color: var(--label); }

/* soft seams where a dark section meets a light one (light mode) */
/* circuit -> memberships keeps the hard edge from version 1 (Jay prefers it) */
/* FAQ -> reserve keeps the hard edge from version 1 (Jay prefers it) */
.reserve .wrap { position: relative; z-index: 2; }
/* treatments -> head spa photo keeps its hard edge (Jay prefers it) */

/* circuit dial: degrees Celsius */
.cc__temp small { font-size: .34em; vertical-align: .95em; margin-left: .04em; letter-spacing: 0; }

/* tide chart: tap support */
.chart.is-active .chart__cursor { opacity: 1; }
.chart { touch-action: pan-y; }

/* ---------- Gift cards ---------- */
.gift { position: relative; padding: 6vh 0 16vh; }
.gift__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: clamp(40px, 8vw, 140px); align-items: center; }
.gift__media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; max-width: 440px; order: 2; justify-self: end; width: 100%; } /* copy left, photo right */
.gift__media img { width: 100%; height: 100%; object-fit: cover; }
.gift__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 44px; }

/* ---------- People: therapists + guest words ---------- */
.people { position: relative; padding: 14vh 0 16vh; background: linear-gradient(180deg, var(--bg) 0, var(--bg-2) 30vh, var(--bg-2) calc(100% - 30vh), var(--bg) 100%); }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.team__card { padding: clamp(28px, 3vw, 44px); border: 1px solid var(--line); }
.team__mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--line); margin-bottom: 30px; }
.team__mark svg { width: 46px; fill: var(--accent); opacity: .7; }
.team__card h3 { margin: 0 0 8px; font: 400 clamp(24px, 2.2vw, 30px)/1.15 var(--serif); }
.team__role { margin: 0 0 18px; font: 400 12px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.team__card p:last-child { margin: 0; color: var(--fg-soft); font-size: 15.5px; }
.words { margin-top: clamp(80px, 12vh, 140px); }
.words__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.words__item { margin: 0; padding-top: 28px; border-top: 1px solid var(--gold); }
.words__item blockquote { margin: 0 0 22px; font: italic 300 clamp(21px, 1.8vw, 26px)/1.4 var(--serif); color: var(--fg); }
.words__item figcaption { font: 400 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }

/* ---------- Questions ---------- */
.faq { position: relative; padding: 6vh 0 18vh; }
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.faq__grid .sec-head { margin-bottom: 0; }
.faq__list { border-top: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: grid; grid-template-columns: 1fr 28px; align-items: center; gap: 24px; padding: 28px 0; cursor: pointer; list-style: none;
  font: 400 clamp(21px, 1.9vw, 27px)/1.25 var(--serif); color: var(--fg);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .svc__plus { grid-area: auto; }
.faq__item summary:hover .svc__plus { border-color: var(--fg); }
.faq__item[open] .svc__plus { background: var(--fg); border-color: var(--fg); transform: rotate(180deg); }
.faq__item[open] .svc__plus::before, .faq__item[open] .svc__plus::after { background: var(--bg); }
.faq__item[open] .svc__plus::after { transform: rotate(0); }
.faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .7s var(--ease), content-visibility .7s allow-discrete; }
.faq__item[open]::details-content { block-size: auto; }
.faq__a p { margin: 0 0 30px; max-width: 620px; color: var(--fg-soft); font-size: 16px; }

/* ---------- Footer: full viewport width (the line runs edge to edge) ---------- */
.foot { border-top: 1px solid var(--line-light); }
html[data-theme="dark"] .foot { border-top-color: var(--line); }
.foot .wrap { max-width: none; }
.foot__grid { border-top: 0; }
.foot__base a { text-decoration: underline; text-decoration-color: rgba(238, 231, 221, .25); text-underline-offset: 4px; }

@media (max-width: 1080px) {
  .gift__grid, .faq__grid { grid-template-columns: 1fr; }
  .faq__grid .sec-head { position: static; }
  .team, .words__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__left .theme-toggle:not(.theme-toggle--menu) { display: none; }
  .theme-toggle--menu { display: grid; }
  .tabs { gap: 14px; }
  .tabs button { font-size: 15px; }
  .cc__node span { font-size: 11px; letter-spacing: .12em; }
  .chart__mark { font-size: 10px; letter-spacing: .16em; }
  .gift__media { max-width: none; aspect-ratio: 4 / 3; order: 0; }
  .menu__list a { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .philo__steps { display: none; }
  .faq__item::details-content { transition: none; }
}

/* content hidden until the spa confirms it (see the HIDDEN comments in index.html) */
[hidden] { display: none !important; }
