/* ============ basis ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
  font-family: "Valley Sans";
  src: url("../fonts/ValleySans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0a10;
  --ink: #f2efe9;
  --ink-dim: rgba(242, 239, 233, .55);
  --ink-faint: rgba(242, 239, 233, .28);
  --c-vormgeving: #7c5cff;
  --c-drie-d: #ff5a3c;
  --c-websites: #22d3ee;
  --c-machinekamer: #ffb020;
  --font-display: "Valley Sans", sans-serif;
  --font-body: "Inter", sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
}
#scene.is-ready { opacity: 1; }

/* ============ laad-indicator ============ */
.laden {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 600px at 68% 30%, rgba(124, 92, 255, .10), transparent 60%),
    var(--bg);
  transition: opacity .6s ease;
}
.laden.is-weg { opacity: 0; pointer-events: none; }

.laden-kaart {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* de foto rendert van pixels naar scherp mee met de voortgang */
.laden-foto {
  position: relative;
  width: 148px;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #0e0d15;
}
.laden-foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}
.laden-foto-pixel {
  image-rendering: pixelated;
  filter: saturate(.8) brightness(.75);
}
.laden-foto-scherp {
  clip-path: inset(0 0 100% 0);
}
.laden-scan {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-drie-d), transparent);
  box-shadow: 0 0 14px 2px rgba(255, 90, 60, .55);
}
/* HUD-hoekjes om de foto */
.laden-foto::before, .laden-foto::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ink-dim);
  z-index: 2;
}
.laden-foto::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.laden-foto::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.laden-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.laden-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: .14em;
}
.laden-logo .dot { color: var(--c-drie-d); }
.laden-fase {
  font-size: 12.5px;
  color: var(--ink-dim);
  min-height: 1.2em;
  animation: laden-puls 1.7s ease-in-out infinite;
}
.laden-balk {
  width: 188px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink-faint);
}
.laden-vul {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-drie-d), var(--c-websites));
  transition: width .3s ease;
}
.laden-pct {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
@keyframes laden-puls {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .laden-logo { animation: none; }
}

/* ============ overlay-ui ============ */
.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity .5s ease;
}
.ui.is-hidden { opacity: 0; }

.ui-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
}

.ui-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .14em;
  pointer-events: auto;
}
.ui-brand-foto {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--ink-faint);
}
.ui-brand .dot { color: var(--c-drie-d); } /* de punt blijft rood-oranje */

.ui-nav { display: flex; gap: 28px; pointer-events: auto; }

.ui-link {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
  padding: 6px 0;
  transition: color .25s ease;
}
.ui-link:hover { color: var(--ink); }
.ui-link--alt {
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  padding: 7px 16px;
  transition: color .25s ease, border-color .25s ease;
}
.ui-link--alt:hover { border-color: var(--ink-dim); }

.ui-hero {
  position: absolute;
  top: 11vh;
  left: 0; right: 0;
  text-align: center;
  transition: opacity .8s ease, transform .8s ease;
}
.ui-hero.is-away { opacity: 0; transform: translateY(-24px); }

.ui-pil {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 16px;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink-dim);
  background: rgba(11, 10, 16, .35);
}

.ui-title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -.015em;
}

.ui-intro {
  margin: 20px auto 0;
  max-width: 540px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
}

.ui-hint {
  position: fixed;
  left: 50%;
  bottom: 2vh;
  transform: translateX(-50%);
  font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .85);
  letter-spacing: .02em;
  color: var(--ink-faint);
  animation: hint-pulse 3.2s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: .95; }
}

/* ============ startknop ============ */
.start-knop {
  position: fixed;
  left: 50%;
  bottom: 9vh;
  transform: translateX(-50%);
  pointer-events: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(242, 239, 233, .4);
  border-radius: 999px;
  padding: 15px 42px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .3s ease, background .3s ease,
              box-shadow .3s ease, transform .3s ease;
  animation: start-gloed 3.4s ease-in-out infinite;
}
.start-knop:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 34px rgba(255, 90, 60, .3);
  transform: translateX(-50%) translateY(-2px);
}
.start-knop[hidden] { display: none; }
@keyframes start-gloed {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 90, 60, .12); }
  50% { box-shadow: 0 0 30px rgba(255, 90, 60, .3); }
}
@media (prefers-reduced-motion: reduce) {
  .start-knop { animation: none; }
}

@media (max-width: 899px) {
  .start-knop { display: none; }
}

/* ============ portaallabels ============ */
.labels { position: fixed; inset: 0; pointer-events: none; z-index: 9; }

.label {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, 0);
  text-align: center;
  opacity: 0;
  transition: opacity .4s ease;
  will-change: transform;
}
.label.is-visible { opacity: 1; }

