.wrap { width: min(1152px, calc(100% - 2 * clamp(16px, 4vw, 48px))); margin-inline: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.6vw, 5.6rem); letter-spacing: -0.075em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); letter-spacing: -0.06em; }
h3 { font-size: 1.3rem; }
p, figcaption { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: clip; }

/* Kop */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: rgb(247 246 241 / 86%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header-inner, .site-header nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 20px); }
.header-inner { min-height: 68px; }
.header-inner nav { margin-left: auto; }
.site-header a, .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.site-header nav a { color: var(--ink); font-size: 0.9rem; font-weight: 750; white-space: nowrap; text-decoration: none; }
.site-header nav a:hover, .text-link { color: var(--primary); }
.text-link { font-weight: 750; text-underline-offset: 0.22em; }
.wordmark img { display: block; width: auto; height: 34px; }
.metronome { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; background: var(--primary-50); color: var(--primary-700); font-size: 0.75rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metronome i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

.kicker { margin-bottom: 12px; color: var(--primary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(24px, 5vw, 64px); padding-block: clamp(36px, 7vw, 92px) clamp(28px, 5vw, 64px); }
.hero h1 > span[aria-hidden] { display: block; }
.hero h1 .moves { color: var(--primary); }
.moves .word { display: inline-block; white-space: nowrap; }
.moves .ch { display: inline-block; }
.lead { max-width: 36ch; margin-top: 18px; font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }

.stage { perspective: 1300px; perspective-origin: 50% 0%; }
.pitch {
  position: relative; aspect-ratio: var(--court-ratio); border-radius: 16px; background: var(--court); color: white;
  touch-action: pan-y; transform-origin: 50% 60%;
  transform: rotateX(42deg) rotateZ(-9deg) scale(0.9);
  box-shadow: 0 40px 60px -30px rgb(40 23 71 / 55%), 0 0 0 10px rgb(81 49 146 / 10%);
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1), box-shadow 0.8s;
}
.stage:not(.live) .pitch:hover { transform: rotateX(32deg) rotateZ(-6deg) scale(0.93); }
.stage.live .pitch { transform: none; box-shadow: 0 18px 40px -24px rgb(40 23 71 / 50%), 0 0 0 4px var(--ball); touch-action: none; }
.pitch:focus-visible { outline: 3px solid var(--ball); outline-offset: 4px; }
.pitch canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: inherit; }
.corner { position: absolute; width: 22px; height: 22px; border: 3px solid var(--ball); transition: opacity 0.4s; animation: corner 2.4s ease-in-out infinite; }
.corner.tl { top: -12px; left: -12px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -12px; right: -12px; border-left: 0; border-bottom: 0; animation-delay: 0.6s; }
.corner.br { bottom: -12px; right: -12px; border-left: 0; border-top: 0; animation-delay: 1.2s; }
.corner.bl { bottom: -12px; left: -12px; border-right: 0; border-top: 0; animation-delay: 1.8s; }
@keyframes corner { 0%, 70%, 100% { opacity: 0.35; } 10% { opacity: 1; } }
.stage.live .corner { opacity: 0; animation: none; }
.hud { position: absolute; inset: 12px 12px auto; display: flex; justify-content: space-between; align-items: start; gap: 6px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud span { padding: 4px 9px; border-radius: 6px; background: var(--court-overlay); font-size: 0.82rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.hud-stop { min-height: 36px; padding: 4px 12px; background: white; color: var(--primary-700); font-size: 0.82rem; opacity: 0; visibility: hidden; transition: opacity 0.3s; }
.stage.live .hud-stop { opacity: 1; visibility: visible; }
.play-btn {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; min-height: 52px; padding: 10px 22px 10px 14px; border-radius: 99px;
  background: white; color: var(--primary-700); font-size: 1.05rem; box-shadow: 0 10px 30px -10px rgb(0 0 0 / 45%);
  transition: opacity 0.3s, scale 0.3s;
}
.play-btn:hover { border-color: var(--ball); scale: 1.05; }
.play-ball { width: 26px; height: 26px; border-radius: 50%; background: var(--ball); box-shadow: inset -4px -4px 0 rgb(0 0 0 / 12%); animation: bounce 0.6s cubic-bezier(.3,.7,.4,1) infinite alternate; }
@keyframes bounce { to { translate: 0 -5px; } }
.stage.live .play-btn { opacity: 0; scale: 0.6; pointer-events: none; }
.stage figcaption { margin-top: clamp(20px, 3vw, 34px); font-size: 0.875rem; text-align: center; }

/* Experiment-label */
.badge { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 7px 14px 7px 11px; border: 1.5px dashed var(--ball); border-radius: 99px; background: #fff3ee; color: #a8361a; font-size: 0.85rem; font-weight: 800; }
.badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--ball); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* Bouwplaats */
.build { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(20px, 4vw, 48px); align-items: center; margin-block: clamp(8px, 2vw, 24px) clamp(40px, 6vw, 72px); padding: clamp(18px, 3vw, 30px); border: 1.5px dashed #e7b9aa; border-radius: clamp(18px, 2.4vw, 26px); background: repeating-linear-gradient(-45deg, transparent 0 18px, rgb(232 90 53 / 3.5%) 18px 36px); }
.build-intro h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.build-intro p { margin-top: 8px; font-size: 0.95rem; }
.build-intro .text-link { margin-top: 2px; font-size: 0.95rem; }
.build-list { margin: 0; padding: 0 16px; list-style: none; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.build-list li { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); column-gap: 14px; align-items: baseline; padding-block: 10px; }
.build-list li + li { border-top: 1px solid var(--border); }
.build-list h3 { font-size: 0.98rem; letter-spacing: -0.02em; line-height: 1.3; }
.build-list p { grid-column: 2; font-size: 0.85rem; line-height: 1.45; }
.state { grid-row: span 2; justify-self: start; padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.state.now { background: #fff3ee; color: #a8361a; }
.state.now::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--ball); vertical-align: 1px; animation: blink 1.2s ease-in-out infinite; }
.state.test { background: var(--primary-50); color: var(--primary-700); }
.state.later { background: #eeeee8; color: var(--muted); }
.section-note { margin-top: 8px; }
.scene-tag { position: absolute; z-index: 1; top: 16px; left: 16px; padding: 3px 9px; border-radius: 6px; background: #fff3ee; color: #a8361a; font-size: 0.72rem; font-weight: 800; }

/* Spellen */
.section-head { margin-bottom: clamp(18px, 3vw, 30px); }
.games { padding-block: clamp(40px, 7vw, 88px); }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px); }
.game-card {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface);
  color: inherit; text-decoration: none; transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s, border-color 0.2s;
}
.game-card:hover { transform: translateY(-6px) rotate(-0.6deg); border-color: var(--primary); box-shadow: 0 24px 40px -28px rgb(40 23 71 / 60%); }
.game-card:nth-child(2):hover { transform: translateY(-6px) rotate(0.6deg); }
.game-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.game-text { position: relative; display: grid; align-content: start; gap: 6px; padding: clamp(18px, 3vw, 28px); }
.game-no { position: absolute; top: clamp(10px, 2vw, 18px); right: clamp(16px, 3vw, 26px); color: transparent; -webkit-text-stroke: 1.5px var(--border); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em; transition: -webkit-text-stroke-color 0.3s; }
.game-card:hover .game-no { -webkit-text-stroke-color: var(--ball); }
.game-text h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); padding-right: 3.5em; }
.go { margin-top: 8px; color: var(--primary); font-weight: 800; }
.go span { display: inline-block; transition: translate 0.3s; }
.game-card:hover .go span { translate: 5px 0; }

