/* Sujuu: "Päivä" prototype. Light, warm, one working day.
   Layout: a threshold (the Beacon opening onto the lake) leads into the day. On wide screens the
   day is a long plaster room you move through sideways, one arched opening per moment, laid out
   on 1 : 1.618; on phones and with reduced motion it stacks. Then evening, pricing, questions. */

@font-face {
  font-family: "Sujuu Sans";
  src: url("../fonts/SujuuSans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  /* brand palette (handoff §05) */
  --plum: #302B3B;
  --aubergine: #574568;
  --citron: #C7D36A;
  --lilac: #B9B0C9;
  --cream: #F5F0E8;

  --bg: var(--cream);
  --plaster: #F1E9DE;      /* the room's walls, a shade warmer than the page */
  --stone: #E4D8C8;        /* the ledge the room stands on */
  --fg: var(--plum);
  --fg-2: #5D5469;
  --line: rgba(48, 43, 59, .14);
  --surface: #FBF8F3;
  --surface-2: #EEE8DE;
  --ghost: rgba(87, 69, 104, .07);
  --fi: rgba(87, 69, 104, .2);
  --focus: var(--aubergine);
  --tint: transparent;
  --on-dark: var(--cream);
  --on-dark-2: rgba(245, 240, 232, .74);
  --noise: rgba(185, 176, 201, .32);

  --display: "Sujuu Sans", "Nunito", "Varela Round", ui-rounded, system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale ~1.618 */
  --t-xs: .8125rem;
  --t-s: .9375rem;
  --t-m: 1.1875rem;
  --t-l: 1.5rem;
  --t-xl: clamp(1.75rem, 2.6vw, 2.25rem);
  --t-2xl: clamp(2.4rem, 5vw, 4.5rem);
  --t-hero: clamp(2.6rem, 6.4vw, 6.2rem);

  --ease: cubic-bezier(.25, .8, .25, 1);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
#buy, #faq { scroll-margin-top: 96px; } /* land below the top bar */
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--t-m)/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
.defs { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.005em; text-wrap: balance; }
.eyebrow { margin: 0 0 18px; font: 600 var(--t-xs)/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--citron); }
.fi { margin: 0; font: 600 clamp(3.6rem, 9vw, 8.5rem)/.9 var(--display); color: var(--fi); letter-spacing: -.01em; }

/* time-of-day colour wash (set by JS) and paper grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: var(--tint); mix-blend-mode: multiply; transition: background .8s linear;
}
main::before {
  content: ""; position: fixed; inset: 0; z-index: 4; pointer-events: none;
  background-image: var(--grain, none); background-size: 180px; mix-blend-mode: multiply; opacity: .05;
}
/* window light (painted by scenery.js), multiplied: shade in the room, warm where the light falls */
.daylight {
  position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none;
  mix-blend-mode: multiply; opacity: var(--day-light, 0); /* eased in and out by scroll, never switched */
}

/* ------------------------------------------------------------------ top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 12px 28px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter-r) 12px var(--gutter-l);
  color: var(--bar-fg, var(--on-dark));
  transition: color .4s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease);
}
/* frosted glass, used in exactly two places: this bar over the day, and the order card */
.bar.on-day { --bar-fg: var(--fg); }
.bar::before { /* frosted at the top, fading into the room: no hard edge */
  content: ""; position: absolute; inset: 0 0 -28px; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(rgba(241, 233, 222, .78), rgba(241, 233, 222, 0));
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  -webkit-mask: linear-gradient(#000 45%, transparent); mask: linear-gradient(#000 45%, transparent);
  transition: opacity .4s var(--ease);
}
.bar.on-day::before { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; }
.brand__mark { width: 20px; height: 33px; }
.brand__word { font: 600 1.45rem/1 var(--display); letter-spacing: .01em; }
/* the Beacon's two lower halves: plum and aubergine on light ground, cream and lilac on dark */
.m-a { fill: var(--mark-a, var(--plum)); }
.m-b { fill: var(--mark-b, var(--aubergine)); }
.bar, .evening { --mark-a: var(--lilac); --mark-b: var(--cream); } /* the kit's reverse: lilac left, cream right */
.bar.on-day { --mark-a: var(--plum); --mark-b: var(--aubergine); }
.m-upper { fill: var(--citron); }
.bar__nav { display: flex; gap: 24px; }
.bar__nav a {
  color: inherit; text-decoration: none; font: 500 var(--t-xs)/1 var(--body); letter-spacing: .12em; text-transform: uppercase;
  opacity: .85; padding: 10px 0;
}
.bar__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
  font: 500 var(--t-xs)/1 var(--body); letter-spacing: .02em; cursor: pointer; opacity: .85;
}
.tool:hover { opacity: 1; }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#sound-toggle .wave { opacity: .25; }
#sound-toggle[aria-pressed="true"] .wave { opacity: 1; }
#sound-toggle[aria-pressed="true"] { background: var(--citron); color: var(--plum); border-color: var(--citron); opacity: 1; }

