/*
  Eldvik Bad: thermal baths website (Screenery template)
  The page is the steamed-up window of a fjord bathhouse. A drawn dusk scene sits fixed behind the glass;
  frosted panes on the glass carry the UI; the first pane is fogged and can be wiped; the footer is the cedar wall inside.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. The world: scene, veil, nightfall on scroll
   4. Glass panes and components: buttons, fields, chips, stepper, checks, alert, toast
   5. Header
   6. Hero: the window, the fog, the card
   7. Pools and saunas
   8. Ritual timer
   9. How busy
  10. Booking and receipt
  11. Water facts, getting here, questions
  12. Footer: the cedar wall
  13. Motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette: fjord night, steam, cedar and lamp light */
  --night: #0a1f22;
  --fjord: #12343a;
  --fjord-2: #1d4a50;
  --fjord-3: #5f8580;
  --steam: #eef3f1;
  --steam-2: #c9d8d5;        /* secondary text on dark glass (>= 7:1 on --glass-ink) */
  --steam-3: #a9bfbb;        /* tertiary, small print on glass (>= 4.5:1) */
  --amber: #f0a654;          /* lamp light */
  --amber-2: #f6c98b;
  --ember: #d9773a;
  --cedar: #7a4527;
  --cedar-2: #5c331d;
  --cedar-3: #9a5a33;
  --ice: #9fd0d6;            /* cold phase */
  --ink: #1a0f06;            /* text on amber */
  --danger: #ffb4a0;         /* error text on dark glass */
  --danger-bg: rgba(140, 40, 20, 0.36);

  /* Glass */
  --glass-ink: rgba(7, 25, 28, 0.66);          /* the tint inside a pane */
  --glass-ink-strong: rgba(6, 21, 24, 0.8);
  --glass-edge: rgba(238, 243, 241, 0.18);
  --glass-hi: rgba(255, 255, 255, 0.3);        /* top edge highlight */
  --glass-blur: blur(18px) saturate(1.35);
  --fog-tint: rgba(208, 223, 220, 0.36);

  /* Type */
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-h2: clamp(2.3rem, 1.4rem + 2.8vw, 3.9rem);
  --fs-h1: clamp(2.75rem, 1.2rem + 4.6vw, 5.4rem);

  /* Space and shape */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --frame: 14px;             /* cedar window frame */

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--night);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--fjord-3) var(--night);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  /* no background here: the root carries it, so the fixed scene (negative z-index) is not painted over */
  color: var(--steam);
  font: 400 var(--fs-md)/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--ink); }
