/* Volg Johnny — kleuren uit de Zeeuwse polder, oranje voor de route */
:root {
  --zee: #123B46;        /* diep Oosterschelde-blauw: tekst, fietscomputer */
  --zee-licht: #2A5662;
  --slik: #E7ECE8;       /* licht slikgrijs: achtergrond */
  --wit: #FFFFFF;
  --route: #F0561D;      /* route-oranje, ook in het icoon */
  --dijk: #5F8F45;       /* dijkgras: live */
  --grijs: #56686C;      /* secundaire tekst */

  --kop: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --tekst: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --breed: 1180px;
  --rand: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--slik);
  color: var(--zee);
  font-family: var(--tekst);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.binnen { max-width: var(--breed); margin: 0 auto; padding-left: var(--rand); padding-right: var(--rand); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--zee); color: var(--wit); padding: 8px 14px; border-radius: 6px; z-index: 3000; }
.skip:focus { left: 8px; }

/* ---------- Bovenbalk ---------- */
.balk { padding-top: env(safe-area-inset-top); }
.balk__rij { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.merk { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--kop); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.merk img { border-radius: 9px; }
.menu { display: flex; gap: 22px; }
.menu a { text-decoration: none; font-weight: 500; font-size: 16px; color: var(--zee-licht); padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--route); color: var(--zee); }

/* ---------- Kop met status ---------- */
.kop { padding-top: clamp(18px, 5vw, 48px); padding-bottom: clamp(18px, 3vw, 28px); }
.kop h1 {
  margin: 0;
  font-family: var(--kop);
  font-weight: 700;
  font-size: clamp(52px, 11vw, 132px);
  line-height: .9;
  letter-spacing: -.01em;
  max-width: 14ch;
}
.status { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-weight: 500; color: var(--grijs); }
.status__stip { width: 11px; height: 11px; border-radius: 50%; background: #A9B6B8; flex: none; position: relative; }
.status[data-staat="live"] { color: var(--dijk); }
.status[data-staat="live"] .status__stip { background: var(--dijk); }
.status[data-staat="live"] .status__stip::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--dijk); animation: puls 2s ease-out infinite;
}
.status[data-staat="stil"] .status__stip { background: var(--route); }
@keyframes puls { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status__stip::after { animation: none !important; display: none; } }

/* ---------- Kaart + fietscomputer ---------- */
.live { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }

.kaart-kader { position: relative; border-radius: 20px; overflow: hidden; background: #D5DDD9; min-height: 460px; height: 62vh; max-height: 640px; }
#kaart { position: absolute; inset: 0; }
.leaflet-container { font-family: var(--tekst); background: #D5DDD9; }
.leaflet-control-attribution { font-size: 11px; }
/* kaart iets rustiger, zodat de oranje route eruit springt */
.leaflet-tile-pane { filter: saturate(.55) contrast(.92) brightness(1.03); }

.centreer {
  position: absolute; left: 16px; bottom: 16px; z-index: 500;
  font: 600 15px var(--tekst); color: var(--zee); background: var(--wit);
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(18, 59, 70, .25), 0 4px 14px rgba(18, 59, 70, .15);
}
.centreer:hover { background: var(--slik); }

.positie { width: 22px; height: 22px; border-radius: 50%; background: var(--route); border: 4px solid var(--wit); box-shadow: 0 0 0 1px rgba(18,59,70,.3), 0 2px 8px rgba(18,59,70,.35); }
.positie--laatst { background: var(--zee); }

/* De fietscomputer: het ene opvallende element */
.computer {
  background: var(--zee);
  color: var(--wit);
  border-radius: 20px;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 6px solid #0C2C35;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.computer dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.computer__veld { border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.computer__veld--groot { grid-column: 1 / -1; border-top: 0; padding-top: 0; }
.computer dt { font-size: 14px; color: #A9C3C8; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.computer dd { white-space: nowrap; }
.computer dd { margin: 2px 0 0; font-family: var(--kop); font-weight: 600; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.computer__veld--groot dd { font-size: 104px; font-weight: 700; color: var(--route); letter-spacing: -.01em; }
.computer dd small { font-family: var(--tekst); font-size: 14px; font-weight: 500; color: #A9C3C8; margin-left: 6px; }
.computer__voet { margin: 18px 0 0; font-size: 13px; color: #A9C3C8; line-height: 1.4; }

/* ---------- Ritten (logboek) ---------- */
.ritten { padding-top: clamp(56px, 9vw, 96px); }
.ritten h2, .telefoon h2 { font-family: var(--kop); font-weight: 700; font-size: clamp(34px, 5vw, 52px); line-height: 1; margin: 0 0 10px; }
.rittenlijst { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--zee); max-width: 900px; }
.rittenlijst > li { border-bottom: 1px solid #C9D3CF; }
.rittenlijst__leeg { padding: 22px 0; color: var(--grijs); }
.rit {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 16px 8px 16px 0; text-decoration: none; color: var(--zee);
}
.rit:hover .rit__datum { text-decoration: underline; text-decoration-color: var(--route); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rit__vorm { width: 76px; height: 76px; background: var(--wit); border-radius: 12px; display: block; }
.rit__vorm path { fill: none; stroke: var(--route); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.rit__datum { font-family: var(--kop); font-weight: 600; font-size: 26px; line-height: 1.1; display: block; }
.rit__meer { color: var(--grijs); font-size: 15px; display: block; margin-top: 2px; }
.rit__km { font-family: var(--kop); font-weight: 700; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.rit__km small { font-family: var(--tekst); font-weight: 500; font-size: 14px; color: var(--grijs); margin-left: 4px; }
.rit__label { display: inline-block; margin-left: 8px; font-family: var(--tekst); font-size: 13px; font-weight: 600; color: var(--wit); background: var(--dijk); padding: 1px 8px; border-radius: 999px; vertical-align: 4px; }

/* ---------- Ritpagina ---------- */
.terug { display: inline-block; margin-bottom: 14px; font-weight: 500; color: var(--zee-licht); text-decoration: none; }
.terug:hover { text-decoration: underline; }
.kop--rit h1 { font-size: clamp(44px, 8vw, 96px); max-width: 18ch; }

/* ---------- Telefoon ---------- */
.telefoon { padding-top: clamp(56px, 9vw, 96px); padding-bottom: clamp(48px, 7vw, 80px); }
.inleiding { margin: 0 0 28px; max-width: 52ch; color: var(--grijs); font-size: 18px; }
.stappen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; max-width: 820px; }
.stappen h3 { font-family: var(--kop); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.stappen p { margin: 0; max-width: 40ch; }
.stappen > div { border-left: 4px solid var(--route); padding-left: 16px; }

/* ---------- Voet ---------- */
.voet { border-top: 1px solid #CBD5D1; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); color: var(--grijs); font-size: 14px; }
.voet p { margin: 0; }

/* ---------- Mobiel ---------- */
@media (max-width: 860px) {
  .live { grid-template-columns: 1fr; }
  .kaart-kader { height: 56vh; min-height: 340px; }
  .computer dl { grid-template-columns: repeat(3, 1fr); }
  .computer__veld--groot dd { font-size: 72px; }
  .computer dd { font-size: 32px; }
}
@media (max-width: 560px) {
  .computer dl { gap: 16px 14px; }
  .computer dt { font-size: 13px; }
  .computer dd small { font-size: 12px; margin-left: 3px; }
  .menu a[href="#telefoon"] { display: none; }
  .rit { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; }
  .rit__vorm { width: 56px; height: 56px; }
  .rit__datum { font-size: 21px; }
  .rit__km { font-size: 34px; }
  .stappen { grid-template-columns: 1fr; gap: 22px; }
  .computer { padding: 18px 16px 14px; }
  .computer dd { font-size: 30px; }
  .computer__veld--groot dd { font-size: 68px; }
}