/* ------------------------------------------------------------------ threshold */
.threshold { position: relative; height: 300vh; z-index: 2; }
.threshold__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.threshold__inside {
  position: absolute; inset: 0; background: var(--bg);
  display: grid; place-content: center; text-align: center; gap: 8px;
}
.lake { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* each window shows the slice of the one landscape behind it (painted by scenery.js) */
.arch .view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.threshold__inside .lake { opacity: var(--lake-o, 1); }
.inside__time, .inside__line { position: relative; opacity: var(--inside-text-o, 0); }
.ring {
  position: absolute; left: 50%; top: 50%; width: 1em; height: 1em; margin: -.5em 0 0 -.5em; border-radius: 50%;
  border: 2px solid rgba(199, 211, 106, .9); opacity: 0; transform: scale(.3); pointer-events: none;
}
.inside__time.is-ringing .ring { animation: ring 2.6s var(--ease) forwards; }
@keyframes ring { 15% { opacity: .9; } to { opacity: 0; transform: scale(2.4); } }
.clock__time.is-chiming { animation: chime 2.4s var(--ease); }
@keyframes chime { 20% { text-shadow: 0 0 18px rgba(199, 211, 106, .9); color: var(--aubergine); } }
.inside__time { margin: 0; font: 600 clamp(4rem, 14vw, 12rem)/1 var(--display); color: var(--ghost); letter-spacing: -.02em; }
.inside__line { margin: 0; font: 600 var(--t-xl)/1.2 var(--display); color: var(--fg); }
.threshold__field { position: absolute; inset: 0; width: 100%; height: 100%; }
.threshold__field .field { fill: var(--plum); }
.threshold__field .leaf { fill: url(#beacon-rg-f); } /* the kit's citron gradient: a large brand moment */

.noise {
  position: absolute; inset: 0; pointer-events: none;
  opacity: var(--noise-o, 1); transform: scale(var(--noise-s, 1)); filter: blur(var(--noise-blur, 0px));
}
.noise span {
  position: absolute; left: var(--x); top: var(--y); white-space: nowrap; user-select: none;
  font: 400 .75rem/1 var(--body); color: var(--noise); letter-spacing: .02em; filter: blur(.5px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent);
  mask: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent);
  animation: drift 22s ease-in-out infinite alternate; animation-delay: var(--d);
}
/* where each fragment drifts (wide screens: x, y; phones: nx, ny), kept here so the CSP needs no inline styles */
.noise span:nth-child(1) { --x: 8%; --y: 16%; --nx: 4%; --ny: 70%; --d: 0s; }
.noise span:nth-child(2) { --x: 24%; --y: 90%; --nx: 50%; --ny: 92%; --d: -4s; }
.noise span:nth-child(3) { --x: 56%; --y: 15%; --nx: 8%; --ny: 96%; --d: -9s; }
.noise span:nth-child(4) { --x: 72%; --y: 90%; --nx: 52%; --ny: 70%; --d: -2s; }
.noise span:nth-child(5) { --x: 76%; --y: 26%; --nx: 6%; --ny: 72%; --d: -7s; }
.noise span:nth-child(6) { --x: 78%; --y: 50%; --nx: 64%; --ny: 78%; --d: -12s; }
.noise span:nth-child(7) { --x: 48%; --y: 91%; --nx: 4%; --ny: 86%; --d: -5s; }
.noise span:nth-child(8) { --x: 72%; --y: 76%; --nx: 58%; --ny: 88%; --d: -15s; }
.noise span:nth-child(9) { --x: 32%; --y: 12%; --nx: 6%; --ny: 78%; --d: -11s; }
.noise span:nth-child(10) { --x: 54%; --y: 30%; --nx: 30%; --ny: 80%; --d: -3s; }
@keyframes drift { from { translate: 0 0; } to { translate: 18px -14px; } }

.hero {
  position: absolute; z-index: 3; left: var(--gutter-l); right: var(--gutter-r);
  top: 50%; transform: translateY(calc(-50% + var(--hero-dy, 0px)));
  max-width: min(36rem, 46vw); margin-left: clamp(0px, 6vw, 96px);
  color: var(--on-dark); opacity: var(--hero-o, 1);
}
.hero h1 { margin: 0; font-size: var(--t-hero); line-height: 1.02; }
.hero__sub { margin: 26px 0 0; max-width: 31em; color: var(--on-dark-2); font-size: var(--t-m); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 500 var(--t-s)/1 var(--body); text-decoration: none; transition: transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--cream { background: var(--cream); color: var(--plum); }
.btn--line { border: 1px solid rgba(245, 240, 232, .45); color: var(--on-dark); }

/* ------------------------------------------------------------------ the day: stacked (base) */
.day { position: relative; z-index: 2; background: linear-gradient(var(--plaster), var(--bg)); }
.day__stage { position: relative; padding: 0 var(--gutter-r) 12vh var(--gutter-l); }
.clock {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 14px;
  margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  padding: calc(64px + env(safe-area-inset-top, 0px)) var(--gutter-r) 12px var(--gutter-l);
  background: var(--plaster); border-bottom: 1px solid var(--line);
}
.clock__time { margin: 0; font: 600 1.9rem/1 var(--display); font-variant-numeric: tabular-nums; }
.clock__moment { margin: 0; font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.room { position: relative; display: grid; gap: 14vh; padding-top: 12vh; }
.bay { position: relative; min-width: 0; }
.bay--moment { display: grid; gap: 10px; }
.moment__n { margin: 0; font: 500 var(--t-xs)/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-2); }
.moment__title { margin: 0; font-size: var(--t-2xl); line-height: 1.02; }

.scene { display: grid; gap: 28px; }
.arch {
  position: relative; overflow: hidden; width: min(68%, 15rem); aspect-ratio: 1 / 1.5;
  border-radius: 999px 999px 8px 8px / 46% 46% 8px 8px; background: var(--surface-2);
}
/* each moment has its own opening, like the windows of one building */
.arch::after { /* the reveal of a deep plaster wall */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 14px 28px -10px rgba(70, 46, 30, .28), inset 0 0 0 1px rgba(70, 46, 30, .08);
}
.scene__body { display: grid; gap: 28px; min-width: 0; }
.scene__text { max-width: 30rem; }
.scene__text p:not(.stamp) { margin: 0; color: var(--fg-2); }
.stamp { margin: 0 0 14px; font: 500 var(--t-xs)/1 var(--body); letter-spacing: .16em; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.h3 { margin: 0 0 18px; font-size: var(--t-xl); line-height: 1.12; }

.bay--quiet { display: grid; gap: 28px; }
.quiet { display: grid; gap: 8px; }
.quiet .fi { font-size: clamp(3rem, 6vw, 5.5rem); }
.quiet__line { margin: 6px 0 0; font-size: var(--t-2xl); line-height: 1.05; max-width: 12em; }
.quiet__note { margin: 14px 0 0; color: var(--fg-2); }
.track, .walk { display: none; }

/* ------------------------------------------------------------------ concept UI */
.ui { margin: 0; min-width: 0; max-width: 36rem; container-type: inline-size; }
.win {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(70, 46, 30, .5);
  font: 400 var(--t-xs)/1.4 var(--body); color: var(--fg);
}
.win__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.win__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.win__bar b { margin-left: 10px; font-weight: 600; }
.win__body { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); }
.win__nav { display: grid; align-content: start; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line); }
.win__nav i { font-style: normal; padding: 6px 10px; border-radius: 6px; color: var(--fg-2); display: flex; justify-content: space-between; }
.win__nav i.on { background: var(--surface-2); color: var(--fg); font-weight: 600; }
@container (max-width: 32rem) { /* a narrow window drops its sidebar rather than squeezing the list */
  .win__body { grid-template-columns: minmax(0, 1fr); }
  .win__nav { display: none; }
}
.agenda { list-style: none; margin: 0; padding: 6px 0; }
.agenda li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.agenda li:last-child { border-bottom: 0; }
.agenda time { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.agenda b { display: block; font-weight: 500; }
.agenda small { color: var(--fg-2); font-size: .75rem; }
.agenda .is-now { position: relative; }
.h12 .agenda li { grid-template-columns: 4.6rem 1fr; } /* room for "10:30 AM" */
.agenda .is-now::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--citron); }

.hub { padding: 16px 18px 18px; }
.hub__now { margin: 0 0 14px; font-weight: 600; }
.hub__now time { color: var(--fg-2); font-weight: 500; margin-right: 8px; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { min-height: 44px; border-radius: 8px; background: var(--surface-2); }
.piece {
  display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  transform: translate(var(--px, 0px), var(--py, 0px)); opacity: var(--po, 1); will-change: transform;
}
.piece em { font-style: normal; font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); min-width: 2.6rem; }
.piece.is-set { border-color: transparent; transition: border-color .4s var(--ease); }

.search { padding: 14px 18px 18px; display: grid; gap: 4px; }
.search__q {
  display: flex; align-items: center; gap: 2px; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); font-weight: 500;
}
.search__caret { width: 1.5px; height: 1.1em; background: var(--fg); margin-left: 1px; }
.search__q kbd { margin-left: auto; font: 500 .6875rem/1 var(--body); color: var(--fg-2); padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; }
.search__kind { margin: 8px 0 2px; font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.search__hit { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 8px; border-radius: 6px; }
.search__hit--on { background: var(--surface-2); }
.search__hit b { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__hit small { color: var(--fg-2); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
.join { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--citron); color: var(--plum); font-size: .6875rem; font-weight: 600; }
.checks { list-style: none; margin: 0; padding: 6px 0; }
.check { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--fg-2); position: relative; transition: background .3s var(--ease), border-color .3s var(--ease); }
.check i::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px;
  border: solid var(--plum); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .25s var(--ease);
}
.check small { color: var(--fg-2); }
.check.is-done i { background: var(--citron); border-color: var(--citron); }
.check.is-done i::after { transform: rotate(45deg) scale(1); }
.check.is-done span { color: var(--fg-2); }
.check--move.is-done i { background: transparent; border-color: var(--fg-2); border-style: dashed; }
.check--move.is-done i::after { display: none; }

