/* ==========================================================================
   JS Studio: stijlen
   Richting: Avondstudio × JS Studio (zie DESIGN.md)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --f-display: "Archivo", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --cobalt: #3A5BFF;
  --deep: #1B2FA8;
  --graphite: #111214;
  --bone: #ECE7DC;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --bar-h: 64px;
}

/* Avond (standaard) */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --room: #07080A;
  --room-lo: #030304;
  --wall: #121318;
  --wall-lo: #0B0C0F;
  --wall-light: rgba(170, 186, 255, .16);
  --wood: #2A221C;
  --wood-hi: #3A3027;
  --wood-lo: #1A1511;
  --wood-edge: #15110E;
  --grain-a: .5;
  --mat: #141518;
  --mat-stitch: rgba(236, 231, 220, .08);
  --shell: #2B2D32;
  --shell-hi: #3C3F45;
  --shell-lo: #1D1F23;
  --shell-ink: #060607;
  --keys: #0F1012;
  --paper: #CFC9BC;
  --paper-rule: rgba(17, 18, 20, .10);
  --ink: #2A2C31;
  --pot: #A8A193;
  --pot-hi: #C9C2B3;
  --pot-lo: #6E685D;
  --leaf-a: #2B4A3A;
  --leaf-b: #37604B;
  --leaf-c: #213A2D;
  --lamp-body: #1C1E22;
  --lamp-mid: #2C2F35;
  --lamp-hi: #4A4E57;
  --lamp-on: 1;
  --window-on: 0;
  --pool-lamp: rgba(206, 218, 255, .26);
  --pool-screen: rgba(90, 120, 255, .30);
  --blob: rgba(0, 0, 0, .55);
  --poster-frame: #0A0A0B;
  --poster-paper: #1A1B1F;
  --poster-ink: #ECE7DC;

  --text: #ECE7DC;
  --muted: #A19D94;
  --line: rgba(236, 231, 220, .12);
  --line-strong: rgba(236, 231, 220, .22);
  --surface: #111214;
  --surface-2: #17181B;
  --os-wall: #0C0D10;
  --accent: #3A5BFF;
  --accent-ink: #FFFFFF;
  --accent-text: #93A6FF;
  --shadow: rgba(0, 0, 0, .6);
  --mark-top: var(--text);
}

/* Dag */
:root[data-theme="light"] {
  color-scheme: light;
  --room: #D6D0C4;
  --room-lo: #B9B2A5;
  --wall: #E7E1D6;
  --wall-lo: #D7D0C3;
  --wall-light: rgba(255, 252, 244, .9);
  --wood: #C4A884;
  --wood-hi: #D6BD99;
  --wood-lo: #A88C68;
  --wood-edge: #8E7556;
  --grain-a: .32;
  --mat: #2A2C31;
  --mat-stitch: rgba(236, 231, 220, .12);
  --shell: #BEBFC3;
  --shell-hi: #D8D9DC;
  --shell-lo: #A3A4A8;
  --shell-ink: #1B1C1F;
  --keys: #16171A;
  --paper: #F3EFE6;
  --paper-rule: rgba(17, 18, 20, .10);
  --ink: #2A2C31;
  --pot: #E6E0D4;
  --pot-hi: #F6F2EA;
  --pot-lo: #BDB5A6;
  --leaf-a: #3B6A50;
  --leaf-b: #4D8264;
  --leaf-c: #2E5540;
  --lamp-body: #2A2C31;
  --lamp-mid: #3C3F46;
  --lamp-hi: #6A6E78;
  --lamp-on: 0;
  --window-on: 1;
  --pool-lamp: rgba(206, 218, 255, 0);
  --pool-screen: rgba(58, 91, 255, .18);
  --blob: rgba(60, 40, 20, .32);
  --poster-frame: #111214;
  --poster-paper: #ECE7DC;
  --poster-ink: #111214;

  --text: #111214;
  --muted: #5E5A52;
  --line: rgba(17, 18, 20, .13);
  --line-strong: rgba(17, 18, 20, .24);
  --surface: #F7F4EE;
  --surface-2: #FFFFFF;
  --os-wall: #ECE7DC;
  --accent: #3A5BFF;
  --accent-ink: #FFFFFF;
  --accent-text: #1B2FA8;
  --shadow: rgba(40, 32, 20, .28);
  --mark-top: var(--text);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--os-wall); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--os-wall);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skiplink {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  transition: top .2s var(--ease-out);
}
.skiplink:focus { top: 12px; }

