/* ============================================================
   OUT OF FRAME — HOMEPAGE
   Bewegend kleurverloop (WebGL) + soepel scrollen (Lenis)
   + grote typografie. Bouwt voort op css/style.css.
   ============================================================ */

.home {
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  background: var(--bg);
}

/* Lenis regelt het soepele scrollen; dubbel gladmaken voorkomen */
html.lenis { scroll-behavior: auto; }

.h-wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Achtergrond: kleurverloop ---------- */
.h-canvas, .h-fallback {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.h-canvas { z-index: -1; opacity: 0; transition: opacity 1.4s ease; }
.gl-on .h-canvas { opacity: 1; }

/* CSS-versie van het verloop: zonder WebGL, of tot het canvas draait */
.h-fallback {
  z-index: -2;
  background:
    radial-gradient(60% 70% at 78% 30%, rgba(0, 229, 255, 0.55), transparent 62%),
    radial-gradient(55% 65% at 30% 65%, rgba(109, 92, 255, 0.75), transparent 65%),
    radial-gradient(80% 60% at 60% 110%, rgba(42, 20, 140, 0.9), transparent 70%),
    #07061a;
  animation: fallbackDrift 18s ease-in-out infinite alternate;
}
.gl-on .h-fallback { animation: none; }
@keyframes fallbackDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: -6vw 4vh, 5vw -3vh, 0 -4vh; }
}

/* Filmkorrel over het verloop (inline SVG-ruis, geen extra bestand) */
.h-grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none;
  opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Navigatie ---------- */
.nav--home .nav__inner { max-width: var(--wrap); padding: 0 var(--gutter); }
.nav--home .nav__links a:not(.btn) { color: rgba(242, 243, 247, 0.78); }
.nav--home .nav__links a:not(.btn):hover { color: #fff; }

/* ---------- Knoppen ---------- */
.btn--light {
  background: #f4f4f8; color: #07070c;
  gap: 10px;
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(0, 229, 255, 0.35); }
.btn--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.btn__arrow { display: inline-block; transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Labels & koppen ---------- */
.h-label, .h-tag {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim);
}
.h-tag {
  display: inline-flex; align-items: center; gap: 10px;
  color: rgba(255, 255, 255, 0.85);
}
.h-title {
  font-size: clamp(40px, 6.4vw, 96px);
  font-weight: 600; letter-spacing: -0.045em; line-height: 0.95;
}
.h-head { display: grid; gap: 22px; margin-bottom: clamp(44px, 6vw, 80px); }
.h-head--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: end; gap: 40px;
}
.h-head__text { color: var(--text-dim); font-size: 17px; line-height: 1.6; }
.h-head--split > .h-link { justify-self: end; }
.h-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: gap 0.35s var(--ease-out), background-size 0.35s var(--ease-out);
}
.h-link:hover { gap: 16px; }

/* Secties met een effen achtergrond schuiven over het verloop heen */
.h-section {
  position: relative;
  background: var(--bg);
  padding: clamp(90px, 12vw, 170px) 0;
  border-top: 1px solid var(--line);
}

/* ============================================================
   HERO
   ============================================================ */
.h-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  /* de parallax mag de inhoud nooit over de volgende sectie schuiven */
  overflow: clip;
}
/* Donkere zoom onderaan zodat de titel altijd leesbaar is */
.h-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 6, 9, 0.35) 0%, transparent 22%, transparent 45%, rgba(6, 6, 9, 0.55) 100%);
}
.h-hero__inner {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(24px, 4vh, 48px)) var(--gutter) clamp(28px, 4vh, 44px);
  display: flex; flex-direction: column;
  will-change: transform, opacity;
}
.h-hero__top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 40px;
}
.h-hero__intro {
  text-shadow: 0 1px 18px rgba(6, 6, 9, 0.35);
  max-width: 400px;
  font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.86);
}
.h-hero__title {
  margin-top: auto;
  /* schaalt mee met breedte én hoogte, zodat alles op lage schermen past */
  font-size: clamp(42px, min(10.4vw, 15.5vh), 172px);
  font-weight: 600; letter-spacing: -0.055em; line-height: 0.9;
  color: #fff;
  padding-top: 40px;
}
.h-hero__title em {
  font-style: normal; font-weight: 300;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}
