/* ============================================
   4R — STUDIO LAAG (v5)
   Motion- en compositiesysteem bovenop site.css.
   Alles degradeert netjes zonder JS en met
   prefers-reduced-motion.
   ============================================ */

/* --- Lenis: native smooth-scroll CSS uit zodra Lenis actief is --- */
html.lenis { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* --- SCROLL PROGRESS --- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 10000;
  width: 100%; height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* --- CUSTOM CURSOR (alleen fijne pointers) --- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 10001;
  border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.35);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              border-color 0.3s, background-color 0.3s;
}
.cursor-ring.is-hover {
  width: 56px; height: 56px;
  border-color: var(--accent);
  background: rgba(37,99,235,0.08);
}
.cursor-ring.is-hover::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
body.has-cursor, body.has-cursor a, body.has-cursor button,
body.has-cursor input, body.has-cursor select, body.has-cursor label {
  cursor: none;
}

/* --- KINETISCHE TYPOGRAFIE --- */
/* JS splitst [data-kinetic] in gemaskeerde woorden. */
.k-mask {
  display: inline-block; overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em; margin-bottom: -0.08em; /* descenders niet afsnijden */
}
.k-word {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}
.no-js [data-kinetic], .reduced-motion [data-kinetic] { opacity: 1; }
.kinetic-done .k-word { transform: none; }

/* Fallback als JS niet draait: tekst gewoon zichtbaar */
[data-kinetic] { visibility: visible; }
.js-pending [data-kinetic] .k-word { transform: translateY(115%); }

/* --- HERO STAGE (homepage) --- */
.hero-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 0 9vh;
  overflow: hidden;
  isolation: isolate;
}
.hero-stage canvas.hero-gl {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
}
.hero-stage::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(37,99,235,0.12), transparent 60%),
    linear-gradient(to bottom, rgba(3,3,3,0.55), rgba(3,3,3,0.1) 40%, rgba(3,3,3,0.85));
  pointer-events: none;
}
.hero-inner { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 5vw; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 9.5vw, 10.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}
.hero-title .accent { color: var(--accent); }
.hero-foot {
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center;
  margin-top: 5vh;
}
.hero-sub {
  max-width: 46ch; color: var(--text-dim);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem); line-height: 1.65;
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px 64px;
  margin-top: 6vh; padding-top: 28px;
  border-top: 1px solid var(--line-bright);
}
.hero-stats .num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 2.2vw, 2rem); color: #fff; line-height: 1.1;
}
.hero-stats .txt {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint); margin-top: 6px;
}
.hero-scrollhint {
  position: absolute; right: 5vw; bottom: 9vh;
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 12px;
}
.hero-scrollhint::after {
  content: ''; width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollhint 2.2s var(--ease-out) infinite;
}
@keyframes scrollhint {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- MARQUEE --- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0;
  position: relative;
}
.marquee-track {
  display: inline-flex; gap: 0;
  animation: marquee 36s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 28px;
  padding-right: 28px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--text-dim);
}
.marquee-item .dot { color: var(--accent); font-size: 0.7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- FULL-BLEED & PARALLAX BEELD --- */
.bleed {
  width: 100vw; margin-left: calc(50% - 50vw);
}
.parallax-frame {
  position: relative; overflow: hidden;
  border-radius: 4px;
}
.parallax-frame img {
  width: 100%; height: 118%;
  object-fit: cover;
  will-change: transform;
}
.parallax-frame figcaption {
  position: absolute; left: 24px; bottom: 20px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(3,3,3,0.55);
  backdrop-filter: blur(8px);
  padding: 8px 14px; border-radius: 2px;
}

/* --- SECTIE-NUMMERS (redactionele signatuur) --- */
.section-index {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.2em; color: var(--text-faint);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px; text-transform: uppercase;
}
.section-index::after {
  content: ''; flex: 1; max-width: 120px; height: 1px;
  background: var(--line-bright);
}

/* --- DISPLAY HEADLINES OP PAGINA'S --- */
.page-hero h1 {
  font-size: clamp(2.8rem, 7.5vw, 7.5rem);
  line-height: 0.98; letter-spacing: -0.025em;
  max-width: 12ch;
}
.page-hero p { max-width: 52ch; }

/* --- HOVER: KAARTEN EN BEELD --- */
.tool-card, .article-card {
  transition: transform 0.5s var(--ease-out), border-color 0.4s, background-color 0.4s;
}
.tool-card:hover, .article-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-bright);
}
.visual-frame img, .parallax-frame img {
  transition: transform 0.8s var(--ease-out), filter 0.6s;
}
.visual-frame:hover img { transform: scale(1.03); }

/* --- MAGNETISCHE ELEMENTEN --- */
.magnetic { will-change: transform; display: inline-block; }

/* --- LINK-UNDERLINE ANIMATIE --- */
.article-content a:not(.btn-primary), .footer a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease-out), color 0.3s;
}
.article-content a:not(.btn-primary):hover, .footer a:hover {
  background-size: 100% 1px;
  color: #fff;
}

/* --- REDACTIEONELE WATERMERKEN --- */
.hero-stage .hero-watermark { color: rgba(255,255,255,0.04); z-index: -1; }

/* --- REDUCED MOTION: alles statisch --- */
@media (prefers-reduced-motion: reduce) {
  .k-word { transform: none !important; }
  .marquee-track { animation: none; }
  .hero-scrollhint::after { animation: none; }
  .parallax-frame img { height: 100%; }
  .cursor-dot, .cursor-ring { display: none; }
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: auto; }
  .scroll-progress { display: none; }
}