input, button, textarea { font: inherit; color: inherit; caret-color: var(--amber); }
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: 3px;
  border-radius: 6px;
}
a { color: var(--amber-2); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:not(.btn):hover { color: var(--steam); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font: 600 var(--fs-h2)/1.02 var(--serif); letter-spacing: -0.01em; }
h3 { font: 600 var(--fs-lg)/1.25 var(--sans); }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; }
::-webkit-scrollbar { width: 12px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--fjord-2); border-radius: 10px; border: 3px solid var(--night); }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 26px; height: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 50;
  background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600;
}
.skip:focus { top: 12px; }
.num, [data-temp], [data-guests], [data-r-total] { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- 3. The world ---------- */
.scene {
  position: fixed; inset: 0; z-index: -3;
  background: var(--night);
}
.scene__svg { width: 100%; height: 100%; }
/* Night falls as you move down the page, so text on the glass keeps its contrast over the lamp-lit deck */
.scene::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(5, 17, 19, 0.5), rgba(5, 17, 19, 0.62));
  opacity: var(--nightfall, 1);
}
/* Condensation gathering around the edges of the whole window */
.veil {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(200, 218, 215, 0.16) 100%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  -webkit-mask-image: radial-gradient(120% 95% at 50% 45%, transparent 58%, #000 100%);
  mask-image: radial-gradient(120% 95% at 50% 45%, transparent 58%, #000 100%);
}
@supports (animation-timeline: scroll()) {
  .scene::after {
    animation: nightfall linear both;
    animation-timeline: scroll(root);
    animation-range: 0 90vh;
  }
  @keyframes nightfall { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- 4. Glass panes and components ---------- */
.pane {
  position: relative;
  border-radius: var(--r-lg);
  background:
    linear-gradient(155deg, rgba(238, 243, 241, 0.12), rgba(238, 243, 241, 0.03) 38%, transparent 60%),
    radial-gradient(120% 70% at 85% 110%, rgba(240, 166, 84, 0.16), transparent 60%),
    var(--glass-ink);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),                 /* top edge catching the lamp */
    inset 1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(240, 166, 84, 0.22),       /* warm light at the bottom edge */
    inset 0 0 40px rgba(159, 208, 214, 0.05),      /* inner light */
    0 30px 60px -28px rgba(0, 0, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.25);
}
/* A brighter rim on the upper left, like light bending at the edge of thick glass */
.pane::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.04) 30%, transparent 55%, rgba(246, 201, 139, 0.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pane { background-color: var(--glass-ink-strong); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 600 var(--fs-sm)/1 var(--sans); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--amber {
  background: var(--amber); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.6), 0 10px 24px -12px rgba(240, 166, 84, 0.8);
}
.btn--amber:hover { background: var(--amber-2); color: var(--ink); }
.btn--glass {
  background: rgba(238, 243, 241, 0.08); color: var(--steam);
  border-color: rgba(238, 243, 241, 0.32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--glass:hover { background: rgba(238, 243, 241, 0.16); color: var(--steam); border-color: rgba(238, 243, 241, 0.5); }
.btn--small { min-height: 44px; padding: 0 16px; font-size: var(--fs-xs); white-space: nowrap; }
.btn--icon { width: 48px; padding: 0; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: 0.85; }

.field { border: 0; padding: 0; margin: 0 0 var(--s-6); min-width: 0; }
.field legend, .field__label {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); width: 100%;
  padding: 0; margin-bottom: var(--s-3);
  font: 600 var(--fs-sm)/1.3 var(--sans); color: var(--steam);
}
.field__aside { font-weight: 400; color: var(--steam-2); }
.field__hint { font-size: var(--fs-xs); color: var(--steam-3); margin-top: -6px; }
.field__error { min-height: 0; color: var(--danger); font-size: var(--fs-sm); margin-top: var(--s-2); }
.field__error:empty { display: none; }
.field--row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.field--row .field__error { flex-basis: 100%; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-5); }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: var(--r-sm); border: 1px solid rgba(238, 243, 241, 0.28);
  background: rgba(3, 14, 16, 0.5); color: var(--steam);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.input::placeholder { color: var(--steam-3); opacity: 1; }
.input:hover { border-color: rgba(238, 243, 241, 0.45); }
.input:focus { border-color: var(--amber-2); background: rgba(3, 14, 16, 0.65); }
.input:focus-visible { outline-offset: 1px; border-radius: var(--r-sm); }
[aria-invalid="true"].input { border-color: var(--danger); }

.choice {
  position: relative; display: grid; align-content: center; gap: 2px;
  min-height: 64px; padding: 10px 12px; text-align: center;
  border-radius: var(--r-sm); border: 1px solid rgba(238, 243, 241, 0.22);
  background: rgba(238, 243, 241, 0.05);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.choice:hover { background: rgba(238, 243, 241, 0.12); border-color: rgba(238, 243, 241, 0.4); }
.choice[aria-checked="true"] {
  background: var(--amber); border-color: var(--amber); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.6);
}
.choice[aria-checked="true"] small { color: rgba(26, 15, 6, 0.82); }
.choice[aria-disabled="true"] { cursor: not-allowed; background: transparent; border-style: dashed; color: var(--steam-3); }
.choice[aria-disabled="true"] b { text-decoration: line-through; text-decoration-thickness: 1px; }
.choice b { font: 600 var(--fs-sm)/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.choice small { font-size: var(--fs-xs); color: var(--steam-2); line-height: 1.3; }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill); border: 1px solid rgba(238, 243, 241, 0.28); background: rgba(3, 14, 16, 0.45); }
.stepper__btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: rgba(238, 243, 241, 0.1); cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.stepper__btn:hover { background: rgba(238, 243, 241, 0.22); }
.stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__val { min-width: 2.5ch; text-align: center; font: 600 var(--fs-xl)/1 var(--serif); }

.addons { display: grid; gap: var(--s-2); }
.check {
  display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: 8px 14px;
  border-radius: var(--r-sm); border: 1px solid rgba(238, 243, 241, 0.18); background: rgba(238, 243, 241, 0.04);
  cursor: pointer; transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.check:hover { background: rgba(238, 243, 241, 0.1); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border-radius: 7px; border: 1.5px solid var(--steam-2); color: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.check__box .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.check__text { display: flex; justify-content: space-between; gap: var(--s-3); flex: 1; font-weight: 500; }
.check__text small { color: var(--steam-2); font-size: var(--fs-sm); font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; }
.check input:checked ~ .check__box { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.check:has(input:checked) { border-color: rgba(240, 166, 84, 0.6); background: rgba(240, 166, 84, 0.1); }
.check input:focus-visible ~ .check__box { outline: 2px solid var(--amber-2); outline-offset: 3px; }
.check:has(input:disabled) { opacity: 0.6; cursor: not-allowed; }

.alert {
  margin-bottom: var(--s-4); padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--danger-bg); border: 1px solid rgba(255, 180, 160, 0.5);
  color: var(--steam); font-size: var(--fs-sm);
}
.alert b { color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--glass-ink-strong); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 16px 40px -16px rgba(0, 0, 0, 0.8);
  font-size: var(--fs-sm);
}


/* ---------- 5. Header ---------- */
.top {
  position: fixed; top: 10px; left: var(--gutter); right: var(--gutter); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  height: var(--header-h); padding: 0 10px 0 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(238, 243, 241, 0.1), transparent), rgba(7, 25, 28, 0.62);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--steam); text-decoration: none; min-height: 44px; }
.brand__mark { width: 30px; height: 30px; fill: none; stroke: var(--steam); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand__line { stroke: var(--amber); }
.brand__name { font: 700 1.6rem/1 var(--serif); letter-spacing: 0.01em; }
.top__nav { display: flex; align-items: center; gap: 2px; }
.top__nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill);
  color: var(--steam); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  transition: background-color 0.25s var(--ease);
}
.top__nav a:not(.btn):hover { background: rgba(238, 243, 241, 0.1); }
.top__book { margin-left: 8px; min-height: 44px; }
.top__menu {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid rgba(238, 243, 241, 0.3); background: rgba(238, 243, 241, 0.08);
  font-weight: 600; font-size: var(--fs-sm); cursor: pointer;
}

