:root {
  --bg: #0c120e;
  --surface: #121a14;
  --surface-2: #1d2620;
  --surface-3: #28332b;
  --border: #26352a;
  --border-glow: #475a48;
  --text: #e6e2d6;
  --text-muted: #8f9789;
  --text-dim: #5f675c;
  --amber: #e89635;
  --amber-bright: #f5b455;
  --amber-dim: #8a5e1f;
  --moss: #6f9450;
  --moss-dim: #3d5230;
  --rust: #c25638;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: "zero", "ss01"; }
.display { font-family: 'Big Shoulders Display', sans-serif; letter-spacing: 0.01em; }

/* ============ HERO: kaart + titel ============ */
.hero {
  position: relative;
  height: min(60vh, 540px);
  min-height: 340px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#kaart {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 1;
}
.hero-titelbalk {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  pointer-events: none;
  padding: 18px 20px 40px;
  background: linear-gradient(180deg, rgba(12, 18, 14, 0.92) 0%, rgba(12, 18, 14, 0.55) 55%, transparent 100%);
}
.hero-titelbalk h1 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 9vw, 58px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
}
.hero-titelbalk h1 .accent { color: var(--amber); }
.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Leaflet donker bijkleuren */
.leaflet-container { font-family: 'IBM Plex Sans', sans-serif; }
/* Esri Dark Gray is middengrijs; dit brengt hem terug naar het bijna-zwart
   van de oude CARTO-kaart, passend bij --bg. Alleen de basislaag: de
   labellaag eroverheen houdt zo zijn contrast. */
.kaart-basis-donker { filter: brightness(0.55) contrast(1.15) saturate(0.8); }
.leaflet-control-attribution {
  background: rgba(12, 18, 14, 0.7) !important;
  color: var(--text-dim) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }
.leaflet-bar a {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-bar a:hover { background: var(--surface-3) !important; }

/* Dag-markers */
.dag-dot-wrap { background: none; border: none; }
.dag-dot {
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.dag-dot.is-gereden { background: var(--amber); }
.dag-dot.is-toekomst { background: var(--text-dim); opacity: 0.8; }

/* Huidige positie: pulserende ring op de laatst gepubliceerde dag */
.dag-dot.is-huidig {
  background: var(--amber-bright, #f5b455);
  cursor: default;
}
@media (prefers-reduced-motion: no-preference) {
  .dag-dot.is-huidig {
    animation: puls-ring 2.2s ease-out infinite;
  }
  @keyframes puls-ring {
    0%   { box-shadow: 0 0 0 0 rgba(232, 150, 53, 0.55); }
    70%  { box-shadow: 0 0 0 16px rgba(232, 150, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 150, 53, 0); }
  }
}
.foto-marker-wrap { background: none; border: none; }
.foto-marker {
  display: block;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--amber);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}
.foto-marker img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ STATSROW ============ */
.statsrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  background: var(--surface);
  padding: 14px 8px 12px;
  text-align: center;
}
.stat-waarde {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(18px, 5vw, 26px);
  color: var(--amber);
  font-feature-settings: "zero";
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
/* Subregel: het plan als context onder het gedaan-getal ("nog 3.893 km gepland") */
.stat-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
  min-height: 10px;
}

/* Voortgangsregel */
.voortgang {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 14px 20px 0;
}
.voortgang b { color: var(--amber); font-weight: 700; }

/* ============ SECTIEDIVIDER: gestippelde routelijn ============ */
.divider {
  display: block;
  width: min(520px, 80%);
  margin: 26px auto 6px;
  overflow: visible;
}
.divider path { stroke: var(--amber-dim); }
.divider circle { fill: var(--amber); }

/* ============ TIJDLIJN ============ */
.tijdlijn {
  position: relative;
  max-width: 660px;
  margin: 0 auto;
  padding: 10px 16px 40px;
}
/* contourlijnen-achtergrond (inline SVG data-URI, geen extern asset) */
.tijdlijn-sectie {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23475a48' stroke-width='1' opacity='0.10'%3E%3Cpath d='M-20,80 Q90,20 210,70 T440,60'/%3E%3Cpath d='M-20,120 Q100,60 210,110 T440,100'/%3E%3Cpath d='M-20,160 Q110,105 210,150 T440,145'/%3E%3Cpath d='M-20,290 Q120,230 230,280 T440,270'/%3E%3Cpath d='M-20,330 Q130,275 230,320 T440,315'/%3E%3Cpath d='M-20,370 Q140,320 230,360 T440,355'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
}
.tijdlijn::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 27px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--border-glow) 6%, var(--border-glow) 94%, transparent 100%);
}

