/* 1a² · Nebula — Orbit in kleur. Het menu is een baan rond het onderwerp;
   alle kleuren komen uit de mood (--m-*), per frame bijgewerkt, dus ook de
   verlopen in de tekst schuiven mee als de wereld van kleur wisselt. */

:root {
  --m-bg: 22 26 36;
  --m-bg2: 12 15 22;
  --m-haze: 43 58 92;
  --m-line: 159 178 214;
  --m-ink: 238 241 247;
  --m-dim: 128 138 160;
  --m-accent: 143 193 255;
  --m-accent2: 242 169 127;
  --m-oink: 29 45 80;
  /* het verloop van de koppen: inkt → accent → accent2 */
  --grad: linear-gradient(100deg, rgb(var(--m-ink)) 0%, rgb(var(--m-ink)) 28%, rgb(var(--m-accent)) 68%, rgb(var(--m-accent2)) 100%);
  --pad: 28px;
  --grain: .1;
}

html, body { height: 100%; }
body {
  background: radial-gradient(120% 90% at 32% 42%, rgb(var(--m-haze)) 0%, rgb(var(--m-bg)) 48%, rgb(var(--m-bg2)) 100%);
  color: rgb(var(--m-ink));
  font: 450 14px/1.5 var(--f-sans);
}
.js body { overflow: hidden; }
.mono { font-family: var(--f-mono); font-weight: 400; letter-spacing: .08em; }
::selection { background: rgb(var(--m-accent)); color: rgb(var(--m-bg)); }

.skip {
  position: fixed; z-index: 70; left: 12px; top: -48px; padding: 8px 12px;
  background: rgb(var(--m-ink)); color: rgb(var(--m-bg)); text-decoration: none; font-size: 13px;
  transition: top .26s var(--e-out);
}
.skip:focus { top: 12px; }

.field { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; touch-action: pan-y; cursor: grab; }
.is-turning .field { cursor: grabbing; }
/* het canvas komt pas als het eerste beeld er is; tot dan de verloop-achtergrond van body */
.js .field { opacity: 0; transition: opacity .9s ease; }
.js .field.is-on { opacity: 1; }
html[data-ch="contact"] { --grain: .06; }

/* ---------- rand ---------- */

.top {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px var(--pad); font-size: 13px; pointer-events: none;
}
.top a { pointer-events: auto; text-decoration: none; }
.top__name b { font-weight: 560; margin-right: 10px; }
.top__name span { color: rgb(var(--m-ink) / .62); }
.top__geo { font-size: 10px; color: rgb(var(--m-dim)); }

.bottom {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; padding: 18px var(--pad) 20px;
  font-size: 12.5px; pointer-events: none;
}
.bottom a { pointer-events: auto; text-decoration: none; color: rgb(var(--m-ink) / .78); }
.bottom a:hover { color: rgb(var(--m-ink)); }

/* ---------- de baan ---------- */

