/* ── Self-hosted fonts (variable fonts, Latin subset) ─────────────────────── */
@font-face {
  font-family: 'Inter Tight';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-tight.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
}

/* Codefabriek — design tokens */
:root {
  --bg: #0A0B0A;
  --fg: #F4F2EE;
  --fg-dim: rgba(244, 242, 238, 0.55);
  --fg-faint: rgba(244, 242, 238, 0.18);
  --line: rgba(244, 242, 238, 0.10);
  --line-strong: rgba(244, 242, 238, 0.22);
  --accent: #00E676;
  --accent-dim: rgba(0, 230, 118, 0.16);
  --accent-faint: rgba(0, 230, 118, 0.06);
  --surface: #111210;
  --surface-2: #16171540;

  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1400px;
  --pad-x: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #F4F2EE;
  --fg: #0A0B0A;
  --fg-dim: rgba(10, 11, 10, 0.58);
  --fg-faint: rgba(10, 11, 10, 0.20);
  --line: rgba(10, 11, 10, 0.10);
  --line-strong: rgba(10, 11, 10, 0.22);
  --accent: #00B85F;
  --accent-dim: rgba(0, 184, 95, 0.14);
  --accent-faint: rgba(0, 184, 95, 0.06);
  --surface: #ECEAE5;
  --surface-2: #E5E3DE40;
}

[data-theme="green"] {
  --bg: #00E676;
  --fg: #0A0B0A;
  --fg-dim: rgba(10, 11, 10, 0.62);
  --fg-faint: rgba(10, 11, 10, 0.22);
  --line: rgba(10, 11, 10, 0.14);
  --line-strong: rgba(10, 11, 10, 0.26);
  --accent: #0A0B0A;
  --accent-dim: rgba(10, 11, 10, 0.10);
  --accent-faint: rgba(10, 11, 10, 0.04);
  --surface: #00CF6A;
  --surface-2: #00BC6140;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* Grid overlay (toggleable via Tweaks) */
body[data-grid="on"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / calc((100vw - 2 * var(--pad-x)) / 12) 100%;
  margin: 0 var(--pad-x);
  mix-blend-mode: difference;
  opacity: 0.6;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Mono utility labels */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
}

/* Section header pattern */
.section {
  padding: clamp(80px, 12vh, 140px) 0;
  border-top: 1px solid var(--line);
  position: relative;
  scroll-margin-top: 80px;
}
section[id] { scroll-margin-top: 80px; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: end;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.section-sub {
  color: var(--fg-dim);
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.55;
}

/* Reveal — hidden only when JS is present (§7) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Highlight word */
.hl {
  background: var(--accent);
  color: #0A0B0A;
  padding: 0.05em 0.18em;
  border-radius: 2px;
  white-space: nowrap;
}
[data-theme="green"] .hl { background: #0A0B0A; color: #00E676; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  background: transparent;
  color: var(--fg);
}
.btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary {
  background: var(--accent);
  color: #0A0B0A;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  z-index: 102;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
}
.nav.is-open {
  background: var(--bg);
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav.is-open .nav-cta { display: none; }
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-logo svg { height: 22px; width: auto; }
.nav-logo-img { height: 36px; width: auto; display: block; }
.footer-logo-img { height: 56px; width: auto; display: block; }
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--fg); background: var(--surface); }
.nav-cta {
  padding: 10px 18px;
  background: var(--accent);
  color: #0A0B0A;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.2s var(--ease);
}
.nav-cta:hover { background: var(--fg); color: var(--bg); }

/* Right-side cluster (CTA + burger) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Burger button — hidden on desktop, shown on mobile */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.burger-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  transform-origin: center;
}
.nav.is-open .burger-bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav.is-open .burger-bar:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

