/* Stillevand — concept site for a calm dental clinic. Made by Nexus Digital. */
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-var-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-var-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --paper: #f3f5f1;   /* daylight on plaster: page ground and the veil over the film */
  --ink: #16302a;     /* deep pine: all text */
  --pine: #2f5d50;    /* buttons, links, what is live */
  --sage: #89a391;    /* quiet lines and marks */
  --water: #d6e6e6;   /* the glass of water: hover and focus */
  --soft: #4c625b;    /* secondary text */
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 400 1.0625rem/1.55 "Figtree", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ol, dl, dd, table { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: -999rem; top: 0.75rem; z-index: 50; background: var(--ink); color: var(--paper); padding: 0.7rem 1rem; border-radius: 999px; }
.skip:focus { left: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Film ─────────────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--paper) center / cover no-repeat; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
/* a veil of daylight: lighter where the page only shows the room, fuller behind lists and forms */
.shade { position: absolute; inset: 0; z-index: 10; --dim: 0.1;
  background:
    linear-gradient(to top, rgb(243 245 241 / 0.94) 0%, rgb(243 245 241 / 0.62) 34%, rgb(243 245 241 / 0) 68%),
    linear-gradient(rgb(243 245 241 / var(--dim)), rgb(243 245 241 / var(--dim))); }

/* ── Top bar ──────────────────────────────────────────────────── */
.top { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: 0.9rem var(--pad);
  background: linear-gradient(rgb(243 245 241 / 0.9), rgb(243 245 241 / 0)); }
