:root {
  --bg: #070d15;
  --bg-2: #0d1724;
  --ink: #e7f2ff;
  --muted: #9fb3c8;
  --line: rgba(110, 143, 176, 0.24);
  --card: rgba(15, 28, 43, 0.86);
  --blue: #3aa9ff;
  --blue-soft: #78c6ff;
  --green: #4be39a;
  --warn: #ffc857;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 0% 0%, rgba(58,169,255,.18), transparent 60%),
    radial-gradient(1200px 600px at 100% 100%, rgba(75,227,154,.10), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(8, 14, 22, 0.82);
}
.nav__brand { display: flex; gap: 12px; align-items: center; }
.nav__logoImg {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.nav__logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(140deg, var(--blue), #174b7a);
  box-shadow: 0 0 0 2px rgba(58,169,255,.18), 0 8px 18px rgba(58,169,255,.26);
}
.nav__title { font-weight: 800; letter-spacing: .2px; }
.nav__sub { font-size: 12px; color: var(--muted); }
.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}
.pill--ok { color: var(--green); border-color: rgba(75,227,154,.45); }
.pill--err { color: #ff7c7c; border-color: rgba(255,124,124,.45); }
.pill--busy { color: var(--warn); border-color: rgba(255,200,87,.45); }

.stageIndicator {
  position: fixed;
  right: 18px;
  top: 110px;
  z-index: 30;
  width: 210px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.86);
  box-shadow: var(--shadow);
}
.journeySummary {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.journeySummary__title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.journeySummary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
  color: var(--muted);
}
.journeySummary__row strong {
  color: var(--ink);
  font-size: 12px;
}
.journeyCtaBtn {
  width: 100%;
  margin: 6px 0 8px;
  text-align: left;
  line-height: 1.2;
}
.journeySummary__done {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
}
.journeySummary__done.is-done {
  border-color: rgba(75,227,154,.45);
  color: var(--green);
}
.resetBtn { width: 100%; margin-top: 8px; }
.stageIndicator__title { font-size: 11px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .11em; }
.stageDot {
  width: 100%;
  margin: 6px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}
.stageDot span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  margin-right: 8px;
  background: rgba(58,169,255,.18);
}
.stageDot.is-active {
  color: var(--ink);
  border-color: rgba(58,169,255,.45);
  background: linear-gradient(180deg, rgba(58,169,255,.14), rgba(58,169,255,.05));
}