/* JS Studio-teken */
.mark { display: block; overflow: visible; }
.mark .t { fill: var(--mark-top); }
.mark .l { fill: var(--cobalt); }
.mark .r { fill: var(--deep); }
.mark.mono .t, .mark.mono .l, .mark.mono .r { fill: currentColor; }

/* ---------- Kopbalk ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bar-h);
  top: var(--jsstudio-bar-h, 0px); /* schuift mee onder de JS Studio-balk (alleen voor ingelogde teamleden) */
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 36px);
  color: var(--text);
  transition: background-color .4s ease, border-color .4s ease, backdrop-filter .4s ease, top .3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.topbar.solid {
  background: color-mix(in srgb, var(--os-wall) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 11px; text-decoration: none;
  font-family: var(--f-display); font-weight: 780; font-stretch: 125%;
  font-size: 15px; letter-spacing: .01em; text-transform: uppercase;
}
.wordmark .mark { width: 18px; transition: transform .5s var(--ease-out); }
.wordmark:hover .mark { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; gap: clamp(14px, 2.2vw, 30px); font-size: 14px; }
.nav a { text-decoration: none; opacity: .72; transition: opacity .2s ease; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="true"], .nav a[aria-current="page"] { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="true"]::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.pill {
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--line);
  transition: background-color .2s ease, opacity .4s ease, transform .4s var(--ease-out);
}
.pill:hover { background: color-mix(in srgb, var(--text) 13%, transparent); }
.skip.gone { opacity: 0; pointer-events: none; transform: translateY(-6px); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
  transition: background-color .2s ease;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }
.menu-btn { display: none; }
.bar-cta {
  padding: 9px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 13.5px; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.bar-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--cobalt) 80%, transparent); }
.bar-cta[aria-current="page"] { box-shadow: 0 0 0 2px var(--os-wall), 0 0 0 4px var(--accent); }
.sheet-cta { margin-top: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 650; text-align: center; }
.sheet-cta:hover { background: var(--accent) !important; filter: brightness(1.08); }
.sheet {
  position: absolute; top: calc(var(--bar-h) - 4px); right: 12px; left: 12px;
  display: grid; padding: 8px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); box-shadow: 0 20px 50px -20px var(--shadow);
}
.sheet[hidden] { display: none; }
.sheet a { padding: 14px 14px; border-radius: 10px; text-decoration: none; font-size: 17px; }
.sheet a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
@media (max-width: 900px) {
  .nav, .bar-cta { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 420px) { .skip { padding: 8px 11px; } }

/* Zonder JavaScript: geen themaknop, geen uitklapmenu; het hoofdmenu blijft zichtbaar en loopt door op smalle schermen */
html:not(.js) [data-theme-toggle], html:not(.js) .menu-btn, html:not(.js) .skip, html:not(.js) .sheet { display: none !important; }
@media (max-width: 900px) {
  html:not(.js) .topbar { position: absolute; height: auto; flex-wrap: wrap; padding-block: 10px; row-gap: 6px; }
  html:not(.js) .nav { display: flex !important; flex-wrap: wrap; order: 3; width: 100%; gap: 4px 18px; }
  html:not(.js) .bar-cta { display: inline-block; }
}

/* ==========================================================================
   Het podium
   ========================================================================== */
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--room); }
.world { position: absolute; inset: 0; }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--room) 70%, transparent) 0%, transparent 34%),
    radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0,0,0,.35) 100%);
}
:root[data-theme="light"] .vignette { background: linear-gradient(to bottom, color-mix(in srgb, var(--room) 55%, transparent) 0%, transparent 30%); }

