
/* ===== Avondlicht: warm mens (abrikoos) tegenover koele machine (mint), op aubergine ===== */
:root {
  --ink: #16111C;
  --plum: #2A2033;
  --plum-hi: #3A2D45;
  --cream: #F6EEE3;
  --dim: #C9BEC4;
  --mute: #8E8291;
  --hair: rgba(246, 238, 227, 0.14);
  --apricot: #F2A65A;
  --ember: #E2704F;
  --mint: #6FD6B8;
  --serif: "Gambarino", Georgia, "Times New Roman", serif;
  --sans: "Ranade", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(18px, 4.5vw, 72px);
  --z-scene: 0; --z-scrim: 1; --z-content: 2; --z-chrome: 10; --z-tip: 20; --z-dialog: 40; --z-loader: 50;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--apricot); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--apricot); color: var(--ink); }
.mono { font-family: var(--mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-scene); display: block; touch-action: pan-y; }

/* zachte vignetten: alleen waar tekst staat */
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); pointer-events: none; opacity: 0; will-change: opacity; }
.scrim-t { opacity: 1; background: linear-gradient(180deg, rgba(22, 17, 28, 0.55), rgba(22, 17, 28, 0) 16%); }
.scrim-l { background: radial-gradient(120% 70% at 0% 100%, rgba(22, 17, 28, 0.88), rgba(22, 17, 28, 0.55) 38%, rgba(22, 17, 28, 0) 66%); }
.scrim-r { display: none; }
.scrim-b { display: none; }

/* laden */
.loader { position: fixed; inset: 0; z-index: var(--z-loader); background: var(--ink); display: grid; place-content: center; gap: 1rem; justify-items: center; color: var(--dim); transition: opacity 1100ms var(--ease), visibility 1100ms; }
.loader b { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--cream); letter-spacing: -0.01em; }
.loader i { display: block; width: 180px; height: 2px; border-radius: 2px; background: var(--hair); position: relative; overflow: hidden; }
.loader i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--apricot), var(--mint)); transform-origin: left; animation: load 1.4s var(--ease) infinite; }
.loader i.pct::after { animation: none; transform: scaleX(var(--p, 0)); transition: transform 220ms linear; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.loader.done { opacity: 0; visibility: hidden; }
.loader.fail i { display: none; }

/* navigatie */
.nav { position: fixed; inset: 0 0 auto 0; z-index: var(--z-chrome); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: calc(1rem + env(safe-area-inset-top, 0px)) var(--gutter) 1rem; pointer-events: none; }
.nav > * { pointer-events: auto; }
.mark { justify-self: start; display: inline-flex; align-items: baseline; gap: 0.15rem; text-decoration: none; color: var(--cream); font-family: var(--serif); font-size: 1.2rem; letter-spacing: -0.01em; white-space: nowrap; }
.mark em { font-style: normal; color: var(--apricot); }
.mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); margin-left: 0.2rem; align-self: center; }
@media (prefers-reduced-motion: no-preference) { .mark i { animation: ping 2.8s var(--ease) infinite; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(111, 214, 184, 0.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(111, 214, 184, 0); } }
.hud { justify-self: center; display: flex; align-items: center; gap: 0.75rem; color: var(--dim); pointer-events: none; }
.hud b { font-family: var(--mono); font-weight: 400; font-size: 0.75rem; color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.hud .bar { width: 90px; height: 2px; background: var(--hair); border-radius: 2px; overflow: hidden; }
.hud .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--apricot), var(--mint)); transform-origin: left; transform: scaleX(0); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }

.btn { --b: var(--apricot); display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 46px; padding: 0 1.25rem; border-radius: 999px; border: 1px solid var(--b); background: var(--b); color: var(--ink); font: 600 0.9375rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease); box-shadow: 0 8px 24px -10px rgba(242, 166, 90, 0.7); }
.btn:hover { background: #F7B975; border-color: #F7B975; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn i { font-style: normal; transition: transform 180ms var(--ease); }
.btn:hover i { transform: translateX(3px); }
.btn-line { background: rgba(22, 17, 28, 0.35); border-color: var(--hair); color: var(--cream); box-shadow: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-line:hover { background: rgba(42, 32, 51, 0.7); border-color: rgba(246, 238, 227, 0.32); }
.nav .btn { min-height: 40px; font-size: 0.875rem; padding: 0 1.05rem; }
.bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 13px; }
.bars span { width: 3px; height: 13px; background: currentColor; border-radius: 1px; transform-origin: bottom; transition: transform 200ms var(--ease); }
.sound:not([aria-pressed="true"]) .bars span:nth-child(1) { transform: scaleY(0.4); }
.sound:not([aria-pressed="true"]) .bars span:nth-child(2) { transform: scaleY(0.85); }
.sound:not([aria-pressed="true"]) .bars span:nth-child(3) { transform: scaleY(0.6); }
@media (prefers-reduced-motion: no-preference) {
  .sound[aria-pressed="true"] .bars span { animation: eq 0.9s ease-in-out infinite; color: var(--mint); }
  .sound[aria-pressed="true"] .bars span:nth-child(2) { animation-delay: -0.3s; }
  .sound[aria-pressed="true"] .bars span:nth-child(3) { animation-delay: -0.6s; }
}
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* hoofdstukken rechts */
.rail { position: fixed; right: clamp(12px, 2.2vw, 34px); top: 50%; transform: translateY(-50%); z-index: var(--z-chrome); display: grid; gap: 0.15rem; }
.rail button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; height: 30px; padding: 0 0 0 1rem; background: none; border: 0; cursor: pointer; color: var(--mute); font: 400 0.6875rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.rail button::after { content: ""; width: 26px; height: 1px; background: currentColor; transform: scaleX(0.4); transform-origin: right; transition: transform 260ms var(--ease), background-color 260ms; }
.rail button span { opacity: 0; transform: translateX(6px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); white-space: nowrap; }
.rail button:hover span, .rail button:focus-visible span, .rail button.on span { opacity: 1; transform: none; }
.rail button:hover { color: var(--dim); }
.rail button.on { color: var(--cream); }
.rail button.on::after { transform: scaleX(1); background: var(--apricot); }

.tip { position: fixed; left: 0; top: 0; z-index: var(--z-tip); pointer-events: none; background: rgba(22, 17, 28, 0.88); border: 1px solid var(--hair); color: var(--cream); padding: 0.5rem 0.8rem; border-radius: 999px; opacity: 0; transform: translate3d(-300px, -300px, 0); transition: opacity 160ms var(--ease); white-space: nowrap; }
.tip.show { opacity: 1; }
#scene.can-click { cursor: pointer; }

/* ===== onderschriften: kort, linksonder, de kamer vertelt de rest ===== */
main { position: relative; z-index: var(--z-content); pointer-events: none; }
.ch { height: 160vh; height: 160svh; display: flex; flex-direction: column; justify-content: flex-end; padding-inline: var(--gutter); }
.panel { pointer-events: auto; position: sticky; bottom: 0; width: min(30rem, 100%); padding-bottom: calc(clamp(2rem, 6vh, 4rem) + env(safe-area-inset-bottom, 0px)); display: grid; gap: 0.8rem; will-change: translate, opacity; }
.kicker { display: flex; align-items: center; gap: 0.7rem; margin: 0; color: var(--apricot); }
.kicker .n { color: var(--cream); opacity: 0.7; font-variant-numeric: tabular-nums; }
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.panel h1 { font-size: clamp(2.6rem, 3.4vw + 0.9rem, 4.4rem); line-height: 0.98; }
.panel h2 { font-size: clamp(2rem, 2.2vw + 0.9rem, 3.1rem); line-height: 1.02; }
.panel h1 em, .panel h2 em { font-style: normal; color: var(--apricot); }
.panel h1, .panel h2 { text-shadow: 0 2px 28px rgba(22, 17, 28, 0.65); }
.sub { margin: 0; color: var(--dim); max-width: 40ch; font-size: clamp(1rem, 0.3vw + 0.95rem, 1.12rem); text-shadow: 0 1px 14px rgba(22, 17, 28, 0.9); }
.sub strong { color: var(--cream); font-weight: 600; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; margin-top: 0.3rem; }
.link { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--cream); text-decoration: none; font-weight: 500; font-size: 0.95rem; border-bottom: 1px solid var(--hair); padding-bottom: 2px; }
.link:hover { border-color: var(--apricot); }
.credit { margin: 0.4rem 0 0; color: var(--mute); font-size: 0.6rem; }
.nojs { position: relative; z-index: 5; max-width: 40rem; margin: 6rem auto; padding: 0 1.5rem; color: var(--cream); }

/* woorden komen zacht binnen */
.panel .w { display: inline-block; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .panel .w { opacity: 0; transform: translateY(0.35em); filter: blur(6px); transition: opacity 700ms var(--ease), transform 900ms var(--ease), filter 700ms var(--ease); transition-delay: calc(var(--wi) * 45ms); }
  .panel.in .w { opacity: 1; transform: none; filter: none; }
  .panel .kicker, .panel .sub, .panel .ctas, .panel .credit { opacity: 0; translate: 0 10px; transition: opacity 700ms var(--ease), translate 900ms var(--ease); }
  .panel.in .kicker { opacity: 1; translate: none; }
  .panel.in .sub { opacity: 1; translate: none; transition-delay: 220ms; }
  .panel.in .ctas, .panel.in .credit { opacity: 1; translate: none; transition-delay: 380ms; }
}

