/* Lokaal meegeleverde fonts (SIL Open Font License), latin-subset, variabel gewicht */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #07080c;
  --bg-2: #0d0e16;
  --panel: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --text: #e9e8f2;
  --muted: #9a98ad;
  --heide: #b56cff;
  --mint: #3cf5c0;
  --warn: #ffc65c;
  --grad: linear-gradient(100deg, var(--heide), var(--mint));
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lat-bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Achtergrond (lattice): standaardwaarden gelijk aan lib/settings.php,
   /admin overschrijft ze via JavaScript */
:root {
  --lat-bg: #07080c;
  --lat-rgb-beam: 181,108,255;
  --lat-rgb-mesh: 255,255,255;
  --lat-rgb-aurora1: 91,42,153;
  --lat-rgb-aurora2: 18,122,104;
  --lat-aurora-alpha: .32;
  --lat-aurora-blur: 40px;
  --lat-mesh-alpha: .05;
  --lat-mesh-size: 74px;
  --lat-mesh-speed: 14s;
  --lat-beam-alpha: .08;
  --lat-beam-dur: 11s;
  --lat-grain-alpha: .25;
}
.lat-field, .lat-mesh, .lat-sweep, .lat-grain { transition: opacity 1s ease; }
html:not(.bg-ready) :is(.lat-field, .lat-mesh, .lat-sweep, .lat-grain) { opacity: 0 !important; }
.nav { z-index: 50; }
main, .footer { position: relative; z-index: 2; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(7, 8, 12, .7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-text { font-weight: 500; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-text b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 0;
  background: var(--grad);
  color: #07080c !important;
  font: 600 1rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 40px -10px rgba(181, 108, 255, .6);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(60, 245, 192, .55); }
.btn-ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--mint); box-shadow: none; }
.btn-small { padding: 8px 18px; font-size: .9rem; }
.btn-wide { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* HERO */
.hero { position: relative; min-height: calc(100vh - 66px); display: flex; align-items: center; overflow: hidden; }
.hero-inner {
  position: relative;
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 60px clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
}
.eyebrow { font: .8rem var(--mono); color: var(--muted); letter-spacing: .04em; margin: 0 0 20px; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(60, 245, 192, .7); animation: ping 2s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(60, 245, 192, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 245, 192, 0); } }
.h1-pre { display: block; font-size: clamp(1rem, 1.9vw, 1.45rem); font-weight: 500; letter-spacing: .16em; line-height: 1.3; color: var(--text); margin-bottom: .5em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.lead em { color: var(--text); font-style: normal; border-bottom: 1px dashed var(--heide); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 34px; }

/* TERMINAL */
.terminal { background: rgba(13, 14, 22, .85); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 520px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2b38; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font: .75rem var(--mono); color: var(--muted); }
.terminal pre { margin: 0; padding: 16px 18px; font: .82rem/1.75 var(--mono); color: #cfcde0; white-space: pre-wrap; min-height: 9em; }
.terminal.big { max-width: none; }
.terminal.big pre { min-height: 0; }
.terminal .c { color: #6c6a80; } .terminal .p { color: var(--heide); } .terminal .ok { color: var(--mint); } .terminal .warn { color: var(--warn); }
.cursor { animation: blink 1s steps(1) infinite; color: var(--mint); }
@keyframes blink { 50% { opacity: 0; } }

/* HERO SCENE */
.hero-visual { position: relative; }
.scene { width: 100%; height: auto; overflow: visible; }
.scene .lbl { font: 10px var(--mono); fill: var(--muted); letter-spacing: .12em; }
.scene .orbit { transform-origin: 375px 125px; animation: wobble 9s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-6deg) scale(1.04); } }
.scene .orbs { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.scene .leds circle { fill: var(--mint); animation: led 1.6s infinite; }
.scene .leds circle:nth-child(3n) { fill: var(--heide); animation-delay: .4s; }
.scene .leds circle:nth-child(4n) { animation-delay: .9s; animation-duration: 2.3s; }
@keyframes led { 50% { opacity: .15; } }
.scene .signal { animation: led 2s infinite; }
.scene .flows path { stroke-dasharray: 4 8; animation: flow 3s linear infinite; opacity: .7; }
@keyframes flow { to { stroke-dashoffset: -120; } }
.scene .nodes circle { animation: led 2.4s infinite; }
.scene .nodes circle:nth-child(odd) { animation-delay: 1.2s; }
.scene .eye { animation: eye 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes eye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.scene .dc-lights rect { animation: led 3s infinite; }
.scene .dc-lights rect:nth-child(2n) { animation-delay: 1s; }
.scene .dc-lights rect:nth-child(3n) { animation-delay: 2s; fill: var(--heide); }
.scene #heath-dots circle { animation: shimmer 4s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .35; } }

/* MARQUEE */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: rgba(13, 14, 22, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: scroll 40s linear infinite; }
.marquee span { font: 600 1.05rem var(--sans); color: #6f6d84; white-space: nowrap; letter-spacing: .01em; }
.marquee span::before { content: "◆"; color: var(--heide); margin-right: 64px; font-size: .7em; vertical-align: middle; opacity: .6; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { max-width: 1280px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.kicker { font: .85rem var(--mono); color: var(--mint); margin: 0 0 14px; letter-spacing: .04em; }
.sub { color: var(--muted); font-size: 1.1rem; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(13, 14, 22, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .3s, border-color .3s, background .3s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(181, 108, 255, .14), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(181, 108, 255, .4); }
.card:hover::after { opacity: 1; }
.card p { color: var(--muted); margin: 0 0 22px; }
.icon { width: 84px; height: 84px; margin-bottom: 22px; overflow: visible; }
.icon .s { fill: none; stroke: var(--mint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.icon .s.dim { stroke: var(--heide); stroke-opacity: .55; stroke-width: 1.6; }
.icon .f1 { fill: var(--mint); } .icon .f2 { fill: var(--heide); }
.icon .blink { animation: led 1.8s infinite; }
.icon .d1 { animation-delay: .3s; } .icon .d2 { animation-delay: .7s; } .icon .d3 { animation-delay: 1.1s; }
.icon .pulse { stroke-dasharray: 80; animation: trace 2.4s linear infinite; }
@keyframes trace { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.tag { font: .7rem var(--mono); letter-spacing: .14em; color: var(--heide); border: 1px solid rgba(181, 108, 255, .35); padding: 4px 10px; border-radius: 999px; }

/* STATS */
.stats {
  max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
}
.stat { padding: 40px 28px; background: rgba(13, 14, 22, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); margin: -1px 0 0 -1px; }
.stat:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat b { display: block; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .95rem; }

/* SPLIT */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split p { color: var(--muted); font-size: 1.1rem; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; color: var(--muted); }
.checks li b { color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 5px; background: var(--grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* QUOTES */
.quotes { columns: 3 320px; column-gap: 20px; }
.quote { break-inside: avoid; margin: 0 0 20px; padding: 28px; border-radius: var(--radius); background: rgba(13, 14, 22, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); }
.quote blockquote { margin: 0 0 22px; font-size: 1.08rem; line-height: 1.55; }
.quote figcaption { display: flex; align-items: center; gap: 14px; font-size: .88rem; color: var(--muted); line-height: 1.4; }
.quote figcaption b { color: var(--text); font-weight: 600; }
.av { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 600 .8rem var(--mono); color: #07080c; background: var(--grad); }

/* CONTACT */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-copy p { color: var(--muted); font-size: 1.1rem; }
.contact-meta { margin: 36px 0 0; display: grid; gap: 18px; }
.contact-meta dt { font: .75rem var(--mono); color: var(--mint); letter-spacing: .1em; text-transform: uppercase; }
.contact-meta dd { margin: 2px 0 0; }
.form { padding: 34px; border-radius: var(--radius); background: rgba(13, 14, 22, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: .88rem; color: var(--muted); }
.form input[type=text], .form input[type=email], .form select, .form textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 8, 12, .6);
  color: var(--text);
  font: 1rem var(--sans);
  transition: border-color .2s, box-shadow .2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--heide); box-shadow: 0 0 0 4px rgba(181, 108, 255, .15); }
.form .invalid { border-color: #ff6b8a !important; }
.form .check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .95rem; cursor: pointer; }
.form .check input { width: 18px; height: 18px; accent-color: var(--heide); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.4em; font: .85rem var(--mono); }
.form-status.ok { color: var(--mint); }
.form-status.err { color: #ff8aa3; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 40px clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }
.footer p { color: #6f6d84; font-size: .85rem; margin: 0; max-width: 640px; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split, .contact { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat:first-child, .stat:last-child { border-radius: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .cards { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .section { padding-block: 80px; }
  .brand-text { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