/* ---------- Eerste tekst ---------- */
.hero {
  position: absolute; left: 0; right: 0; top: calc(var(--bar-h) + 5vh); z-index: 10;
  display: grid; justify-items: center; text-align: center; padding: 0 20px;
  pointer-events: none;
}
.hero-title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(46px, 9.4vw, 148px); line-height: .9; letter-spacing: -.012em; text-transform: uppercase;
  color: var(--text);
}
.split { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; will-change: transform; }
.split .sp { display: inline-block; width: .28em; }
.hero-intro {
  margin: clamp(14px, 2.2vh, 24px) 0 0; max-width: 40ch;
  font-size: clamp(15px, 1.35vw, 19px); line-height: 1.5; color: var(--muted);
  text-wrap: balance;
}
.cue {
  margin: clamp(16px, 3vh, 30px) 0 0; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted);
}
.cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.cue .wheel { animation: wheel 1.8s var(--ease-io) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(4px); opacity: 0; } 100% { opacity: 0; } }

/* ==========================================================================
   Het "besturingssysteem" (JS Studio OS)
   ========================================================================== */
.os {
  position: absolute; inset: 0; overflow: hidden; container-type: size;
  background: var(--os-wall); color: var(--text); font-family: var(--f-body);
}
.os-full { opacity: 0; visibility: hidden; z-index: 20; }
.wallpaper {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(48% 58% at 86% 14%, color-mix(in srgb, var(--cobalt) 26%, transparent), transparent 72%),
    radial-gradient(44% 56% at 6% 102%, color-mix(in srgb, var(--deep) 40%, transparent), transparent 72%);
}
:root[data-theme="light"] .wallpaper {
  background:
    radial-gradient(48% 58% at 86% 14%, color-mix(in srgb, var(--cobalt) 16%, transparent), transparent 72%),
    radial-gradient(44% 56% at 6% 102%, color-mix(in srgb, var(--deep) 14%, transparent), transparent 72%);
}
.wallpaper::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.3px);
  background-size: max(18px, 2.2cqw) max(18px, 2.2cqw);
  -webkit-mask: radial-gradient(70% 70% at 50% 40%, #000, transparent);
          mask: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}

/* Inloggen */
.login {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center;
  gap: 3.4cqh; padding: 8cqh 6cqw 6cqh;
}
.login .mark { width: clamp(22px, 8cqw, 120px); }
.login-title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(12px, 7.2cqw, 118px); line-height: .9; letter-spacing: -.01em;
}
.login-intro { margin: -.6cqh 0 0; max-width: 38ch; font-size: clamp(6px, 1.75cqw, 19px); line-height: 1.5; color: var(--muted); text-wrap: balance; }
.pw {
  position: relative; display: flex; align-items: center; justify-content: center; gap: max(4px, .9cqw);
  width: clamp(80px, 26cqw, 340px); height: clamp(18px, 5.6cqh, 52px);
  border-radius: 999px; margin-top: 1.2cqh;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--line);
  transition: border-color .3s ease;
}
.pw i { width: max(3px, .75cqw); aspect-ratio: 1; border-radius: 50%; background: var(--text); opacity: .12; }
.pw .caret { width: 2px; height: 44%; background: var(--cobalt); border-radius: 1px; animation: blink 1s steps(1) infinite; margin-left: .4cqw; }
.pw .ok {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  background: var(--cobalt); color: #fff; font-family: var(--f-mono); font-size: clamp(6px, 1.3cqw, 14px); letter-spacing: .04em;
  opacity: 0;
}
@keyframes blink { 50% { opacity: 0; } }
.ask { margin: 0; font-family: var(--f-mono); font-size: clamp(5px, 1.15cqw, 13px); color: var(--muted); letter-spacing: .03em; }
.os-full .login .mark { width: clamp(56px, 8cqw, 120px); }
.os-full .login-title { font-size: clamp(34px, 7.2cqw, 118px); }
.os-full .login-intro { font-size: clamp(15px, 1.75cqw, 19px); }
.os-full .pw { width: clamp(210px, 26cqw, 340px); height: clamp(44px, 5.6cqh, 52px); gap: 8px; }
.os-full .pw i { width: max(6px, .75cqw); }
.os-full .pw .ok { font-size: clamp(12px, 1.3cqw, 14px); }
.os-full .ask { font-size: clamp(11.5px, 1.15cqw, 13px); }
.ask kbd {
  font-family: inherit; padding: .1em .5em; border-radius: 4px; border: 1px solid var(--line-strong);
  display: inline-block; transition: background-color .2s, color .2s;
}
.ask kbd.pressed { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }

/* Bureaublad */
.desktop { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.menubar {
  position: absolute; inset: 0 0 auto 0; height: var(--bar-h);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.desk-copy { position: absolute; left: clamp(20px, 5cqw, 80px); bottom: clamp(24px, 7cqh, 90px); max-width: 44cqw; }
.desk-title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(34px, 5.8cqw, 104px); line-height: .92; letter-spacing: -.012em;
}
.desk-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.desk-title .line > span { display: inline-block; }
.desk-title em { font-style: normal; color: var(--accent-text); }
.desk-note { margin: 18px 0 0; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

.minis {
  position: absolute; right: clamp(20px, 5cqw, 80px); top: calc(var(--bar-h) + 6cqh);
  display: grid; grid-template-columns: repeat(2, clamp(170px, 19cqw, 300px)); gap: 4.4cqh 2.4cqw; align-items: start;
  perspective: 1200px;
}
.mini { display: grid; gap: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.mini:nth-child(even) { margin-top: 5cqh; }
.mini-win {
  border-radius: 12px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 18px 40px -18px var(--shadow);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s ease;
}
.mini:focus-visible .mini-win {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--cobalt) 60%, var(--line));
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 30px 50px -22px var(--shadow);
}
.mini:focus-visible { outline: none; }
.mini-label { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 14px; font-weight: 600; }
.mini-label small { font-weight: 400; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }

.titlebar {
  height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 11.5px; color: var(--muted);
}
.dots { display: inline-flex; gap: 6px; margin-right: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dots i:first-child { background: var(--cobalt); }

/* Lege plek voor beeld */
.slot {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in srgb, var(--text) 5%, transparent) 11px 12px),
    linear-gradient(160deg, color-mix(in srgb, var(--cobalt) 12%, var(--surface)), color-mix(in srgb, var(--deep) 10%, var(--surface)));
}
.slot .mark { width: 22%; opacity: .16; --mark-top: var(--text); }
.slot .mark .l, .slot .mark .r { fill: var(--text); }
.slot-label {
  position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 11px; color: var(--muted); white-space: nowrap;
  padding: 3px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line);
}
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Groot projectvenster */
.bigwin {
  position: absolute; left: 0; right: 0; top: var(--bar-h); bottom: 0; margin: auto;
  width: min(90cqw, 1180px); height: calc(100cqh - var(--bar-h) - 6cqh);
  border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 50px 120px -40px var(--shadow);
  opacity: 0; visibility: hidden; transform-origin: 0 0;
}
.bigwin > .titlebar { height: 40px; font-size: 12px; justify-content: space-between; }
.bigwin .tb-left { display: inline-flex; align-items: center; gap: 8px; }
.bigwin .tb-count { opacity: .7; }
.bigwin-body { position: absolute; inset: 40px 0 0 0; overflow: hidden; }
.bigwin-inner {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(22px, 3.2cqw, 56px);
  padding: clamp(20px, 3.4cqw, 52px);
}
.bw-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.bw-title {
  margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(30px, 4.6cqw, 78px); line-height: .92; letter-spacing: -.012em;
}
.bw-kind { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.bw-media { display: grid; gap: 14px; align-content: start; min-width: 0; }
.bw-media .slot { border-radius: 12px; border: 1px solid var(--line); }
.bw-main { margin: 0; display: grid; gap: 10px; }
.bw-cap { margin: 0; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; color: var(--muted); }
.bw-thumbs { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 14px; }
.bw-thumb { all: unset; box-sizing: border-box; display: block; cursor: pointer; border-radius: 13px; padding: 2px; border: 1px solid transparent; transition: border-color .2s ease, opacity .2s ease; opacity: .62; }
.bw-thumb:hover { opacity: 1; }
.bw-thumb.on { border-color: var(--accent); opacity: 1; }
.bw-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bw-thumb .slot { border-radius: 10px; }
.bw-facts { display: grid; gap: 22px; align-content: start; }
.bw-facts p { margin: 0; max-width: 48ch; }
.bw-facts .muted { color: var(--muted); font-size: 15.5px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; margin: 0; font-size: 14px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta dt { color: var(--muted); font-family: var(--f-mono); font-size: 12px; padding-top: 2px; }
.meta dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--f-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 12px;
  font-size: 14.5px; font-weight: 650; text-decoration: none; border: 0;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .3s var(--ease-out), background-color .2s ease, box-shadow .3s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--cobalt) 70%, transparent); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { box-shadow: none; background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Na het verhaal
   ========================================================================== */
.after {
  position: relative; z-index: 2;
  background:
    radial-gradient(60% 40% at 90% 0%, color-mix(in srgb, var(--cobalt) 14%, transparent), transparent 70%),
    var(--os-wall);
  padding: clamp(90px, 14vh, 160px) clamp(14px, 4vw, 48px) 40px;
  display: grid; gap: clamp(28px, 5vw, 56px);
  justify-items: center;
}
.panel {
  width: min(100%, 1180px); border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 40px 90px -50px var(--shadow);
  scroll-margin-top: calc(var(--bar-h) + var(--jsstudio-bar-h, 0px) + 20px);
}
.panel-bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.panel-body { padding: clamp(24px, 5vw, 64px); }
.h2 {
  margin: 0 0 clamp(26px, 4vw, 48px); font-family: var(--f-display); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(34px, 5.4vw, 80px); line-height: .92; letter-spacing: -.012em; text-wrap: balance;
}
.lede { margin: -12px 0 32px; font-size: clamp(17px, 1.5vw, 21px); color: var(--muted); max-width: 46ch; }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(24px, 4vw, 56px); }
.skill-group h3 { margin: 0 0 14px; font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 18px; font-weight: 600; }
.skill-group li:last-child { border-bottom: 1px solid var(--line); }
.skill-group li span { font-family: var(--f-mono); font-weight: 400; font-size: 12.5px; color: var(--muted); text-align: right; }
.skill-group li.now span { color: var(--accent-text); }
.skill-group li.now::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); flex: none; align-self: center;
}
.skill-group li.now { justify-content: flex-start; }
.skill-group li.now span { margin-left: auto; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: minmax(70px, 140px) 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--f-mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.timeline .when.now { color: var(--accent-text); }
.timeline h3 { margin: 0 0 4px; font-size: 20px; font-weight: 650; }
.timeline p { margin: 0; color: var(--muted); max-width: 60ch; }

.term {
  font-family: var(--f-mono); font-size: 14.5px; line-height: 1.9;
  background: color-mix(in srgb, var(--os-wall) 70%, var(--surface)); border: 1px solid var(--line);
  border-radius: 14px; padding: clamp(18px, 3vw, 30px); margin-bottom: 28px; overflow-wrap: anywhere;
}
.term .prompt { color: var(--muted); }
.term .row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.term .row b { font-weight: 500; color: var(--muted); }
.term a { color: var(--accent-text); }
.term .later { color: var(--muted); opacity: .75; }
.term .cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--cobalt); animation: blink 1s steps(1) infinite; }
.back-top { margin-top: 4px; }

