/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --surface: #e8e7e3;
  --surface-2: #dddcd7;
  --ink: #111110;
  --muted: #5f5e5a;
  --ascii: rgba(17, 17, 16, 0.26);
  --ascii-hot: #111110;
  --accent: #d4ff3a;
  --mark-hi: #9fc400;
  --accent-ink: #111110;
  --tile-shadow: 0 18px 40px -18px rgba(17, 17, 16, 0.35);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --margin: clamp(16px, 2.4vw, 32px);
  --radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0c;
    --surface: #181817;
    --surface-2: #232321;
    --ink: #f1f0ec;
    --muted: #a3a29c;
    --ascii: rgba(241, 240, 236, 0.2);
    --ascii-hot: #d4ff3a;
    --mark-hi: #d4ff3a;
    --tile-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --surface: #181817;
  --surface-2: #232321;
  --ink: #f1f0ec;
  --muted: #a3a29c;
  --ascii: rgba(241, 240, 236, 0.2);
  --ascii-hot: #d4ff3a;
  --mark-hi: #d4ff3a;
  --tile-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.4s, color 0.4s;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--margin); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }

h2 { font-size: clamp(40px, 5.6vw, 88px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; text-wrap: balance; }
h3 { font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.25s, color 0.25s;
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn:active { transform: scale(0.96); }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.link { font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 2px; transition: background-size 0.35s var(--ease-out); }
.link:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--margin);
  transition: transform 0.45s var(--ease-out), background-color 0.4s;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; justify-self: start; }
.nav__mark { height: 26px; width: auto; color: var(--ink); overflow: visible; }
.nav__mark circle { transition: transform 0.5s var(--ease-spring); transform-box: fill-box; transform-origin: center; }
.nav__brand:hover .nav__mark circle { transform: scale(1.25); }
.nav__brand:hover .nav__mark circle:nth-child(2n) { transition-delay: 0.05s; }

.nav__links { display: flex; gap: 6px; }
.nav__links a {
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); font-size: 15px; font-weight: 500;
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.nav__links a:hover { background: var(--surface-2); }
.nav__links a:active { transform: scale(0.95); }
.nav__end { display: flex; align-items: center; gap: 8px; justify-self: end; }
.nav__menu { display: none; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--surface); font-weight: 500; cursor: pointer; }