.h-line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.h-line > span { display: inline-block; }

.h-hero__bottom {
  margin-top: clamp(28px, 4.5vh, 52px);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.h-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.h-hero__meta {
  display: flex; gap: 36px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.8);
}
.h-hero__meta b { font-weight: 500; color: #fff; }
.h-scroll { display: inline-flex; align-items: center; gap: 12px; }
.h-scroll i {
  position: relative; width: 1px; height: 30px; overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}
.h-scroll i::after {
  content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: #fff;
  animation: scrollCue 2.2s var(--ease-out) infinite;
}
@keyframes scrollCue { to { top: 100%; } }
.h-hero .night-msg { align-self: flex-start; color: rgba(255, 255, 255, 0.8); border-color: rgba(255, 255, 255, 0.25); }

/* Intro-animatie: regels schuiven omhoog uit hun masker */
.js .h-line > span {
  transform: translateY(105%);
  transition: transform 1.25s var(--ease-out) var(--d, 0s);
}
.js .h-in {
  opacity: 0; transform: translateY(16px);
  transition: opacity 1s ease var(--d, 0s), transform 1.2s var(--ease-out) var(--d, 0s);
}
.js .is-loaded .h-line > span,
.js .is-loaded .h-in { transform: none; opacity: 1; }

/* ============================================================
   LOPENDE BAND
   ============================================================ */
.h-marquee {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 30px) 0;
}
.h-marquee .marquee__track { gap: clamp(26px, 3vw, 48px); align-items: center; }
.h-marquee .marquee__track span {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 64px); letter-spacing: -0.03em;
  color: var(--text);
}
.h-marquee .marquee__track span:nth-of-type(even) {
  color: transparent; -webkit-text-stroke: 1px rgba(242, 243, 247, 0.55);
}
.h-marquee .marquee__track i {
  font-style: normal; font-size: clamp(18px, 2vw, 28px);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================
   STATEMENT
   ============================================================ */
.h-statement__grid {
  display: grid; grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 90px); align-items: start;
}
.h-statement__side { display: grid; gap: 40px; position: sticky; top: calc(var(--nav-h) + 30px); }
.h-wheel { justify-content: flex-start; }
.h-wheel .logo-orbit { width: min(280px, 100%); filter: none; }
.h-statement__text {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.3vw, 66px);
  font-weight: 500; letter-spacing: -0.035em; line-height: 1.08;
  margin-bottom: 48px;
}
.h-statement__text em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* woorden lichten op tijdens het scrollen (zie js/home/home.js) */
.h-word { opacity: 0.16; transition: opacity 0.35s ease; }
.h-word.is-lit { opacity: 1; }

/* ============================================================
   DIENSTEN: grote lijst
   ============================================================ */
.h-services { list-style: none; border-top: 1px solid var(--line); }
.h-services li { border-bottom: 1px solid var(--line); }
.h-services a {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.05fr) 40px;
  min-height: clamp(110px, 10vw, 140px);
  gap: 30px; align-items: center;
  padding: clamp(26px, 3vw, 40px) 0;
  transition: opacity 0.5s ease;
}
/* verlooplijn die bij hover van links naar rechts over de onderrand loopt */
.h-services a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}
.h-services__num { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.h-services__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(24px, 2.7vw, 42px); letter-spacing: -0.035em; line-height: 1.05;
  transition: transform 0.6s var(--ease-out), color 0.4s ease;
}
.h-services__text { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; transition: color 0.4s ease; }
.h-services__arrow {
  justify-self: end;
  font-size: 28px; font-family: var(--font-display); color: var(--text-dim);
  transform: rotate(-45deg);
  transition: transform 0.6s var(--ease-out), color 0.4s ease;
}
@media (hover: hover) {
  /* de rest van de lijst treedt terug, de gekozen rij komt naar voren */
  .h-services:hover a { opacity: 0.38; }
  .h-services a:hover { opacity: 1; }
  .h-services a:hover::after { transform: scaleX(1); }
  .h-services a:hover .h-services__name { transform: translateX(14px); }
  .h-services a:hover .h-services__text { color: var(--text); }
  .h-services a:hover .h-services__arrow { transform: rotate(0deg); color: var(--accent-2); }
}
.h-services a:focus-visible { outline: 1px solid var(--accent-2); outline-offset: 4px; }