.mark { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; letter-spacing: -0.01em; text-decoration: none; }
.mark-ring { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1.5px solid var(--pine); position: relative; }
.mark-ring::after { content: ""; position: absolute; inset: 0.28rem; border-radius: 50%; background: var(--pine); }
.status { display: none; font-size: 0.875rem; color: var(--soft); }
.status::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: var(--sage); }
.status[data-open]::before { background: #3f9a6b; box-shadow: 0 0 0 4px rgb(63 154 107 / 0.18); }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem); font-size: 0.9375rem; font-weight: 500; }
.top-nav a { text-decoration: none; padding: 0.5rem 0; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.top-nav .pill { padding: 0.5rem 1.05rem; border-radius: 999px; background: var(--pine); color: var(--paper); }
.top-nav .pill:hover { text-decoration: none; background: var(--ink); }
@media (min-width: 800px) { .status { display: block; } }

/* ── Chapter rail ─────────────────────────────────────────────── */
.chapters { position: fixed; right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 20; display: none; }
.chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; justify-items: end; }
.chapters a { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.8125rem; text-decoration: none; color: var(--soft); }
.chapters a::after { content: ""; width: 1.1rem; height: 1.5px; background: currentColor; transition: width 0.4s var(--ease); }
.chapters a:hover, .chapters a[aria-current="true"] { color: var(--ink); }
.chapters a[aria-current="true"]::after { width: 2.4rem; background: var(--pine); }
@media (min-width: 1000px) { .chapters { display: block; } }

/* ── Chapters ─────────────────────────────────────────────────── */
main { position: relative; z-index: 15; }
.ch { position: relative; min-height: 220vh; }
.ch--hero { min-height: 200vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: end; justify-items: center; gap: 1.35rem; padding: 6rem var(--pad) max(3rem, 9vh); text-align: center; }

.name { position: relative; font-family: var(--serif); font-weight: 340; font-size: clamp(3.6rem, 13.5vw, 13rem); line-height: 0.92; letter-spacing: -0.035em; }
.name span { display: inline-block; }
.js .name span { opacity: 0; filter: blur(12px); animation: settle 1.6s var(--ease) forwards; animation-delay: calc(0.3s + var(--i) * 0.06s); }
@keyframes settle { to { opacity: 1; filter: none; } }
/* three slow rings, like a drop in still water, once when the page opens */
.ripples { position: absolute; left: 50%; bottom: 42%; width: 0; height: 0; pointer-events: none; }
.ripples i { position: absolute; left: 0; top: 0; width: min(70vw, 46rem); aspect-ratio: 1; margin: calc(min(70vw, 46rem) / -2); border-radius: 50%; border: 1px solid rgb(47 93 80 / 0.5); opacity: 0; transform: scale(0.1); }
.js .ripples i { animation: ripple 4.6s var(--ease) 0.6s 1 both; }
.js .ripples i:nth-child(2) { animation-delay: 1.3s; }
.js .ripples i:nth-child(3) { animation-delay: 2s; }
@keyframes ripple { 0% { opacity: 0; transform: scale(0.08); } 18% { opacity: 0.7; } 100% { opacity: 0; transform: scale(1); } }

.say { font-family: var(--serif); font-weight: 380; font-size: clamp(1.9rem, 4.6vw, 4.1rem); line-height: 1.06; letter-spacing: -0.022em; max-width: 21ch; text-wrap: balance; }
.lead { font-size: clamp(1.0625rem, 1.45vw, 1.3rem); max-width: 38ch; color: var(--ink); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.7rem; border-radius: 999px; background: var(--pine); color: var(--paper); border: 1.5px solid var(--pine); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease); }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn--line { background: rgb(243 245 241 / 0.7); color: var(--ink); border-color: var(--ink); backdrop-filter: blur(8px); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

/* first visit: three steps, a line fills between them as the chapter is scrolled */
.steps { list-style: none; padding: 0; display: grid; gap: 1.1rem; width: min(100%, 62rem); counter-reset: step; position: relative; text-align: left; }
.steps li { counter-increment: step; padding: 1.1rem 1.2rem 1.2rem; border-radius: 1.1rem; background: rgb(243 245 241 / 0.82); backdrop-filter: blur(10px); border: 1px solid rgb(22 48 42 / 0.1); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.7rem; border-radius: 50%; border: 1.5px solid var(--pine); font-family: var(--serif); font-size: 1rem; color: var(--pine); transition: background 0.5s, color 0.5s; }
.steps h3 { font-family: var(--serif); font-weight: 450; font-size: 1.35rem; letter-spacing: -0.01em; }
.steps p { margin-top: 0.3rem; color: var(--soft); font-size: 0.9875rem; }
.js .steps li:nth-child(1)::before { background: var(--pine); color: var(--paper); }
.steps li:nth-child(2)::before { background: color-mix(in srgb, var(--pine) calc(clamp(0, (var(--p, 1) - 0.3) * 6, 1) * 100%), transparent); color: color-mix(in srgb, var(--paper) calc(clamp(0, (var(--p, 1) - 0.3) * 6, 1) * 100%), var(--pine)); }
.steps li:nth-child(3)::before { background: color-mix(in srgb, var(--pine) calc(clamp(0, (var(--p, 1) - 0.6) * 6, 1) * 100%), transparent); color: color-mix(in srgb, var(--paper) calc(clamp(0, (var(--p, 1) - 0.6) * 6, 1) * 100%), var(--pine)); }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .steps::before { content: ""; position: absolute; left: 2.2rem; right: 2.2rem; top: -0.9rem; height: 2px; border-radius: 2px; background: linear-gradient(to right, var(--pine) calc(var(--p, 1) * 115%), rgb(22 48 42 / 0.16) 0); }
}

/* ── Price list: a sheet of paper over the film ──────────────── */
.ch--list { min-height: 0; padding: 72vh var(--pad) 72vh; }
.card { width: min(100%, 52rem); margin: 0 auto; padding: clamp(1.4rem, 4vw, 3.2rem); border-radius: 1.5rem; background: rgb(250 251 249 / 0.95); border: 1px solid rgb(22 48 42 / 0.08); box-shadow: 0 30px 80px -40px rgb(22 48 42 / 0.45); }
.card-h { font-family: var(--serif); font-weight: 380; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.025em; line-height: 1; }
.group { margin-top: 2.2rem; }
.group h3 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; color: var(--pine); padding-bottom: 0.6rem; border-bottom: 1px solid rgb(22 48 42 / 0.14); }
.group ul { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1.25rem; padding: 0.85rem 0; border-bottom: 1px solid rgb(22 48 42 / 0.09); }
.item-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 450; letter-spacing: -0.01em; }
.item-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.item-desc { grid-column: 1 / -1; color: var(--soft); font-size: 0.9375rem; }
.card-note { margin-top: 1.6rem; color: var(--soft); font-size: 0.9375rem; }