.theme {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: var(--surface); cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.theme:hover { background: var(--surface-2); }
.theme:active { transform: scale(0.92); }
.theme svg { width: 20px; height: 20px; overflow: visible; }
.theme__core, .theme__cut, .theme__rays { transition: transform 0.6s var(--ease-spring), r 0.6s var(--ease-spring), opacity 0.3s; transform-origin: 12px 12px; }
:root[data-theme="dark"] .theme__core { r: 9px; }
:root[data-theme="dark"] .theme__cut { transform: translate(-10px, 3px); }
:root[data-theme="dark"] .theme__rays { opacity: 0; transform: rotate(-90deg) scale(0.4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme__core { r: 9px; }
  :root:not([data-theme="light"]) .theme__cut { transform: translate(-10px, 3px); }
  :root:not([data-theme="light"]) .theme__rays { opacity: 0; transform: rotate(-90deg) scale(0.4); }
}

.sheet {
  position: absolute; top: calc(100% - 4px); right: var(--margin); left: var(--margin);
  display: grid; gap: 4px; padding: 8px;
  background: var(--surface); border-radius: 22px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.4);
  transform-origin: top right;
  animation: sheet-in 0.35s var(--ease-out);
}
.sheet[hidden] { display: none; }
.sheet a { padding: 14px 16px; border-radius: 14px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.sheet a:active { background: var(--surface-2); }
@keyframes sheet-in { from { opacity: 0; transform: scale(0.94) translateY(-6px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}
.hero__ascii { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.tiles { position: absolute; inset: 0; }
.tile {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w);
  translate: -50% -50%;
  z-index: var(--z, 1);
  border-radius: 12px;
  transition: opacity 0.4s, filter 0.4s;
}
.tile__move { display: block; will-change: transform; }
.tile__img {
  display: block; overflow: hidden; border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--tile-shadow);
  transition: transform 0.5s var(--ease-spring);
}
.tile img { width: 100%; height: auto; }
.tile:hover { z-index: 20; }
.tile:hover .tile__img { transform: scale(1.06); }
.tile:active .tile__img { transform: scale(1.02); }
@media (hover: hover) {
  .tiles:has(.tile:hover) .tile:not(:hover) { opacity: 0.35; filter: grayscale(0.7); }
}
.tile[data-hidden-mobile] { display: var(--mobile-display, block); }

.hero__copy {
  position: absolute; left: var(--margin); bottom: clamp(24px, 5vh, 56px);
  max-width: 560px; z-index: 5;
}
.hero__copy h1 {
  font-size: clamp(30px, 3vw, 46px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600;
  text-wrap: balance;
}
.hero__copy p { margin-top: 16px; max-width: 46ch; color: var(--ink); }
.hero__actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.hero__status {
  position: absolute; right: var(--margin); bottom: clamp(24px, 5vh, 56px);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2fd36b; position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* Cursor-label dat de tegel volgt */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  opacity: 0; transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s;
}
.cursor.is-on { opacity: 1; }
.cursor__label, .cursor__name {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap;
  transform: scale(0.6); transform-origin: 0 0; transition: transform 0.35s var(--ease-spring);
}
.cursor__label { background: var(--ink); color: var(--bg); }
.cursor__name { background: var(--accent); color: var(--accent-ink); transition-delay: 0.04s; }
.cursor.is-on .cursor__label, .cursor.is-on .cursor__name { transform: scale(1); }

/* ---------- Work (gestapelde kaarten) ---------- */
.work { padding-top: clamp(96px, 14vw, 200px); }
.work__head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.work__head p { max-width: 42ch; font-size: 19px; }
.stack { display: grid; gap: 24px; padding-inline: var(--margin); max-width: 1440px; margin-inline: auto; }
.case { position: sticky; top: calc(84px + var(--i, 0) * 14px); }
.case__inner {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 4vw, 72px); align-items: center;
  min-height: min(78vh, 720px);
  padding: clamp(28px, 4vw, 64px);
  border-radius: 32px;
  background: var(--c-bg); color: var(--c-ink);
  transform-origin: 50% 0;
  will-change: transform;
}
.case--kluis  { --c-bg: #1a1816; --c-ink: #efe8dc; --c-soft: #2a2622; --c-hi: #c8a971; }
.case--zzp    { --c-bg: #0c1311; --c-ink: #e8f6f0; --c-soft: #16211d; --c-hi: #3ee0a8; }
.case--beauty { --c-bg: #f3e6ea; --c-ink: #3c2f2b; --c-soft: #e9d6dc; --c-hi: #c2668f; }
.case--edeni  { --c-bg: #ecefe4; --c-ink: #22342a; --c-soft: #dde3d2; --c-hi: #b08d47; }
.case__kind { font-size: 15px; font-weight: 500; color: var(--c-hi); }
.case h3 { margin-top: 10px; font-size: clamp(34px, 4.2vw, 64px); line-height: 1; letter-spacing: -0.045em; }
.case__text > p:not(.case__kind) { margin-top: 20px; max-width: 44ch; }
.case__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-top: 32px; max-width: 420px; }
.case__meta dt { font-size: 14px; opacity: 0.7; }
.case__meta dd { font-weight: 500; }
.case__link {
  display: inline-flex; gap: 8px; align-items: center; margin-top: 36px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--c-ink); color: var(--c-bg); font-weight: 500;
  transition: transform 0.25s var(--ease-out), background-color 0.25s, color 0.25s;
}
.case__link:hover { background: var(--c-hi); color: var(--c-bg); }
.case__link:hover span { transform: translate(2px, -2px); }
.case__link span { transition: transform 0.25s var(--ease-out); }
.case__link:active { transform: scale(0.96); }
.case__media { position: relative; padding-bottom: 8%; padding-right: 6%; }
.case__desk { border-radius: 16px; width: 100%; }
.case__phone {
  position: absolute; right: 0; bottom: 0; width: 27%;
  border-radius: 22px; outline: 6px solid var(--c-bg);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.6);
}

/* ---------- Approach ---------- */
.approach { padding-top: clamp(120px, 15vw, 220px); }
.approach__intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.approach__intro p { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; max-width: 34ch; letter-spacing: -0.01em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: clamp(56px, 7vw, 96px); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: space-between; gap: 40px; padding: 24px; border-radius: 24px; background: var(--surface); min-height: 200px; }
.stats dd { font-size: clamp(44px, 5vw, 80px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 600; }
.stats dt { font-weight: 500; color: var(--muted); }
.stats div:first-child { background: var(--accent); color: var(--accent-ink); }
.stats div:first-child dt { color: var(--accent-ink); opacity: 0.75; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; margin-top: clamp(72px, 9vw, 140px); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 28px;
  border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 600;
}
.steps h3 { font-size: 24px; line-height: 1.15; }
.steps p { margin-top: 12px; }

/* ---------- Services ---------- */
.services { margin-top: clamp(120px, 15vw, 220px); padding-block: clamp(80px, 10vw, 160px); background: var(--surface); border-radius: 40px; margin-inline: clamp(0px, 1vw, 16px); }
.services__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
.services__head { position: sticky; top: 120px; }
.services__head p { margin-top: 24px; max-width: 36ch; font-size: 19px; }
.services__head .btn { margin-top: 32px; }
.services__list { display: grid; gap: 8px; }
.services__list li {
  padding: 28px; border-radius: 24px; background: var(--bg);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.services__list li:hover { transform: translateX(8px); }
.services__list h3 { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.05; letter-spacing: -0.035em; }
.services__list p { margin-top: 10px; max-width: 52ch; }
.services__list .tags { margin-top: 14px; color: var(--muted); font-size: 15px; font-weight: 500; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(48px, 6vw, 96px); padding-top: clamp(120px, 15vw, 220px); align-items: start; }
.contact__intro { position: sticky; top: 120px; }
.contact__intro p { margin-top: 24px; max-width: 40ch; font-size: 19px; }
.contact__mail {
  display: inline-block; margin-top: 36px;
  font-size: clamp(22px, 2.4vw, 36px); font-weight: 600; letter-spacing: -0.03em;
  background: linear-gradient(var(--accent), var(--accent)) 0 92% / 0 40% no-repeat;
  transition: background-size 0.45s var(--ease-out);
}
.contact__mail:hover { background-size: 100% 40%; color: var(--ink); }
:root[data-theme="dark"] .contact__mail:hover { color: var(--accent-ink); background-size: 100% 100%; }
.contact__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; max-width: 480px; }
.contact__facts dt { color: var(--muted); font-size: 15px; }
.contact__facts dd { font-weight: 500; }

.form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 40px); border-radius: 32px; background: var(--surface); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; font-weight: 500; font-size: 15px; }
.field small { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 2px solid transparent; border-radius: 14px;
  background: var(--bg); font-size: 16px; font-weight: 400;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #e5484d; }
.chips { border: 0; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 500; font-size: 15px; margin-bottom: 10px; padding: 0; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--bg); font-size: 15px;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.chips label:active span { transform: scale(0.95); }
.chips input:checked + span { background: var(--ink); color: var(--bg); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.form .btn { justify-self: start; margin-top: 8px; }
.form__note { font-size: 14px; color: var(--muted); }
.form__error { color: #e5484d; font-weight: 500; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(120px, 15vw, 220px); padding-bottom: 24px; overflow: hidden; }
.footer__top { display: flex; align-items: center; gap: 32px; font-weight: 500; }
.footer__top a:last-child { margin-left: auto; }
.footer__mark { height: 44px; width: auto; color: var(--ink); display: block; }
.footer__top a:hover { color: var(--muted); }
.footer__word {
  font-size: 23.5vw; line-height: 0.9; letter-spacing: -0.07em; font-weight: 800;
  text-align: center; margin: 24px 0 32px; white-space: nowrap;
}
.footer__legal { font-size: 14px; color: var(--muted); }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Thema-overgang via View Transitions */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .theme { display: none; }
  .nav__links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__menu { display: block; }
  .work__head, .approach__intro, .services__grid, .contact { grid-template-columns: 1fr; gap: 24px; }
  .services__head, .contact__intro { position: static; }
  .case { position: relative; top: 0; }
  .case__inner { grid-template-columns: 1fr; min-height: 0; border-radius: 28px; }
  .case__media { order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav .btn { display: none; }
  .hero { min-height: 600px; }
  .hero__copy { right: var(--margin); bottom: 28px; }
  .hero__copy h1 { font-size: 30px; }
  .hero__copy p { margin-top: 12px; }
  .hero__actions { margin-top: 20px; gap: 20px; }
  .hero__actions .link { white-space: nowrap; }
  .hero__actions .btn--lg { height: 48px; padding: 0 22px; }
  .hero__status { display: none; }
  .stats div { min-height: 150px; padding: 20px; border-radius: 20px; }
  .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .contact__facts { grid-template-columns: 1fr; }
  .footer__top { flex-wrap: wrap; gap: 16px 24px; }
  .services { border-radius: 28px; }
  .services__list li { padding: 22px; }
}

@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; transform: none; }
}

/* Donkere tegels laten loskomen van een donkere achtergrond */
:root[data-theme="dark"] .tile__img { outline: 1px solid rgba(255, 255, 255, 0.09); outline-offset: -1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile__img { outline: 1px solid rgba(255, 255, 255, 0.09); outline-offset: -1px; }
}

/* Footer: KI in pixels, zoals het logo */
.footer__ki { height: 0.72em; width: auto; margin-right: 0.035em; vertical-align: baseline; }
.footer__ki circle { r: 2.75px; transform-box: fill-box; transform-origin: center; }
.footer__hi { fill: var(--mark-hi); }
.js .footer__word[data-reveal] .footer__ki circle { transform: scale(0); transition: transform 0.6s var(--ease-spring); transition-delay: calc(var(--n) * 45ms + 150ms); }
.js .footer__word[data-reveal].is-in .footer__ki circle { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .js .footer__word[data-reveal] .footer__ki circle { transform: none; } }

/* KI in pixels, inline in tekst */
.ki { display: inline-block; }
.ki svg { height: 0.72em; width: auto; margin-right: 0.04em; vertical-align: baseline; overflow: visible; }
.ki circle { transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--ease-spring); }
.ki:hover circle { transform: scale(1.3); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form__ok { font-weight: 500; }