.scene { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--court); }
.scene::before { content: ""; position: absolute; inset: 10px; border: 2px solid rgb(255 255 255 / 45%); border-radius: 6px; background: linear-gradient(90deg, transparent calc(50% - 1px), rgb(255 255 255 / 45%) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.scene i { position: absolute; display: block; font-style: normal; }
.cone { width: 7%; aspect-ratio: 1; translate: -50% -50%; background: #ffcf64; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.mini-ball { width: 6%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--ball); box-shadow: 0 0 0 4px rgb(232 90 53 / 25%); }

.scene-dodge .cone, .scene-dodge .star { top: -10%; animation: fall 2.4s linear infinite; }
.scene-dodge .c1 { left: 18%; animation-delay: -0.5s; }
.scene-dodge .c2 { left: 50%; }
.scene-dodge .c3 { left: 82%; animation-delay: -1.6s; }
.scene-dodge .star { left: 34%; translate: -50% -50%; color: white; font-size: clamp(14px, 2.2vw, 22px); line-height: 1; animation-delay: -1.2s; animation-name: fall-star; }
.scene-dodge .mini-ball { top: 78%; left: 34%; animation: dodge 2.4s cubic-bezier(.6,0,.3,1) infinite; }
@keyframes fall { to { top: 110%; } }
@keyframes fall-star { 0% { top: -10%; opacity: 1; } 72% { opacity: 1; scale: 1; } 76% { top: 81%; opacity: 0; scale: 2; } 100% { top: 110%; opacity: 0; } }
@keyframes dodge { 0%, 35% { left: 34%; } 50%, 85% { left: 66%; } 100% { left: 34%; } }

.scene-hit .cone { animation: hit 3.6s ease-out infinite; }
.scene-hit .a { left: 22%; top: 32%; }
.scene-hit .b { left: 76%; top: 40%; animation-delay: -2.4s; }
.scene-hit .c { left: 46%; top: 74%; animation-delay: -1.2s; }
.scene-hit .mini-ball { left: 22%; top: 32%; animation: route 3.6s cubic-bezier(.55,0,.35,1) infinite; }
@keyframes route {
  0%, 15% { left: 22%; top: 32%; } 33%, 48% { left: 76%; top: 40%; }
  66%, 81% { left: 46%; top: 74%; } 100% { left: 22%; top: 32%; }
}
@keyframes hit { 0% { scale: 1.6; background: white; } 12% { scale: 1; background: #ffcf64; } 100% { scale: 1; } }

/* Zo werkt het: donkere mat */
.setup-section { position: relative; width: min(1152px, calc(100% - 2 * clamp(16px, 4vw, 48px))); margin-inline: auto; background: var(--primary); color: white; padding-block: clamp(32px, 6vw, 72px); border-radius: clamp(18px, 2.4vw, 26px); }
.setup-section > .wrap { width: auto; padding-inline: clamp(18px, 4.5vw, 56px); }
.setup-section p { color: rgb(255 255 255 / 78%); }
.setup-section .kicker { color: #ffb59f; }
.setup { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 60px); align-items: center; }
.setup-intro p:last-child { margin-top: 14px; max-width: 34ch; font-size: 1.08rem; }

.vision { position: relative; overflow: hidden; border-radius: 18px; background: var(--primary-700); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 60%); }
.vision img { display: block; width: 100%; height: auto; }
.vision-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.vision figcaption { position: absolute; right: 9px; bottom: 9px; padding: 3px 8px; border-radius: 5px; background: var(--court-overlay); color: white; font-size: 0.73rem; }
.sight { stroke: white; stroke-width: 3; stroke-dasharray: 4 12; stroke-linecap: round; opacity: 0.85; animation: sight 0.6s linear infinite; }
@keyframes sight { to { stroke-dashoffset: -16; } }
.mat-outline { fill: rgb(232 90 53 / 8%); stroke: #ffcf64; stroke-width: 4; stroke-dasharray: 100; animation: outline 4.8s ease-in-out infinite; }
@keyframes outline { 0% { stroke-dashoffset: 100; } 35%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.mat-corners circle { fill: #ffcf64; stroke: var(--primary-700); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: pop 4.8s ease-out infinite; }
.mat-corners circle:nth-child(2) { animation-delay: 0.3s; }
.mat-corners circle:nth-child(3) { animation-delay: 0.6s; }
.mat-corners circle:nth-child(4) { animation-delay: 0.9s; }
@keyframes pop { 0%, 5% { scale: 0; } 12% { scale: 1.5; } 18%, 90% { scale: 1; } 100% { scale: 0; } }
.lock path { fill: none; stroke: var(--ball); stroke-width: 6; stroke-linecap: round; }
.lock rect { fill: var(--ball); }
.lock text { fill: white; font: 800 20px var(--font); text-anchor: middle; }
.lock { transform-box: fill-box; transform-origin: 20% 50%; animation: lock 1.2s ease-in-out infinite; }
@keyframes lock { 0%, 100% { scale: 1; } 50% { scale: 1.04; } }
.scan { fill: rgb(255 255 255 / 35%); animation: scan 3.6s linear infinite; }
@keyframes scan { from { transform: translateY(-10px); } to { transform: translateY(820px); } }

.steps { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); margin: clamp(8px, 2vw, 20px) 0 0; padding: 56px 0 0; list-style: none; }
.step { position: relative; z-index: 1; }
.step-no { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 50%; background: var(--primary-700); border: 2px solid rgb(255 255 255 / 35%); color: white; font-weight: 800; transition: background 0.3s, border-color 0.3s, scale 0.3s; }
.step.on .step-no { background: white; border-color: white; color: var(--primary); scale: 1.08; }
.step h3 { color: white; }
.step p { margin-top: 6px; }
.steps-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.steps-path path { fill: none; stroke-linecap: round; }
.steps-path .track { stroke: rgb(255 255 255 / 20%); stroke-width: 14; }
.steps-path .done { stroke: rgb(255 255 255 / 55%); stroke-width: 14; }
.steps-ball { fill: var(--ball); stroke: var(--primary); stroke-width: 4; }

/* Privacy */
.privacy { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 8vw, 104px); }
.privacy-text p:last-child { margin-top: 14px; max-width: 40ch; font-size: 1.08rem; }
.wire { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0; }
.device { position: relative; display: grid; align-content: start; gap: 6px; padding: 14px 12px; border-radius: 18px; background: var(--ink); color: white; }
.phone { width: clamp(108px, 14vw, 132px); min-height: 200px; border-radius: 22px; }
.screen { width: clamp(130px, 17vw, 180px); }
.device-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; margin-bottom: 4px; }
.chip { padding: 6px 8px; border-radius: 8px; background: rgb(255 255 255 / 10%); font-size: 0.8rem; font-weight: 750; }
.lock-note { margin-top: 4px; color: #ffcf64; font-size: 0.75rem; font-weight: 750; }
.screen-field { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 8px; background: var(--court); }
.screen-field i { position: absolute; width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--ball); translate: -50% -50%; animation: screen-ball 2.4s ease-in-out infinite; }
@keyframes screen-ball { 0% { left: 42%; top: 61%; } 33% { left: 47%; top: 55%; } 66% { left: 51%; top: 49%; } 100% { left: 42%; top: 61%; } }
.cable { position: relative; height: 120px; margin-inline: -2px; }
.cable::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px dashed var(--border); }
.packet { position: absolute; top: 50%; left: 0; translate: 0 -50%; padding: 4px 9px; border-radius: 99px; background: var(--primary); color: white; font-size: 0.72rem; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; animation: packet 2.4s linear infinite; }
.packet:nth-child(2) { background: var(--ball); animation-delay: 0.6s; }
.packet:nth-child(3) { animation-delay: 1.2s; }
.packet:nth-child(4) { animation-delay: 1.8s; }
@keyframes packet { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { left: calc(100% - 7em); opacity: 0; } }

/* Verhaal */
.story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; gap: clamp(20px, 5vw, 64px); padding-block: clamp(20px, 4vw, 48px) clamp(32px, 5vw, 64px); border-top: 1px solid var(--border); padding-top: clamp(40px, 6vw, 72px); }
.story p { margin-top: 12px; }
.related { padding: clamp(18px, 3vw, 26px); border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.related img { display: block; object-fit: contain; object-position: left; }

/* Afsluiter met de hm-slinger */
.signoff { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 32px); padding-block: clamp(16px, 4vw, 48px) clamp(24px, 4vw, 48px); }
.slinger { width: clamp(180px, 34vw, 380px); height: auto; overflow: visible; }
.slinger path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 26; }
.sl-shadow { stroke: var(--primary-50); }
.sl-line { stroke: var(--primary); }
.sl-ball { fill: var(--ball); }
.signoff-text { color: var(--ink); font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.06em; }

.footer { border-top: 1px solid var(--border); padding-block: 10px clamp(24px, 4vw, 40px); font-size: 0.875rem; color: var(--muted); }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.disclaimer { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.disclaimer-label { display: block; margin-bottom: 4px; color: var(--ink); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.disclaimer p { font-size: 0.8rem; line-height: 1.6; }

/* Binnenkomen */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity 0.7s ease, translate 0.8s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; translate: 0 0; }
.game-list .reveal:nth-child(2), .story .reveal:nth-child(2), .privacy .reveal:nth-child(2) { transition-delay: 0.12s; }
.paused, .paused * { animation-play-state: paused !important; }

@media (max-width: 860px) {
  .hero, .setup, .privacy, .story, .build { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 620px; }
}
@media (max-width: 640px) {
  .metronome { display: none; }
  .header-inner { min-height: 60px; }
  .wordmark img { height: 27px; }
  .site-header nav a { font-size: 0.8rem; }
  .game-list { grid-template-columns: 1fr; }
  .build-list li { grid-template-columns: 1fr; }
  .build-list p { grid-column: 1; }
  .state { grid-row: auto; margin-bottom: 4px; }
  .steps { grid-template-columns: 1fr; padding: 0 0 0 64px; gap: 22px; }
  .step-no { position: absolute; left: -64px; top: -6px; margin: 0; }
  .wire { grid-template-columns: 1fr; justify-items: center; }
  .cable { width: 100%; height: 110px; }
  .cable::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 3px dashed var(--border); }
  .packet { left: 50% !important; translate: -50% 0; top: 0; animation-name: packet-down; }
  @keyframes packet-down { 0% { top: 0; opacity: 0; } 12%, 80% { opacity: 1; } 100% { top: calc(100% - 1.6em); opacity: 0; } }
  .phone { min-height: 0; width: 220px; }
  .screen { width: 220px; }
  .signoff { flex-direction: column; }
}
@media (max-width: 380px) {
  .wordmark img { height: 22px; }
  .site-header nav a { font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  .pitch, .stage:not(.live) .pitch:hover { transform: rotateX(20deg) scale(0.96); }
  .stage.live .pitch { transform: none; }
  .scan, .sight { display: none; }
  .scene-dodge .cone { top: 38%; }
  .scene-dodge .star { top: 56%; }
}