/* Slide-down sheet */
.nav-sheet {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.nav-sheet.in {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-sheet-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 100px var(--pad-x) 40px;
  gap: 4px;
  overflow-y: auto;
}
.nav-sheet-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 44px);
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--fg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.2s var(--ease);
  transition-delay: calc(0.05s * var(--i, 0));
}
.nav-sheet.in .nav-sheet-link {
  opacity: 1;
  transform: translateY(0);
}
.nav-sheet-link.active { color: var(--accent); }
.nav-sheet-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--fg-dim);
  font-weight: 500;
  flex-shrink: 0;
}
.nav-sheet-label { flex: 1; }
.nav-sheet-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--accent);
  color: #0A0B0A;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-sheet-cta svg { width: 18px; height: 18px; }
.nav-sheet-foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--fg-dim);
}

/* Marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  display: flex;
  gap: 60px;
  white-space: nowrap;
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: scroll 40s linear infinite;
  flex-shrink: 0;
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 14px;
}
.marquee-item::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes scroll {
  to { transform: translateX(calc(-100% - 60px)); }
}

/* Dot grid background for hero */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--fg-faint) 1px, transparent 1.2px);
  background-size: 32px 32px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}

/* ── §7 additions — replacing inline styles ──────────────────────────────── */

/* Accent colour utility (replaces style="color: var(--accent)") */
.accent { color: var(--accent); }

/* Section-title highlight — matches hero/contact treatment (base .hl has no display:inline-block) */
.section-title .hl {
  display: inline-block;
  padding: 0.02em 0.14em 0.04em;
  border-radius: 4px;
  line-height: 0.95;
}

/* section-sub top margin (replaces style={{marginTop: 24}}) */
.section-sub { margin-top: 24px; }

/* Services reveal stagger (replaces style={{"--reveal-delay": i*80ms}}) */
.services-list .reveal:nth-child(1) { --reveal-delay: 0ms; }
.services-list .reveal:nth-child(2) { --reveal-delay: 80ms; }
.services-list .reveal:nth-child(3) { --reveal-delay: 160ms; }
.services-list .reveal:nth-child(4) { --reveal-delay: 240ms; }
.services-list .reveal:nth-child(5) { --reveal-delay: 320ms; }

/* Cases reveal stagger (replaces style={{"--reveal-delay": i*80ms}}) */
.cases-grid .reveal:nth-child(1) { --reveal-delay: 0ms; }
.cases-grid .reveal:nth-child(2) { --reveal-delay: 80ms; }
.cases-grid .reveal:nth-child(3) { --reveal-delay: 160ms; }
.cases-grid .reveal:nth-child(4) { --reveal-delay: 240ms; }
.cases-grid .reveal:nth-child(5) { --reveal-delay: 320ms; }
.cases-grid .reveal:nth-child(6) { --reveal-delay: 400ms; }

/* Process reveal stagger — process-line is child 1, steps are children 2-5 */
.process-track .reveal:nth-child(2) { --reveal-delay: 0ms; }
.process-track .reveal:nth-child(3) { --reveal-delay: 100ms; }
.process-track .reveal:nth-child(4) { --reveal-delay: 200ms; }
.process-track .reveal:nth-child(5) { --reveal-delay: 300ms; }

/* Training solution panel stagger */
.training-solution { --reveal-delay: 120ms; }

/* Nav-sheet link stagger (replaces style={{"--i": i}}) */
.nav-sheet-link:nth-child(1) { --i: 0; }
.nav-sheet-link:nth-child(2) { --i: 1; }
.nav-sheet-link:nth-child(3) { --i: 2; }
.nav-sheet-link:nth-child(4) { --i: 3; }
.nav-sheet-link:nth-child(5) { --i: 4; }
.nav-sheet-link:nth-child(6) { --i: 5; }

@media (max-width: 920px) {
  .nav { padding: 0; }
  .nav-inner { padding: 14px var(--pad-x); }
}

@media (max-width: 600px) {
  .nav-logo-img { height: 28px; }
}

/* Voices carousel: hide non-active items only when JS is present */
.js .quote-author-item:not(.active) { display: none; }
.js .quote-text:not(.active) { display: none; }

/* Quote animation fires on active text */
.quote-text { animation: none; }
.quote-text.active { animation: quoteIn 0.6s var(--ease); }