.foot {
  width: min(100%, 1180px); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px clamp(24px, 5vw, 64px);
  align-items: start; padding: 36px 4px 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.foot-logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font-family: var(--f-display); font-weight: 780; font-stretch: 125%; font-size: 14px; letter-spacing: .01em; text-transform: uppercase;
}
.foot .mark { width: 18px; }
.foot-tag { margin: 12px 0 0; color: var(--muted); }
.foot-nav, .foot-meta { display: grid; gap: 6px; align-content: start; justify-items: start; }
.foot-nav a, .foot-meta a { color: var(--text); text-decoration: none; opacity: .8; padding: 3px 0; }
.foot-nav a:hover, .foot-meta a:hover { opacity: 1; text-decoration: underline; }
.foot-base {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px;
}
@media (max-width: 820px) {
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
/* Verborgen teamlogin: klein, gedempt, verdwijnt zodra bar.js ziet dat je bent ingelogd */
.foot-login {
  all: unset; box-sizing: border-box; cursor: pointer;
  font-family: var(--f-mono); font-size: 12px; line-height: 1; color: var(--muted); opacity: .55;
  padding: 10px 6px; margin: -10px -6px; border-radius: 6px; transition: opacity .2s ease, color .2s ease;
}
.foot-login:hover, .foot-login:focus-visible { opacity: 1; color: var(--text); }
.foot-login:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jsstudio-ingelogd .foot-login { display: none; }

/* Onthullen bij scrollen (na het verhaal) */
.reveal { opacity: 0; transform: translateY(40px); }

/* ---------- Telefoon ---------- */
@media (max-width: 820px) {
  .minis { left: 16px; right: 16px; top: calc(var(--bar-h) + 16px); grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .mini:nth-child(even) { margin-top: 0; }
  .mini-label small { display: none; }
  .desk-copy { left: 16px; right: 16px; bottom: 28px; max-width: none; }
  .desk-title { font-size: clamp(30px, 9vw, 48px); }
  .desk-note { display: none; }
  .bigwin { width: calc(100cqw - 20px); height: calc(100cqh - var(--bar-h) - 20px); top: calc(var(--bar-h) + 10px); bottom: 10px; margin: 0 auto; }
  .bigwin-inner { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .term .row { grid-template-columns: 1fr; gap: 0; margin-bottom: 8px; }
}


/* ---------- Mini-vensters als knoppen + highlight tijdens scrollen ---------- */
button.mini { all: unset; box-sizing: border-box; display: grid; gap: 10px; cursor: pointer; position: relative; }
button.mini:focus-visible .mini-win { outline: 2px solid var(--accent); outline-offset: 4px; }
.mini-win { display: block; }
.mini-win .titlebar { display: flex; }
.mini-win .titlebar { white-space: nowrap; overflow: hidden; }
@media (max-width: 1000px) { .mini-win .titlebar { font-size: 10.5px; padding: 0 10px; gap: 6px; } }
.mini-in {
  display: grid; gap: 10px; position: relative;
  transform-origin: 50% 50%;
  transition: transform .6s cubic-bezier(.34, 1.45, .5, 1), opacity .4s ease, filter .4s ease;
}
.mini:nth-child(odd) .mini-in { transform-origin: 70% 45%; }
.mini:nth-child(even) .mini-in { transform-origin: 100% 45%; }
.mini-win { position: relative; }
.mini-hint {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, 8px); white-space: nowrap; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgba(20, 30, 120, .6);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out), transform .45s var(--ease-out);
}
.mini-hint svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Muis erover: klein optillen (alleen op apparaten met een muis, zodat het op touch niet blijft hangen) */
@media (hover: hover) {
  .mini:hover .mini-win { transform: translateY(-4px); border-color: var(--accent); }
  .mini:hover .mini-hint { opacity: 1; transform: translate(-50%, 0); }
}

/* Tijdens scrollen: het project springt 50% groter op */
.minis.has-hl .mini:not(.is-hl) .mini-in { opacity: .35; filter: saturate(.6); }
.mini.is-hl { z-index: 5; }
.mini.is-hl .mini-in { transform: scale(1.5); }
.mini.is-hl .mini-win {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 40px 80px -30px var(--shadow), 0 0 0 1px var(--accent);
}
.mini.is-hl .mini-hint { opacity: 1; transform: translate(-50%, 0) scale(.72); }
.mini.is-hl .mini-label { color: var(--accent-text); }
.mini-label { transition: color .3s ease; }
.mini.is-hl .mini-win, .mini:hover .mini-win { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s ease; }

/* Stippenraster dat op de muis reageert */
.dots-canvas { position: absolute; inset: 0; display: block; }
.os.has-dots .wallpaper::after { display: none; }

@media (max-width: 820px) {
  .mini:nth-child(odd) .mini-in { transform-origin: 0% 40%; }
  .mini:nth-child(even) .mini-in { transform-origin: 100% 40%; }
  .mini.is-hl .mini-in { transform: scale(1.25); }
  .mini.is-hl .mini-hint { transform: translate(-50%, 0) scale(.85); }
}

/* ---------- Projectvenster (modal) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: calc(var(--bar-h) + var(--jsstudio-bar-h, 0px) + 8px) 16px 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--os-wall) 70%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal .bigwin {
  position: relative; inset: auto; margin: 0; opacity: 1; visibility: visible;
  width: min(1180px, 100%); height: min(820px, 100%);
}
.bigwin .tb-right { display: inline-flex; align-items: center; gap: 12px; }
.win-close { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: transparent; border: 1px solid var(--line); }
.win-close:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.win-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal .bigwin-body { overflow: auto; overscroll-behavior: contain; }
.next-proj {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 0; margin-top: 4px;
  background: none; border: 0; font-size: 14px; font-weight: 600; color: var(--accent-text);
}
.next-proj svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.next-proj:hover svg { transform: translateX(4px); }
body.modal-open { overflow: hidden; }

/* ---------- Gereedschap ---------- */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 clamp(26px, 4vw, 44px); }
.tools-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.chip small { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; color: var(--muted); }
.chip.now { border-color: color-mix(in srgb, var(--cobalt) 55%, var(--line)); }
.chip.now small { color: var(--accent-text); }