/* ---------- 6. Hero: the window ---------- */
.hero { padding: calc(var(--header-h) + 22px) var(--gutter) 0; }
.window {
  position: relative;
  height: max(600px, calc(100svh - var(--header-h) - 34px));
  border-radius: 14px;
  isolation: auto;
}
/* The cedar frame: a wood ring drawn with a content-box mask so the glass inside stays see-through */
.window::before, .window__mullion {
  background:
    repeating-linear-gradient(7deg, rgba(60, 25, 8, 0.16) 0 1px, transparent 1px 5px, rgba(255, 220, 180, 0.06) 5px 6px, transparent 6px 13px, rgba(60, 25, 8, 0.1) 13px 15px, transparent 15px 31px),
    linear-gradient(135deg, #a8693d, var(--cedar) 40%, #8a4f2c 70%, var(--cedar-2));
}
.window::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  padding: var(--frame); border-radius: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.35);
}
/* Shadow the frame throws onto the glass, and lamp light on the inner edge */
.window::after {
  content: ""; position: absolute; inset: var(--frame); z-index: 2; pointer-events: none; border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 10px 18px -10px rgba(0, 0, 0, 0.7), inset 0 -2px 0 rgba(246, 201, 139, 0.25);
}
.window__mullion {
  position: absolute; z-index: 2; top: var(--frame); bottom: var(--frame); left: 63%; width: 12px;
  box-shadow: 4px 0 10px -2px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 220, 180, 0.3);
  pointer-events: none;
}
.window__glass {
  position: absolute; inset: var(--frame); overflow: hidden; border-radius: 4px;
  cursor: crosshair;
  touch-action: pan-y;   /* vertical drags still scroll the page on touch; sideways strokes wipe */
}
/* The fog without script, and with motion reduced: real backdrop blur, masked by a hand-wiped patch */
.fog {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 30% 105%, rgba(240, 166, 84, 0.26), transparent 70%),
    url("assets/beads.svg") 0 0 / 140px 140px,
    linear-gradient(rgba(214, 228, 225, 0.3), rgba(200, 216, 213, 0.42));
  -webkit-backdrop-filter: blur(16px) saturate(1.1) brightness(1.12);
  backdrop-filter: blur(16px) saturate(1.1) brightness(1.12);
  -webkit-mask: url("assets/wipe.svg") 0 0 / 100% 100% no-repeat;
  mask: url("assets/wipe.svg") 0 0 / 100% 100% no-repeat;
  transition: opacity 0.6s var(--ease);
}
.fog.is-wide { -webkit-mask-image: url("assets/wipe-wide.svg"); mask-image: url("assets/wipe-wide.svg"); }
.fog__canvas, .fog__drops { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; }
.is-live .fog { opacity: 0; }
.is-live .fog__canvas, .is-live .fog__drops { display: block; }

