/* ==================================================================
   WM Services, richting "Werklamp (donker)". Bron van waarheid: design.md.
   Palet in OKLCH, één accent (werklamp-amber), type: Bricolage 800 /
   Newsreader / JetBrains Mono. Beweging: minimal, alleen het laadmoment.
   ================================================================== */

:root {
  --bg:         oklch(0.15 0.016 264);
  --surface:    oklch(0.21 0.022 264);
  --surface-2:  oklch(0.26 0.024 264);
  --edge:       oklch(0.34 0.026 264);
  --ink:        oklch(0.95 0.012 80);
  --muted:      oklch(0.68 0.018 264);
  --accent:     oklch(0.76 0.155 62);
  --accent-ink: oklch(0.18 0.030 62);

  --display: "Bricolage Grotesque", "Arial Black", "Helvetica Neue", sans-serif;
  --body:    "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  --gutter: 24px;
  --max: 1200px;
  --measure: 68ch;

  /* 4px-ritme */
  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-10: 40px; --s-16: 64px; --s-26: 104px;
  --section: var(--s-26);

  --t-hover: 120ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); color: var(--ink); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 var(--s-4); max-width: var(--measure); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; transition: color var(--t-hover); }
a:hover { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.8125rem; line-height: 1.55; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0 0 var(--s-4); font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); line-height: 1.06; letter-spacing: -0.025em; max-width: 22ch; }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 28ch; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; font-variation-settings: "opsz" 48; margin-bottom: var(--s-2); }
small, .small { font-size: 0.875rem; line-height: 1.5; }

/* Focus: zichtbaar, overal hetzelfde */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: var(--s-2); z-index: 100; background: var(--accent); color: var(--accent-ink); padding: var(--s-2) var(--s-3); border-radius: 3px; text-decoration: none; }
.skip:focus { left: var(--s-2); }

/* Raster: 12 kolommen, gutter 24, max 1200, links uitgelijnd */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }

.section { padding-block: var(--section); border-top: 1px solid var(--edge); }
.section > .wrap > h2:only-child { margin-bottom: 0; }

/* Header: logo links, één CTA rechts */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--edge); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand img { width: 28px; height: auto; }

/* Knoppen */
.btn {
  display: inline-block; padding: 14px 22px; border-radius: 3px; border: 1px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; transition: background-color var(--t-hover), border-color var(--t-hover), color var(--t-hover);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: oklch(0.80 0.15 62); color: var(--accent-ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }
.site-header .btn { padding: 10px 16px; font-size: 0.9375rem; }

/* Hero: alleen type, links */
.hero { padding-block: var(--s-26) var(--s-16); }
.hero .lede { font-size: 1.25rem; line-height: 1.5; margin-top: var(--s-6); }
.hero-note { margin-top: var(--s-4); }

/* Laadmoment (het enige georkestreerde moment) */
.load { opacity: 0; transition: opacity 240ms ease-out; }
.load-2 { transition-delay: 80ms; }
.loaded .load { opacity: 1; }

/* Probleem in één regel */
.section-problem h2 { max-width: 24ch; }

/* Proces: genummerde rijen */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.steps li { display: grid; grid-template-columns: 5rem 1fr; gap: var(--s-6); padding-block: var(--s-6); border-bottom: 1px solid var(--edge); }
.steps .step-num { font-family: var(--display); font-weight: 800; font-size: 1.375rem; line-height: 1.25; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps p { margin-bottom: 0; }

/* Cases: volle breedte, geen kaartengrid */
.case { padding-block: var(--s-16) 0; }
.case + .case { margin-top: var(--s-16); padding-top: var(--s-16); border-top: 1px solid var(--edge); }
.case-header h2 { margin-bottom: var(--s-2); }
.case-meta { margin: 0; }
.case-body { display: flex; flex-direction: column; gap: var(--s-6); }
.case-row p { margin-bottom: 0; }
.big-number { font-family: var(--display); font-weight: 800; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.025em; margin: var(--s-2) 0 var(--s-3); font-variant-numeric: tabular-nums; }
.case-body .btn { align-self: flex-start; margin-top: var(--s-2); }

/* Signatuur: het opleveringsvlak. Enige element met zichtbare rand en schaduw. */
.delivery { margin: 0; align-self: start; }
.delivery-frame {
  position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: 4px; overflow: hidden;
  box-shadow: 0 24px 48px -24px oklch(0.05 0.02 264 / 0.8);
}
.delivery-frame > * { transition: opacity 180ms ease; }
.delivery-frame > [hidden] { display: none; }
.delivery-frame.switching > * { opacity: 0; }
.ph-media {
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-2); padding: var(--s-6);
  color: var(--muted); font-size: 0.9375rem;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, oklch(0.24 0.022 264) 14px 15px),
    var(--surface);
}
.ph-media.ph-input { background: var(--surface-2); aspect-ratio: 4 / 5; }
.ph-media code { color: var(--ink); }
.ph-dim { font-size: 0.875rem; }
.delivery-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-top: var(--s-3); flex-wrap: wrap; }
.run { color: var(--muted); font-weight: 400; }
.toggle { display: inline-flex; border: 1px solid var(--edge); border-radius: 3px; overflow: hidden; }
.toggle button {
  background: transparent; border: 0; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 0.875rem;
  padding: 6px 12px; cursor: pointer; transition: color var(--t-hover), background-color var(--t-hover);
}
.toggle button + button { border-left: 1px solid var(--edge); }
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.toggle button:focus-visible { outline-offset: -3px; }

