:root {
  --apg-yellow: #ffdc20;
  --apg-red: #ce4138;
  --apg-green: #9caf3b;
  --apg-black: #111111;
  --apg-cream: #f7f3ec;
  --apg-paper: #fffdf9;
  --apg-muted: #776f67;
  --portrait-width: clamp(278px, 15vw, 305px);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
}

html { background: var(--apg-cream); }

body {
  width: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--apg-black);
  background:
    radial-gradient(circle at 50% 47%, rgba(255,255,255,.98) 0%, rgba(255,255,255,.80) 28%, transparent 58%),
    linear-gradient(180deg, #fbf9f4 0%, #f0e9df 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.site-shell {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
}

/* Header ------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 500;
  padding: 11px clamp(16px, 3vw, 46px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,243,236,.76);
  border-bottom: 1px solid rgba(17,17,17,.055);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: .04em;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(17,17,17,.08));
}

.brand span { font-size: 14px; }
.nav { display: flex; align-items: center; gap: 10px; }

.nav-link {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nav-link--quiz {
  color: #fff;
  background: var(--apg-black);
  box-shadow: 0 8px 20px rgba(17,17,17,.12);
}

.nav-link:hover { transform: translateY(-1px); }
.nav-link--quiz:hover { box-shadow: 0 12px 26px rgba(17,17,17,.18); }

/* Experience --------------------------------------------- */
.experience {
  min-width: 0;
  min-height: 0;
  position: relative;
}

.orbit-stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.orbit-stage.is-dragging { cursor: grabbing; }


/* Achtergrondvideo --------------------------------------- */
.background-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.background-video video {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;
  object-position: center center;

  opacity: 1;
  filter: none;
  transform: none;
}

.background-video::after {
  display: none;
}

.ambient {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  filter: blur(28px);
  opacity: .18;
  pointer-events: none;
}

.ambient--yellow {
  width: 31vw;
  height: 31vw;
  min-width: 280px;
  min-height: 280px;
  left: -8vw;
  top: 22%;
  background: rgba(255,220,32,.62);
}

.ambient--red {
  width: 28vw;
  height: 28vw;
  min-width: 250px;
  min-height: 250px;
  right: -8vw;
  top: 14%;
  background: rgba(206,65,56,.38);
}

.ambient--green {
  width: 23vw;
  height: 23vw;
  min-width: 210px;
  min-height: 210px;
  right: 18%;
  bottom: -12%;
  background: rgba(156,175,59,.28);
}

.orbit-world {
  width: 1px;
  height: 1px;
  position: absolute;
  left: 50%;
  top: 26%;
  z-index: auto;
  pointer-events: none;
}

.prince-card {
  width: var(--portrait-width);
  margin-left: calc(var(--portrait-width) * -0.5);
  margin-top: calc(var(--portrait-width) * -0.5);
  padding: 0;
  border: 0;
  background: transparent;
  position: absolute;
  left: 0;
  top: 0;

  /*
   * Eén compositor-transform:
   * translate3d voor beweging + uitsluitend downscale voor diepte.
   *
   * De basiskaart is bewust groter zodat de voorste prins op scale(1)
   * kan blijven en daardoor scherper oogt.
   */
  transform-origin: 50% 72%;
  will-change: transform, opacity;

  pointer-events: auto;
  cursor: pointer;
}

.prince-card::after {
  content: "";
  width: 64%;
  height: 10px;
  position: absolute;
  left: 18%;
  bottom: 1%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse,
      rgba(17,17,17,.26) 0%,
      rgba(17,17,17,.12) 38%,
      transparent 74%
    );
  opacity:
    calc(.10 + var(--prominence, .5) * .28);
  pointer-events: none;
}

.prince-card .prince-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;

  /*
   * Bitmap zelf blijft volledig vlak en filtervrij.
   */
  transform: none;
  filter: none;
  image-rendering: auto;

  pointer-events: none;
  transition: opacity .16s linear;
}

.prince-card.is-loaded .prince-img {
  opacity: 1;
}

.prince-card.is-active .prince-img {
  transform: none;
  filter: none;
}

.orbit-loading {
  width: max-content;
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--apg-muted);
  font-size: 13px;
  font-weight: 750;
}

.orbit-loading__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--apg-red);
  box-shadow: 0 0 0 6px rgba(206,65,56,.10);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% { transform: scale(.72); opacity: .58; }
}


/* Orbit guide -------------------------------------------- */
.orbit-guide {
  width: min(126vw, 2200px);
  height: min(82vh, 690px);
  position: absolute;
  left: 50%;
  top: 24.5%;
  z-index: 10;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit-guide__line {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(17,17,17,.055);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.42),
    0 28px 80px rgba(17,17,17,.035);
}

.orbit-guide__line--inner {
  inset: 12.5% 12%;
  border-color: rgba(206,65,56,.035);
}

/* Centre -------------------------------------------------- */
.centre-piece {
  width: min(31vw, 330px);
  min-width: 205px;
  position: absolute;
  left: 50%;
  top: 26.5%;
  z-index: 70;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}

.centre-glow {
  width: 155%;
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: -1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.98) 0%, rgba(255,255,255,.79) 38%, transparent 72%);
  filter: blur(5px);
}