.wrap { margin: 0; padding: 8px 0; }
.wrap__row {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line);
  opacity: var(--wo, 1); transform: translateY(var(--wy, 0)); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.wrap__row:last-child { border-bottom: 0; }
.wrap dt { color: var(--fg-2); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 2px; }
.wrap dd { margin: 0; }
.wrap__row--co { border-bottom: 0; padding-bottom: 2px; }
.wrap__row--co dt { grid-column: 1 / -1; color: var(--fg); font: 600 var(--t-xs)/1.4 var(--body); letter-spacing: 0; text-transform: none; }
.wrap__row--actions { border-bottom: 0; padding-top: 14px; }
.wrap__row--actions dd { display: flex; gap: 8px; }
.wrap__btn { padding: 5px 14px; border-radius: 999px; background: var(--plum); color: var(--cream); font-size: .75rem; font-weight: 500; }
.wrap__btn--quiet { background: none; color: var(--fg-2); border: 1px solid var(--line); }
.wrap.is-waiting .wrap__row { --wo: 0; --wy: 6px; }

/* ------------------------------------------------------------------ the day: a room you walk through */
@media (min-width: 860px) {
  .scene { grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
  .arch { height: auto; max-height: 72vh; }
  .bay--quiet { grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr); align-items: center; }
}
@media (min-width: 860px) and (prefers-reduced-motion: no-preference) {
  .day { height: var(--day-h, 700vh); }
  .day__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: 0; }
  .day__stage::after { /* the stone ledge the room stands on */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 13vh; pointer-events: none;
    background: linear-gradient(var(--stone), #EADFD1); border-top: 1px solid rgba(70, 46, 30, .12);
  }
  .clock { /* on the ledge, like a clock on a mantel */
    position: absolute; z-index: 6; top: auto; bottom: 3.2vh; left: var(--gutter-l); width: 20vw;
    display: grid; gap: 6px; margin: 0; padding: 0; background: none; border: 0;
  }
  .clock__time { font-size: clamp(1.8rem, 3vw, 2.8rem); }
  .room {
    position: absolute; top: 0; left: 0; height: 100%; display: flex; gap: 0; padding: 0 6vw 0 8vw;
    transform: translate3d(var(--room-x, 0px), 0, 0); will-change: transform;
  }
  .bay { flex: none; height: 100%; padding: calc(84px + 3vh) 3vw calc(13vh + 4vh); display: flex; align-items: center; }
  .bay--moment { width: 56vw; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }
  .scene { width: 100vw; display: flex; gap: 4vw; }
  .bay { --arch-h: min(62vh, 44vw); }
  .bay > .arch { flex: none; height: var(--arch-h); width: calc(var(--arch-h) / 1.5); max-height: none; align-self: center; aspect-ratio: auto; }
  .scene__text { max-width: 25rem; }
  .scene__text p:not(.stamp) { font-size: 1.0625rem; line-height: 1.65; }
  .h3 { font-size: clamp(1.5rem, 2.2vw, 2.1rem); line-height: 1.15; }
  /* text and screen side by side, on 38.2 : 61.8 */
  .scene__body { flex: 1; display: grid; grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr); align-items: center; gap: 3vw; }
  .scene__body .ui { max-width: 36rem; }
  .bay--quiet { width: 100vw; display: flex; gap: 5vw; }
  .quiet { min-width: 26rem; }
  .track { display: block; position: absolute; z-index: 6; left: 24vw; right: 6vw; bottom: 5vh; height: 24px; }
  .track__line { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: rgba(70, 46, 30, .16); }
  .track__line .tick { position: absolute; top: -3px; width: 2px; height: 8px; background: var(--fg-2); opacity: .5; }
  .track__line .tick b { position: absolute; top: 14px; left: 1px; transform: translateX(-50%); white-space: nowrap; font: 500 var(--t-xs)/1 var(--body); color: var(--fg-2); font-variant-numeric: tabular-nums; }
  /* the walk control: quiet by design (kohtuus, hiljaisuus). The breathing "now" dot shows it's walking. */
  .walk {
    display: block; position: absolute; z-index: 6; left: calc(24vw - 44px); bottom: calc(5vh - 8px);
    width: 40px; height: 40px; padding: 12px; border: 0; border-radius: 50%; background: none; cursor: pointer;
    color: var(--fg-2); opacity: .45; transition: opacity .3s var(--ease);
  }
  .walk:hover, .walk:focus-visible { opacity: 1; }
  .walk svg { width: 16px; height: 16px; display: block; }
  .walk__pause { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .walk__play { fill: currentColor; display: none; }
  .walk[aria-pressed="false"] .walk__pause { display: none; }
  .walk[aria-pressed="false"] .walk__play { display: block; }
  .track.is-walking .track__now { animation: breathe 4.8s ease-in-out infinite; }
  @keyframes breathe { 50% { box-shadow: 0 0 0 4px var(--stone), 0 0 0 9px rgba(199, 211, 106, .35); } }
  .track__now {
    position: absolute; top: -6px; left: var(--now, 0%); width: 14px; height: 14px; margin-left: -7px;
    border-radius: 50%; background: var(--citron); box-shadow: 0 0 0 4px var(--stone); z-index: 1;
  }
}

