/* ═══════════════════════════════════════════════════════════════
   BAR TIJ — het levende portret
   Palet wordt live gezet door js/main.js (--bg, --bg2, --ink,
   --accent, --nightness) en verschuift met de echte tijd.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #F4EBD3;
  --bg2: #ECDFBC;
  --ink: #3B1510;
  --accent: #C24028;
  --nightness: 0;
  --cream: #F4EBD3;
  --muted: color-mix(in srgb, var(--ink) 62%, transparent);
  --line: color-mix(in srgb, var(--ink) 22%, transparent);
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "Fragment Mono", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  background: var(--bg);
  color: var(--ink);
  transition: background-color 1.4s ease, color 1.4s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wrap {
  width: min(72rem, 100% - 3rem);
  margin-inline: auto;
}

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* ── scroll reveals ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.9s cubic-bezier(.22,.7,.3,1), transform 0.9s cubic-bezier(.22,.7,.3,1);
}
.reveal.in:nth-child(2) { transition-delay: 0.08s; }
.reveal.in:nth-child(3) { transition-delay: 0.16s; }
.reveal.in:nth-child(4) { transition-delay: 0.24s; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 34rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero-stage {
  position: absolute; inset: 0; z-index: -1;
  animation: pontoon 9s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
  scale: 1.03;
}
@keyframes pontoon {
  from { transform: translateY(0) rotate(0.001deg); }
  to   { transform: translateY(-7px) rotate(0.12deg); }
}

.hero-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* verticale positie ademt mee met het getij (gezet door js) */
  object-position: 58% var(--heroWaterY, 42%);
  opacity: 0;
  transition: opacity 2.4s ease, object-position 3s ease;
}
#layerDay { opacity: 1; }
video.hero-layer { opacity: 0; }
.hero.scrubbing .hero-layer { transition-duration: 0.35s; }

