/* Kerstrun Wiekevorst - a winter-night theme: deep blue, warm gold lights, Christmas red. */

:root {
  --night-900: #08131f;
  --night-800: #0d1b2a;
  --night-700: #132a40;
  --night-600: #1c3a57;
  --snow: #f4f7fb;
  --muted: #a9b8c9;
  --gold: #f2c14e;
  --gold-soft: #f7d98b;
  --red: #d62839;
  --red-dark: #a51c2a;
  --green: #2a9d6f;
  --radius: 14px;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  --max: 1120px;
  --header-h: 68px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--snow);
  background: var(--night-800);
  background-image: radial-gradient(1200px 600px at 80% -10%, #1d3b5c 0%, transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--gold); color: var(--night-900); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 16px; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 900;
  height: var(--header-h);
  background: rgb(8 19 31 / 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--snow); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.brand:hover { color: var(--snow); }
.brand img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

.nav-toggle {
  display: none; background: none; border: 1px solid rgb(255 255 255 / 0.2); color: var(--snow);
  border-radius: 10px; padding: 8px 10px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px; color: var(--snow); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.site-nav a:hover { background: rgb(255 255 255 / 0.07); color: var(--snow); }
.site-nav a[aria-current="page"] { background: rgb(242 193 78 / 0.14); color: var(--gold); }
.site-nav a.nav-live { background: var(--red); color: #fff; display: flex; align-items: center; gap: 8px; }
.site-nav a.nav-live:hover { background: var(--red-dark); }
.site-nav a.nav-live[aria-current="page"] { box-shadow: 0 0 0 2px var(--gold) inset; }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--night-900); border-bottom: 1px solid rgb(255 255 255 / 0.08);
    display: none; padding: 12px 16px 20px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 16px; border-radius: 10px; }
}

/* ------------------------------------------------------------ string lights */

.lights {
  height: 26px; overflow: hidden; pointer-events: none;
  display: flex; justify-content: space-around; padding: 0 8px;
  background:
    radial-gradient(ellipse 60% 14px at 50% 0, transparent 70%, rgb(255 255 255 / 0.15) 72%, transparent 76%) 0 0 / 80px 26px repeat-x;
}
.lights span { width: 9px; height: 14px; border-radius: 50% 50% 45% 45%; margin-top: 9px; animation: twinkle 2.4s ease-in-out infinite; }
.lights span:nth-child(4n+1) { background: var(--red); color: var(--red); }
.lights span:nth-child(4n+2) { background: var(--gold); color: var(--gold); animation-delay: 0.6s; }
.lights span:nth-child(4n+3) { background: var(--green); color: var(--green); animation-delay: 1.2s; }
.lights span:nth-child(4n)   { background: #6ec1ff; color: #6ec1ff; animation-delay: 1.8s; }
.lights span { box-shadow: 0 0 10px 2px currentColor; }

@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

/* ------------------------------------------------------------ hero */

.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero h1 span { color: var(--gold); }
.hero-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 30px; font-weight: 500; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 20px; height: 20px; color: var(--gold); }

#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-family: inherit; transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: rgb(255 255 255 / 0.3); color: var(--snow); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }

/* ------------------------------------------------------------ countdown */

.countdown { display: flex; gap: 12px; margin: 0 0 32px; }
.countdown div {
  min-width: 78px; padding: 12px 10px; text-align: center; border-radius: 12px;
  background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.1);
}
.countdown strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.countdown-done { font-size: 1.2rem; color: var(--gold); font-weight: 600; margin: 0 0 32px; }

@media (max-width: 420px) {
  .countdown { gap: 8px; }
  .countdown div { min-width: 0; flex: 1; padding: 10px 4px; }
  .countdown strong { font-size: 1.6rem; }
}

/* ------------------------------------------------------------ sections & cards */

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-alt { background: rgb(0 0 0 / 0.18); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

.page-hero { padding: clamp(40px, 7vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-hero p { color: var(--muted); max-width: 60ch; font-size: 1.15rem; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.025));
  border: 1px solid rgb(255 255 255 / 0.09); border-radius: var(--radius); padding: 26px;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: rgb(242 193 78 / 0.12); color: var(--gold); }
.card-icon svg { width: 24px; height: 24px; }

.callout {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: linear-gradient(120deg, var(--red-dark), var(--red) 60%, #e85d4a);
  border-radius: calc(var(--radius) + 6px); padding: clamp(28px, 5vw, 48px); box-shadow: var(--shadow);
}
.callout h2 { margin-bottom: 0.3em; }
.callout p { margin: 0; color: rgb(255 255 255 / 0.88); }
.callout .btn { background: #fff; color: var(--red-dark); }
.callout .btn:hover { background: var(--snow); color: var(--red-dark); }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ timeline (programma) */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 110px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--gold), var(--red)); opacity: 0.5; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 32px; padding: 14px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 104px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.timeline time { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--gold); padding-top: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.timeline .card { padding: 18px 22px; }
.timeline h3 { margin-bottom: 0.25em; }
.timeline li.highlight .card { border-color: rgb(214 40 57 / 0.6); background: rgb(214 40 57 / 0.12); }

@media (max-width: 560px) {
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; padding-left: 32px; }
  .timeline li::before { left: 1px; top: 22px; }
  .timeline time { text-align: left; padding-top: 0; }
}