/* ============================================================
   DEMO
   ============================================================ */
.h-demo .demo { background: rgba(255, 255, 255, 0.02); border-radius: 28px; }

/* ============================================================
   WERKWIJZE: horizontaal scrollen
   De sectie krijgt via JS extra hoogte; het binnenste blok blijft
   "plakken" en de stappen schuiven opzij terwijl je naar beneden scrolt.
   ============================================================ */
.h-process { padding: 0; }
.h-process__sticky {
  padding: clamp(90px, 12vw, 150px) 0 clamp(60px, 8vw, 100px);
}
.h-process__head { display: grid; gap: 22px; margin-bottom: clamp(28px, 5vh, 70px); }
/* op lage schermen moet kop + kaarten in één schermhoogte passen */
.h-process.is-pinned .h-title { font-size: clamp(36px, min(6.4vw, 10vh), 96px); }
.h-process__viewport { overflow: hidden; }
.h-process__track {
  list-style: none;
  display: flex; gap: 20px;
  /* links uitgelijnd met de kop erboven, ook op hele brede schermen */
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  will-change: transform;
}
/* zolang JS het niet overneemt: gewoon horizontaal veegbaar */
.h-process:not(.is-pinned) .h-process__viewport {
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.h-process:not(.is-pinned) .h-process__viewport::-webkit-scrollbar { display: none; }
.h-process:not(.is-pinned) .h-step { scroll-snap-align: start; }

.h-step {
  flex: 0 0 clamp(280px, 30vw, 430px);
  min-height: clamp(250px, 40vh, 420px);
  border: 1px solid var(--line); border-radius: 26px;
  padding: 34px 32px;
  background: linear-gradient(160deg, rgba(109, 92, 255, 0.08), rgba(0, 229, 255, 0.02) 60%);
  display: flex; flex-direction: column;
}
.h-step__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(64px, 7vw, 110px); letter-spacing: -0.06em; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1px rgba(0, 229, 255, 0.6);
  margin-bottom: auto;
}
.h-step h3 { font-size: 28px; margin: 30px 0 12px; letter-spacing: -0.03em; }
.h-step p { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; min-height: 4.8em; }
.h-step--end {
  border-style: dashed; background: none;
  justify-content: center; align-items: flex-start;
}
.h-step--end .h-link { font-size: 22px; }
.h-process__bar {
  margin-top: 40px; height: 1px; background: var(--line); position: relative;
}
.h-process__bar i {
  position: absolute; left: 0; top: 0; height: 100%; width: 100%;
  background: var(--grad); transform-origin: left; transform: scaleX(0);
}
.h-process:not(.is-pinned) .h-process__bar { display: none; }
.h-process.is-pinned .h-process__sticky {
  position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav-h) 0 30px;
  overflow: hidden;
}
/* auto-marges in een flex-kolom krimpen anders tot nul breedte */
.h-process.is-pinned .h-process__sticky > * { width: 100%; }

/* ============================================================
   VEILIG: vier pijlers
   ============================================================ */