.hero__card {
  position: absolute; z-index: 3;
  left: calc(var(--frame) + clamp(20px, 3vw, 44px));
  bottom: calc(var(--frame) + clamp(20px, 3vw, 44px));
  width: min(600px, 54%);
  padding: clamp(24px, 3vw, 40px);
}
.hero__title { font: 600 var(--fs-h1)/0.98 var(--serif); letter-spacing: -0.015em; }
.hero__lede { margin-top: var(--s-4); color: var(--steam-2); max-width: 52ch; }
.hero__now {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s-2) var(--s-6);
  margin: var(--s-5) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid rgba(238, 243, 241, 0.16);
}
.hero__now dt { font-size: var(--fs-xs); color: var(--steam-3); }
.hero__now dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero__wipe {
  position: absolute; z-index: 3; top: calc(var(--frame) + 24px); right: calc(var(--frame) + 24px);
  display: flex; align-items: center; gap: var(--s-3);
}
.hero__hint {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 500;
  background: rgba(7, 25, 28, 0.7); color: var(--steam);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-edge);
  transition: opacity 0.8s var(--ease);
}
.hero__hint.is-done { opacity: 0; }
.no-js .hero__wipe { display: none; }   /* without script the glass cannot be wiped, so do not offer it */

/* ---------- 7. Pools and saunas ---------- */
.section { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; padding-top: clamp(80px, 11vw, 150px); }
.section__head { max-width: 62ch; margin-bottom: var(--s-6); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.section__head p { margin-top: var(--s-4); color: var(--steam-2); font-size: var(--fs-md); }

.waters { padding: clamp(20px, 3vw, 40px); --cols: minmax(0, 1.25fr) 8.5rem minmax(0, 1.15fr); }
.waters__scale { display: grid; grid-template-columns: var(--cols); gap: 0 var(--s-6); padding-bottom: var(--s-2); }
.waters__ticks { grid-column: 3; position: relative; height: 20px; font-size: var(--fs-xs); color: var(--steam-3); font-variant-numeric: tabular-nums; }
.waters__ticks span { position: absolute; left: calc(var(--t) / 90 * 100%); transform: translateX(-50%); white-space: nowrap; }
.waters__ticks span:first-child { transform: none; }
.waters__ticks span:last-child { transform: translateX(-60%); }
.waters__list { list-style: none; margin: 0; padding: 0; }
.water {
  display: grid; grid-template-columns: var(--cols); gap: 6px var(--s-6);
  grid-template-areas: "name read bar" "name read note";
  align-items: center;
  padding: var(--s-5) 0; border-top: 1px solid rgba(238, 243, 241, 0.13);
}
.water__name { grid-area: name; }
.water__name h3 { font: 600 1.7rem/1.1 var(--serif); }
.water__name p { margin-top: 6px; color: var(--steam-2); font-size: var(--fs-sm); max-width: 56ch; }
.water__read { grid-area: read; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.water__read b { font: 600 2.6rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.water__read span { font-size: var(--fs-xs); color: var(--steam-2); }
.water__bar {
  grid-area: bar; align-self: end; position: relative; height: 10px; border-radius: 6px;
  background: rgba(238, 243, 241, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  background-image: repeating-linear-gradient(90deg, rgba(238, 243, 241, 0.16) 0 1px, transparent 1px calc(100% / 9));
}
.water__bar i {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; width: 50%;
  background: linear-gradient(90deg, var(--ice), #6fb3a8 22%, #e7b66f 45%, var(--amber) 70%, var(--ember));
  background-size: 200% 100%;
  transition: width 1.2s var(--ease);
}
.water__bar i::after { content: ""; position: absolute; right: -3px; top: -4px; width: 6px; height: 18px; border-radius: 3px; background: var(--steam); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.water__note { grid-area: note; align-self: start; font-size: var(--fs-xs); color: var(--steam-3); }
.waters__stamp { display: flex; align-items: center; gap: 10px; padding-top: var(--s-4); border-top: 1px solid rgba(238, 243, 241, 0.13); font-size: var(--fs-xs); color: var(--steam-2); font-variant-numeric: tabular-nums; }

/* ---------- 8. Ritual timer ---------- */
.ritual {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-6) clamp(24px, 5vw, 72px);
  padding: clamp(22px, 3.5vw, 48px);
}
.seg { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.seg legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s-3); padding: 0; }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3);
  min-height: 56px; padding: 14px 18px; border-radius: var(--r-md);
  border: 1px solid rgba(238, 243, 241, 0.2); background: rgba(238, 243, 241, 0.04);
  font: 600 1.45rem/1.1 var(--serif);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.seg small { font: 400 var(--fs-xs)/1.3 var(--sans); color: var(--steam-2); font-variant-numeric: tabular-nums; text-align: right; }
.seg label:hover span { background: rgba(238, 243, 241, 0.1); }
.seg input:checked + span { border-color: var(--amber); background: rgba(240, 166, 84, 0.14); outline: 1px solid var(--amber); outline-offset: -2px; }
.seg input:focus-visible + span { outline: 2px solid var(--amber-2); outline-offset: 3px; }
.ritual__total { margin-top: var(--s-4); color: var(--steam-2); font-size: var(--fs-sm); }
.ritual__total b { color: var(--steam); font-variant-numeric: tabular-nums; }
.ritual__now { display: grid; align-content: start; }
.ritual__phase { display: flex; align-items: center; gap: var(--s-3); font: 600 var(--fs-xl)/1 var(--serif); color: var(--phase, var(--amber)); }
.ritual__round { margin-left: auto; font: 500 var(--fs-sm)/1 var(--sans); color: var(--steam-2); font-variant-numeric: tabular-nums; }
.ritual__clock {
  margin: var(--s-3) 0 var(--s-2);
  font: 500 clamp(5rem, 3rem + 7vw, 8.5rem)/0.9 var(--serif);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em;
}
.ritual__do { color: var(--steam-2); min-height: 3.2em; max-width: 46ch; }
.ritual__controls { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.ritual[data-phase="cold"] { --phase: var(--ice); }
.ritual[data-phase="rest"] { --phase: var(--steam-2); }
.ritual[data-phase="done"] { --phase: var(--amber-2); }
.ritual__track { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.round { flex: var(--len) 1 0; min-width: 0; }
.round__label { display: block; font-size: var(--fs-xs); color: var(--steam-3); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.round__steps { display: flex; gap: 3px; height: 34px; list-style: none; margin: 0; padding: 0; }
.step {
  position: relative; flex: var(--len) 1 0; min-width: 12px; overflow: hidden; border-radius: 6px;
  background: rgba(238, 243, 241, 0.08); border: 1px solid rgba(238, 243, 241, 0.12);
}
.step::before { content: ""; position: absolute; inset: 0; width: var(--fill, 0%); background: var(--c); opacity: 0.9; }
.step[data-kind="hot"] { --c: linear-gradient(90deg, var(--ember), var(--amber)); }
.step[data-kind="cold"] { --c: var(--ice); }
.step[data-kind="rest"] { --c: linear-gradient(90deg, var(--fjord-3), var(--steam-2)); }
.step.is-done { --fill: 100%; }
.step.is-done::before { opacity: 0.45; }
.step.is-now { border-color: var(--steam); outline: 1px solid var(--steam); }
.step span { position: relative; display: block; padding: 0 8px; font-size: var(--fs-xs); line-height: 32px; white-space: nowrap; color: var(--steam); font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.step[data-kind="cold"] span { padding: 0; text-indent: -999px; }

/* ---------- 9. How busy ---------- */
.busy { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-6) clamp(24px, 5vw, 64px); padding: clamp(22px, 3.5vw, 48px); align-items: end; }
.busy__now { margin-top: var(--s-4); font: 500 1.6rem/1.25 var(--serif); }
.busy__now b { color: var(--amber-2); font-weight: 700; }
.busy__tip { margin-top: var(--s-3); color: var(--steam-2); font-size: var(--fs-sm); }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-5); }
.days button {
  min-width: 52px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(238, 243, 241, 0.24); background: rgba(238, 243, 241, 0.05); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 500;
}
.days button:hover { background: rgba(238, 243, 241, 0.12); }
.days button[aria-checked="true"] { background: var(--steam); color: var(--night); border-color: var(--steam); }
.days button.is-today::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); margin-left: 6px; vertical-align: middle; }
.busy__chart { margin: 0; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 220px; padding-bottom: 26px; border-bottom: 1px solid rgba(238, 243, 241, 0.2); }
.bars::before { content: "Full"; position: absolute; left: 0; right: 0; top: 0; border-top: 1px dashed rgba(238, 243, 241, 0.28); font-size: 11px; color: var(--steam-3); padding-top: 2px; text-align: right; }
.bar { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.bar i { display: block; width: 100%; height: var(--h); min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(rgba(201, 216, 213, 0.7), rgba(201, 216, 213, 0.28)); transition: height 0.6s var(--ease); }
.bar.is-now i { background: linear-gradient(var(--amber-2), var(--amber)); }
.bar.is-closed i { background: none; border: 1px dashed rgba(238, 243, 241, 0.2); height: 3px; }
.bar span { position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); font-size: 11px; color: var(--steam-3); font-variant-numeric: tabular-nums; }
.bar.is-now span { color: var(--amber-2); font-weight: 700; }
.busy__chart figcaption { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--steam-3); }

/* ---------- 10. Booking and receipt ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.book__form { padding: clamp(22px, 3.5vw, 44px); }
.dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dates .choice { min-height: 70px; padding: 8px 4px; }
.dates .choice b { font: 600 1.5rem/1 var(--serif); font-variant-numeric: lining-nums; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.receipt { position: sticky; top: calc(var(--header-h) + 26px); padding: clamp(22px, 3vw, 36px); }
.receipt h3 { font: 600 2rem/1.1 var(--serif); }
.receipt__when { margin-top: var(--s-2); color: var(--steam-2); font-size: var(--fs-sm); }
.receipt__lines { list-style: none; margin: var(--s-5) 0 0; padding: 0; font-size: var(--fs-sm); }
.receipt__lines li { display: flex; justify-content: space-between; gap: var(--s-4); padding: 10px 0; border-top: 1px solid rgba(238, 243, 241, 0.12); }
.receipt__lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt__lines small { display: block; color: var(--steam-3); font-size: var(--fs-xs); }
.receipt__total { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s-4) 0; border-top: 1px solid rgba(238, 243, 241, 0.4); }
.receipt__total span { font-weight: 600; }
.receipt__total b { font: 700 2.4rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.receipt__note { font-size: var(--fs-xs); color: var(--steam-3); margin-bottom: var(--s-5); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(26, 15, 6, 0.3); border-top-color: var(--ink); }
.is-loading .spinner { display: block; }
.done { display: grid; gap: var(--s-3); }
.book__form.is-sent { opacity: 0.55; transition: opacity 0.6s var(--ease); }
.done:focus { outline: none; }
.done__mark { width: 64px; height: 64px; fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.done h3 { font: 600 2.2rem/1.05 var(--serif); }
.done p { color: var(--steam-2); }
.done p b { color: var(--steam); }
.done__ref b { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; color: var(--amber-2) !important; }
.done .btn { justify-self: start; margin-top: var(--s-2); }

/* ---------- 11. Water facts, getting here, questions ---------- */
.water-facts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--s-6) clamp(24px, 5vw, 64px); padding: clamp(22px, 3.5vw, 48px); align-items: center; }
.water-facts__text > p { margin-top: var(--s-4); color: var(--steam-2); max-width: 64ch; }
.water-facts__text h2 { margin-bottom: var(--s-2); }
.facts { margin: var(--s-5) 0 0; }
.facts div { display: flex; align-items: baseline; gap: var(--s-3); padding: 10px 0; border-top: 1px solid rgba(238, 243, 241, 0.12); }
.facts dt { color: var(--steam-2); font-size: var(--fs-sm); }
.facts div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted rgba(238, 243, 241, 0.25); transform: translateY(-4px); }
.facts dd { order: 2; margin: 0; font: 600 1.45rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.depth { margin: 0; }
.depth svg { width: 100%; height: auto; max-width: 420px; margin-inline: auto; }
.depth figcaption { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--steam-3); text-align: center; }