@media (min-width: 860px) and (max-width: 1199px) and (prefers-reduced-motion: no-preference) {
  .scene__body { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 24px; max-width: 34rem; }
  .bay { --arch-h: min(58vh, 40vw); }
  .scene__text p:not(.stamp) { font-size: 1rem; }
}

/* ------------------------------------------------------------------ evening, buying, questions */
.evening {
  position: relative; z-index: 2; color: var(--on-dark);
  background: linear-gradient(rgb(234,223,209) 0.0vh, rgb(231,220,206) 5.3vh, rgb(224,210,199) 10.7vh, rgb(214,196,188) 16.0vh, rgb(201,179,174) 21.3vh, rgb(186,159,158) 26.7vh, rgb(164,137,140) 32.0vh, rgb(136,113,120) 37.3vh, rgb(108,92,101) 42.7vh, rgb(84,72,84) 48.0vh, rgb(65,57,71) 53.3vh, rgb(53,47,62) 58.7vh, rgb(48,43,59) 64.0vh); /* dusk falls, eased over two-thirds of a screen */
  padding: 58vh var(--gutter-r) 10vh var(--gutter-l);
}
.evening__inner { max-width: 60rem; margin: 0 auto; }
.evening__mark { display: block; width: clamp(64px, 6.5vw, 92px); height: auto; margin: 0 0 28px -10px; } /* the file keeps its clear space */
.fi--light { font-size: var(--t-xl); color: rgba(245, 240, 232, .45); margin-bottom: 12px; }
.sign { margin: 0; font-size: clamp(3rem, 9vw, 8.5rem); line-height: .98; }
.evening__text { margin: 32px 0 0; max-width: 34em; color: var(--on-dark-2); }

