/* =========================================================
   Digital Labo — design tokens
   ========================================================= */
:root {
  /* Kleur */
  --ink: #0B0B0B;
  --paper: #FFFFFF;
  --sand: #F6F3EF;

  --coral: #E2603C;        /* merkkoraal: het bolletje, grote accenten */
  --coral-ink: #C94E2C;    /* 4,5:1 op wit: knoppen en kleine tekst */
  --coral-deep: #B34527;   /* hover */
  --coral-soft: rgba(226, 96, 60, 0.14);

  --text: #0B0B0B;
  --text-muted: #3A3A3A;
  --text-quiet: #6E6E6E;
  --text-on-ink: #FFFFFF;
  --text-on-ink-muted: #B4B4B4;
  --text-on-ink-quiet: #8A8A8A;  /* 5,7:1 op ink */

  --line: #DDDDDD;
  --line-on-ink: rgba(255, 255, 255, 0.16);

  /* Typografie */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Ritme */
  --pad: clamp(24px, 5vw, 64px);
  --section-y: clamp(72px, 10vw, 120px);
  --radius-card: 24px;
  --radius-pill: 999px;

  /* Beweging */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --speed: 0.28s;
}

/* =========================================================
   Basis
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

h1, h2, h3 { text-wrap: balance; }

canvas { display: block; }

:focus-visible {
  outline: 2px solid var(--coral-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--coral-ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Ankerlinks mogen niet onder de sticky header verdwijnen */
section[id] { scroll-margin-top: 78px; }

.wrap { max-width: 900px; margin: 0 auto; }
.wrap-wide { max-width: 1100px; }
.wrap-contact { max-width: 640px; }

/* =========================================================
   Het bolletje — het atoom van de site
   ========================================================= */
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}

@keyframes dot-arrive {
  0%   { transform: translate(-14px, -18px) scale(0.4); opacity: 0; }
  60%  { transform: translate(0, 2px) scale(1.15); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
/* Een opgepakt bolletje laat zijn plek leeg achter.
   visibility, niet opacity: dot-arrive vult zijn eindwaarde in en zou
   een opacity-regel overschrijven. */
.dot.is-taken { visibility: hidden; }

/* =========================================================
   Easter egg — het bolletje als cursor
   ========================================================= */
.cursor-dot {
  position: fixed;
  left: 0; top: 0;
  width: 9px; height: 9px;
  border: 0 solid var(--coral);
  border-radius: 50%;
  background: var(--coral);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  will-change: transform;
  transition:
    width 0.18s var(--ease),
    height 0.18s var(--ease),
    border-width 0.18s var(--ease),
    border-radius 0.18s var(--ease),
    background-color 0.18s var(--ease),
    opacity 0.15s linear;
}
.cursor-dot.is-active { opacity: 1; }
/* Boven klikbare dingen: open ring in plaats van het handje */
.cursor-dot.is-link {
  width: 26px; height: 26px;
  border-width: 2px;
  background: transparent;
}
/* Boven tekst: streepje in plaats van de tekstcursor */
.cursor-dot.is-text {
  width: 2px; height: 22px;
  border-radius: 1px;
}

html.dot-carried,
html.dot-carried * { cursor: none !important; }

/* Alleen met een echte muis valt er iets op te pakken */
@media (hover: hover) and (pointer: fine) {
  .logo-dot {
    position: relative;
    transition: transform 0.2s var(--ease);
  }
  /* Ruimer aanraakvlak dan de 7px die je ziet */
  .logo-dot::after {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
  }
  .logo-dot:hover { transform: scale(1.5); }
}

/* =========================================================
   Typografische componenten
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.eyebrow-num {
  color: var(--coral-ink);
  position: relative;
  padding-right: 12px;
}
.eyebrow-num::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 1px;
  background: var(--line);
}
.eyebrow-on-ink { color: var(--text-on-ink-quiet); }
.eyebrow-on-ink .eyebrow-num { color: var(--coral); }
.eyebrow-on-ink .eyebrow-num::after { background: var(--line-on-ink); }

.mono-num {
  font-family: var(--font-mono);
  font-size: 0.78em;
  color: var(--coral-ink);
  font-variant-numeric: tabular-nums;
}

.accent { color: var(--coral); }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin: 0 0 40px;
}

.body-text {
  font-size: 16.5px;
  line-height: 1.75;
  max-width: 62ch;
  margin: 0 0 20px;
  color: var(--text-muted);
}
.body-text:last-child { margin-bottom: 0; }
.body-text-lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.45;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 24px;
}

/* =========================================================
   Knoppen
   ========================================================= */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background-color var(--speed) var(--ease), transform 0.12s var(--ease);
}
.btn-primary {
  background: var(--coral-ink);
  color: #fff;
  font-size: 15.5px;
  padding: 16px 32px;
}
.btn-nav {
  background: var(--coral-ink);
  color: #fff;
  padding: 10px 22px;
  font-size: 14.5px;
}
.btn:hover { background: var(--coral-deep); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-on-ink);
  padding: 16px 4px;
  position: relative;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 12px;
  height: 1px;
  background: var(--line-on-ink);
  transform-origin: left;
  transition: transform var(--speed) var(--ease), background-color var(--speed) var(--ease);
}
.btn-ghost:hover::after { background: var(--coral); transform: scaleX(1.02); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.logo-word {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.7px;
  line-height: 1;
  color: var(--text);
}
.logo-word-sm { font-size: 16px; letter-spacing: -0.5px; }
.logo-bold { font-weight: 700; }
.logo-light { font-weight: 300; margin-left: 4px; }
.logo-word-sm .logo-light { margin-left: 3px; }
.logo-dot { transform-origin: center; }
.js .logo-dot { animation: dot-arrive 0.6s var(--ease) 0.15s both; }
.logo-dot-sm { width: 5px; height: 5px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  font-size: 14.5px;
  font-weight: 500;
}
/* Alleen tekstlinks krijgen navkleur — knoppen houden hun eigen stijl.
   (Voorheen overschreef `.site-nav a` de witte tekst van .btn-nav.) */
.site-nav a:not(.btn) {
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--coral-ink); }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