.post-kaart, .preview-kaart {
  position: relative;
  margin: 22px 0 22px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 16px 14px;
  scroll-margin-top: 16px;
}
.tl-dot {
  position: absolute;
  left: -27px;
  top: 22px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--amber-dim);
  transform: translateX(-50%);
}
.preview-kaart .tl-dot { background: var(--text-dim); box-shadow: 0 0 0 1px var(--border-glow); }

.post-kop {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.datum-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--bg);
  background: var(--amber);
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}
.type-badge {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid;
}
.type-badge.is-gravel { color: var(--moss); border-color: var(--moss-dim); }
.type-badge.is-transit { color: var(--text-muted); border-color: var(--border-glow); }
.post-km {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-left: auto;
}
.post-titel {
  font-weight: 700;
  font-size: clamp(20px, 5.5vw, 26px);
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--text);
}
.van-naar {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-top: 3px;
  text-transform: uppercase;
}
.post-body {
  margin-top: 10px;
  color: var(--text);
  white-space: pre-line;
  font-size: 14.5px;
}
.post-illu, .preview-illu {
  margin-top: 12px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  line-height: 0;
}
.region-illu { width: 100%; height: auto; display: block; }

/* Fotogrid */
.fotogrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}
.fotogrid.is-enkel { grid-template-columns: 1fr; }
.foto-tegel {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  padding: 0;
  background: var(--surface-2);
  cursor: pointer;
}
.fotogrid.is-enkel .foto-tegel { aspect-ratio: 3 / 2; }
.foto-tegel img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.plus-tegel img { filter: brightness(0.35); }
.plus-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--amber-bright);
  letter-spacing: 0.05em;
}

/* Lichtbak */
.lichtbak {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 8, 0.93);
  padding: 20px;
  cursor: zoom-out;
}
.lichtbak.is-open { display: flex; }
.lichtbak img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 6px;
  border: 1px solid var(--border-glow);
  position: relative;
  z-index: 1;
  pointer-events: none; /* tikken gaat naar de zones eronder */
}
/* Video moet wél klikbaar blijven: de bediening zit erin. */
#lichtbak-video {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 6px;
  border: 1px solid var(--border-glow);
  position: relative;
  z-index: 3;
  background: #000;
}

/* Videotegel in de tijdlijn: stil voorbeeld met een play-teken erover */
.foto-tegel video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.foto-tegel .speel-teken {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(12, 18, 14, 0.72);
  border: 1px solid var(--amber-dim);
  color: var(--amber-bright);
  font-size: 15px;
  padding-left: 3px;
  pointer-events: none;
}

/* Voortgangsbalkjes bovenin, één per foto */
.lb-balken {
  position: absolute;
  top: 10px; left: 12px; right: 12px;
  display: flex;
  gap: 4px;
  z-index: 3;
}
.lb-balk {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(230, 226, 214, 0.25);
}
.lb-balk.is-gezien { background: var(--amber); }

/* Halve schermen om door te tikken; onzichtbaar, wel bedienbaar */
.lb-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 38%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.lb-links { left: 0; }
.lb-rechts { right: 0; }
.lb-zone:focus-visible { outline: 2px solid var(--amber); outline-offset: -6px; }

.lb-sluit {
  position: absolute;
  top: 20px; right: 16px;
  z-index: 4;
  background: rgba(12, 18, 14, 0.75);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 14px;
  cursor: pointer;
}
.lb-sluit:hover { border-color: var(--amber); color: var(--amber); }

.lb-teller {
  position: absolute;
  bottom: 16px; left: 0; right: 0;
  text-align: center;
  z-index: 3;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  pointer-events: none;
}