/* warme gloed van de lampjes, opacity via --nightness */
.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 32% at 62% 34%, rgba(255,183,94,0.5), transparent 70%),
    radial-gradient(80% 40% at 40% 85%, rgba(255,140,60,0.25), transparent 70%);
  mix-blend-mode: screen;
  opacity: calc(var(--nightness) * 0.75);
  transition: opacity 2.4s ease;
  animation: glowbreathe 5.5s ease-in-out infinite alternate;
}
@keyframes glowbreathe {
  from { filter: brightness(1); }
  to   { filter: brightness(1.13); }
}

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,6,4,0.42), transparent 26%),
    linear-gradient(to top, rgba(10,6,4,0.62), transparent 48%);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(1.1rem, env(safe-area-inset-top)) 1.4rem 0;
}
.hero-logo { width: clamp(74px, 13vw, 120px); height: auto; filter: drop-shadow(0 2px 12px rgba(0,0,0,0.35)); }
.hero-topright { text-align: right; padding-top: 0.4rem; }
.hero-clock {
  font-size: 0.78rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hero-tide {
  font-size: 0.62rem;
  margin-top: 0.35rem;
  opacity: 0.8;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-body {
  margin-top: auto;
  padding: 0 1.4rem 1.7rem;
  display: flex;
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes ctatij {
  from { transform: translateX(0); }
  to   { transform: translateX(140px); }
}

/* ── de dagschuif ───────────────────────────────────────────── */
.hero-dial {
  /* blijf boven de golfrand die over de hero-onderkant valt */
  padding: 0 1.4rem calc(clamp(34px, 6vw, 80px) + 1.1rem + env(safe-area-inset-bottom));
  position: relative;
  z-index: 3;
}
.dial-label {
  display: flex; justify-content: space-between; align-items: baseline;
  min-height: 0.95rem;
  margin-bottom: 0.55rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
  opacity: 0.9;
}
.dial-reset {
  background: none; border: none; color: var(--cream);
  cursor: pointer; padding: 0.2rem 0;
  border-bottom: 1px solid currentColor;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}

#timeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
#timeSlider::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px;
  background: var(--track, linear-gradient(to right, #1a1830, #f0e0b8, #e8963f, #1a1830));
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
#timeSlider::-moz-range-track {
  height: 5px; border-radius: 3px;
  background: var(--track, linear-gradient(to right, #1a1830, #f0e0b8, #e8963f, #1a1830));
}
#timeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  margin-top: -10.5px;
  background: var(--cream);
  border: 3px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
  transition: transform 0.15s ease;
}
#timeSlider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
#timeSlider:active::-webkit-slider-thumb { transform: scale(1.25); }

.dial-time {
  position: absolute;
  translate: -50% -100%;
  padding: 0.28rem 0.65rem;
  border-radius: 7px;
  background: rgba(10, 6, 4, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream);
  pointer-events: none;
  white-space: nowrap;
}

/* ═══════════════ GOLVEN ═══════════════ */
.waves {
  display: block;
  width: 100%; height: clamp(34px, 6vw, 80px);
  margin-top: -1px;
  pointer-events: none;
}
.waves-top { position: absolute; top: 0; left: 0; transform: translateY(-99%); }
/* --tideY: 0px bij hoogwater, ~18px bij laagwater — het water tegen de kade */
.wave {
  fill: var(--bg);
  transition: fill 1.4s ease, transform 3s ease;
  transform: translateY(var(--tideY, 9px));
}
.wave-menu { fill: var(--bg2); }
.wave-ink { fill: var(--ink); }
.menu { position: relative; }
.footer { position: relative; }

/* ═══════════════ VERHAAL ═══════════════ */
.story {
  position: relative;
  padding: clamp(4.5rem, 11vw, 9rem) 0;
}
.kicker {
  color: var(--accent);
  margin-bottom: 1.6rem;
}
.story-lede {
  font-size: clamp(1.7rem, 4.6vw, 3.3rem);
  font-weight: 480;
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 26ch;
  font-variation-settings: "opsz" 60;
}
.story-line {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
  max-width: 44ch;
  margin-top: 2.2rem;
}
.story-close {
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 600;
  color: var(--accent);
  margin-top: 2.6rem;
}

/* ═══════════════ DE KAART ═══════════════ */
.menu {
  background: var(--bg2);
  transition: background-color 1.4s ease;
  padding: clamp(4.5rem, 11vw, 9rem) 0;
}
.section-title {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 640;
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
  font-variation-settings: "opsz" 144;
}
.menu-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.menu-head {
  font-size: 1.25rem;
  font-weight: 640;
  font-style: italic;
  color: var(--accent);
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.menu-list { list-style: none; }
.menu-list li {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 1.02rem;
}
.mi em { font-style: italic; color: var(--muted); font-size: 0.88em; }
.leader { flex: 1; border-bottom: 2px dotted var(--line); translate: 0 -4px; }
/* schilderstape over de prijzen tot de echte kaart er is —
   volledig dekkend, met crêpe-textuur en rafelranden */
.mp { font-size: 0.8rem; position: relative; }
.mp::after {
  content: "";
  position: absolute;
  inset: -0.45em -0.9em;
  background:
    repeating-linear-gradient(93deg,
      rgba(255, 255, 255, 0.16) 0 2px,
      rgba(0, 0, 0, 0.025) 2px 4px,
      transparent 4px 6px),
    #E7DCBE;
  border-left: 2px dashed rgba(150, 135, 100, 0.45);
  border-right: 2px dashed rgba(150, 135, 100, 0.45);
  transform: rotate(-2.5deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}
.menu-list li:nth-child(2n) .mp::after { transform: rotate(2deg); }
.menu-list li:nth-child(3n) .mp::after { transform: rotate(-1.2deg) translateY(1px); }
.menu-note {
  margin-top: 3rem;
  color: var(--muted);
}

/* ═══════════════ PRAKTISCH ═══════════════ */
.visit { padding: clamp(4.5rem, 11vw, 9rem) 0; }
.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.visit-block h3 {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.visit-block p { font-size: 1.08rem; line-height: 1.65; }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  background: var(--ink);
  color: var(--bg);
  transition: background-color 1.4s ease, color 1.4s ease;
  padding: clamp(3.5rem, 8vw, 6rem) 0 calc(2.2rem + env(safe-area-inset-bottom));
  text-align: center;
}
.footer-logo { width: 92px; margin-bottom: 1.6rem; }
.footer-line {
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 2rem;
}
.footer-meta { opacity: 0.55; }

/* ═══════════════ RESERVEREN ═══════════════ */
.rsv[hidden], .rsv-chip[hidden] { display: none; }
/* zwevende kaart rechtsonder, boven de vaste pil — pagina blijft
   zichtbaar en bruikbaar, geen backdrop (patroon: riverbar.nl) */
.rsv {
  position: fixed;
  right: max(1.2rem, env(safe-area-inset-right));
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  z-index: 1001;
  width: min(390px, calc(100vw - 2.4rem));
  height: min(660px, calc(100svh - 2.4rem));
  display: flex;
  flex-direction: column;
  background: #F4EBD3;
  border: 1px solid #7C1F14;
  border-radius: 18px;
  box-shadow: 0 10px 48px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transform-origin: bottom right;
  animation: rsvup 0.4s cubic-bezier(.22,.7,.3,1);
}
@keyframes rsvup { from { transform: translateY(26px) scale(0.95); opacity: 0; } }
@media (max-width: 560px) {
  .rsv { right: 0; bottom: 0; width: 100vw; height: 100svh; border-radius: 0; }
}
.rsv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  background: #7C1F14;
  color: #F4EBD3;
  flex-shrink: 0;
}
.rsv-actions { display: flex; gap: 0.25rem; }
.rsv-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.6rem 0.4rem;
  border-radius: 7px;
}
.rsv-btn:hover { background: color-mix(in srgb, #F4EBD3 22%, transparent); }
.rsv-frame {
  border: 0;
  flex: 1;
  margin: 10px;
  width: calc(100% - 20px);
  border-radius: 12px;
  background: #fff;
}

/* de vaste reserveerpil: donker glas met het tij erin — twee
   golflagen stromen traag langs elkaar; bij hover komt de vloed op */
.rsv-chip {
  position: fixed;
  right: max(1.2rem, env(safe-area-inset-right));
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  z-index: 1001;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  min-height: 3.4rem;
  padding: 0.4rem 1.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0b1420 46%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid color-mix(in srgb, var(--cream) 45%, transparent);
  color: var(--cream);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
  animation: rsvup 0.3s ease;
}
/* mobiel: pil uit beeld zolang de dagschuif zichtbaar is */
@media (max-width: 699px) {
  body.dial-inview .rsv-chip {
    opacity: 0;
    pointer-events: none;
    transform: translateY(140%);
  }
}
.rsv-chip::before,
.rsv-chip::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -140px;
  right: -140px;
  bottom: -2px;
  height: 44%;
  background: color-mix(in srgb, var(--accent) 78%, #16222e);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q17.5 8 35 20 T70 20 T105 20 T140 20 V40 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x bottom / 140px 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q17.5 8 35 20 T70 20 T105 20 T140 20 V40 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x bottom / 140px 100%;
  transition: height 0.55s cubic-bezier(.22,.7,.3,1);
  animation: ctatij 8s linear infinite;
}
.rsv-chip::after {
  height: 26%;
  background: color-mix(in srgb, var(--cream) 45%, transparent);
  animation-duration: 5s;
  animation-direction: reverse;
}
.rsv-chip:hover, .rsv-chip:focus-visible {
  border-color: color-mix(in srgb, var(--cream) 85%, transparent);
  transform: translateY(-2px);
}
.rsv-chip:hover::before, .rsv-chip:focus-visible::before { height: 125%; }
.rsv-chip:hover::after, .rsv-chip:focus-visible::after { height: 72%; }

/* ═══════════════ KORREL ═══════════════ */
.grain {
  position: fixed; inset: -50%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainshift 8s steps(10) infinite;
}
@keyframes grainshift {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-3%,2%); }
  30% { transform: translate(2%,-4%); } 50% { transform: translate(-4%,-2%); }
  70% { transform: translate(3%,3%); } 90% { transform: translate(-2%,4%); }
}

/* ═══════════════ TOEGANKELIJKHEID ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-stage, .hero-glow, .grain,
  .rsv-chip::before, .rsv-chip::after { animation: none; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