/* ------------------------------------------------------------ FAQ & info */

.faq details { border-bottom: 1px solid rgb(255 255 255 / 0.1); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; color: var(--gold); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 36px; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 10px 0; border-bottom: 1px dashed rgb(255 255 255 / 0.12); display: flex; gap: 12px; }
.info-list li:last-child { border-bottom: 0; }
.info-list strong { min-width: 120px; color: var(--snow); }
.info-list span { color: var(--muted); }

/* ------------------------------------------------------------ sponsors */

.sponsor-tier { margin-bottom: 44px; }
.sponsor-tier h3 { color: var(--gold); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px; }
.sponsor-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sponsor-grid.large { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sponsor {
  aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 18px; text-align: center;
  border-radius: 12px; background: rgb(255 255 255 / 0.95); color: var(--night-800); font-weight: 700; text-decoration: none;
}
.sponsor:hover { color: var(--night-800); outline: 3px solid var(--gold); }

/* ------------------------------------------------------------ live page */

.live-layout { position: relative; height: calc(100dvh - var(--header-h)); min-height: 480px; }
#map { position: absolute; inset: 0; background: var(--night-700); }

.live-panel {
  position: absolute; z-index: 500; top: 16px; left: 16px; width: 340px; max-width: calc(100% - 32px);
  background: rgb(8 19 31 / 0.92); backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 0.1); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.live-panel h1 { font-size: 1.5rem; margin-bottom: 10px; }
.live-panel p { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.live-panel .btn-row { gap: 8px; }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-live { background: rgb(42 157 111 / 0.18); color: #5fdba5; }
.status-live::before { animation: pulse 1.6s ease-in-out infinite; }
.status-stale { background: rgb(242 193 78 / 0.16); color: var(--gold); }
.status-waiting { background: rgb(255 255 255 / 0.08); color: var(--muted); }
.status-error { background: rgb(214 40 57 / 0.2); color: #ff8a95; }

.live-facts { list-style: none; padding: 0; margin: 0 0 16px; font-size: 0.93rem; }
.live-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
.live-facts li:last-child { border-bottom: 0; }
.live-facts span { color: var(--muted); }
.live-facts strong { font-variant-numeric: tabular-nums; text-align: right; }

.legend { display: flex; gap: 16px; font-size: 0.82rem; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 3px solid; }
.legend .l-route { border-top-style: dashed; border-color: var(--gold); }
.legend .l-trail { border-color: var(--red); }

.panel-toggle { display: none; }

@media (max-width: 640px) {
  .live-panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-width: none; padding: 16px; max-height: 55%; overflow: auto; }
  .live-panel.collapsed .panel-body { display: none; }
  .live-panel h1 { font-size: 1.2rem; margin: 0; }
  .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .panel-toggle { display: block; background: none; border: 1px solid rgb(255 255 255 / 0.2); color: var(--snow); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 0.85rem; cursor: pointer; }
  .live-panel .status { margin: 10px 0; }
}

/* Leaflet markers */
.parade-marker { position: relative; }
.parade-marker .dot {
  position: absolute; inset: 0; border-radius: 50%; background: var(--red); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgb(214 40 57 / 0.7); animation: ring 2s infinite; display: grid; place-items: center; font-size: 16px;
}
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(214 40 57 / 0.6); } 70% { box-shadow: 0 0 0 18px rgb(214 40 57 / 0); } 100% { box-shadow: 0 0 0 0 rgb(214 40 57 / 0); } }
.me-marker { width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(59 130 246 / 0.25); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content { color: var(--night-800); }

/* ------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid rgb(255 255 255 / 0.07); background: var(--night-900); padding: 40px 0 28px; color: var(--muted); font-size: 0.93rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr; margin-bottom: 28px; }
.footer-grid h4 { color: var(--snow); margin: 0 0 10px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 0.07); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ misc */

.center { text-align: center; }
.pt-0 { padding-top: 0; }
.mx-auto { margin-inline: auto; }
.justify-center { justify-content: center; }
.mt { margin-top: 32px; }
.two-col { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
