/* Gedeelde basis: reset, typografie, header, stickers, startknop, footer, hulpjes */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--papier);
  color: var(--inkt);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100svh;
  opacity: 0;
  transition: opacity .45s ease;
}
html.klaar body { opacity: 1; }
img, video, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.op-slot, html.op-slot body { overflow: hidden; }

/* papiergrein over alles */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 120; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .1 0 0 0 0 .12 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* focus: altijd zichtbaar */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.op-kleur :focus-visible { outline-color: var(--inkt); }

.naar-inhoud {
  position: fixed; left: 12px; top: 12px; z-index: 200; padding: 10px 16px; background: var(--inkt); color: var(--papier);
  border-radius: 999px; transform: translateY(-200%); text-decoration: none; font-family: var(--f-mono); font-size: .8rem;
}
.naar-inhoud:focus { transform: none; }
.onzichtbaar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* typografie */
.kop { font-family: var(--f-kop); font-weight: 600; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
html[data-wereld="raar"] .kop { font-weight: 560; letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.kop em, .accent { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); font-variation-settings: normal; }
.kop-xl { font-size: var(--t-xl); }
.kop-l { font-size: var(--t-l); }
.kop-m { font-size: var(--t-m); line-height: 1.1; }
.label { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; }
.poster { font-family: var(--f-poster); text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
.intro { font-size: var(--t-s); max-width: 34em; text-wrap: pretty; }
.binnen { width: min(100% - 2 * var(--rand), var(--kolom)); margin-inline: auto; }

/* knoppen */
.knop {
  display: inline-flex; align-items: center; gap: .6em; min-height: 52px; padding: .8em 1.6em; border-radius: 999px;
  background: var(--accent); color: var(--accent-tekst); font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid var(--accent); transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), opacity .2s;
}
.knop:hover { transform: rotate(-2deg) scale(1.04); }
html[data-wereld="raak"] .knop:hover { transform: translateY(-2px); }
.knop-groot { font-size: clamp(1.15rem, 2.2vw, 1.6rem); padding: .9em 2em; min-height: 64px; }
.knop-lijn { background: transparent; color: var(--inkt); border-color: var(--inkt); }
.knop[aria-disabled="true"] { opacity: .4; }

.sticker {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .35em 1.05em; border: 1.5px solid var(--inkt);
  border-radius: 50%/50%; border-radius: 999px / 999px; white-space: nowrap; font-family: var(--f-serif); font-style: italic; font-size: 1.08rem; line-height: 1; text-decoration: none;
  color: var(--inkt); background: transparent; transform: rotate(var(--draai, -4deg)); position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.4), color .2s;
}
html[data-wereld="raar"] .sticker { font-family: var(--f-wonk); font-style: normal; font-weight: 500; font-size: .98rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.sticker::before { content: ""; position: absolute; inset: 0; background: var(--inkt); z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .25s ease; }
.sticker:hover, .sticker:focus-visible, .sticker[aria-current="true"] { transform: rotate(0deg); color: var(--papier); }
.sticker:hover::before, .sticker:focus-visible::before, .sticker[aria-current="true"]::before { transform: scaleY(1); }
.sticker:nth-child(even) { --draai: 3deg; }

/* header */
.kopbalk {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + var(--veilig-b)) calc(var(--rand) + var(--veilig-r)) 12px calc(var(--rand) + var(--veilig-l)); pointer-events: none;
}
.kopbalk > * { pointer-events: auto; }
.logo { display: block; width: clamp(128px, 15vw, 190px); }
.logo img { width: 100%; height: auto; }
.kopbalk-knoppen { display: flex; align-items: center; gap: 8px; }
.taalknoppen { display: flex; gap: 4px; }
.taalknoppen .sticker { padding-inline: .7em; font-family: var(--f-mono) !important; font-style: normal; font-size: .78rem; font-variation-settings: normal !important; }

