:root {
  --page-bg: #070a08;
  --text: #ffffff;
  --panel: rgba(9, 13, 11, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: 1rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  color: #000;
  background: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 274px;
  padding: .75rem max(1rem, env(safe-area-inset-right)) .75rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  background: rgba(7, 10, 8, .98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.topbar-title {
  max-width: min(52vw, 590px);
  color: rgba(255, 255, 255, .84);
  font-size: clamp(.72rem, 1.25vw, .96rem);
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  width: min(310px, 48vw);
  flex-direction: column;
  align-items: stretch;
  gap: .42rem;
}

.info-shell {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.info-button,
.action-button,
.back-button,
.open-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 42px;
  padding: .62rem .9rem;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 850;
  line-height: 1.18;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.info-button { width: 100%; text-transform: lowercase; }
.info-button:hover,
.info-button:focus-visible,
.action-button:hover,
.action-button:focus-visible,
.back-button:hover,
.back-button:focus-visible,
.open-pdf-button:hover,
.open-pdf-button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, .15);
  border-color: #fff;
  transform: translateY(-1px);
}
.info-button svg { transition: rotate .2s ease; }
.info-button[aria-expanded="true"] svg { rotate: 180deg; }

.info-menu {
  position: absolute;
  top: 0;
  right: calc(100% + .7rem);
  width: min(360px, calc(100vw - 2rem));
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform-origin: right top;
  animation: menu-in .18s ease-out;
}
.info-menu[hidden] { display: none; }
.info-menu a {
  display: grid;
  gap: .15rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  line-height: 1.3;
  transition: background .18s ease, transform .18s ease;
}
.info-menu a + a { border-top: 1px solid rgba(255, 255, 255, .1); }
.info-menu a:hover,
.info-menu a:focus-visible {
  outline: none;
  background: var(--panel-soft);
  transform: translateX(-2px);
}
.info-menu strong { font-size: .98rem; }
.info-menu span { color: rgba(255, 255, 255, .68); font-size: .82rem; }

.page-shell {
  min-height: calc(100svh - 274px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at 50% 20%, rgba(58, 79, 69, .24), transparent 55rem), var(--page-bg);
}

.poster-stage {
  position: relative;
  width: min(100vw, calc((100svh - 274px) * 1.9434));
  max-width: 1920px;
  margin: 0;
  line-height: 0;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.poster-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.logo-link {
  position: absolute;
  z-index: 2;
  display: block;
  line-height: 1.2;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.001);
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease, backdrop-filter .2s ease;
}
.logo-link::before {
  content: "";
  position: absolute;
  inset: -3%;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 68%);
  filter: blur(14px);
  transition: opacity .2s ease;
}
.logo-link:hover,
.logo-link:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .82), 0 0 32px rgba(255, 255, 255, .75);
  backdrop-filter: brightness(1.22) contrast(1.04) saturate(1.08);
  -webkit-backdrop-filter: brightness(1.22) contrast(1.04) saturate(1.08);
  transform: scale(1.015);
}
.logo-link:hover::before,
.logo-link:focus-visible::before { opacity: 1; }
.logo-link-everesting { left: 1.8%; top: 5.4%; width: 21.2%; height: 31.2%; border-radius: 18px; }
.logo-link-strijders { left: 80.8%; top: 4.1%; width: 16.4%; height: 30.5%; border-radius: 50%; }

.logo-tooltip {
  position: absolute;
  left: 50%;
  bottom: -.8rem;
  translate: -50% 100%;
  min-width: max-content;
  padding: .48rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 7, .9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  font-size: clamp(.68rem, .9vw, .82rem);
  font-weight: 800;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, translate .18s ease;
}
.logo-link:hover .logo-tooltip,
.logo-link:focus-visible .logo-tooltip { opacity: 1; translate: -50% calc(100% + .2rem); }

.noscript-note {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  translate: -50% 0;
  margin: 0;
  padding: .7rem 1rem;
  border-radius: 12px;
  background: #111;
}

