/* Fonts zoals op myebox.be: Roboto voor tekst, Barlow voor koppen (lokaal gehost) */
@font-face { font-family: "Roboto"; src: url("../fonts/roboto-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("../fonts/roboto-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("../fonts/roboto-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --primary: #16324f;
  --primary-dark: #0f243a;
  --accent: #84d2f6;
  --accent-strong: #087ea6;
  --hero-bg: #17263f;
  --page-bg: #eef2f5;
  --surface: #ffffff;
  --field-bg: #fbfcfd;
  --text: #2a2d41;
  --muted: #66697a;
  --border: #d7e0ea;
  --error: #b42318;
  --success: #067647;
  --focus-ring: rgba(132, 210, 246, 0.45);
  --shadow: 0 1px 3px rgba(22, 50, 79, 0.07);
  --shadow-small: 0 1px 2px rgba(22, 50, 79, 0.05);
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--muted);
  background: var(--page-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Barlow", "Roboto", sans-serif;
  color: var(--text);
  line-height: 1.25;
  margin-top: 0;
}
strong { color: var(--text); }

img { max-width: 100%; display: block; }
code { font-size: 0.88em; background: var(--page-bg); padding: 0.1rem 0.3rem; border-radius: 5px; }

.container { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--text); margin-right: auto; }
.brand-logo { width: auto; height: 44px; max-width: 190px; object-fit: contain; object-position: left center; }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  font-family: "Barlow", sans-serif;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 9px 12px; border-radius: 8px;
}
.main-nav a:hover { background: var(--page-bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  font-family: "Barlow", sans-serif; font-size: 1rem; font-weight: 600; text-decoration: none;
  padding: 12px 20px; transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: none; box-shadow: 0 0 0 4px var(--focus-ring);
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--small { padding: 9px 16px; }
.btn--large { padding: 14px 26px; }

/* ---------- Hero: smal, volledige breedte, alleen afbeelding ---------- */
.hero {
  width: 100%;
  height: clamp(140px, 19vw, 230px);
  overflow: hidden;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
}
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.eyebrow {
  margin: 0 0 10px; color: var(--accent); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.eyebrow--dark { color: var(--accent-strong); }

/* ---------- Layout ---------- */
.content-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 36px;
  align-items: start; padding: 40px 0 64px;
}
.form-intro {
  display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px;
}
.form-intro h2 { font-size: 2.1rem; font-weight: 700; margin: 0; }
.form-intro p:not(.eyebrow) { color: var(--muted); font-size: 1rem; margin: 8px 0 0; max-width: 58ch; }
.progress-box {
  min-width: 250px; background: var(--surface); border: none;
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-small);
  color: var(--text); font-size: 0.95rem; font-weight: 700;
}
.progress-track { height: 8px; background: var(--page-bg); border-radius: 999px; overflow: hidden; margin-top: 9px; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 0.25s ease; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; border: none; }
.alert p { margin: 4px 0 0; }
.alert--error { background: #fef3f2; color: #7a271a; }
.alert--success { background: #ecfdf3; color: #05603a; }

/* ---------- Form sections: blokken zonder border ---------- */
.form-section {
  background: var(--surface); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow-small); padding: 36px 40px 40px; margin: 0 0 24px;
}
.section-head {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 20px; margin-bottom: 26px;
  border-bottom: 1px solid #e8eef4;
}
.step-label {
  display: block; margin-bottom: 3px;
  font-family: "Barlow", sans-serif; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-strong);
}
.section-head h3 { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* Honeypot: onzichtbaar voor mensen, zichtbaar voor bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}

.fields-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px; row-gap: 22px; align-items: start;
}
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 1rem; color: var(--text); line-height: 1.35; }
.required { color: var(--error); }
.field input, .field select {
  width: 100%; height: 52px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--field-bg); color: var(--text); font: inherit; font-size: 1rem; padding: 0 14px;
}
.field input::placeholder { color: #9a9dab; }
.field input:hover, .field select:hover { border-color: var(--accent); }
.field input:focus, .field select:focus { border-color: var(--accent); background: var(--surface); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--error); }
.field-help { color: var(--muted); font-size: 0.83rem; }
.field-error { color: var(--error); font-size: 0.85rem; font-weight: 600; }

.form-actions {
  background: var(--surface); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow-small); padding: 28px 32px;
}
.consent { display: flex; gap: 11px; align-items: flex-start; font-weight: 500; color: var(--text); cursor: pointer; }
.consent input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--primary); flex: 0 0 auto; }
.action-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; }
.privacy-note { color: var(--muted); font-size: 0.85rem; margin: 14px 0 0; }

/* ---------- Sidebar: blokken zonder border ---------- */
.sidebar { display: grid; gap: 24px; position: sticky; top: 92px; }
.side-card {
  background: var(--surface); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow-small); padding: 24px;
}
.side-card h3 { margin: 0 0 14px; font-size: 1.2rem; font-weight: 700; }
.side-card p { margin: 0; }
.side-card--dark {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--text);
  box-shadow: none;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.side-card--dark h3 { color: var(--text); }