/* Voortgangsbalk onderaan de header */
.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.scroll-progress-bar {
  display: block;
  height: 100%;
  background: var(--coral);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 18px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobiel paneel */
.mobile-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--pad) 24px;
  display: grid;
  gap: 4px;
}
.mobile-nav[hidden] { display: none; }
.js .mobile-nav { animation: panel-in 0.22s var(--ease) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.mobile-nav a:not(.btn) {
  font-size: 17px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.mobile-nav-cta {
  margin-top: 20px;
  text-align: center;
}

/* =========================================================
   Sectierail (meetinstrument, desktop)
   ========================================================= */
.rail {
  display: none;
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  gap: 20px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-quiet);
  font-variant-numeric: tabular-nums;
}
.rail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color var(--speed) var(--ease), transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.rail-label {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
  white-space: nowrap;
}
.rail-item:hover .rail-label,
.rail-item.is-active .rail-label { opacity: 1; transform: none; }
.rail-item.is-active .rail-dot {
  background: var(--coral);
  transform: scale(1.3);
  box-shadow: 0 0 0 5px var(--coral-soft);
}
.rail-item.is-active { color: var(--text); }
/* Boven donkere secties draait de rail mee van kleur */
.rail.is-on-dark .rail-item { color: var(--text-on-ink-quiet); }
.rail.is-on-dark .rail-dot { background: rgba(255, 255, 255, 0.28); }
.rail.is-on-dark .rail-item.is-active { color: var(--text-on-ink); }
.rail.is-on-dark .rail-item.is-active .rail-dot { background: var(--coral); }

@media (min-width: 1200px) { .rail { display: grid; } }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: clamp(64px, 10vw, 120px) var(--pad) clamp(80px, 12vw, 140px);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Achter de tekstkolom houdt het veld zich in; in de open ruimte ernaast
   komt het volledig tot zijn recht. Op mobiel staat de tekst over de hele
   breedte, dus daar blijft het veld gelijkmatig. */
@media (min-width: 761px) {
  .hero-canvas {
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.55) 45%, #000 72%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.55) 45%, #000 72%);
  }
}
.hero-inner { position: relative; z-index: 1; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.6vw, 60px);
  letter-spacing: -2px;
  line-height: 1.08;
  margin: 0 0 26px;
  max-width: 16ch;
}
.hero-lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 25px);
  letter-spacing: -0.3px;
  line-height: 1.4;
  margin: 0 0 24px;
  max-width: 34ch;
}
.hero-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-on-ink-muted);
  max-width: 58ch;
  margin: 0 0 40px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
}