/* ---------- Contactformulier ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-intro .lede { margin: -12px 0 18px; }
.small { font-size: 14px; color: var(--muted); }
.small a { color: var(--accent-text); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; align-content: start; }
.field.full, .form-foot.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.req { color: var(--accent-text); }
.opt { font-family: var(--f-mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: color-mix(in srgb, var(--os-wall) 60%, var(--surface));
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 13px 14px; min-height: 48px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 25%, transparent); }
.field [aria-invalid="true"] { border-color: #E5484D; }
.err { margin: 0; font-size: 13px; color: #F2777B; }
:root[data-theme="light"] .err { color: #C4282D; }
.err:empty { display: none; }
.select { position: relative; }
.select svg { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.select select { padding-right: 40px; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.form-foot .btn { border: 0; cursor: pointer; font-family: inherit; }
.form-foot .btn[disabled] { opacity: .6; cursor: progress; }
.form-status { margin: 0; font-size: 14.5px; max-width: 52ch; }
.form-status.is-ok { color: var(--accent-text); }
.form-status.is-error { color: #F2777B; }
:root[data-theme="light"] .form-status.is-error { color: #C4282D; }
.linkish { background: none; border: 0; padding: 0; color: var(--text); font-size: 13px; text-decoration: underline; text-underline-offset: .25em; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .mini-hint { font-size: 11.5px; padding: 6px 10px; }
  .modal { padding: calc(var(--bar-h) + var(--jsstudio-bar-h, 0px) + 4px) 8px 8px; }
  .modal .bigwin { height: 100%; }
}

/* ==========================================================================
   Statische versie (minder beweging, of als scripts niet laden)
   ========================================================================== */
