/* Totum Nexum — stylesheet
   Source of truth: "Totum Nexum — Stijlrichting" v0.1 (okt 2026).
   Rules from the style tile: radius 6–8px, 1px lines, no shadows,
   glow only on dark, motion only on scroll, fonts self-hosted. */

/* Fonts — latin subsets, variable weight. Self-hosted: no request to Google. */
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

/* Layout and type tokens (theme-independent) */
:root {
  --font-sans:  "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-logo:  "Space Grotesk", "Geist", system-ui, sans-serif;

  --container: 1280px;
  --gutter: 24px;
  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 88px;
  --themebar-h: 44px;
}

/* Colour tokens — dark is the default theme.
   .theme-dark re-applies them to a single section (scripting) in light mode. */
:root,
.theme-dark {
  --bg:           #1E1F22;
  --panel:        #26282D;
  --node-bg:      #2F343E;
  --text:         #ABB2BF;
  --text-strong:  #FAFAFA;
  --text-body:    #ABB2BF;
  --text-muted:   #8B93A1;
  --line:         rgba(171, 178, 191, 0.18);
  --line-strong:  rgba(171, 178, 191, 0.40);
  --line-node:    rgba(171, 178, 191, 0.28);
  --line-dash:    #5C6370;
  --logo-ink:     #FAFAFA;

  --accent:       #4078F2;  /* logo, big headings, lines, data */
  --accent-dark:  #2E63D9;  /* buttons — enough contrast for white text */
  --accent-hover: #1F4FB8;
  --accent-text:  #61AFEF;  /* accent used as text (labels, links) */
  --accent-wash:  rgba(97, 175, 239, 0.12);
  --hl:           #61AFEF;  /* highlighted words in headings */
  --link-hover:   #FAFAFA;
  --on-accent:    #FFFFFF;

  --data-green:   #98C379;
  --danger:       #E06C75;

  --glow: radial-gradient(620px 440px at 77% 56%, rgba(64, 120, 242, 0.24), rgba(64, 120, 242, 0) 70%);
}

:root[data-theme="light"] {
  --bg:           #FAFAFA;
  --panel:        #FFFFFF;
  --node-bg:      #FFFFFF;
  --text:         #383A42;
  --text-strong:  #383A42;
  --text-body:    #5C5F69;
  --text-muted:   #6A6D78;
  --line:         #E2E4E9;
  --line-strong:  #C9CDD6;
  --line-node:    #D5D8DF;
  --line-dash:    #B8BEC9;
  --logo-ink:     #040404;

  --accent-text:  #2E63D9;
  --accent-wash:  #EAF0FD;
  --hl:           #4078F2;
  --link-hover:   #1F4FB8;

  --data-green:   #3F8A3E;
  --danger:       #B3261E;

  --glow: none;
}

.theme-dark {
  background: var(--glow), var(--bg);
  color: var(--text);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--themebar-h) + 8px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { color: var(--text-strong); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
h2.display { font-size: clamp(34px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.025em; }

/* "(één proces)" — brackets in mono, inner text in accent */
.paren { font-family: var(--font-mono); font-weight: 400; }
.hl { color: var(--hl); }
/* Keeps "(één proces)" together so the haakjes never end up on separate lines. */
.nobr { white-space: nowrap; }
.nobr.long { white-space: normal; } /* long highlights may wrap: nowrap overflows the narrow hero column */

/* Mono label: "(voor bouw & vastgoed)", "01 — INTAKE" */
.label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-text);
}
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--accent-dark);
  color: var(--on-accent);
  border-radius: var(--radius);
}
.skip-link:focus { left: 8px; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 900px) {
  :root { --gutter: 80px; }
  .container { max-width: calc(var(--container) + 2 * var(--gutter)); }
}

.section { padding-block: clamp(64px, 10vw, 120px); }
.section + .section:not(.theme-dark) { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: 48px; }
.section-head p:not(.label) { color: var(--text-body); font-size: 19px; }