.buy { max-width: 60rem; margin: 24vh auto 0; display: grid; gap: 48px; }
.buy__head { max-width: 40rem; }
.buy__head h2 { margin: 0; font-size: var(--t-2xl); line-height: 1.02; }
.buy__head p { margin: 18px 0 0; color: var(--on-dark-2); }
.buy__head .kalevala { font-size: var(--t-s); color: rgba(245, 240, 232, .55); }
.own { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.own h4 { margin: 0 0 8px; font: 600 var(--t-m)/1.3 var(--display); }
.own p { margin: 0; font-size: var(--t-s); color: rgba(245, 240, 232, .72); }

.shore {
  position: relative; margin: 12vh calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  min-height: 78vh; display: grid; place-items: center; padding: 12vh var(--gutter-r) 10vh var(--gutter-l);
}
.notify {
  position: relative; width: min(100%, 52rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px 48px; align-items: center;
  padding: 44px 48px; border-radius: 28px;
}
.notify h3 { margin: 0 0 12px; font-size: var(--t-xl); line-height: 1.15; }
.notify__intro p { margin: 0; color: var(--on-dark-2); font-size: var(--t-s); line-height: 1.6; max-width: 26em; }
.notify__form { display: grid; gap: 10px; }
.notify__label { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.notify__row { display: flex; gap: 10px; }
.notify input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(245, 240, 232, .24); background: rgba(245, 240, 232, .06); color: var(--on-dark);
  font: 400 var(--t-s)/1 var(--body);
}
.notify input::placeholder { color: rgba(245, 240, 232, .5); }
.notify input:focus-visible { outline: 2px solid var(--citron); outline-offset: 2px; }
.notify input[aria-invalid="true"] { border-color: #E8B4A0; }
.notify .btn { border: 0; cursor: pointer; flex: none; }
.notify__fine, .notify__status { margin: 0; font-size: var(--t-xs); color: var(--on-dark-2); }
.notify__status:empty { display: none; }
.notify__fine a, .foot a { color: inherit; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* the honeypot: off screen, out of tab order */
.glass {
  background: linear-gradient(160deg, rgba(245, 240, 232, .1), rgba(245, 240, 232, .04));
  border: 1px solid rgba(245, 240, 232, .16);
  -webkit-backdrop-filter: blur(8px) saturate(1.1); backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 30px 70px -45px rgba(20, 14, 24, .45);
}

/* the booklet download */
.booklet {
  max-width: 60rem; margin: 16vh auto 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px 56px; align-items: start;
}
.booklet h2 { margin: 0; font-size: var(--t-xl); line-height: 1.12; }
.booklet__intro p:not(.eyebrow) { margin: 14px 0 0; color: var(--on-dark-2); }
.booklet__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.booklet__links .btn { gap: 10px; }
.booklet__links small { font-size: var(--t-xs); opacity: .7; }
.booklet__print { padding: 26px 28px; border-radius: 16px; border: 1px solid rgba(245, 240, 232, .18); }
.booklet__print h3 { margin: 0 0 12px; font-size: var(--t-m); }
.booklet__print ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--on-dark-2); font-size: var(--t-s); line-height: 1.55; }
.booklet__print strong { color: var(--citron); font-weight: 600; }
.booklet__fine { margin: 14px 0 0; font-size: var(--t-xs); color: var(--on-dark-2); }
.faq { max-width: 46rem; margin: 14vh auto 0; }
.faq__title { margin: 0 0 18px; font-size: var(--t-xl); }
.faq details { border-top: 1px solid rgba(245, 240, 232, .16); padding: 18px 0; }
.faq summary { cursor: pointer; font: 600 var(--t-m)/1.4 var(--display); }
.faq p { margin: 10px 0 0; color: var(--on-dark-2); font-size: var(--t-s); max-width: 40em; }

.foot {
  position: relative; z-index: 2; background: var(--plum); color: rgba(245, 240, 232, .6);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  padding: 28px var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  border-top: 1px solid rgba(245, 240, 232, .1); font-size: var(--t-xs);
}
.foot p { margin: 0; max-width: 60em; }

/* ------------------------------------------------------------------ privacy page */
.legal-bar { padding: calc(20px + env(safe-area-inset-top, 0px)) var(--gutter-r) 0 var(--gutter-l); color: var(--fg); }
.legal { max-width: 40rem; margin: 0 auto; padding: 10vh var(--gutter-r) 14vh var(--gutter-l); }
.legal h1 { margin: 0 0 20px; font-size: var(--t-2xl); line-height: 1.02; }
.legal h2 { margin: 48px 0 12px; font-size: var(--t-l); line-height: 1.25; }
.legal p { margin: 0 0 16px; color: var(--fg-2); line-height: 1.7; }
.legal a { color: var(--fg); text-underline-offset: 3px; }
.legal__lede { font-size: var(--t-m); }
.legal__meta { margin-top: 40px; font-size: var(--t-s); }
.legal__meta + .legal__meta { margin-top: 0; }

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 859px) {
  .hero { max-width: none; margin-left: 0; top: 13vh; transform: translateY(var(--hero-dy, 0px)); }
  .hero h1 { font-size: clamp(2.4rem, 10.5vw, 3.6rem); }
  .hero__sub { font-size: var(--t-s); }
  .noise span { left: var(--nx); top: var(--ny); }
  .bar__nav { gap: 16px; }
  .bar__nav a:not([href="#buy"]) { display: none; }
  .tool__label { display: none; }
  .tool { padding: 0 11px; }
  .win__body { grid-template-columns: minmax(0, 1fr); }
  .win__nav { display: none; }
  .own, .notify, .booklet { grid-template-columns: minmax(0, 1fr); }
  .notify { padding: 28px 22px; gap: 22px; }
  .notify__row { flex-direction: column; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .threshold { height: auto; }
  .threshold__stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; }
  .noise span { animation: none; }
  .piece { transform: none !important; opacity: 1 !important; }
  body::after, .bar, .wrap__row { transition: none; }
}