.getting { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-5); }
.map { margin: 0; padding: clamp(12px, 2vw, 24px); overflow: hidden; }
.map svg { width: 100%; height: auto; border-radius: var(--r-md); }
.routes { padding: clamp(22px, 3vw, 36px); display: grid; align-content: space-between; gap: var(--s-5); }
.routes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.routes__list li { display: grid; grid-template-columns: 26px 1fr; gap: var(--s-4); }
.routes__list .icon { color: var(--amber-2); margin-top: 2px; }
.routes__list p { margin-top: 4px; color: var(--steam-2); font-size: var(--fs-sm); }
.address { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid rgba(238, 243, 241, 0.14); }
.address .icon { color: var(--amber-2); }
.address p { flex: 1; min-width: 12ch; font-weight: 600; }

.faq { padding: clamp(8px, 2vw, 20px) clamp(20px, 3.5vw, 44px); }
.faq details { border-top: 1px solid rgba(238, 243, 241, 0.14); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 64px; padding: var(--s-3) 0; cursor: pointer; list-style: none;
  font: 600 1.55rem/1.2 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.4s var(--ease); color: var(--amber-2); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 var(--s-5); color: var(--steam-2); max-width: 68ch; }
.faq summary:hover { color: var(--amber-2); }

/* ---------- 12. Footer: the cedar wall of the changing room ---------- */
.foot {
  margin-top: clamp(96px, 12vw, 160px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 30px),
    repeating-linear-gradient(90deg, transparent 0 158px, rgba(30, 12, 4, 0.55) 158px 160px, rgba(255, 220, 180, 0.05) 160px 162px, transparent 162px 318px, rgba(30, 12, 4, 0.55) 318px 320px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 160px, transparent 160px 320px, rgba(255, 200, 150, 0.04) 320px 480px),
    repeating-linear-gradient(90deg, rgba(255, 220, 180, 0.04) 0 3px, transparent 3px 11px, rgba(0, 0, 0, 0.08) 11px 12px, transparent 12px 23px),
    linear-gradient(180deg, #6a3a1f, #50291a);
  color: var(--steam);
  border-top: 3px solid #2a170c;
  box-shadow: inset 0 18px 30px -18px rgba(246, 201, 139, 0.25);
}
.foot__inner {
  width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; padding: var(--s-8) 0 var(--s-7);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: var(--s-6);
}
.foot .foot__name { font: 700 2.4rem/1 var(--serif); margin-bottom: var(--s-3); }
.foot p { color: #f3e6da; font-size: var(--fs-sm); }
.foot p + p { margin-top: var(--s-3); }
.foot__title { font: 600 var(--fs-sm)/1.3 var(--sans); margin-bottom: var(--s-3); color: var(--amber-2); }
.foot a { color: var(--steam); }
.foot a:hover { color: var(--amber-2); }
.hours { border-collapse: collapse; font-size: var(--fs-sm); }
.hours th { text-align: left; font-weight: 400; padding: 4px 16px 4px 0; color: #f3e6da; }
.hours td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--steam); font-weight: 700; }
.foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--fs-sm); }
.foot__links a { display: inline-flex; min-height: 32px; align-items: center; }
.foot__legal { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; padding: var(--s-4) 0 var(--s-6); border-top: 1px solid rgba(0, 0, 0, 0.35); font-size: var(--fs-xs) !important; }