.orbit { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.sat {
  position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 3px;
  padding: 6px 8px; text-decoration: none; color: rgb(var(--m-ink));
  pointer-events: auto; will-change: transform, opacity;
  transform-origin: 50% 22px;
}
.sat svg {
  width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.15;
  stroke-linecap: round; stroke-linejoin: round; overflow: visible;
  transition: color .26s ease, transform .52s var(--e-out);
}
.sat svg .fill { fill: currentColor; }
.sat__n { font: 400 9px/1 var(--f-mono); letter-spacing: .14em; color: rgb(var(--m-dim)); margin-top: 2px; }
.sat__t { font-size: 11.5px; line-height: 1; white-space: nowrap; letter-spacing: .01em; transition: opacity .32s ease; }
.sat:hover svg, .sat:focus-visible svg { color: rgb(var(--m-accent)); transform: scale(1.12); }
.sat:focus-visible { outline: 1px dashed rgb(var(--m-accent) / .7); outline-offset: 2px; }
.sat[aria-current] { color: rgb(var(--m-accent)); }
.sat[aria-current] .sat__t, .sat[aria-current] .sat__n { opacity: 0; }
.sat[aria-current] svg { transform: scale(1.25); }

.caption {
  position: fixed; z-index: 25; left: 0; top: 0; display: flex; align-items: center; gap: 14px;
  will-change: transform;
}
.caption__now { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.caption__n { font-size: 11px; color: rgb(var(--m-accent)); }
.caption__t { font-family: var(--f-wide); font-stretch: 116%; font-weight: 470; font-size: 22px; letter-spacing: -.01em; }
.caption__shape { font-size: 10px; color: rgb(var(--m-dim)); }
.caption__shape::before { content: "["; margin-right: .5em; }
.caption__shape::after { content: "]"; margin-left: .5em; }
.caption__step {
  font: 300 22px/1 var(--f-sans); width: 30px; height: 30px; color: rgb(var(--m-ink) / .55);
  border-bottom: 1px solid rgb(var(--m-ink) / .2);
  transition: color .22s ease, border-color .22s ease, transform .42s var(--e-out);
}
.caption__step:hover, .caption__step:focus-visible { color: rgb(var(--m-ink)); border-color: rgb(var(--m-accent)); }
.caption__step[data-step="-1"]:hover { transform: translateX(-3px); }
.caption__step[data-step="1"]:hover { transform: translateX(3px); }
.hint { position: fixed; z-index: 25; left: 0; top: 0; font-size: 9.5px; color: rgb(var(--m-dim)); white-space: nowrap; will-change: transform; }

.beam { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
.beam line { stroke: rgb(var(--m-accent)); stroke-width: 1; stroke-dasharray: 1 6; stroke-linecap: round; opacity: .55; }

/* ---------- de kolom (het hoofdstuk dat voor ligt) ---------- */

.chapters { outline: none; }
.js .chapters { position: fixed; z-index: 22; right: 4vw; top: 14vh; bottom: 92px; width: min(30vw, 440px); }
.js .chapter {
  position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 0 4px 30px 0; visibility: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
}
.js .chapter::-webkit-scrollbar { display: none; }
.js .chapter.is-active, .js .chapter.is-leaving { visibility: visible; }
.chapter + .chapter { margin-top: 60px; }
.js .chapter + .chapter { margin-top: 0; }

.signal { display: flex; align-items: center; gap: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: rgb(var(--m-accent)); margin-bottom: 22px; }
.signal::after { content: ""; width: 6px; height: 10px; background: currentColor; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.chapter h1, .chapter h2, .chapter h3 { font-family: var(--f-wide); }
.chapter h2 { font-size: clamp(28px, 2.6vw, 42px); line-height: 1.02; font-weight: 460; font-stretch: 112%; letter-spacing: -.03em; margin-bottom: 22px; }
.hero { font-size: clamp(36px, 3.5vw, 58px); line-height: .98; font-weight: 470; font-stretch: 110%; letter-spacing: -.035em; margin-bottom: 26px; }
.hero em { font-style: normal; color: rgb(var(--m-accent)); }
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > [data-line] { display: inline-block; }
.lead { font-size: 18px; line-height: 1.4; font-weight: 460; margin-bottom: 16px; max-width: 32ch; }
.chapter p:not(.lead):not(.signal) { font-size: 14px; line-height: 1.64; color: rgb(var(--m-ink) / .78); margin-bottom: 12px; max-width: 46ch; }

.items li { position: relative; padding: 14px 0 12px 36px; border-top: 1px solid rgb(var(--m-ink) / .14); }
.items__n { position: absolute; left: 0; top: 17px; font-size: 10px; color: rgb(var(--m-dim)); }
.items h3 { font-size: 15px; line-height: 1.3; font-weight: 520; font-stretch: 104%; margin-bottom: 5px; }
.chapter .items p { font-size: 13.5px; margin-bottom: 0; }

.folds details { border-top: 1px solid rgb(var(--m-ink) / .14); }
.folds details:last-child { border-bottom: 1px solid rgb(var(--m-ink) / .14); }
.folds summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 36px 1fr auto; align-items: baseline;
  padding: 13px 0; font-size: 14.5px; font-weight: 500; transition: color .26s ease;
}
.folds summary::-webkit-details-marker { display: none; }
.folds summary .items__n { position: static; }
.folds__r { font-size: 9.5px; color: rgb(var(--m-dim)); white-space: nowrap; }
.folds summary:hover, .folds details[open] summary, .folds details[open] .folds__r { color: rgb(var(--m-accent)); }
.chapter .folds p { padding-left: 36px; margin-bottom: 16px; font-size: 13.5px; }

.sectors { margin-bottom: 24px; }
.sectors li {
  font-family: var(--f-wide); font-size: clamp(30px, 2.9vw, 46px); line-height: 1.06; font-weight: 450; font-stretch: 118%;
  letter-spacing: -.03em; width: max-content; cursor: default;
  transition: color .26s ease, font-stretch .52s var(--e-out);
}
.sectors:hover li { color: rgb(var(--m-ink) / .3); }
.sectors li:hover { color: rgb(var(--m-accent)); font-stretch: 125%; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin: 22px 0 18px; padding: 18px 0; border-top: 1px solid rgb(var(--m-ink) / .14); border-bottom: 1px solid rgb(var(--m-ink) / .14); }
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.stats dt { font-size: 9.5px; text-transform: uppercase; color: rgb(var(--m-dim)); }
.stats dd { margin: 0; font-family: var(--f-wide); font-size: 36px; line-height: 1; font-weight: 460; font-stretch: 108%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.chapter .fine { font-size: 12.5px; color: rgb(var(--m-dim)); }

.onward {
  display: inline-block; margin-top: 10px; text-decoration: none; font-size: 10.5px; text-transform: uppercase;
  color: rgb(var(--m-accent)); transition: letter-spacing .42s var(--e-out);
}
.onward:hover, .onward:focus-visible { letter-spacing: .16em; }

.mail {
  display: inline-block; margin: 8px 0 26px; text-decoration: none;
  font-family: var(--f-wide); font-size: clamp(22px, 2.1vw, 32px); font-weight: 470; font-stretch: 108%; letter-spacing: -.025em;
  border-bottom: 1px solid rgb(var(--m-accent));
  transition: font-stretch .52s var(--e-out), color .26s ease;
}
.mail:hover, .mail:focus-visible { font-stretch: 122%; color: rgb(var(--m-accent)); }
.contact div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgb(var(--m-ink) / .14); }
.contact dt { font-size: 9.5px; line-height: 1.9; text-transform: uppercase; color: rgb(var(--m-dim)); }
.contact dd { margin: 0; font-size: 14px; }
.contact a { text-decoration: none; border-bottom: 1px solid rgb(var(--m-ink) / .3); }

/* ---------- binnenkomen en vertrekken (de partituur) ---------- */

.js .chapter [data-line] {
  opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity .52s ease var(--d, 0ms), transform .52s var(--e-out) var(--d, 0ms);
}
.js .chapter .ln > [data-line] { transform: translate3d(0, 105%, 0); }
.js .chapter.is-active [data-line] { opacity: 1; transform: none; }
.js .chapter.is-leaving [data-line] { opacity: 0; transform: translate3d(0, -12px, 0); transition: opacity .32s ease, transform .42s var(--e-out); }

.is-preview .hint { display: none; }

/* ---------- telefoon ---------- */

@media (max-width: 860px) {
  :root { --pad: 16px; }
  .js body { overflow: auto; }
  .top {
    padding: max(14px, env(safe-area-inset-top)) var(--pad) 26px;
    background: linear-gradient(rgb(var(--m-bg)) 45%, rgb(var(--m-bg) / 0));
  }
  .top__name span { display: none; }
  .bottom, .hint, .beam { display: none; }

  .sat { padding: 8px 6px; }
  .sat svg { width: 24px; height: 24px; }
  .sat__t { display: none; }
  .caption__t { font-size: 19px; }
  .caption__step { width: 44px; height: 44px; font-size: 26px; }

  .js .chapters { position: relative; right: auto; top: auto; bottom: auto; width: auto; padding: 66vh var(--pad) 90px; }
  .js .chapter {
    position: relative; inset: auto; overflow: visible; display: none; visibility: visible;
    -webkit-mask-image: none; mask-image: none; padding: 0;
  }
  .js .chapter.is-active { display: block; }
  .js .chapter.is-leaving { display: none; }
  .js .chapters::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: calc(66vh - 40px); bottom: 0;
    background: linear-gradient(rgb(var(--m-bg) / 0), rgb(var(--m-bg) / .92) 60px);
  }
  .hero { font-size: 11vw; }
  .sectors li { font-size: 10vw; }
}

@media (prefers-reduced-motion: reduce) {
  .signal::after { animation: none; }
  .js .chapter [data-line], .js .chapter .ln > [data-line] { transform: none !important; transition: opacity .2s ease !important; }
}

/* ---------- 1a²: verlopen in de letters en de interface ---------- */

.chapter h2 .ln > [data-line], .hero .ln > [data-line], .caption__t, .stats dd {
  background-image: var(--grad);
  background-size: 100% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero em { color: inherit; }
.signal { color: rgb(var(--m-accent2)); }
.beam line { stroke: rgb(var(--m-accent2)); opacity: .7; }
.sat[aria-current] svg { filter: drop-shadow(0 0 6px rgb(var(--m-accent) / .75)) drop-shadow(0 0 14px rgb(var(--m-accent2) / .45)); }
.sat:hover svg, .sat:focus-visible svg { color: rgb(var(--m-accent2)); }
.caption__n { color: rgb(var(--m-accent2)); }
.mail { background-image: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mail:hover, .mail:focus-visible { color: transparent; }
.items li, .folds details { border-image: linear-gradient(90deg, rgb(var(--m-accent) / .35), rgb(var(--m-accent2) / .2) 60%, transparent) 1; }
