/* Totum Nexum — gedeelde basis uit het nieuwe ontwerp (totum-nexum-ontwerp).
   Bevat: tokens, header, mobiel menu, footer met themaschakelaar en de kleine
   componenten (knop, label, tag, kaart, terminalkaart).
   Laad dit bestand NA style.css: de tokens hieronder overschrijven de oude.
   Alles heeft het voorvoegsel tn-, zodat het niet botst met de oude opzet.
   Donker is standaard; licht komt via data-theme="light" op <html>. */

/* ---------- Tokens ---------- */
:root {
  --surface: #1e1f22;
  --surface-raised: #26282d;
  --text-strong: #fafafa;
  --text: #abb2bf;
  --text-muted: #abb2bf;
  --line: rgba(171, 178, 191, 0.18);
  --line-control: rgba(171, 178, 191, 0.4);
  --brand: #4078f2;
  --action: #2e63d9;
  --on-action: #ffffff;
  --accent-text: #61afef;
  --logo-ink: #fafafa;
  --tag-bg: rgba(97, 175, 239, 0.14);
  --success: #98c379;

  /* Waarden die in de pagina's voorkomen en per thema verschillen */
  --danger: #e06c75;
  --link-hover: #fafafa;
  --dot: rgba(171, 178, 191, 0.16);
  --flow-line: #61afef;
  --stripe-a: rgba(171, 178, 191, 0.45);
  --stripe-b: rgba(171, 178, 191, 0.25);
  --success-line: rgba(152, 195, 121, 0.5);
  --success-wash: rgba(152, 195, 121, 0.1);
  --done-a: rgba(97, 175, 239, 0.14);
  --done-b: rgba(64, 120, 242, 0.38);
  --deco-paren: rgba(64, 120, 242, 0.14);
  --input-hover: rgba(171, 178, 191, 0.6);
  --glow-home: radial-gradient(680px 480px at 76% 50%, rgba(64, 120, 242, 0.22), rgba(64, 120, 242, 0) 70%);
  --glow-over: radial-gradient(620px 420px at 82% 18%, rgba(64, 120, 242, 0.18), rgba(64, 120, 242, 0) 70%);
  --glow-contact: radial-gradient(640px 460px at 78% 40%, rgba(64, 120, 242, 0.2), rgba(64, 120, 242, 0) 70%);
  --glow-knop: rgba(64, 120, 242, 0.24);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-10: 40px;
  --space-14: 56px; --space-16: 64px; --space-20: 80px;
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
}

:root[data-theme="light"] {
  --surface: #fafafa;
  --surface-raised: #ffffff;
  --text-strong: #383a42;
  --text: #5c5f69;
  --text-muted: #6a6d78;
  --line: #e2e4e9;
  --line-control: #c9cdd6;
  --accent-text: #2e63d9;
  --logo-ink: #040404;
  --tag-bg: #eaf0fd;
  --success: #357a35;
  --danger: #b3261e;
  --link-hover: #1f4fb8;
  --dot: rgba(56, 58, 66, 0.12);
  --flow-line: #4078f2;
  --stripe-a: rgba(106, 109, 120, 0.4);
  --stripe-b: rgba(106, 109, 120, 0.2);
  --success-line: rgba(53, 122, 53, 0.4);
  --success-wash: rgba(53, 122, 53, 0.08);
  --done-a: #eaf0fd;
  --done-b: #c6d6fb;
  --deco-paren: rgba(64, 120, 242, 0.16);
  --input-hover: #9aa0ac;
  --glow-home: none;
  --glow-over: none;
  --glow-contact: none;
  --glow-knop: rgba(64, 120, 242, 0.12);
}

/* Delen die altijd donker blijven, ook in de lichte weergave: in licht het actieblok onderaan een pagina */
.tn-dark,
:root[data-theme="light"] .tn-panel {
  --surface: #1e1f22;
  --surface-raised: #26282d;
  --text-strong: #fafafa;
  --text: #abb2bf;
  --text-muted: #abb2bf;
  --line: rgba(171, 178, 191, 0.18);
  --line-control: rgba(171, 178, 191, 0.4);
  --accent-text: #61afef;
  --tag-bg: rgba(97, 175, 239, 0.14);
  --success: #98c379;
  --logo-ink: #fafafa;
  --link-hover: #fafafa;
  --danger: #e06c75;
}

/* Actieblok onderaan een pagina: kaart in donker, donker vlak met gloed in licht */
.tn-panel { border: 1px solid var(--line); background: var(--surface-raised); }
:root[data-theme="light"] .tn-panel {
  border: 0;
  background: radial-gradient(560px 380px at 82% 30%, rgba(64, 120, 242, 0.26), rgba(64, 120, 242, 0) 70%), #1e1f22;
  color: var(--text-strong);
}

html { scroll-padding-top: 96px; }