/* ---------- 13. Motion (quiet, behind the glass) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .steam ellipse { animation: rise 9s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
  .steam__b { animation-delay: -2.2s !important; }
  .steam__c { animation-delay: -4.5s !important; }
  .steam__d { animation-delay: -6.8s !important; }
  @keyframes rise {
    0% { transform: translate(0, 40px) scale(0.7); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translate(30px, -120px) scale(1.5); opacity: 0; }
  }
  .plume { animation: plume 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
  @keyframes plume { to { transform: translate(8px, -14px) scale(1.15); opacity: 0.6; } }
  .lights rect:nth-child(3n) { animation: flicker 5s steps(1) infinite; }
  .lights rect:nth-child(4n+1) { animation: flicker 8s steps(1) infinite -3s; }
  @keyframes flicker { 0%, 92% { opacity: 1; } 93% { opacity: 0.55; } 96% { opacity: 0.9; } }
  .shimmer { animation: shimmer 6s ease-in-out infinite alternate; }
  @keyframes shimmer { to { transform: translateX(-18px); opacity: 0.6; } }
  .twinkle { animation: twinkle 4s ease-in-out infinite alternate; }
  @keyframes twinkle { to { opacity: 0.6; } }
  .is-loading .spinner { animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .done:not([hidden]) .done__mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.9s 0.2s var(--ease) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- 14. Narrow screens ---------- */