.label-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .06em;
  transition: color .3s ease, text-shadow .3s ease;
}
.label-sub {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-faint);
  transition: color .3s ease;
}
.label.is-hot .label-sub { color: var(--ink-dim); }
.label.is-hot[data-portal="vormgeving"] .label-name { color: var(--c-vormgeving); }
.label.is-hot[data-portal="drie-d"] .label-name { color: var(--c-drie-d); }
.label.is-hot[data-portal="websites"] .label-name { color: var(--c-websites); }
.label.is-hot[data-portal="machinekamer"] .label-name { color: var(--c-machinekamer); }

/* ============ flash / vlucht ============ */
.flash {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity .55s ease;
}
.flash.is-on { opacity: 1; }

/* ============ placeholder-wereld ============ */
.world {
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    radial-gradient(1200px 700px at 50% 115%, var(--world-glow, rgba(255,90,60,.22)), transparent 65%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .7s ease;
}
.world.is-on { opacity: 1; }
.world[hidden] { display: none; }

.world-back {
  position: absolute;
  top: 30px; left: 40px;
  background: none;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 18px;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}
.world-back:hover { color: var(--ink); border-color: var(--ink-dim); }

.world-inner { text-align: center; max-width: 860px; padding: 0 32px; }

.world-kicker {
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--world-accent, var(--c-vormgeving));
  margin-bottom: 16px;
}
.world-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -.01em;
}
.world-note {
  margin-top: 18px;
  color: var(--ink-dim);
  font-size: 15px;
}
.world-cases {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.world-case {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px dashed var(--ink-faint);
  background: rgba(255, 255, 255, .02);
}

/* ============ 3D-wereld: hologram-hal ============ */
.w3d {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}
.w3d[hidden] { display: none; }
.w3d .world-back { pointer-events: auto; z-index: 2; }

.w3d-titel {
  position: absolute;
  top: 88px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: .02em;
  text-align: center;
  opacity: 1;
  transition: opacity 1.2s ease;
}
.w3d-titel-kicker {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--c-drie-d);
  margin-bottom: 8px;
}
.w3d-titel.is-weg { opacity: 0; }

.w3d-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: opacity .8s ease;
}
.w3d-hint.is-weg { opacity: 0; }

.w3d-paneel {
  position: absolute;
  top: 50%; right: 44px;
  transform: translateY(-50%) translateX(24px);
  width: min(720px, calc(100vw - 88px));
  max-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid rgba(124, 92, 255, .3);
  background: rgba(13, 10, 26, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(124, 92, 255, .12);
  pointer-events: auto;
  opacity: 0;
  overflow-y: auto;
  transition: opacity .45s ease, transform .45s ease;
}
.w3d-paneel.is-open { opacity: 1; transform: translateY(-50%) translateX(0); }
.w3d-paneel[hidden] { display: none; }

.w3d-sluit {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  transition: color .25s ease;
}
.w3d-sluit:hover { color: var(--ink); }

.w3d-media video {
  width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 12px;
  background: #000;
  display: block;
}

.w3d-info { min-width: 0; padding-right: 8px; }
.w3d-kicker {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--c-drie-d);
  margin-bottom: 10px;
}
.w3d-naam {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -.01em;
  line-height: 1.12;
}
.w3d-klant {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-dim);
}
.w3d-verhaal {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(242, 239, 233, .82);
}
.w3d-tools {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--ink-dim);
}
.w3d-tools[hidden] { display: none; }
.w3d-extra-kop {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.w3d-extra-rij {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.w3d-extra-rij video {
  width: 118px;
  border-radius: 8px;
  background: #000;
  display: block;
}

/* ============ mobiel / fallback-kaarten ============ */
.cards {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
  padding: 0 22px 40px;
}
.cards-top { padding: 26px 4px; }
.cards-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.1;
  margin: 26px 4px 34px;
}
.cards-intro {
  margin: -18px 4px 30px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 560px;
}

.cards-grid { display: grid; gap: 14px; }

.card {
  display: block;
  border-radius: 18px;
  padding: 26px 22px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(420px 220px at 15% -20%, var(--card-glow), transparent 70%),
    rgba(255, 255, 255, .03);
}
.card--vormgeving { --card-glow: rgba(124, 92, 255, .35); }
.card--drie-d { --card-glow: rgba(255, 90, 60, .35); }
.card--websites { --card-glow: rgba(34, 211, 238, .3); }
.card--machinekamer { --card-glow: rgba(255, 176, 32, .3); }

.card-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
}
.card-sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-dim);
}

@media (max-width: 899px) {
  #scene, .ui, .labels { display: none; }
}
@media (min-width: 900px) {
  .cards:not(.is-forced) { display: none; }
}