.side-card--dark p { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.83rem; margin-top: 10px !important; }
.section-links { display: grid; }
.section-links a {
  display: flex; align-items: center; gap: 12px;
  font-family: "Barlow", sans-serif; font-size: 1.02rem;
  color: var(--text); text-decoration: none; font-weight: 600;
  padding: 11px 2px; border-bottom: 1px solid #edf2f6;
}
.section-links a:last-child { border-bottom: none; }
.section-links a:hover { color: var(--accent-strong); }

/* ---------- Footer: dynamisch, zoals een website-footer ---------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.78); margin-top: 8px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px;
  padding: 48px 0 36px;
}
.footer-col h4 { color: #fff; font-size: 1.05rem; font-weight: 600; margin: 0 0 16px; }
.footer-logo {
  width: auto; height: 42px; max-width: 180px; object-fit: contain; object-position: left center;
  background: #fff; border-radius: 7px; padding: 4px 8px; margin-bottom: 16px;
}
.footer-desc { margin: 0; max-width: 34ch; line-height: 1.55; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.78); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact span { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); }
.footer-contact a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.14); padding: 20px 0 24px; font-size: 0.88rem;
}
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal a { color: rgba(255,255,255,0.78); text-decoration: none; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }

/* ---------- Responsive ---------- */
/* Tablet + mobiel: app-weergave met één witte achtergrond voor het formulier */
@media (max-width: 940px) {
  body { background: var(--surface); }
  .main-nav { display: none; }
  .hero { height: clamp(120px, 24vw, 180px); }
  .sidebar { display: none; }
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%; padding: 0 0 48px;
  }
  .form-intro { padding: 28px 24px 4px; margin-bottom: 16px; }
  .progress-box { background: var(--page-bg); box-shadow: none; }
  .alert { margin: 0 24px 16px; }
  .form-section {
    border-radius: 0; box-shadow: none; margin: 0;
    padding: 30px 24px 34px;
    border-bottom: 1px solid #e9edf1;
  }
  .form-actions { border-radius: 0; box-shadow: none; padding: 30px 24px 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; }
  .header-inner > .btn { display: none; }
  .brand-logo { height: 38px; max-width: 160px; }
  .hero { height: 118px; }
  .form-intro { display: block; padding: 24px 20px 4px; }
  .progress-box { margin-top: 18px; }
  .alert { margin: 0 20px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .form-section { padding: 26px 20px 30px; }
  .form-actions { padding: 26px 20px 8px; }
  .section-head { align-items: flex-start; }
  .section-head h3 { font-size: 1.35rem; }
  .fields-grid, .sidebar { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .action-row { flex-direction: column-reverse; }
  .action-row .btn { width: 100%; }
}

/* === VALIDATIE-FLITS === */
.field input.is-flash,
.field select.is-flash,
.field textarea.is-flash,
.consent.is-flash {
  animation: fieldFlash 2.4s ease-out forwards;
}

@keyframes fieldFlash {
  0%   { border-color: var(--error); box-shadow: 0 0 0 4px rgba(180,35,24,.22); background-color: rgba(180,35,24,.06); }
  55%  { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180,35,24,.10); background-color: var(--field-bg); }
  100% { border-color: var(--border); box-shadow: none; background-color: var(--field-bg); }
}

.field-error { display: block; margin-top: 6px; font-size: .85rem; color: var(--error); }
.field-error[hidden] { display: none; }

.consent input[aria-invalid="true"] {
  outline: 2px solid var(--error);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .field input.is-flash,
  .field select.is-flash,
  .field textarea.is-flash,
  .consent.is-flash { animation-duration: .01s; }
}

/* === VALIDATIE-V2 === */
.field input.is-flash,
.field select.is-flash,
.field textarea.is-flash {
  animation: fieldFlashStrong 2.4s cubic-bezier(.36,.07,.19,.97) forwards;
}

@keyframes fieldFlashStrong {
  0%   { border-color: var(--error); box-shadow: 0 0 0 6px rgba(180,35,24,.30); background-color: rgba(180,35,24,.12); transform: translateX(-4px); }
  10%  { transform: translateX(4px); }
  20%  { transform: translateX(-3px); }
  30%  { transform: translateX(3px); }
  40%  { transform: translateX(0); }
  70%  { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180,35,24,.14); background-color: var(--field-bg); }
  100% { border-color: var(--border); box-shadow: none; background-color: var(--field-bg); }
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 7px;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--error);
}
.field-error::before { content: "⚠"; font-weight: 700; line-height: 1; }
.field-error[hidden] { display: none; }

.consent.is-flash {
  animation: consentFlash 2.4s ease-out forwards;
}
@keyframes consentFlash {
  0%   { outline: 3px solid var(--error); outline-offset: 4px; background-color: rgba(180,35,24,.10); }
  70%  { outline: 3px solid var(--error); outline-offset: 4px; background-color: transparent; }
  100% { outline: 3px solid transparent; outline-offset: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .field input.is-flash, .field select.is-flash,
  .field textarea.is-flash, .consent.is-flash { animation-duration: .01s; }
}