/* ---------- Header ---------- */
.tn-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.tn-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 16px clamp(24px, 5.5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tn-logo { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.tn-logo-img { display: block; height: 30px; width: auto; }
.tn-logo-for-light { display: none; }
:root[data-theme="light"] .tn-logo-for-light { display: block; }
:root[data-theme="light"] .tn-logo-for-dark { display: none; }
.tn-cursor { display: block; width: 2px; height: 20px; margin-left: 6px; background: var(--accent-text); animation: tn-blink 1.06s steps(1) infinite; }
@keyframes tn-blink { 50% { opacity: 0; } }

.tn-nav { display: flex; align-items: center; gap: 28px; }
.tn-nav-links { display: flex; align-items: center; gap: 32px; }
.tn-navlink { font-size: 15px; font-weight: 500; color: var(--text-strong); text-decoration: none; transition: color 0.15s ease; }
.tn-navlink:hover, .tn-navlink[aria-current="page"] { color: var(--accent-text); }

/* ---------- Mobiel menu (details, werkt zonder JavaScript) ---------- */
.tn-menu { display: none; }
.tn-menu > summary {
  list-style: none;
  width: 44px; height: 44px;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-md);
  color: var(--text-strong);
  cursor: pointer;
}
.tn-menu > summary::-webkit-details-marker { display: none; }
.tn-menu .tn-ic-x, .tn-menu[open] .tn-ic-bars { display: none; }
.tn-menu[open] .tn-ic-x { display: block; }
.tn-menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  box-sizing: border-box;
  padding: 4px clamp(24px, 5.5vw, 80px) 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.tn-menu-panel .tn-navlink { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 17px; }
.tn-menu-panel .tn-menu-cta { margin-top: 20px; display: flex; }
.tn-menu-panel .tn-menu-switch { margin-top: 8px; display: flex; }
@media (max-width: 860px) {
  .tn-nav-links { display: none; }
  .tn-menu { display: block; }
}

/* ---------- Footer ---------- */
.tn-footer { background: var(--surface); border-top: 1px solid var(--line); }
.tn-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 28px clamp(24px, 5.5vw, 80px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px;
  font-size: 14px;
  color: var(--text);
}
.tn-footer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.tn-footer-mark { display: block; height: 24px; width: auto; }
.tn-mark-for-light { display: none; }
:root[data-theme="light"] .tn-mark-for-light { display: block; }
:root[data-theme="light"] .tn-mark-for-dark { display: none; }
.tn-footer a { color: var(--accent-text); text-decoration: none; }
.tn-footer a:hover { color: var(--text-strong); }

/* Themaschakelaar: LICHT [ ] DONKER. Donker = knop rechts, licht = knop links. */
.tn-switch {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 4px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--text);
}
.tn-switch[hidden] { display: none; }
.tn-switch-track {
  width: 32px; height: 18px; box-sizing: border-box;
  border: 1px solid var(--line-control); border-radius: 9px;
  display: flex; align-items: center; justify-content: flex-end; padding: 2px;
}
.tn-switch-thumb { width: 12px; height: 12px; border-radius: 6px; background: #61afef; }
.tn-switch-dark { color: var(--accent-text); }
:root[data-theme="light"] .tn-switch-track { justify-content: flex-start; }
:root[data-theme="light"] .tn-switch-dark { color: var(--text); }
:root[data-theme="light"] .tn-switch-light { color: var(--accent-text); }

/* ---------- Focus en beweging ---------- */
.tn-header a:focus-visible, .tn-header summary:focus-visible,
.tn-footer a:focus-visible, .tn-switch:focus-visible, .tn-btn:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Componenten (uit design-system/components/bundle.css) ---------- */
.tn-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); border-radius: var(--radius-md);
  cursor: pointer; line-height: 1; white-space: nowrap; text-decoration: none;
  box-sizing: border-box;
}
.tn-btn-md { height: 50px; padding: 0 22px; font-size: 16px; }
.tn-btn-sm { height: 44px; padding: 0 18px; font-size: 15px; }
.tn-btn-primary { background: var(--action); color: var(--on-action); border: none; font-weight: 600; }
.tn-btn-primary:hover { filter: brightness(0.92); color: var(--on-action); }
.tn-btn-secondary { background: transparent; color: var(--text-strong); border: 1px solid var(--line-control); font-weight: 500; }
.tn-btn-secondary:hover { border-color: var(--text-muted); color: var(--text-strong); }
.tn-btn-full { width: 100%; }
.tn-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

.tn-tag { display: inline-block; font-family: var(--font-mono); font-size: 13px; line-height: 1.4; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--tag-bg); color: var(--accent-text); }
.tn-label { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.4; color: var(--accent-text); margin: 0; }
.tn-bracketed-paren { font-family: var(--font-mono); font-weight: 400; color: inherit; }
.tn-bracketed-word { color: var(--brand); }

.tn-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.tn-card-number { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--accent-text); }
.tn-card-title { font-size: 18px; font-weight: 600; color: var(--text-strong); }
.tn-card-body { font-size: 15px; line-height: 1.55; color: var(--text); }

.tn-term { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.tn-term-bar { height: 34px; box-sizing: border-box; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.tn-term-dots { display: flex; gap: 6px; }
.tn-term-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line-control); }
.tn-term-file { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.tn-term-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); font-family: var(--font-mono); font-size: 15px; line-height: 1.5; }
.tn-term-cmd { color: var(--text-strong); }
.tn-term-prompt { color: var(--accent-text); }
.tn-term-out { color: var(--text-muted); }
.tn-term-done { color: var(--success); }
