/* ==========================================================================
   Platform pages – start page and quest pages
   ========================================================================== */

/* ---- Hero variants -------------------------------------------------------- */

.join-panel {
  --n: 2px;
  display: grid;
  gap: 12px;
  width: min(100%, 540px);
  margin-top: 38px;
  padding: 18px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(14, 31, 92, 0.74), rgba(7, 19, 53, 0.74)) padding-box,
    linear-gradient(180deg, rgba(141, 180, 255, 0.42), rgba(141, 180, 255, 0.08)) border-box;
  border: 2px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.join-panel__row { display: flex; gap: 12px; }
.join-panel__row .btn { flex: 1; height: auto; }
.join-panel__hint { font-size: 0.8125rem; color: var(--text-dim); }
.join-panel__hint b {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.hero__panel {
  display: grid;
  justify-items: center;
  gap: 24px;
  margin-top: 34px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---- Featured quest ------------------------------------------------------- */

.featured { padding-top: clamp(80px, 11vw, 150px); }
.quest-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  overflow: hidden;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(20, 42, 118, 0.45), rgba(6, 16, 48, 0.7));
  box-shadow: 0 50px 120px -60px rgba(47, 107, 255, 0.7), inset 0 1px 0 rgba(185, 209, 255, 0.12);
}
.quest-card__scene {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 72%, rgba(92, 143, 255, 0.4), transparent 70%),
    linear-gradient(180deg, #030a22, #0f2a78);
}
.world__lights .px-W { filter: drop-shadow(0 0 3px #fff); }

/* Kerst in Zwolle diorama (components/zwolle-scene.js) */
.zscene { position: absolute; inset: 0; width: 100%; height: 100%; }
.zscene__skyline { --px-D: #1d3a8f; --px-K: #06112f; --px-L: #6f8fd8; }
.zscene .zw-peperbus { --px-N: #15307d; --px-K: #0b1d57; --px-D: #3358bd; } /* floodlit */
.zscene__moon { filter: drop-shadow(0 0 4px rgba(185, 209, 255, 0.6)); }
.zscene__skyline .px-alt { animation: window 12s steps(1) infinite; animation-delay: calc(var(--i) * -0.83s); }
.zscene .zw-peperbus .px-W,
.zscene .zw-mill__sails .px-W,
.zscene__lamp .px-W { filter: drop-shadow(0 0 1px #fff); }
.zscene__tree { filter: drop-shadow(0 0 4px rgba(185, 209, 255, 0.45)); }
.zscene__tree .px-alt { animation: bulb 1.8s steps(1) infinite; animation-delay: calc(var(--i) * -0.37s); }
.zscene__star {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: sparkle 4.5s var(--ease-out) 1s infinite;
}
.zscene__bulb { fill: var(--q-white); animation: bulb 2.4s steps(1) var(--d) infinite; }
.zscene__wire { fill: var(--q-navy-850); }
.zscene__street { fill: #a9c4f5; }
.zscene__snow { fill: #e3edff; }
.zscene__wall { fill: #0c1d55; }
.zscene__bricks rect { fill: #081640; }
.zscene__ice { fill: #11296f; }
.zscene__ice-edge { fill: #3a5cb4; }
.zscene__glint { animation: ripple 3.2s steps(1) var(--d) infinite; }
.zscene__glint--white { fill: var(--q-blue-100); }
.zscene__glint--blue { fill: var(--q-blue-400); }
.zscene__fleck { fill: #1d3a8f; }
.zscene__skater .px-alt { animation: eye-blink 4.8s steps(1) infinite; }
.quest-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: clamp(28px, 4.5vw, 56px);
}
.quest-card__title {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.quest-card__text {
  max-width: 30rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
}
.quest-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---- How it works --------------------------------------------------------- */

.how__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.how__steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 23px;
  right: calc((100% - 84px) / 4 - 23px); /* ends at the last node */
  height: 2px;
  background-image: linear-gradient(90deg, var(--q-blue-300) 50%, transparent 50%);
  background-size: 8px 2px;
  opacity: 0.55;
  scale: 0 1;
  transform-origin: left center;
  transition: scale 1.6s steps(24) 200ms;
}
.how__steps.is-revealed::before { scale: 1 1; }
.how__step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
}
html.js .how__step {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 800ms var(--ease-out), translate 1s var(--ease-out);
}
html.js .how__steps.is-revealed .how__step { opacity: 1; translate: 0 0; }
.how__step:nth-child(2) { transition-delay: 400ms; }
.how__step:nth-child(3) { transition-delay: 800ms; }
.how__step:nth-child(4) { transition-delay: 1200ms; }
.how__node {
  --n: 3px;
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  font-family: var(--font-pixel);
  font-size: 0.875rem;
  color: var(--q-white);
  background: linear-gradient(180deg, var(--q-blue-400), var(--q-blue-500));
  box-shadow: inset 0 -3px 0 rgba(10, 26, 74, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.how__node--goal {
  --u: 3px;
  background: var(--q-navy-900);
  box-shadow: inset 0 0 0 2px var(--q-blue-400), inset 0 0 18px rgba(47, 107, 255, 0.45);
}
.how__step h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
.how__step p { font-size: 0.9375rem; color: var(--text-muted); }

/* ---- Stop demo ------------------------------------------------------------ */

.stop-demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(44px, 6vw, 100px);
  align-items: center;
}
.stop-demo__copy { display: grid; justify-items: start; gap: 22px; }
.types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.types li {
  --u: 2.2px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(20, 42, 118, 0.28);
  border: 1px solid var(--line);
}
.types li > span:first-child { display: grid; place-items: center; width: 30px; flex: none; }
.types li > span:last-child { font-size: 0.875rem; line-height: 1.4; color: var(--text-muted); }
.types b { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.types .px-alt { animation: blink 1s steps(1) infinite; }

/* ---- FAQ ------------------------------------------------------------------ */

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq .section-head { margin-bottom: 0; }
.faq__list { display: grid; gap: 10px; }
.faq__item {
  border-radius: 16px;
  background: rgba(20, 42, 118, 0.24);
  border: 1px solid var(--line);
  transition: border-color 300ms var(--ease-out), background-color 300ms var(--ease-out);
  interpolate-size: allow-keywords;
}
.faq__item[open] { border-color: var(--line-strong); background: rgba(20, 42, 118, 0.38); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background:
    linear-gradient(var(--q-blue-300), var(--q-blue-300)) center / 12px 2px no-repeat,
    linear-gradient(var(--q-blue-300), var(--q-blue-300)) center / 2px 12px no-repeat;
  transition: rotate 300ms steps(2);
}
.faq__item[open] summary::after { rotate: 45deg; }
.faq__item summary:focus-visible { outline-offset: -2px; border-radius: 16px; }
.faq__item p { padding: 0 22px 20px; color: var(--text-muted); }
.faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 450ms var(--ease-out), content-visibility 450ms allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }

/* ==========================================================================
   Winter theme – Lichtjestocht
   ========================================================================== */

.hero--winter {
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(92, 143, 255, 0.42) 0%, rgba(92, 143, 255, 0) 62%),
    linear-gradient(180deg, #020716 0%, #04102e 45%, #10307e 100%);
}
.hero--winter .hero__title {
  max-width: none;
  font-size: clamp(2.75rem, 0.9rem + 6vw, 6.25rem);
}
.hero--winter .hero__lead { max-width: 38rem; }

.world--winter .world__far { fill: #122c74; }
.world__skyline { --px-N: #112a70; --px-K: #0c2263; --px-D: #1f3f98; --px-L: #6f8fd8; --px-S: #b9d1ff; }
.world__skyline .zw-peperbus { --px-N: #1a3585; --px-K: #12296e; --px-D: #3358bd; } /* floodlit */
.world__skyline .px-alt { animation: window 12s steps(1) infinite; animation-delay: calc(var(--i) * -0.83s); }
.world__skyline .zw-peperbus .px-W,
.world__skyline .zw-mill__sails .px-W { filter: drop-shadow(0 0 1px #fff); }
.world--winter .world__snow { opacity: 0.78; }
.world--winter .world__hills { fill: #1c3a8c; }
.world--winter .world__trees { opacity: 1; }
.world--winter .world__trees .px-alt { animation: bulb 2s steps(1) infinite; animation-delay: calc(var(--i) * -0.41s); }
.world--winter .world__ground { fill: #5575c8; }
.world--winter .world__edge { fill: #a9c4f5; }
.world--winter .world__texture rect { fill: #7d9be0; opacity: 0.8; }
.world--winter .world__tufts rect { fill: #c6d8ff; }
.world--winter .world__route { stroke: var(--q-blue-100); opacity: 0.75; }
.world--winter .world__route--visited { stroke: var(--q-white); opacity: 1; }
.world__wire { fill: var(--q-navy-850); opacity: 0.7; }
.world__bulb { fill: var(--q-white); animation: bulb 2.4s steps(1) var(--d) infinite; }

/* Light sculptures are dark until the explorer reaches them */
.world--winter .world__cp-inner rect { fill: #2f4fa3; }
.world--winter .world__cp-inner.is-hit { filter: url(#qw-glow); }
.world--winter .world__cp-inner.is-hit .px-W { fill: var(--px-W); }
.world--winter .world__cp-inner.is-hit .px-S { fill: var(--px-S); }
.world--winter .world__cp-inner.is-hit .px-D { fill: var(--px-D); }
.world--winter .world__chest-inner .px-alt { animation: bulb 1.6s steps(1) infinite; animation-delay: calc(var(--i) * -0.3s); }

/* ---- Route teaser --------------------------------------------------------- */

.route-teaser__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(44px, 6vw, 100px);
  align-items: center;
}
.route-teaser__copy { display: grid; justify-items: start; gap: 22px; }
.known,
.pack {
  display: grid;
  gap: 13px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.known li,
.pack li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 500;
}
.known__check,
.pack__box {
  --n: 2px;
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  background: var(--q-blue-500);
}
/* Pixel check mark drawn with box-shadows, 3px per pixel */
.known__check::after,
.pack__box::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 10px;
  width: 3px;
  height: 3px;
  background: var(--q-white);
  box-shadow: 3px 3px var(--q-white), 6px 0 var(--q-white), 9px -3px var(--q-white), 12px -6px var(--q-white);
}
.known .is-pending { color: var(--text-muted); }
.known .is-pending .known__check { background: transparent; box-shadow: inset 0 0 0 2px var(--line-strong); }
.known .is-pending .known__check::after { display: none; }

/* Route map (components/route-map.js) */
.route-board { display: grid; gap: 16px; }
.route-board .board__hud { --u: 1.6px; }
.route-board__map { position: absolute; inset: 0; background: var(--q-navy-950); font: inherit; }
.route-board__map.is-off { display: grid; place-items: center; padding: 20px; text-align: center; font-size: 0.875rem; color: var(--text-dim); }
.route-board__map .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(0.85) saturate(0.55) contrast(0.9); }
.route-board__map .leaflet-control-attribution { background: rgba(2, 7, 22, 0.7); color: var(--text-dim); font-size: 10px; }
.route-board__map .leaflet-control-attribution a { color: var(--q-blue-300); }
.route-board__map .leaflet-bar a { background: var(--q-navy-850); color: var(--text); border-color: var(--line); }
.route-board__map .leaflet-tooltip { background: var(--q-navy-850); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; font: 500 12px var(--font-sans); }
.route-board__map .leaflet-tooltip-top::before { border-top-color: var(--q-navy-850); }
.route-pin span {
  position: absolute;
  left: -12px;
  top: -12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--q-white);
  background: var(--q-blue-500);
  box-shadow: 0 0 0 2px var(--q-white), 0 0 14px rgba(92, 143, 255, 0.9);
}
.route-pin--start span { color: var(--q-navy-900); background: var(--q-white); box-shadow: 0 0 0 2px var(--q-blue-500), 0 0 16px rgba(185, 209, 255, 0.9); }
.route-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.route-stops li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(20, 42, 118, 0.35);
  border: 1px solid var(--line);
}
.route-stops li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-family: var(--font-pixel);
  font-size: 0.5625rem;
  color: var(--q-white);
  background: var(--q-blue-500);
}
.route-stops li:first-child span { color: var(--q-navy-900); background: var(--q-white); }
.route-note { font-size: 0.8125rem; color: var(--text-dim); }

/* ---- Assignment grid ------------------------------------------------------ */

.assign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Team & packing ------------------------------------------------------- */

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(26px, 3.5vw, 44px);
  border-radius: var(--radius-l);
  background: linear-gradient(180deg, rgba(20, 42, 118, 0.38), rgba(8, 20, 58, 0.45));
  border: 1px solid var(--line);
}
.panel__icon { --u: 3px; margin-bottom: 6px; }
.panel__title {
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  letter-spacing: -0.04em;
}
.panel__text { color: var(--text-muted); }
.panel__steps {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.panel__steps li { display: flex; align-items: center; gap: 13px; font-weight: 500; }
.panel__steps li > span {
  --n: 2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  color: var(--q-blue-200);
  background: rgba(47, 107, 255, 0.14);
  box-shadow: inset 0 0 0 2px rgba(92, 143, 255, 0.35);
}
html.js .pack__box { background: transparent; box-shadow: inset 0 0 0 2px var(--q-blue-300); transition: background-color 200ms steps(2); }
html.js .pack__box::after { opacity: 0; transition: opacity 200ms steps(2); }
html.js .pack.is-revealed .pack__box { background: var(--q-blue-500); box-shadow: none; }
html.js .pack.is-revealed .pack__box::after { opacity: 1; }
.pack li:nth-child(1) .pack__box,
.pack li:nth-child(1) .pack__box::after { transition-delay: 500ms; }
.pack li:nth-child(2) .pack__box,
.pack li:nth-child(2) .pack__box::after { transition-delay: 850ms; }
.pack li:nth-child(3) .pack__box,
.pack li:nth-child(3) .pack__box::after { transition-delay: 1200ms; }
.pack li:nth-child(4) .pack__box,
.pack li:nth-child(4) .pack__box::after { transition-delay: 1550ms; }

/* ---- Christmas CTA -------------------------------------------------------- */

.xmas-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(50% 60% at 50% 42%, rgba(47, 107, 255, 0.24), transparent 70%);
}
.xmas-cta .snow { z-index: 0; }
.xmas-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.xmas-cta h2 { font-size: var(--fs-h2); }
.xmas-cta__tree {
  --u: 11px;
  position: relative;
  margin-bottom: 8px;
  line-height: 0;
}
.xmas-cta__tree .px-alt { animation: bulb 1.8s steps(1) infinite; animation-delay: calc(var(--i) * -0.37s); }
.xmas-cta__tree svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 24px 40px rgba(2, 7, 22, 0.8));
  animation: float 5s var(--ease-in-out) infinite;
}
.xmas-cta__glow {
  position: absolute;
  inset: -70%;
  background: radial-gradient(circle, rgba(185, 209, 255, 0.34), transparent 58%);
  animation: glow-breathe 4s ease-in-out infinite;
}

/* ---- Resume banner (start/quest pages) ------------------------------------ */

.resume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 11px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--q-white);
  text-decoration: none;
  text-align: left;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(92, 143, 255, 0.5);
  transition: background-color 200ms;
}
.resume:hover { background: rgba(47, 107, 255, 0.32); }
.resume__text { flex: 1; }
.resume__go { font-weight: 700; transition: translate 300ms var(--ease-out); }
.resume:hover .resume__go { translate: 4px 0; }

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 960px) {
  .how__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .how__steps::before { display: none; }
  .stop-demo__grid,
  .route-teaser__grid,
  .faq__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .quest-card { grid-template-columns: 1fr; }
  .quest-card__scene { min-height: 0; aspect-ratio: 16 / 10; }
  .duo { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .join-panel { margin-top: 30px; padding: 14px; }
  .join-panel__row { flex-direction: column; }
  .join-panel__row .btn { flex: none; height: 52px; }
  .join-panel .code-input { width: 100%; }
  .join-panel .code-input__cells { justify-content: space-between; }
  .join-panel .code-input__cell { flex: 1; width: auto; max-width: 52px; height: 52px; }
  .hero__panel { margin-top: 26px; gap: 18px; }
  .hero__actions { width: 100%; flex-direction: column; }
  .quest-card__scene { aspect-ratio: 5 / 4; }
  .how__steps { grid-template-columns: 1fr; row-gap: 28px; }
  .types,
  .assign-grid { grid-template-columns: 1fr; }
  .xmas-cta__tree { --u: 8px; }
}