.is-static .stage { height: auto; overflow: visible; }
.is-static .world { position: relative; height: 100vh; height: 100svh; }
.is-static .os-full { position: relative; opacity: 1; visibility: visible; min-height: 100vh; overflow: visible; }
.is-static .os-full .login { display: none; }
.is-static .desktop { position: relative; opacity: 1; visibility: visible; padding: calc(var(--bar-h) + 40px) clamp(16px, 5vw, 80px) 60px; display: grid; gap: 40px; }
.is-static .menubar { display: none; }
.is-static .desk-copy, .is-static .minis { position: static; max-width: none; }
.is-static .mini:nth-child(even) { margin-top: 0; }
.is-static .minis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.is-static .bigwin { position: relative; inset: auto; margin: 0; width: 100%; height: auto; opacity: 1; visibility: visible; top: auto; }
.is-static .bigwin-body { position: relative; inset: auto; }
.is-static .reveal { opacity: 1; transform: none; }
.is-static .skip { display: none; }

@media (prefers-reduced-motion: reduce) {
  .steam path, .cue .wheel, .pw .caret, .term .cursor { animation: none; }
  * { transition-duration: .01ms !important; }
}
.contact-intro .h2 { font-size: clamp(34px, 3.8vw, 58px); }
.mini.is-hl .slot-label { opacity: 0; transition: opacity .2s ease; }
@media (hover: hover) { .mini:hover .slot-label { opacity: 0; } }