/* =========================================================
   Secties
   ========================================================= */
.section {
  padding: var(--section-y) var(--pad);
  border-bottom: 1px solid var(--line);
}
.section-tint { background: var(--sand); }

/* =========================================================
   Diensten
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--paper);
  padding: 30px 28px 28px;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(11, 11, 11, 0.07);
}
.card-dot { margin-bottom: 20px; transition: transform var(--speed) var(--ease); }
.card:hover .card-dot { transform: scale(1.4); }

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.65;
  margin: 0 0 12px;
}
/* Markeer-pill die vanuit het midden uitvouwt, per tekstregel afzonderlijk */
.card-title span {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 2px 12px;
  margin-left: -12px;
  border-radius: var(--radius-pill);
  background-image: linear-gradient(var(--coral-ink), var(--coral-ink));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0% 100%;
  transition: background-size var(--speed) var(--ease), color var(--speed) var(--ease);
}
.card:hover .card-title span,
.card-title span:hover {
  background-size: 100% 100%;
  color: #fff;
}
.card-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.card-dots { display: none; }

/* =========================================================
   Waarom
   ========================================================= */
.reasons { display: flex; flex-direction: column; }
.reason {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  align-items: baseline;
}
.reason:last-child { border-bottom: 1px solid var(--line); }
.reason-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
}
.reason-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
  margin-right: 10px;
  vertical-align: middle;
  transition: background-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.reason:hover .reason-title::before { background: var(--coral); transform: scale(1.35); }
.reason-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: var(--section-y) var(--pad);
  text-align: center;
}
.contact .eyebrow { justify-content: center; }
.contact .section-title { margin: 0 0 20px; }
.contact-intro {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-on-ink-muted);
  margin: 0 auto 36px;
  max-width: 46ch;
}
.btn-contact { margin-bottom: 44px; }
.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px 28px;
  flex-wrap: wrap;
  font-size: 14px;
}
.contact-links a {
  color: var(--text-on-ink);
  border-bottom: 2px solid var(--coral);
  padding-bottom: 2px;
  transition: color var(--speed) var(--ease);
}
.contact-links a:hover { color: var(--coral); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--paper);
  padding: 32px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .logo { display: inline-flex; }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-quiet);
  margin: 0;
}

/* =========================================================
   Mobiele CTA-balk
   ========================================================= */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(130%);
  transition: transform 0.32s var(--ease);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn {
  display: block;
  text-align: center;
  padding: 15px 24px;
}

/* =========================================================
   Reveals — zichtbaar zonder JS, geanimeerd mét JS
   ========================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Mobiel
   ========================================================= */
@media (max-width: 760px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }

  .hero-title { max-width: none; }

  /* Kaarten als swipe-rij, van rand tot rand */
  .cards {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1);
    padding: 4px var(--pad) 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .card:hover { transform: none; box-shadow: none; }

  .card-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }
  .card-dots-item {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--line);
    transition: background-color var(--speed) var(--ease), transform var(--speed) var(--ease);
  }
  .card-dots-item.is-active { background: var(--coral); transform: scale(1.35); }

  .reason { grid-template-columns: 1fr; gap: 8px; }

  .mobile-cta { display: block; }
  .site-footer { padding-bottom: 96px; }

  .hero-actions { gap: 4px 24px; }
}

/* =========================================================
   Minder beweging
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