/* Countdown */
.countdown {
  text-align: center;
  margin: 26px 0 10px 34px;
}
.countdown-getal {
  font-weight: 900;
  font-size: clamp(64px, 22vw, 120px);
  line-height: 0.9;
  color: var(--amber);
}
.countdown-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Preview-kaarten (pre-trip) */
.preview-kaart { padding: 0 0 14px; overflow: hidden; }
.preview-illu { margin-top: 0; border: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.preview-inhoud { padding: 12px 16px 0; }
.preview-kaart .post-titel { font-size: clamp(17px, 4.5vw, 21px); }

/* Voorbereiding (geen data) */
.voorbereiding {
  margin-left: 34px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.voorbereiding h3 {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.06em;
  margin: 18px 16px 6px;
  color: var(--amber);
}
.voorbereiding p {
  color: var(--text-muted);
  margin: 0 20px 18px;
  font-size: 14px;
}
.voorbereiding-illu { line-height: 0; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  text-align: center;
  background: var(--surface);
}
.kompas { display: block; margin: 0 auto 12px; opacity: 0.85; }
.footer-tekst {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.footer-tekst a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-dim);
}
.footer-tekst a:hover { color: var(--amber); border-color: var(--amber); }

/* ============ HERO: knop naar laatste update ============ */
.hero-knop {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber-bright);
  background: rgba(12, 18, 14, 0.88);
  border: 1px solid var(--amber-dim);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.hero-knop:hover { background: rgba(29, 38, 32, 0.95); color: var(--text); border-color: var(--amber); }

/* ============ INTRO: de bemanning ============ */
.bemanning {
  max-width: 660px;
  margin: 0 auto;
  padding: 26px 16px 8px;
}
.bemanning-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
}
.bemanning-kaart {
  position: relative;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bemanning-kaart:first-of-type { margin-top: 18px; }
.bemanning-foto {
  display: block; width: 100%;
  padding: 0; border: none;
  background: var(--surface-2);
  cursor: zoom-in;
  position: relative;
  line-height: 0;
}
.bemanning-foto img {
  display: block; width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.bemanning-foto.is-4x3 img { aspect-ratio: 4 / 3; }
.bemanning-label {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(11px, 2.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-bright);
  background: rgba(12, 18, 14, 0.82);
  border: 1px solid var(--amber-dim);
  border-radius: 4px;
  padding: 5px 9px;
  line-height: 1.4;
}
.bemanning-pijl {
  position: absolute;
  overflow: visible;
}
.bemanning-pijl path {
  fill: none;
  stroke: var(--amber-bright);
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.bemanning-pijl .pijl-lijn { stroke-dasharray: 260; }
@keyframes arrow-draw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .bemanning-pijl .pijl-lijn { animation: arrow-draw 1.1s ease-out both; }
  .bemanning-pijl.is-2 .pijl-lijn { animation-delay: 0.4s; }
  .bemanning-pijl.is-3 .pijl-lijn { animation-delay: 0.8s; }
}
.bemanning-bijschrift {
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
.bemanning-slot {
  text-align: center;
  padding: 30px 10px 6px;
}
.bemanning-slot h2 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}
.bemanning-slot h2 .accent { color: var(--amber); }
.bemanning-slot p {
  margin: 12px auto 0;
  max-width: 480px;
  color: var(--text-muted);
  font-size: 14.5px;
  text-wrap: pretty;
}

/* ============ PROLOOG-POST ============ */
.proloog-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--amber);
  padding: 3px 8px;
  border-radius: 3px;
}
.proloog-grid { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 12px; }
.proloog-grid.is-duo { grid-template-columns: 1fr 1fr; margin-top: 6px; }
.proloog-grid .foto-tegel { aspect-ratio: 3 / 2; }
.proloog-grid.is-duo .foto-tegel { aspect-ratio: 4 / 3; }

/* ============ REACTIES & LIKES ============ */
.reactie-blok {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.reactie-acties {
  display: flex;
  gap: 10px;
  align-items: center;
}
.like-knop, .reageer-knop, .reactie-verstuur {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.like-knop:hover, .reageer-knop:hover, .reactie-verstuur:hover {
  color: var(--text);
  border-color: var(--border-glow);
}
.like-knop.is-geliked {
  color: var(--amber);
  border-color: var(--amber-dim);
}
.reactie-verstuur:disabled { opacity: 0.6; cursor: default; }

.reacties { margin-top: 10px; }
.reactie-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
  margin-top: 8px;
}
.reactie-kop {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.reactie-naam {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}
.reactie-tijd {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap;
}
.reactie-tekst {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: break-word;
}

.reactie-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.reactie-naam-veld, .reactie-tekst-veld {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
}
.reactie-naam-veld:focus, .reactie-tekst-veld:focus {
  outline: none;
  border-color: var(--amber-dim);
}
.reactie-tekst-veld { resize: vertical; min-height: 64px; }
.reactie-verstuur { align-self: flex-start; }
.reactie-fout {
  font-size: 13px;
  color: var(--rust);
}
/* Honeypot: buiten beeld, niet display:none — sommige bots slaan dat over */
.hp-veld {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ============ FADE-IN ============ */
.fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade.is-zichtbaar { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ BREDER SCHERM ============ */
@media (min-width: 700px) {
  .hero { height: min(64vh, 620px); }
  .fotogrid { gap: 8px; }
  .tijdlijn { padding: 16px 20px 56px; }
  .statsrow { grid-template-columns: repeat(6, 1fr); }
}