.centre-logo {
  width: clamp(150px, 17vw, 248px);
  filter: drop-shadow(0 18px 26px rgba(17,17,17,.08));
}

.centre-logo img { width: 100%; height: auto; }

.centre-piece p {
  max-width: 320px;
  margin: 10px 0 0;
  font-size: clamp(14px, 1.18vw, 18px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -.015em;
}


/* Controls ----------------------------------------------- */
.gallery-controls {
  min-width: min(420px, calc(100vw - 28px));
  padding: 7px;
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.2vh, 34px);
  z-index: 240;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 46px minmax(170px, 1fr) 46px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(17,17,17,.075);
  border-radius: 999px;
  background: rgba(255,253,249,.88);
  box-shadow: 0 18px 46px rgba(17,17,17,.10);
  backdrop-filter: blur(18px);
}

.control-button {
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--apg-black);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  transition: transform .17s ease, background .17s ease;
}

.control-button:hover { transform: scale(1.045); background: #292929; }
.control-button:active { transform: scale(.95); }
.control-button:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(255,220,32,.85);
  outline-offset: 3px;
}

.control-copy {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  text-align: center;
  line-height: 1.08;
}

.control-copy strong {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 950;
}

.control-copy span {
  color: var(--apg-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: none;
}

.interaction-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(81px, 10vh, 102px);
  z-index: 230;
  transform: translateX(-50%);
  color: rgba(17,17,17,.50);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}

.interaction-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, 7px);
}


/* Huibuuke landschap ------------------------------------- */
.bottom-illustration {
  position: absolute;
  left: 50%;
  bottom: -1px;
  z-index: 8;
  width: min(94vw, 1500px);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .96;
}

.bottom-illustration img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 -5px 10px rgba(17,17,17,.06));
}

@media (max-width: 900px) {
  :root { --portrait-width: clamp(190px, 22vw, 225px); }
  .orbit-world { top: 29%; }
  .orbit-guide { width: 110vw; height: min(70vh, 560px); top: 27%; }
  .centre-piece { width: min(42vw, 280px); min-width: 180px; top: 29.5%; }
  .centre-logo { width: clamp(135px, 21vw, 205px); }

  .background-video video {
    opacity: .30;
    filter:
      blur(8px)
      saturate(.68)
      contrast(.90)
      brightness(1.08);
  }

  .bottom-illustration {
    width: min(116vw, 1080px);
    opacity: .95;
  }
}

@media (max-width: 640px) {
  :root { --portrait-width: clamp(138px, 36vw, 165px); }

  .site-shell { grid-template-rows: 62px minmax(0, 1fr); }
  .topbar { padding: 8px 12px; }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 12px; }
  .nav-link { min-height: 38px; padding: 0 13px; font-size: 12px; }

  .orbit-world { top: 32%; }
  .orbit-guide { width: 124vw; height: 62vh; top: 30%; }

  .centre-piece {
    width: 58vw;
    min-width: 165px;
    max-width: 235px;
    top: 32.5%;
  }

  .centre-logo { width: clamp(122px, 35vw, 175px); }
  .centre-piece p { margin-top: 7px; font-size: clamp(12px, 3.7vw, 15px); }

  .gallery-controls {
    width: calc(100vw - 22px);
    min-width: 0;
    bottom: 11px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
  .control-button { width: 42px; height: 42px; }
  .control-copy strong { font-size: 12px; }
  .interaction-hint { bottom: 72px; font-size: 9px; }

  .background-video video {
    opacity: .24;
    filter:
      blur(9px)
      saturate(.64)
      contrast(.90)
      brightness(1.10);
  }

  .bottom-illustration {
    width: 150vw;
    min-width: 650px;
    opacity: .94;
  }
}

@media (max-height: 650px) and (min-width: 641px) {
  .site-shell { grid-template-rows: 60px minmax(0, 1fr); }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .brand img { width: 34px; height: 34px; }

  .orbit-world { top: 23.5%; }
  .orbit-guide { top: 23.5%; }
  .centre-piece { top: 24%; }

  .centre-logo { width: clamp(120px, 15vw, 185px); }
  .centre-piece p { margin-top: 5px; font-size: 13px; }
  .gallery-controls { bottom: 10px; }
  .interaction-hint { display: none; }

  .bottom-illustration {
    width: min(88vw, 1060px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .background-video video {
    display: none;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Skyline ACHTER de video */
.bottom-illustration {
  position: absolute;
  left: 50%;
  bottom: -1px;

  z-index: 0;

  width: min(94vw, 1500px);

  transform: translateX(-50%);

  pointer-events: none;

  opacity: 1;
}

.bottom-illustration img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;

  filter: none;
}


/* Video BOVEN de skyline */
.background-video {
  position: absolute;
  inset: 0;

  z-index: 1;

  overflow: hidden;
  pointer-events: none;

  /* belangrijk: transparant laten */
  background: transparent;
}

.background-video video {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center center;

  /* Hierdoor blijft de skyline er subtiel doorheen zichtbaar */
  opacity: .86;

  filter: none;
  transform: none;
}


/* Geen witte sluier */
.background-video::after {
  display: none;
}