.document-body { min-height: 100svh; background: #111; }
.document-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: .65rem max(1rem, env(safe-area-inset-right)) .65rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: rgba(7, 10, 8, .98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.document-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
}
.document-title {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(.7rem, 1.1vw, .84rem);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
}
.open-pdf-button { min-height: 38px; padding: .5rem .75rem; font-size: .78rem; white-space: nowrap; }
.document-page { height: calc(100svh - 72px); padding: .75rem; }
.pdf-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pdf-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

.video-body {
  min-height: 100svh;
  background: radial-gradient(circle at 50% 15%, rgba(58, 79, 69, .28), transparent 42rem), #070a08;
}

.video-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem max(1rem, env(safe-area-inset-right)) .65rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: rgba(7, 10, 8, .98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.video-title {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(.72rem, 1.2vw, .92rem);
  font-weight: 900;
  letter-spacing: .07em;
  line-height: 1.35;
  text-align: right;
}

.video-page {
  min-height: calc(100svh - 72px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.video-card {
  width: min(100%, 430px);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background: rgba(9, 13, 11, .94);
  box-shadow: var(--shadow);
}

.video-frame-wrap {
  position: relative;
  width: min(100%, 267px);
  aspect-ratio: 267 / 476;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  margin: .9rem 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}

.video-fallback a {
  color: #fff;
  font-weight: 800;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateX(8px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 304px;
    gap: .65rem;
    padding-inline: max(.7rem, env(safe-area-inset-left));
  }
  .topbar-title { max-width: 35vw; font-size: .67rem; letter-spacing: .055em; }
  .topbar-actions { width: min(205px, 61vw); gap: .35rem; }
  .info-button, .action-button { min-height: 40px; padding: .55rem .66rem; font-size: .76rem; }
  .info-menu { top: calc(100% + .55rem); right: 0; width: min(350px, calc(100vw - 1.4rem)); }
  .page-shell { min-height: auto; align-items: center; }
  .poster-stage { width: 100vw; max-width: none; }
  .logo-tooltip { display: none; }
  .logo-link:hover, .logo-link:focus-visible { transform: none; }

  .document-topbar {
    min-height: 112px;
    grid-template-columns: 1fr;
    gap: .45rem;
  }
  .back-button { justify-self: start; min-height: 40px; font-size: .8rem; }
  .document-heading { width: 100%; justify-content: space-between; }
  .document-title { text-align: left; font-size: .66rem; }
  .open-pdf-button { min-height: 36px; font-size: .72rem; }
  .document-page { height: calc(100svh - 112px); padding: .4rem; }
  .pdf-shell { border-radius: 10px; }
  .pdf-frame { display: block; }
}

@media (max-width: 760px) {
  .video-topbar {
    min-height: 112px;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .video-topbar .back-button { align-self: flex-start; }
  .video-title { text-align: left; font-size: .68rem; }
  .video-page { min-height: calc(100svh - 112px); padding: .7rem; }
  .video-card { padding: .7rem; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Doorlopende sponsorbanner */
.sponsors-section {
  width: min(100%, 1920px);
  padding: clamp(1.15rem, 2.3vw, 2rem) 0 clamp(1.25rem, 2.5vw, 2.2rem);
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(13, 18, 15, .98), rgba(7, 10, 8, 1));
  overflow: hidden;
}

.sponsors-title {
  margin: 0;
  padding: 0 max(1rem, env(safe-area-inset-right)) clamp(.95rem, 1.8vw, 1.35rem) max(1rem, env(safe-area-inset-left));
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: .025em;
  line-height: 1.25;
  text-align: center;
}

.sponsors-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-block: .25rem;
}

.sponsors-marquee::before,
.sponsors-marquee::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: clamp(18px, 5vw, 90px);
  pointer-events: none;
}

.sponsors-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #080b09, rgba(8, 11, 9, 0));
}

.sponsors-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #080b09, rgba(8, 11, 9, 0));
}

.sponsors-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: sponsors-scroll 34s linear infinite;
}

.sponsors-run {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(.65rem, 1.1vw, 1.05rem);
  padding-right: clamp(.65rem, 1.1vw, 1.05rem);
}

.sponsor-card {
  display: grid;
  flex: 0 0 clamp(180px, 14vw, 245px);
  width: clamp(180px, 14vw, 245px);
  height: clamp(92px, 7vw, 124px);
  place-items: center;
  padding: clamp(.6rem, .9vw, .9rem);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.sponsor-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes sponsors-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 760px) {
  .sponsors-section { padding-block: 1rem 1.15rem; }
  .sponsors-title { padding-bottom: .8rem; font-size: 1rem; }
  .sponsors-track { animation-duration: 28s; }
  .sponsor-card {
    flex-basis: 170px;
    width: 170px;
    height: 88px;
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sponsors-track {
    animation: none !important;
    transform: none !important;
  }
  .sponsors-marquee {
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

/* V12 — sponsorband in het openingsscherm, zonder logo- of poster-cropping */
:root {
  --topbar-open-h: 204px;
  --sponsors-open-h: 126px;
  --poster-ratio: 1.9434;
}

/* Maak alleen de navigatie compacter om ruimte te reserveren voor de sponsorband. */
.topbar {
  min-height: var(--topbar-open-h);
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.topbar-actions { gap: .26rem; }
.info-button,
.action-button {
  min-height: 32px;
  padding: .4rem .72rem;
  font-size: .76rem;
}

.page-shell {
  min-height: calc(100svh - var(--topbar-open-h));
}

/* De affiche wordt uitsluitend proportioneel geschaald; nooit uitgerekt of afgesneden. */
.poster-stage {
  width: min(100vw, calc((100svh - var(--topbar-open-h) - var(--sponsors-open-h)) * var(--poster-ratio)));
  max-width: 1920px;
}

.poster-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Sponsorband blijft onder de affiche maar past mee binnen het eerste scherm. */
.sponsors-section {
  flex: 0 0 var(--sponsors-open-h);
  width: min(100%, 1920px);
  height: var(--sponsors-open-h);
  min-height: var(--sponsors-open-h);
  max-height: var(--sponsors-open-h);
  padding: .42rem 0 .5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sponsors-title {
  flex: 0 0 auto;
  padding-bottom: .38rem;
  font-size: clamp(.92rem, 1.55vw, 1.28rem);
  line-height: 1.1;
}

.sponsors-marquee {
  flex: 1 1 auto;
  min-height: 0;
  padding-block: 0;
  display: flex;
  align-items: center;
}

.sponsors-track {
  align-items: center;
  animation-duration: 36s;
}

.sponsors-run {
  align-items: center;
  gap: clamp(.55rem, .85vw, .9rem);
  padding-right: clamp(.55rem, .85vw, .9rem);
}

.sponsor-card {
  /* De kaart is alleen een kader. Het logo zelf wordt nooit gewijzigd, gecropt of vervormd. */
  display: flex;
  flex: 0 0 clamp(158px, 11.5vw, 190px);
  width: clamp(158px, 11.5vw, 190px);
  height: 82px;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border-radius: 12px;
  overflow: visible;
}

.sponsor-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  flex: none;
}

@media (max-width: 760px) {
  :root {
    --topbar-open-h: 204px;
    --sponsors-open-h: 116px;
  }

  .topbar {
    min-height: var(--topbar-open-h);
    padding-top: .4rem;
    padding-bottom: .4rem;
  }

  .topbar-title {
    max-width: 35vw;
    font-size: .64rem;
  }

  .topbar-actions {
    width: min(205px, 61vw);
    gap: .22rem;
  }

  .info-button,
  .action-button {
    min-height: 31px;
    padding: .34rem .56rem;
    font-size: .69rem;
  }

  /* Op smalle schermen blijft de affiche op 100vw en dus exact in verhouding. */
  .poster-stage {
    width: 100vw;
    max-width: none;
  }

  .sponsors-section {
    height: var(--sponsors-open-h);
    min-height: var(--sponsors-open-h);
    max-height: var(--sponsors-open-h);
    padding-block: .35rem .42rem;
  }

  .sponsors-title {
    padding-bottom: .32rem;
    font-size: .88rem;
  }

  .sponsors-track { animation-duration: 30s; }

  .sponsor-card {
    flex-basis: 146px;
    width: 146px;
    height: 74px;
    padding: 6px;
    border-radius: 10px;
  }
}

/* Bij een erg lage viewport blijft alles bruikbaar; de poster blijft altijd proportioneel. */
@media (max-height: 680px) and (min-width: 761px) {
  :root {
    --topbar-open-h: 184px;
    --sponsors-open-h: 112px;
  }

  .topbar { min-height: var(--topbar-open-h); }
  .info-button,
  .action-button {
    min-height: 29px;
    padding-block: .3rem;
    font-size: .7rem;
  }
  .sponsor-card { height: 70px; }
}


/* V14 — sponsorlogo's maximaal benutten zonder de bronbestanden te wijzigen */
/* De sponsorzone behoudt exact dezelfde totale hoogte als V13, zodat de affiche/QR-codes onaangeroerd blijven. */
.sponsors-section {
  padding: .2rem 0 .25rem;
}

.sponsors-title {
  padding-bottom: .18rem;
  font-size: clamp(.9rem, 1.4vw, 1.18rem);
  line-height: 1;
}

.sponsor-card {
  flex: 0 0 clamp(174px, 12.4vw, 220px);
  width: clamp(174px, 12.4vw, 220px);
  height: 94px;
  padding: 3px;
  overflow: hidden;
}

.sponsor-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform-origin: center;
}

/* Trailmakers en Bolwerk bevatten veel transparante marge in het originele bestand.
   Alleen de CSS-weergave wordt vergroot; het originele logo-bestand blijft byte-for-byte ongewijzigd.
   De zichtbare logovorm blijft volledig binnen het witte sponsorvenster. */
.sponsor-logo-trailmakers {
  transform: translateY(6px) scale(2.68);
}

.sponsor-logo-bolwerk {
  transform: translateY(2px) scale(1.34);
}

@media (max-width: 760px) {
  .sponsors-section { padding-block: .18rem .22rem; }
  .sponsors-title { padding-bottom: .12rem; font-size: .84rem; }
  .sponsor-card {
    flex-basis: 156px;
    width: 156px;
    height: 88px;
    padding: 3px;
  }
  .sponsor-logo-trailmakers { transform: translateY(6px) scale(2.68); }
  .sponsor-logo-bolwerk { transform: translateY(2px) scale(1.34); }
}

@media (max-height: 680px) and (min-width: 761px) {
  .sponsor-card { height: 78px; }
  .sponsor-logo-trailmakers { transform: translateY(5px) scale(2.68); }
  .sponsor-logo-bolwerk { transform: translateY(2px) scale(1.34); }
}