@media (max-width: 1080px) {
  .top__nav a:not(.btn) { padding: 0 9px; font-size: var(--fs-xs); }
}
@media (max-width: 960px) {
  :root { --header-h: 58px; }
  .top { padding: 0 8px 0 14px; }
  .top__menu { display: inline-flex; }
  .top__nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    border-radius: var(--r-lg);
    background: rgba(7, 25, 28, 0.97);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-edge);
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }
  .top__nav.is-open { display: flex; }
  .top__nav a:not(.btn) { min-height: 48px; padding: 0 14px; font-size: var(--fs-md); border-radius: var(--r-sm); }
  .top__book { margin: 6px 0 0; }

  .hero__card { width: auto; right: calc(var(--frame) + 20px); }
  .ritual, .busy, .water-facts, .getting, .book { grid-template-columns: minmax(0, 1fr); }
  .receipt { position: relative; top: 0; }
  .foot__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  :root { --frame: 10px; }
  .hero { padding-top: calc(var(--header-h) + 18px); }
  .window { height: auto; min-height: calc(100svh - var(--header-h) - 28px); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--frame); }
  .window__mullion { left: var(--frame); right: var(--frame); top: 34%; bottom: auto; width: auto; height: 10px; box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 220, 180, 0.3); }
  .fog { -webkit-mask-image: url("assets/wipe-tall.svg"); mask-image: url("assets/wipe-tall.svg"); }
  .hero__card { position: relative; left: auto; right: auto; bottom: auto; margin: 46vh 10px 10px; padding: 22px 20px 20px; }
  .hero__now { grid-template-columns: repeat(3, auto); gap: var(--s-2) var(--s-4); }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__wipe { top: calc(var(--frame) + 14px); left: calc(var(--frame) + 14px); right: calc(var(--frame) + 14px); justify-content: space-between; }
  .hero__hint { padding: 0 12px; white-space: nowrap; }

  .water { grid-template-columns: 7.25rem minmax(0, 1fr); grid-template-areas: "name name" "read bar" "read note"; gap: 8px var(--s-3); }
  .waters { --cols: 7.25rem minmax(0, 1fr); }
  .waters__scale { grid-template-columns: 7.25rem minmax(0, 1fr); gap: 0 var(--s-3); }
  .waters__ticks { grid-column: 2; }
  .water__read b { font-size: 2rem; }

  .ritual__track { flex-direction: column; gap: var(--s-3); }
  .round { flex: none; }
  .ritual__clock { font-size: clamp(4.5rem, 24vw, 6rem); }

  .bars { height: 180px; gap: 2px; }
  .bar span { font-size: 10px; }
  .bar:nth-child(even) span { display: none; }

  .dates { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-inline: -4px; padding-inline: 4px; scrollbar-width: thin; }
  .dates .choice { flex: 0 0 64px; scroll-snap-align: start; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .check__text { flex-direction: column; gap: 0; }
  .check__text small { text-align: left; font-size: var(--fs-xs); }

  .faq summary { font-size: 1.35rem; }
  .foot__inner { grid-template-columns: 1fr; gap: var(--s-5); padding-top: var(--s-7); }
}
@media (max-width: 380px) {
  .hero__now { grid-template-columns: repeat(2, auto); }
  .brand__name { font-size: 1.4rem; }
}