.credits { width: 100%; margin: 6px 0 0; font-size: 12px; color: var(--muted); opacity: .8; }
.credits a { color: inherit; }

/* ---------- Privacy / colofon ---------- */
.doc-page { background: var(--os-wall); }
.doc { padding: calc(var(--bar-h) + var(--jsstudio-bar-h, 0px) + 32px) clamp(14px, 4vw, 48px) 48px; display: grid; justify-items: center; }
.doc-foot { display: grid; justify-items: center; padding: 0 clamp(14px, 4vw, 48px) 40px; }
.doc .panel { width: min(100%, 860px); }
.doc-body h2 { margin: 40px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.005em; }
.doc-body h1.h2 { margin-top: 12px; }
.doc-body #colofon { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.doc-body p { margin: 0 0 14px; max-width: 68ch; }
.doc-body a { color: var(--accent-text); }
.doc-body code { font-family: var(--f-mono); font-size: .9em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.doc-list { margin: 0; padding-left: 20px; max-width: 68ch; }
.doc-list li { margin-bottom: 10px; }
.doc-meta { max-width: 520px; margin-bottom: 8px; }
.doc-page .topbar .pill { text-decoration: none; }
.form-privacy { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.form-privacy a { color: var(--accent-text); }

/* Touch: geen grijze tik-flits, en knoppen reageren direct */
button, a, .mini { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- Voorpagina: overzicht van de cases en de aanvraag ---------- */
.case-index { list-style: none; margin: 0 0 clamp(22px, 3vw, 32px); padding: 0; }
.case-index li { border-top: 1px solid var(--line); }
.case-index li:last-child { border-bottom: 1px solid var(--line); }
.case-index a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; text-decoration: none;
  transition: padding .35s var(--ease-out), color .2s ease;
}
.case-index a:hover, .case-index a:focus-visible { padding-left: 10px; color: var(--accent-text); }
.case-index b { font-size: clamp(18px, 2vw, 22px); font-weight: 650; }
.case-index span { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .case-index a { flex-direction: column; gap: 2px; } .case-index span { text-align: left; } }
.cta-panel .lede { max-width: 52ch; }
