/* constructieveberekening.nl
   Rustig en technisch: veel wit, navy tekst, lichtblauw als enige accent.
   Maatvoering in monospace zoals op een bouwtekening. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #0f2540;
  --muted: #55657a;
  --line: #d6dde5;
  --accent: #8dd2ef;        /* lichtblauw: vlakken en markeringen */
  --accent-soft: #e4f3fa;
  --primary: #002249;       /* navy: knoppen en selectie */
  --primary-ink: #ffffff;
  --steel: #1f5a8a;         /* staal in tekeningen, vinkjes */
  --danger: #b3261e;
  --focus: #1f6fb2;

  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1824;
    --surface: #142233;
    --ink: #e6edf4;
    --muted: #9eb0c3;
    --line: #25384d;
    --accent: #8dd2ef;
    --accent-soft: #17324a;
    --primary: #8dd2ef;
    --primary-ink: #002249;
    --steel: #8dd2ef;
    --danger: #ff8a80;
    --focus: #8dd2ef;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, legend {
  font-family: var(--f-display);
  font-stretch: 82%;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; font-stretch: 90%; }

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

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .8rem 1.3rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-ink);
  font: 700 1rem/1 var(--f-display);
  font-stretch: 90%;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-small { padding: .55rem .9rem; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link { font-weight: 600; text-underline-offset: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 600 1rem var(--f-display); font-stretch: 85%; }
.logo b { font-weight: 800; }
.logo svg { width: 26px; height: 26px; fill: var(--steel); flex: none; }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } .logo span { font-size: .92rem; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-text { min-width: 0; display: grid; gap: 1.25rem; }
.eyebrow { margin: 0; font: 500 .8rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lead { margin: 0; font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.checks { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.checks li { padding-left: 1.6rem; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: .9rem; height: .5rem;
  border-left: 3px solid var(--steel); border-bottom: 3px solid var(--steel);
  transform: rotate(-45deg);
}

.hero-figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.hero-figure svg { display: block; width: 100%; height: auto; }
.hero-figure figcaption { margin-top: .75rem; font-size: .9rem; color: var(--muted); }
.fig-wall { fill: var(--line); }
.fig-floor { fill: var(--muted); opacity: .55; }
.fig-beam { fill: var(--steel); }
.fig-beam-line { stroke: var(--surface); stroke-width: 1.5; opacity: .6; }
.fig-plate { fill: var(--ink); }
.fig-load path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fig-dim line { stroke: var(--ink); stroke-width: 1.2; }
.fig-label { font: 500 14px var(--f-mono); fill: var(--ink); }
.fig-tag { font: 500 13px var(--f-mono); fill: var(--steel); }

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- secties ---------- */
.section { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.section h2 { margin-bottom: 2rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.steps li { display: grid; gap: .6rem; align-content: start; }
.steps p { margin: 0; color: var(--muted); }
.step-no {
  font: 500 .85rem var(--f-mono);
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- formulier ---------- */
.section-form { background: var(--surface); }
.form-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form-intro { min-width: 0; position: sticky; top: 6rem; }
.form-intro p { color: var(--muted); }
@media (max-width: 900px) { .form-wrap { grid-template-columns: 1fr; } .form-intro { position: static; } }

.wizard { min-width: 0; display: grid; gap: 1.5rem; scroll-margin-top: 5.5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.progress { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; counter-reset: s; overflow-x: auto; }
.progress li {
  flex: 1 1 0; min-width: 4.5rem;
  font: 500 .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  padding-top: .55rem; border-top: 4px solid var(--line);
  counter-increment: s;
}
.progress li::before { content: counter(s) " "; }
.progress li.is-done { border-top-color: var(--accent); color: var(--ink); }
.progress li.is-active { border-top-color: var(--primary); color: var(--ink); }
@media (max-width: 520px) { .progress li { font-size: 0; min-width: 0; } .progress li::before { font-size: .72rem; } }

.step { border: 0; margin: 0; padding: 0; display: grid; gap: 1.1rem; min-width: 0; }
.step legend { font-size: 1.6rem; margin-bottom: .4rem; padding: 0; }
.step-help { margin: 0; color: var(--muted); }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.choice {
  position: relative; display: grid; gap: .2rem;
  padding: 1rem 1rem 1rem 2.9rem;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--bg); cursor: pointer;
  transition: border-color .12s ease;
}
.choice:hover { border-color: var(--muted); }
.choice input { position: absolute; left: 1rem; top: 1.15rem; width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice-title { font-weight: 600; }
.choice-sub { font-size: .9rem; color: var(--muted); }

.group { display: grid; gap: 1.1rem; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.field { display: grid; gap: .35rem; min-width: 0; }
.field label, .field .label { font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { margin: 0; font-size: .9rem; color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .65rem .8rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.is-invalid { border-color: var(--danger) !important; }

.unit { display: flex; align-items: stretch; }
.unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.unit span {
  display: grid; place-items: center; padding-inline: .8rem;
  font: 500 .9rem var(--f-mono); color: var(--muted);
  border: 1.5px solid var(--line); border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pills label {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.pills label:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); }
.pills input { accent-color: var(--primary); }

.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--primary); flex: none; }

.drop {
  position: relative;
  display: grid; gap: .3rem; place-items: center; text-align: center;
  padding: 2rem 1rem;
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--bg); cursor: pointer;
}
.drop.is-over { border-color: var(--steel); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop-title { font-weight: 600; }
.drop-sub { font-size: .9rem; color: var(--muted); }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.file-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius);
}
.file-list img, .file-list .file-icon {
  width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex: none;
  background: var(--line); display: grid; place-items: center;
  font: 500 .7rem var(--f-mono); color: var(--muted);
}
.file-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font: 500 .8rem var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.file-remove { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: .25rem .4rem; }
.file-remove:hover { color: var(--danger); }

.error { margin: 0; color: var(--danger); font-size: .95rem; }

.summary { margin: 0; display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); border-top: 1px solid var(--line); }
.summary dt, .summary dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); padding-right: 1rem; }
.summary dd { overflow-wrap: anywhere; }
@media (max-width: 520px) { .summary { grid-template-columns: 1fr; } .summary dt { border-bottom: 0; padding-bottom: 0; } }

.wizard-nav { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.wizard-nav #nextBtn, .wizard-nav #submitBtn { margin-left: auto; }
.form-status { margin: 0; min-height: 1.5em; color: var(--muted); }
.form-status.is-error { color: var(--danger); }

.done { min-width: 0; display: grid; gap: 1rem; padding: 2rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.done p { margin: 0; }

/* ---------- over ons ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-text { min-width: 0; }
.about-text p { color: var(--muted); max-width: 60ch; }
.about-text h2 { margin-bottom: 1rem; }
.about-facts { margin: 0; border-top: 4px solid var(--primary); }
.about-facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.about-facts dt { font: 500 .78rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: .15rem; }
.about-facts dd { margin: 0; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.2rem var(--f-mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--muted); max-width: 60ch; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