.h-pillars {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.h-pillars article {
  padding: 34px 28px 10px 0;
  border-right: 1px solid var(--line);
  margin-right: 28px;
}
.h-pillars article:last-child { border-right: none; margin-right: 0; }
.h-pillars__num { font-family: var(--mono); font-size: 13px; color: var(--accent-2); }
.h-pillars h3 { font-size: 23px; margin: 46px 0 12px; letter-spacing: -0.025em; }
.h-pillars p { color: var(--text-dim); font-size: 15px; line-height: 1.6; }

/* ============================================================
   CONTACT (over het kleurverloop)
   ============================================================ */
.h-contact {
  position: relative;
  padding: clamp(110px, 14vw, 190px) 0;
}
.h-contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(6, 6, 9, 0) 28%, rgba(6, 6, 9, 0) 70%, rgba(6, 6, 9, 0.6) 100%);
}
.h-contact__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px);
  gap: clamp(40px, 6vw, 100px); align-items: center;
}
.h-contact__intro .h-label { color: rgba(255, 255, 255, 0.85); }
.h-contact__title {
  margin: 22px 0 28px;
  font-size: clamp(44px, 6.6vw, 104px);
  font-weight: 600; letter-spacing: -0.05em; line-height: 0.93;
  color: #fff;
}
.h-contact__text { max-width: 460px; font-size: 17px; color: rgba(255, 255, 255, 0.88); }
.h-contact__mail { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.h-contact__mail .contact-card__mail { color: rgba(255, 255, 255, 0.8); }

.h-form {
  margin: 0; max-width: none;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 28px;
  background: rgba(8, 8, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
}
.h-form .btn { justify-self: stretch; min-width: 0; }
.h-form .cf__privacy { text-align: left; }
.h-form .cf__status { text-align: left; }
.h-form .cf__status:empty { min-height: 0; margin-top: -18px; }

/* ============================================================
   FOOTER met groot woordmerk
   ============================================================ */
.h-footer {
  position: relative; background: var(--bg);
  border-top: 1px solid var(--line);
  padding-top: 34px; overflow: hidden;
}
.h-footer__row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 13.5px;
}
.h-footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.h-footer__links a { transition: color 0.2s ease; }
.h-footer__links a:hover { color: var(--text); }
.h-footer__word {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15.4vw; letter-spacing: -0.06em; line-height: 0.8;
  white-space: nowrap; text-align: center;
  margin: clamp(30px, 5vw, 70px) calc(var(--gutter) * -1) 0;
  padding-bottom: 0.04em;
  background: linear-gradient(180deg, rgba(242, 243, 247, 0.95), rgba(109, 92, 255, 0.35) 75%, transparent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (min-width: 1360px) {
  .h-footer__word { font-size: 209px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .h-hero__top { flex-direction: column; gap: 22px; }
  .h-head--split { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .h-statement__grid { grid-template-columns: 1fr; }
  .h-statement__side { position: static; display: flex; justify-content: space-between; align-items: center; }
  .h-wheel .logo-orbit { width: 120px; }
  .h-services a { grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 12px 16px; }
  .h-services__text { grid-column: 2 / 3; grid-row: 2; }
  .h-services__arrow { grid-row: 1; grid-column: 3; }
  .h-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-pillars article:nth-child(2) { border-right: none; margin-right: 0; }
  .h-pillars article:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .h-contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .h-hero__title { font-size: clamp(42px, 13.2vw, 64px); }
  .h-hero__intro { font-size: 16px; }
  .h-hero__cta { width: 100%; flex-direction: column; }
  .h-hero__cta .btn { width: 100%; }
  .h-hero__meta { width: 100%; justify-content: space-between; }
  .h-pillars { grid-template-columns: 1fr; }
  .h-pillars article { border-right: none; margin-right: 0; padding-right: 0; }
  .h-pillars article + article { border-top: 1px solid var(--line); }
  .h-pillars h3 { margin-top: 22px; }
  .h-step { flex-basis: 82vw; }
  .h-form { border-radius: 22px; }
  .h-footer__links { gap: 16px 20px; }
}

/* Lage schermen (laptop met weinig hoogte, klein venster): hero compacter */
@media (max-height: 680px) and (min-width: 561px) {
  .h-hero__inner { padding-top: calc(var(--nav-h) + 16px); padding-bottom: 20px; }
  .h-hero__top { gap: 14px; }
  .h-hero__intro { font-size: 15.5px; }
  .h-hero__title { padding-top: 18px; }
  .h-hero__bottom { margin-top: 20px; }
}

/* Minder beweging: geen intro-animaties, geen oplichtende woorden */
@media (prefers-reduced-motion: reduce) {
  .js .h-line > span, .js .h-in { transform: none; opacity: 1; transition: none; }
  .h-word { opacity: 1; }
  .h-fallback, .h-scroll i::after { animation: none; }
}
