/*
 * Gedeelde v2-stijl voor enquête en beheer, bijpassend bij landing.html.
 * Laadt ná base.css en de paginastijl. Zet de kleurtokens van base.css om naar
 * het palet van de landingspagina, per stand (<html data-mode="dag|avond">),
 * zodat alle bestaande onderdelen automatisch meekleuren.
 */

/* ---------- tokens per stand ---------- */
:root[data-mode='dag'] {
  --bg: #d9cfbf;
  --surface: #f4eee5;
  --surface-2: #ebe2d4;
  --ink: #1f1d1b;
  --ink-2: #4f4940;
  --ink-3: #7b7264;
  --line: #ddd2c1;
  --line-strong: #c3b5a0;
  --accent: var(--terracotta);
  --accent-ink: #fff;
  --accent-soft: #f1dcd2;
  --blue-soft: #dde4ea;
  --cream: #f4edde;
  color-scheme: light;
}
/* Avond: warm espresso/donker hout uit het moodboard (gelijk aan landing.html), geen koel blauw. */
:root[data-mode='avond'] {
  --terracotta: #d65f40;
  --blue: #9bb4c8;
  --yellow: #f0b64a;
  --olive: #b0b77f;
  --bg: #15110d;
  --surface: #211a14;
  --surface-2: #2c231b;
  --ink: #f6e8d0;
  --ink-2: #d2c4ac;
  --ink-3: #9d8e78;
  --line: #3a2f25;
  --line-strong: #4f4133;
  --accent: var(--terracotta);
  --accent-ink: #fff;
  --accent-soft: #42271c;
  --blue-soft: #2a3139;
  --good: var(--olive);
  --good-soft: #2d2f1f;
  --warn: var(--yellow);
  --warn-soft: #403118;
  --bad: #ec8a7f;
  --bad-soft: #45241f;
  --cream: #f6e8d0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

body.v2 {
  --gap: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  background: var(--bg); color: var(--ink);
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
/* Fijne korrel, zoals op de landingspagina. */
body.v2::after {
  content: ''; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.v2 .card, .v2 .tile, .v2 .option, .v2 .cc { transition: background 0.6s var(--ease), color 0.6s var(--ease), border-color 0.6s var(--ease); }

/* ---------- kopregel ---------- */
.v2-top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 12px calc(var(--gap) + 12px);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.v2-logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; white-space: nowrap; }
.v2-logo .wordmark { font-size: 14px; }
.v2-logo small { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-left: 12px; }

/* Dag/avond-schakelaar (zelfde als op landing.html). */
.mode {
  justify-self: end; position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); padding: 3px; cursor: pointer;
  font-size: 11px; font-weight: 750; letter-spacing: 0.18em; text-transform: uppercase; font-family: inherit;
}
.mode-opt { position: relative; z-index: 1; padding: 7px 12px; transition: color 0.4s var(--ease); }
.mode-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--ink); transition: transform 0.45s var(--ease), background 0.6s var(--ease);
}
:root[data-mode='avond'] .mode-thumb { transform: translateX(100%); }
:root[data-mode='dag'] .mode-opt[data-v='dag'],
:root[data-mode='avond'] .mode-opt[data-v='avond'] { color: var(--bg); }

/* ---------- tegels ---------- */
.tile { position: relative; background: var(--surface); color: var(--ink); padding: clamp(18px, 2.4vw, 36px); min-width: 0; }
.tile-nr { font-size: 11px; font-weight: 750; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }

/* Zoeker-hoekjes (het hoek-motief): één laag met vier hoeken via een masker. */
.vizier-hoeken { position: relative; }
.vizier-hoeken::after {
  content: ''; position: absolute; inset: 16px; z-index: 2; pointer-events: none;
  border: 2px solid rgba(244, 237, 222, 0.85);
  -webkit-mask:
    linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
          mask:
    linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
}

/* Hoofdknop: donker vlak waar bij hover een terracotta vlak in schuift. */
.v2 .btn-primary, .v2 .knop {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); border-color: var(--ink); color: var(--bg);
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 750;
}
.v2 .btn-primary::before, .v2 .knop::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--terracotta);
  transform: translateX(-101%); transition: transform 0.45s var(--ease);
}
.v2 .btn-primary:hover, .v2 .knop:hover { background: var(--ink); filter: none; color: #fff; }
.v2 .btn-primary:hover::before, .v2 .knop:hover::before, .v2 .btn-primary:focus-visible::before { transform: none; }
.v2 .btn-primary[disabled]::before { display: none; }
.v2 .btn { text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; font-weight: 750; }

/* ---------- cookiebeleid (cookies.html) als één tegel ---------- */
.v2 .doc {
  max-width: 860px; margin: 0 auto var(--gap); padding: clamp(24px, 4vw, 56px);
  background: var(--surface); animation: v2-in 0.6s var(--ease) both;
}
.v2 .doc h1 { font-weight: 900; font-stretch: 115%; letter-spacing: -0.03em; line-height: 0.92; font-size: clamp(36px, 6vw, 64px); }
.v2 .doc h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 34px; }
.v2 .doc .back { font-size: 12px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.v2 .doc .back:hover { color: var(--terracotta); }
.v2 .doc .status { background: var(--terracotta); color: #fff; border: 0; padding: 18px 20px; }
.v2 .doc .status p { color: #fff; }
.v2 .doc .status .btn { background: #fff; color: #1f1d1b; border-color: #fff; }
.v2 .doc .table-wrap { border: 0; background: var(--surface-2); }
.v2 .doc th { font-size: 11px; letter-spacing: 0.14em; }
.v2 .doc code { background: var(--bg); }

/* Verschijnen van tegels. */
@keyframes v2-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  body.v2 { --gap: 6px; }
  .v2-top { padding: 10px 14px; gap: 12px; }
  .v2-logo small { display: none; }
  .v2-logo .wordmark { font-size: 13px; }
  .mode-opt { padding: 6px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  body.v2, .v2 .card, .v2 .tile, .v2 .option { transition: none; }
}