/* ===== agenda ===== */
.dlg { position: fixed; inset: 0; z-index: var(--z-dialog); display: grid; place-items: center; padding: 1rem; background: rgba(12, 9, 16, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease), visibility 300ms; }
.dlg.open { opacity: 1; visibility: visible; }
.dlg-card { position: relative; width: min(30rem, 100%); max-height: min(44rem, calc(100svh - 2rem)); overflow: auto; background: linear-gradient(180deg, rgba(42, 32, 51, 0.96), rgba(28, 21, 36, 0.98)); border: 1px solid var(--hair); border-radius: 22px; padding: clamp(1.25rem, 3vw, 1.8rem); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(246, 238, 227, 0.06); transform: translateY(14px) scale(0.98); transition: transform 380ms var(--ease); }
.dlg.open .dlg-card { transform: none; }
.dlg-x { position: absolute; top: 0.9rem; right: 0.9rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair); background: transparent; color: var(--cream); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.dlg-x:hover { border-color: var(--apricot); }
.dlg h3 { margin: 0 2.5rem 0.25rem 0; font: 400 1.7rem/1.1 var(--serif); letter-spacing: -0.015em; }
.dlg h3 em { font-style: normal; color: var(--apricot); }
.dlg .intro { margin: 0 0 1.1rem; color: var(--dim); font-size: 0.95rem; }
.step-label { margin: 1rem 0 0.55rem; color: var(--mute); }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 4.1rem; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.35rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.day { scroll-snap-align: start; display: grid; gap: 0.1rem; justify-items: center; padding: 0.6rem 0.2rem; border-radius: 14px; border: 1px solid var(--hair); background: rgba(22, 17, 28, 0.4); color: var(--cream); cursor: pointer; font: inherit; }
.day small { font: 400 0.6rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.day b { font: 400 1.35rem/1 var(--serif); }
.day[aria-pressed="true"] { border-color: var(--apricot); background: rgba(242, 166, 90, 0.14); }
.day[aria-pressed="true"] small { color: var(--apricot); }
.day:disabled { opacity: 0.35; cursor: not-allowed; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.time { min-height: 44px; border-radius: 12px; border: 1px solid var(--hair); background: rgba(22, 17, 28, 0.4); color: var(--cream); font: 500 0.95rem/1 var(--sans); cursor: pointer; font-variant-numeric: tabular-nums; }
.time[aria-pressed="true"] { border-color: var(--mint); background: rgba(111, 214, 184, 0.14); color: var(--mint); }
.time:disabled { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; }
.empty { color: var(--mute); font-size: 0.9rem; margin: 0; }
.form { display: grid; gap: 0.7rem; margin-top: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field span { font: 400 0.65rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--hair); background: rgba(22, 17, 28, 0.55); color: var(--cream); font: 400 1rem/1.4 var(--sans); padding: 0.7rem 0.85rem; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--apricot); box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.summary { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.85rem; border-radius: 12px; background: rgba(111, 214, 184, 0.08); border: 1px solid rgba(111, 214, 184, 0.25); color: var(--cream); font-size: 0.92rem; }
.summary::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; }
.privacy { margin: 0; color: var(--mute); font-size: 0.78rem; }
.err { margin: 0; color: #FFB4A0; font-size: 0.88rem; min-height: 1.2em; }
.done-view { display: grid; gap: 0.9rem; justify-items: start; }
.done-view .big { font: 400 1.5rem/1.2 var(--serif); }

@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; gap: 0.6rem; }
  .hud { display: none; }
  .rail { display: none; }
  .mark { font-size: 1.05rem; }
  .sound .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sound { width: 40px; padding: 0 !important; }
  .scrim-l { background: linear-gradient(0deg, rgba(22, 17, 28, 0.94) 0%, rgba(22, 17, 28, 0.8) 26%, rgba(22, 17, 28, 0) 46%); }
  .panel { width: 100%; gap: 0.6rem; padding-bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px)); }
  .panel h1 { font-size: clamp(2.3rem, 9vw, 2.9rem); }
  .panel h2 { font-size: clamp(1.75rem, 7.2vw, 2.2rem); }
  .sub { font-size: 0.98rem; }
  .btn { min-height: 48px; }
  .dlg { place-items: end center; padding: 0; }
  .dlg-card { width: 100%; max-height: 92svh; border-radius: 22px 22px 0 0; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); transform: translateY(40px); }
}
@media (max-height: 560px) and (max-width: 760px) { .sub { display: none; } }