/* ── Hours ────────────────────────────────────────────────────── */
.hours { width: min(100%, 26rem); padding: 1.2rem 1.4rem 1.3rem; border-radius: 1.1rem; background: rgb(243 245 241 / 0.86); backdrop-filter: blur(10px); border: 1px solid rgb(22 48 42 / 0.1); text-align: left; }
.hours h3 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; color: var(--pine); }
.hours table { width: 100%; margin-top: 0.5rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours td { padding: 0.5rem 0; border-top: 1px solid rgb(22 48 42 / 0.1); }
.hours td:last-child { text-align: right; }
.hours tr[data-today] td { font-weight: 650; }
.urgent { margin-top: 0.8rem; font-size: 0.9375rem; color: var(--soft); }
.urgent a { color: var(--ink); font-weight: 600; }

/* ── Booking ──────────────────────────────────────────────────── */
.ch--book { min-height: 0; padding-top: 105vh; display: flex; flex-direction: column; }
.book { display: grid; gap: 2rem; padding: 0 var(--pad) 4rem; align-items: start; }
.book .say { max-width: 14ch; }
.book .lead { margin-top: 1rem; }
.find { margin-top: 1.6rem; font-style: normal; line-height: 1.7; }
.find h3 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; color: var(--pine); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; padding: clamp(1.2rem, 3vw, 2rem); border-radius: 1.5rem; background: rgb(250 251 249 / 0.96); border: 1px solid rgb(22 48 42 / 0.08); box-shadow: 0 30px 80px -40px rgb(22 48 42 / 0.45); }
.form label { display: grid; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; min-width: 0; }
.form input, .form select { width: 100%; min-height: 3rem; padding: 0 0.9rem; border-radius: 0.8rem; border: 1.5px solid rgb(22 48 42 / 0.28); background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.form input:focus, .form select:focus { outline: 3px solid var(--water); border-color: var(--pine); }
.form [aria-invalid="true"] { border-color: #b3261e; }
.wide { grid-column: 1 / -1; }
.form-note { padding: 0.9rem 1rem; border-radius: 0.8rem; background: var(--water); font-size: 0.9375rem; }
.foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; padding: 1.4rem var(--pad); background: var(--paper); border-top: 1px solid rgb(22 48 42 / 0.12); font-size: 0.875rem; color: var(--soft); }
@media (min-width: 900px) { .book { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 4rem; } }
@media (max-width: 520px) {
  .ch { min-height: 190vh; }
  .ch--list { padding: 62vh 0.75rem 62vh; }
  .form { grid-template-columns: 1fr; }
  .top-nav a:first-child { display: none; }
}

/* ── No film: reduced motion, or no script. Each chapter shows its own still. ── */
.static .stage, .no-js .stage { display: none; }
.static .ch, .no-js .ch { min-height: 0; background: var(--paper) center / cover no-repeat; }
.static .ch::before, .no-js .ch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(243 245 241 / 0.95) 0%, rgb(243 245 241 / 0.7) 45%, rgb(243 245 241 / 0.35) 100%); }
.static .ch > *, .no-js .ch > * { position: relative; }
.static .pin, .no-js .pin { position: relative; height: auto; min-height: 88vh; }
.static .ch--list, .no-js .ch--list { padding-block: 5rem; }
.static .ch--book, .no-js .ch--book { padding-top: 30vh; }
.static .ch[data-ch="0"], .no-js .ch[data-ch="0"] { background-image: url("films/s1-water-poster.webp"); }
.static .ch[data-ch="1"], .no-js .ch[data-ch="1"] { background-image: url("films/s2-corridor-poster.webp"); }
.static .ch[data-ch="2"], .no-js .ch[data-ch="2"] { background-image: url("films/s3-room-poster.webp"); }
.static .ch[data-ch="3"], .no-js .ch[data-ch="3"] { background-image: url("films/s4-care-poster.webp"); }
.static .ch[data-ch="4"], .no-js .ch[data-ch="4"] { background-image: url("films/s5-lounge-poster.webp"); }
.static .ch[data-ch="5"], .no-js .ch[data-ch="5"] { background-image: url("films/s6-dusk-poster.webp"); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name span, .ripples i { animation: none !important; opacity: 1; filter: none; }
  .ripples { display: none; }
  .btn, .chapters a::after { transition: none; }
}

/* the rail steps aside where the booking form needs the room */
html[data-ch="5"] .chapters { opacity: 0; pointer-events: none; }
.chapters { transition: opacity 0.3s; }