/* vaste startknop */
.startknop {
  position: fixed; right: calc(18px + var(--veilig-r)); bottom: calc(18px + var(--veilig-o)); z-index: 60; width: 118px; height: 118px; border-radius: 50%;
  background: var(--zalm); color: var(--inkt); box-shadow: var(--schaduw); display: grid; place-items: center;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.4), opacity .3s;
}
html[data-wereld="raak"] .startknop { background: var(--kobalt); color: var(--wit); }
html[data-wereld="portaal"] .startknop { background: var(--mosterd); }
.startknop:hover, .startknop:focus-visible { transform: scale(1.08) rotate(-4deg); }
.startknop-ring { position: absolute; inset: 5px; will-change: transform; }
.startknop-ring svg { width: 100%; height: 100%; overflow: visible; }
.startknop-ring text { font-family: var(--f-mono); font-size: 10.6px; letter-spacing: .1em; fill: currentColor; text-transform: uppercase; }
.startknop-brein { width: 46%; position: relative; }
.startknop-brein svg { width: 100%; height: auto; overflow: visible; }
.vonk { opacity: 0; transform-origin: 32px 30px; }
.startknop:hover .vonk, .startknop:focus-visible .vonk { animation: vonk .5s steps(3) infinite; }
@keyframes vonk { 0% { opacity: 0; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15) rotate(8deg); } 100% { opacity: 0; transform: scale(1.3) rotate(-6deg); } }
html.starter-open .startknop { opacity: 0; pointer-events: none; transform: scale(.6); }
@media (max-width: 720px) { .startknop { width: 84px; height: 84px; right: calc(12px + var(--veilig-r)); bottom: calc(12px + var(--veilig-o)); } .startknop-ring text { font-size: 11.8px; } }

/* secties boven de lijn */
main { position: relative; display: block; }
main > section, main > .pin-spacer { position: relative; z-index: 1; }
.sectie { padding-block: clamp(72px, 12vw, 170px); }
.sectiekop { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 64px); }

/* de lijn */
.lijn { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.lijn path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.lijn-punt { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; width: 44px; height: 44px; margin: -22px 0 0 -22px; will-change: transform; }
.lijn-punt svg { width: 100%; height: 100%; overflow: visible; }
.lijn-punt .blad { transform-origin: 22px 22px; }
.lijn-kop { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--kobalt); box-shadow: 0 0 0 6px rgba(52, 70, 217, .18); }
.lijn-tc { position: absolute; left: 0; top: 0; z-index: 0; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; color: var(--kobalt); background: var(--papier); padding: 2px 6px; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.lijn-tc.aan { opacity: 1; }

/* stille loop: poster met video erover zodra die er is */
.loop { position: relative; overflow: hidden; background: var(--inkt); }
.loop > img, .loop > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loop > video { opacity: 0; transition: opacity .5s; }
.loop > video.speelt { opacity: 1; }

/* duotone (raak): kobalt tot je eroverheen gaat */
.duo { position: relative; overflow: hidden; background: var(--kobalt); }
.duo > img, .duo > video, .duo .loop > img, .duo .loop > video { filter: grayscale(1) contrast(1.15); transition: filter .5s ease, opacity .5s; }
.duo::after { content: ""; position: absolute; inset: 0; background: var(--kobalt); mix-blend-mode: screen; pointer-events: none; transition: opacity .5s ease; z-index: 2; }
.duo:hover > img, .duo:hover > video, .duo:hover .loop > img, .duo:hover .loop > video,
a:focus-visible .duo > img, a:focus-visible .duo .loop > img, a:focus-visible .duo .loop > video,
.duo.kleur > img, .duo.kleur .loop > img, .duo.kleur .loop > video { filter: none; }
.duo:hover::after, a:focus-visible .duo::after, .duo.kleur::after { opacity: 0; }
.duo.gl::after { opacity: 0; }

/* snijtekens (raak) */
.snij { position: relative; }
.snij::before {
  content: ""; position: absolute; inset: -18px; pointer-events: none; z-index: 3;
  --s: 14px; --c: var(--inkt);
  background:
    linear-gradient(var(--c), var(--c)) left 0 top 18px / var(--s) 1px no-repeat, linear-gradient(var(--c), var(--c)) left 18px top 0 / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 top 18px / var(--s) 1px no-repeat, linear-gradient(var(--c), var(--c)) right 18px top 0 / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) left 0 bottom 18px / var(--s) 1px no-repeat, linear-gradient(var(--c), var(--c)) left 18px bottom 0 / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 bottom 18px / var(--s) 1px no-repeat, linear-gradient(var(--c), var(--c)) right 18px bottom 0 / 1px var(--s) no-repeat;
}