/* Logo — text-based "(TN) Totum Nexum" */
.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  line-height: 1;
}
.logo-img { display: block; height: 36px; width: auto; }
/* Two logo files, one per theme: the dark-theme logo is the default */
.logo-for-light { display: none; }
[data-theme="light"] .logo-for-light { display: block; }
[data-theme="light"] .logo-for-dark { display: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.header-inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 36px);
  list-style: none;
  padding: 0;
}
.main-nav a:not(.btn) {
  white-space: nowrap;
  padding-block: 12px; /* 44px hit area, the text itself stays 20px */
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.main-nav a:not(.btn):hover { color: var(--link-hover); }

/* Theme switch — slim bar under the nav. Hidden until JS enables it. */
.theme-bar {
  height: var(--themebar-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.theme-switch[hidden] { display: none; }
.theme-switch .opt-dark { color: var(--accent-text); }
[data-theme="light"] .theme-switch .opt-dark { color: var(--text-muted); }
[data-theme="light"] .theme-switch .opt-light { color: var(--accent-text); }
.theme-switch .track {
  position: relative;
  width: 36px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.theme-switch .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.15s ease;
}
[data-theme="light"] .theme-switch .thumb { transform: translateX(16px); }
.theme-switch:hover .track { border-color: var(--text-muted); }

/* Hero glow — only visible in dark (--glow is none in light) */
.hero { background: var(--glow); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Buttons — 44–50px high, comfortable tap target */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-primary { background: var(--accent-dark); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { border-color: var(--line-strong); color: var(--text-strong); font-weight: 500; background: transparent; }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text-strong); }

/* Tag: "(verkenning)" */
.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Hero */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(0, 600px);
  justify-content: space-between;
  align-items: center;
  gap: 64px;
  min-height: 712px; /* 800px design frame minus 88px header */
  padding-block: 64px;
}
.section .hero-grid { min-height: 0; padding-block: 0; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-copy .lead { max-width: 560px; font-size: 19px; line-height: 1.6; color: var(--text-body); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Flow diagram — shared SVG styling, colours follow the theme */
.diagram text { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; fill: var(--text-muted); }
.diagram .node rect { fill: var(--node-bg); stroke: var(--line-node); }
.diagram .node text { font-family: var(--font-sans); font-size: 14px; letter-spacing: 0; fill: var(--text); }
.diagram .dash { fill: none; stroke: var(--line-dash); stroke-width: 1.25; stroke-dasharray: 3 4; }
.diagram .link { stroke: var(--accent); stroke-width: 2; fill: none; }
.diagram .hub circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.diagram .hub text { font-size: 16px; letter-spacing: 0; fill: var(--accent-text); text-anchor: middle; }
.diagram .result rect { fill: var(--accent-dark); }
.diagram .result text { fill: var(--on-accent); text-anchor: middle; letter-spacing: 0; }
.diagram .result .result-title { font-family: var(--font-sans); font-size: 18px; font-weight: 600; }

/* Mobile version of the flow diagram (chips → hub → result) */
.flow-mobile { display: none; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li {
  padding: 8px 12px;
  border: 1px solid var(--line-node);
  border-radius: var(--radius-sm);
  background: var(--node-bg);
  font-size: 15px;
}
.hub-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hub-mobile::before { content: ""; height: 20px; border-left: 1px dashed var(--line-dash); }
.hub-mobile::after  { content: ""; height: 20px; border-left: 2px solid var(--accent); }
.hub-mobile span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-text);
}
.result-mobile {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: var(--on-accent);
}
.result-mobile strong { display: block; font-size: 18px; font-weight: 600; }
.result-mobile span { font-family: var(--font-mono); font-size: 12px; }

/* Steps: INTAKE → GESPREKKEN → PROCESPLAAT → SCORE → ROADMAP */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.steps.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.card p { font-size: 15px; line-height: 1.55; color: var(--text-body); }
.steps .card { counter-increment: step; }
.steps .card::before {
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
}

/* Narrow text sections */
.prose { max-width: 720px; }
.prose p { color: var(--text-body); }
.prose p + p { margin-top: 16px; }
.prose + .principles { margin-top: 48px; }
.principles .card::before { content: none; } /* no step numbers on principles */

/* Footer */
.site-footer { padding-block: 32px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Coming-soon page */
.soon {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding-block: 40px;
  --glow: radial-gradient(560px 420px at 50% 40%, rgba(64, 120, 242, 0.22), rgba(64, 120, 242, 0) 70%);
  background: var(--glow), var(--bg);
}
.soon-main { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
.soon-mark {
  display: flex;
  align-items: flex-start;
  gap: 0.083em;
  font-family: var(--font-logo);
  font-size: clamp(96px, 17vw, 240px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.soon-mark .tn { position: relative; top: 0.096em; color: var(--accent); }
.cursor {
  width: 0.092em;
  height: 1em;
  margin-top: 0.092em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50%, 100% { opacity: 0; } }
.soon-text { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.soon-text h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.soon-text p { max-width: 560px; font-size: 18px; }
.soon .footer-inner { color: var(--text); }

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
}

@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  :root { --header-h: 64px; }
  .logo-img { height: 28px; }
  .main-nav {
    display: none;
    position: absolute;
    z-index: 10; /* above the theme switch thumb, which sits later in the DOM */
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a:not(.btn) { display: block; padding: 12px 0; font-size: 17px; }
  .main-nav .btn { width: 100%; margin-top: 12px; }
}

@media (max-width: 700px) {
  .hero-grid { gap: 40px; padding-block: 32px 48px; }
  .hero-copy { gap: 20px; }
  .hero-copy .lead { font-size: 17px; line-height: 1.55; }
  .actions .btn { width: 100%; }
  .diagram { display: none; }
  .flow-mobile { display: flex; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .theme-switch .thumb { transition: none; }
}

/* Hero fact list: what Totum Nexum does, in three lines */
.facts { list-style: none; padding: 0; display: grid; gap: 10px; }
.facts li { padding-left: 20px; position: relative; color: var(--text-body); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 1px; background: var(--accent-text); }
.facts strong { color: var(--text-strong); font-weight: 600; }

/* Subpages: the opening section carries the h1 */
.page-top h1 { font-size: clamp(34px, 4.4vw, 52px); }
.page-top .section-head { margin-bottom: 32px; }
.main-nav a[aria-current="page"]:not(.btn) { color: var(--accent-text); }

/* Contact form */
.form-wrap { max-width: 640px; }
.form-wrap form { display: grid; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 600; color: var(--text-strong); font-size: 16px; }
.field .optional { font-weight: 400; color: var(--text-muted); }
.field .hint { color: var(--text-muted); font-size: 15px; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming in on focus */
  color: var(--text-strong);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--text-muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 15px; }
.field-error::before { content: "\26A0\FE0E\00A0"; }
.form-note, .form-alt { font-size: 15px; color: var(--text-muted); }
.form-note a, .form-alt a, .legal a { color: var(--accent-text); text-underline-offset: 3px; }
.form-alt { margin-top: 24px; }
.form-wrap form .btn { justify-self: start; }
.form-wrap form .btn[disabled] { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-bottom: 24px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.form-status.ok { border-color: var(--data-green); color: var(--text-strong); }
.form-status.err { border-color: var(--danger); color: var(--text-strong); }
.form-status[hidden] { display: none; }
.status-target { display: none; }
.status-target:target { display: block; }

/* Legal text */
.legal h2 { font-size: 22px; letter-spacing: -0.01em; margin-top: 40px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-top: 12px; }
.legal .meta { margin-top: 40px; }
.footer-inner a { color: inherit; text-underline-offset: 3px; }
.footer-inner a:hover { color: var(--link-hover); }

/* Products overview */
.steps.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.section-cta { margin-top: 32px; }
.products .card { gap: 12px; padding: 28px; }
.products .card h2 { font-size: 22px; letter-spacing: -0.01em; }
.products .card > p { font-size: 16px; color: var(--text-strong); }
.products .facts { margin-top: 8px; gap: 8px; }
.products .facts li { font-size: 15px; line-height: 1.5; }

/* Story paragraphs */
.story p { font-size: 18px; line-height: 1.7; }
.story p + p { margin-top: 20px; }
.story .story-close { color: var(--text-strong); font-weight: 600; font-size: 20px; }


/* The hero headline shares its row with the diagram, so it runs a little smaller than other h1s. */
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); }

.cta-line strong { color: var(--text-strong); }
.story em { color: var(--text-strong); font-style: italic; }

/* Over: signature and portrait */
.signature { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.signature p { color: var(--text-strong); line-height: 1.5; }
.portrait { width: 160px; height: 160px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.price-note { font-size: 15px; color: var(--text-muted); border-top: 1px solid var(--line); padding-top: 12px; }