.brochure { width: 100%; }
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(130, 164, 197, 0.1);
}
.stage--transition {
  min-height: 115vh;
  padding: 0;
  display: block; /* voorkomt flex-centering artefacts */
}
.stage__inner {
  width: min(1200px, calc(100% - 60px));
  margin: 0 auto;
}
.stage--hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.54)),
    url("https://greenery-platform.s3.eu-central-1.amazonaws.com/uploads/sites/6/2017/07/21151731/20170718-0255-1680x1050.jpg") center/cover no-repeat;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin: 0 0 10px;
}
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1 { font-size: clamp(34px, 5vw, 62px); max-width: 860px; }
h2 { font-size: clamp(28px, 4vw, 46px); max-width: 760px; }
p { color: var(--muted); }
.lead { font-size: 18px; max-width: 780px; margin-top: 14px; }
.lead--shift { transform: translateX(-10px); }
.stage--hero .eyebrow,
.stage--hero h1,
.stage--hero .lead {
  color: #fff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 12px rgba(0, 0, 0, 0.65);
}
.transitionFrame {
  position: sticky;
  top: 12vh;
  width: 100%;
  height: 62vh;
  margin: 0;
  overflow: hidden;
  background: #000000;
  border-radius: 0;
  z-index: 1;
}
.transitionFrame::before {
  /* Tech sheen + grid overlay */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(900px 420px at 20% 12%, rgba(58,169,255, calc(var(--open, 0) * .22)), transparent 62%),
    radial-gradient(820px 420px at 82% 20%, rgba(75,227,154, calc(var(--open, 0) * .14)), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.38)),
    repeating-linear-gradient(90deg, rgba(255,255,255, calc(var(--open, 0) * .045)) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(255,255,255, calc(var(--open, 0) * .03)) 0 1px, transparent 1px 38px);
  mix-blend-mode: screen;
  opacity: calc(.25 + var(--open, 0) * .75);
}
.transitionFrame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 14px;
  pointer-events: none;
  transform: perspective(900px) rotateX(calc((1 - var(--open, 0)) * 14deg)) scale(calc(0.70 + (var(--open, 0) * 0.30)));
  transform-origin: 50% 50%;
  opacity: calc(var(--open, 0) * 0.95);
  transition: transform .08s linear, opacity .08s linear;
  z-index: 2;
  box-shadow:
    0 0 0 1px rgba(58,169,255, calc(var(--open, 0) * .35)),
    0 0 32px rgba(58,169,255, calc(var(--open, 0) * .22)),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.transitionVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  display: block;
  z-index: 0;
  max-height: none;
}
.transitionOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 30px;
  background: transparent;
  z-index: 1;
  pointer-events: none;
  opacity: var(--open, 0);
  transition: opacity .12s ease, transform .12s ease;
  transform: translateY(calc(18px * (1 - var(--open, 0)))) perspective(900px) rotateX(calc((1 - var(--open, 0)) * 10deg));
  clip-path: inset(calc((1 - var(--open, 0)) * 36%) calc((1 - var(--open, 0)) * 14%) calc((1 - var(--open, 0)) * 10%) calc((1 - var(--open, 0)) * 14%) round 14px);
}
.transitionOverlay::before {
  /* Sliding scanline */
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  height: 2px;
  top: calc(var(--open, 0) * 100%);
  background: linear-gradient(90deg, transparent, rgba(58,169,255,.85), transparent);
  opacity: calc(var(--open, 0) * .85);
  filter: blur(.2px);
}
.transitionOverlay::after {
  /* Corner brackets */
  content: "";
  position: absolute;
  inset: 22px;
  pointer-events: none;
  opacity: calc(var(--open, 0) * .9);
  background:
    linear-gradient(#fff,#fff) 0 0/18px 2px no-repeat,
    linear-gradient(#fff,#fff) 0 0/2px 18px no-repeat,
    linear-gradient(#fff,#fff) 100% 0/18px 2px no-repeat,
    linear-gradient(#fff,#fff) 100% 0/2px 18px no-repeat,
    linear-gradient(#fff,#fff) 0 100%/18px 2px no-repeat,
    linear-gradient(#fff,#fff) 0 100%/2px 18px no-repeat,
    linear-gradient(#fff,#fff) 100% 100%/18px 2px no-repeat,
    linear-gradient(#fff,#fff) 100% 100%/2px 18px no-repeat;
  mix-blend-mode: screen;
}

.transitionTitle {
  letter-spacing: .01em;
  text-transform: none;
}
.transitionBody {
  background: rgba(255,255,255,0.86);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 18px 42px rgba(0,0,0,0.28);
}

@supports not (clip-path: inset(10% 10% 10% 10% round 10px)) {
  .transitionOverlay { clip-path: none; }
}
.transitionTitle,
.transitionBody {
  color: #ffffff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 14px rgba(0, 0, 0, 0.7);
  -webkit-text-stroke: 1.6px #000;
}
.transitionTitle { max-width: 860px; margin-bottom: 10px; }
.transitionBody {
  max-width: 900px;
  font-size: 17px;
  line-height: 1.5;
  color: #0b1420; /* body tekst zwart */
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.heroStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.heroCtaWrap {
  margin-top: 26px;
  width: min(640px, 100%);
}
.heroCtaBtn {
  width: 100%;
  padding: 18px 22px;
  border-radius: 16px;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: .01em;
  box-shadow: 0 18px 54px rgba(58,169,255,.22), 0 10px 22px rgba(0,0,0,.35);
}
.heroStat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 23, 36, .82);
  padding: 14px;
}
.heroStat span { display: block; font-weight: 800; font-size: 20px; color: var(--ink); }
.heroStat label { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

.grid2 {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}
.scannerPanel, .barcodeCard, .card, .tableWrap {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.scannerPanel { margin-top: 18px; padding: 16px; position: relative; overflow: hidden; }
.scannerBeam {
  position: absolute; left: 0; right: 0; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: scan 2.6s linear infinite;
}
@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }
.barcodeCard { padding: 16px; }
.barcodeCard__title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.gateTableWrap {
  margin-top: 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .35s ease, opacity .2s ease, transform .2s ease;
}
.gateTableWrap.is-open {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
}
.tableWrap--compact { margin-top: 10px; }
.table--compact th, .table--compact td { padding: 8px 10px; }
.gateMatchRow {
  background: rgba(75,227,154,.16);
}
.gateMatchRow td {
  border-bottom-color: rgba(75,227,154,.28);
}
.gateMatchMark {
  font-weight: 900;
  color: var(--green);
}
.barcodeVisual {
  height: 220px;
  border: 1px dashed rgba(120,198,255,.4);
  border-radius: 12px;
  background: rgba(8, 17, 27, .58);
  overflow: hidden;
}
.barcodeVisual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detectGrid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  margin-top: 18px;
}
.card { padding: 14px; }
.card h3 { font-size: 17px; margin-bottom: 12px; }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab {
  border: 1px solid var(--line);
  background: rgba(15, 30, 46, .7);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.tab--active {
  color: white;
  border-color: rgba(58,169,255,.55);
  background: linear-gradient(180deg, rgba(58,169,255,.22), rgba(58,169,255,.08));
}
.tabpane { display: none; }
.tabpane--active { display: block; }

.videoWrap, .previewWrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #050b13;
}
.videoWrap video, .previewWrap img {
  width: 100%;
  max-height: 420px;
  display: block;
  object-fit: cover;
}
.previewWrap img { display: none; object-fit: contain; background: #0d1823; }
#curatedImg { display: block; }
.overlayCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hidden { display: none; }

.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.row--tight { gap: 6px; }

.primaryBtn, .ghostBtn {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}
.primaryBtn {
  border: 1px solid rgba(58,169,255,.6);
  color: #ecf7ff;
  background: linear-gradient(180deg, rgba(58,169,255,.28), rgba(58,169,255,.12));
}
.ghostBtn {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(18, 33, 49, .65);
}
.curatedPicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.curatedBtn.is-active {
  color: #eff9ff;
  border-color: rgba(58,169,255,.6);
  background: linear-gradient(180deg, rgba(58,169,255,.22), rgba(58,169,255,.08));
}
.primaryBtn:disabled, .ghostBtn:disabled { opacity: .5; cursor: not-allowed; }
input[type="file"], input[type="range"] {
  border: 1px solid var(--line);
  background: rgba(12, 25, 39, .8);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 10px;
}
.label { display: block; margin-top: 14px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.labelsBox {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  max-height: 210px;
  overflow: auto;
  background: rgba(12, 24, 37, .8);
}
.labelItem {
  display: flex; gap: 8px; align-items: center;
  padding: 7px; border-radius: 8px;
}
.labelItem:hover { background: rgba(58,169,255,.08); }
.hint { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.4; }
.mono, .processText {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.idBadge {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 23, 36, .8);
  padding: 9px 12px;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 21, 33, .8);
  padding: 10px;
}
.metric label {
  display: block; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.metric span {
  display: block; margin-top: 6px; font-weight: 800;
}
.metric.xl span { font-size: 26px; }

.countsGrid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.countCard {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(10, 22, 34, .78);
  display: flex;
  justify-content: space-between;
}
.countCard__num { color: var(--blue-soft); font-weight: 900; }

.ledgerTop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.tableWrap { margin-top: 12px; overflow: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 740px; }
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
}
.table td { white-space: normal; }
.table th {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  background: rgba(8, 18, 30, .95);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.modal__panel {
  position: relative;
  width: min(980px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 18, 28, 0.98);
  box-shadow: var(--shadow);
  padding: 14px;
}
.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media (max-width: 1220px) {
  .stageIndicator { display: none; }
}
@media (max-width: 940px) {
  .grid2, .detectGrid, .ledgerTop, .heroStats, .metrics {
    grid-template-columns: 1fr;
  }
  .stage__inner { width: calc(100% - 28px); }
  h1 { font-size: 36px; }
  .lead--shift { transform: none; }
  .transitionFrame { height: 62vh; top: 10vh; width: calc(100% - 20px); }
  .transitionOverlay { padding: 18px; }
  .transitionOverlay p { font-size: 15px; }
}