/* Credentials */
.cred-list { margin: var(--s-6) 0 0; padding: 0; border-top: 1px solid var(--edge); }
.cred-list div { display: grid; grid-template-columns: 10rem 1fr; gap: var(--s-4); padding-block: var(--s-3); border-bottom: 1px solid var(--edge); }
.cred-list dt { color: var(--muted); }
.cred-list dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; font-variation-settings: "opsz" 48; }

/* Prijsopgave: gestapeld formulier, labels boven veld */
.section-quote { background: var(--surface); }
.quote-mail { margin-top: var(--s-6); }
.quote-form { display: flex; flex-direction: column; gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--edge); border-radius: 3px;
  padding: 12px 14px; font: inherit; line-height: 1.4; transition: border-color var(--t-hover);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--muted); }
.field 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% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.error { margin: 0; padding-left: var(--s-3); border-left: 2px solid var(--accent); color: var(--ink); font-size: 0.9375rem; }
.quote-form .btn { align-self: flex-start; margin-top: var(--s-2); }
.form-status { margin: 0; color: var(--muted); min-height: 1.6em; }

/* Footer */
.site-footer { border-top: 1px solid var(--edge); padding-block: var(--s-10); }
.footer-inner { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: var(--s-6); flex-wrap: wrap; margin: 0; }
.footer-inner img { width: 22px; }
.footer-meta { color: var(--muted); margin-left: auto !important; }

/* Responsief tot 360px */
@media (max-width: 900px) {
  :root { --section: var(--s-16); }
  .span-5, .span-6, .span-8 { grid-column: 1 / -1; }
  .hero { padding-block: var(--s-16) var(--s-10); }
  .steps li { grid-template-columns: 3.5rem 1fr; gap: var(--s-4); }
  .cred-list div { grid-template-columns: 1fr; gap: 4px; }
  .footer-meta { margin-left: 0 !important; }
}
@media (max-width: 480px) {
  .site-header .btn { padding: 10px 12px; font-size: 0.875rem; }
  .brand span { display: none; }
  .delivery-bar { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion: eindstaat direct zichtbaar, ook het laadmoment */
@media (prefers-reduced-motion: reduce) {
  .load { opacity: 1; transition: none; }
  .delivery-frame > *, .btn, a, .toggle button, .field input, .field textarea, .field select { transition: none; }
  .delivery-frame.switching > * { opacity: 1; }
}