/* knipsels */
.knipsel { display: block; width: var(--maat, 90px); height: auto; pointer-events: none; user-select: none; }
.zweef { animation: zweef var(--duur, 7s) ease-in-out infinite alternate; animation-delay: var(--wacht, 0s); }
@keyframes zweef { from { transform: translate3d(0, -6px, 0) rotate(-3deg); } to { transform: translate3d(0, 8px, 0) rotate(4deg); } }
html.dans .knipsel { animation: dans .32s steps(2) infinite alternate !important; }
@keyframes dans { from { transform: rotate(-16deg) translateY(-10px) scale(1.08); } to { transform: rotate(16deg) translateY(8px) scale(.96); } }

/* WebGL-laag voor de buigende beelden */
.buig-doek { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
img.gl-verborgen { opacity: 0 !important; }

/* footer */
.voet { position: relative; z-index: 1; padding: clamp(48px, 8vw, 96px) 0 calc(150px + var(--veilig-o)); border-top: 1.5px dashed var(--inkt); }
.voet-raster { display: grid; gap: 28px; grid-template-columns: 1fr; }
.voet-regel { font-family: var(--f-kop); font-size: var(--t-m); line-height: 1.1; max-width: 16em; font-weight: 560; }
html[data-wereld="raar"] .voet-regel { font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 100; }
.voet-lijst { display: grid; gap: 6px; }
.voet-lijst a { text-underline-offset: 4px; display: inline-block; padding-block: 4px; }
.voet-klein { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; }
@media (min-width: 800px) { .voet-raster { grid-template-columns: 1.4fr 1fr; } .voet-klein { grid-column: 1 / -1; } }

/* paginaovergang */
.gordijn { position: fixed; inset: 0; z-index: 100; background: var(--gordijn, var(--zalm)); transform: translateY(101%); pointer-events: none; }
.gordijn.dicht { transform: none; transition: transform .5s cubic-bezier(.7, 0, .2, 1); }

/* balk "of kijk bij de andere wereld" */
.balk { position: relative; z-index: 2; display: block; text-align: center; padding: calc(74px + var(--veilig-b)) var(--rand) 12px; background: var(--zalm); font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em; text-underline-offset: 4px; }

/* klapbord-cursor (alleen raar, alleen desktop met muis) */
.klapbord { position: fixed; left: 0; top: 0; z-index: 130; pointer-events: none; width: 62px; margin: 10px 0 0 12px; opacity: 0; transition: opacity .2s; will-change: transform; }
.klapbord.aan { opacity: 1; }
.klapbord-arm { height: 12px; background: repeating-linear-gradient(-55deg, var(--inkt) 0 8px, var(--wit) 8px 16px); border: 1.5px solid var(--inkt); border-radius: 2px; transform-origin: 0 100%; transform: rotate(-22deg); transition: transform .08s steps(2); }
.klapbord.klap .klapbord-arm { transform: rotate(0deg); }
.klapbord-bord { background: var(--inkt); color: var(--papier); font-family: var(--f-mono); font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 5px 5px; border-radius: 2px; text-align: center; white-space: nowrap; }

/* minder beweging */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .zweef { animation: none !important; }
}
