/* Vertragingsscan — stijl overgenomen van het Axon-thema (axonverbindt.nl). */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(/fonts/figtree-400.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(/fonts/figtree-500.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(/fonts/figtree-600.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(/fonts/figtree-700.woff2) format('woff2'); }

:root {
  --ax-bg: #001026;
  --ax-accent: #4578f5;
  --ax-accent-hover: #2f63e6;
  --ax-theme: #23334c;
  --ax-text: #cccccc;
  --ax-white: #fff;
  --ax-soft: #94a3b8;
  --ax-error: #ff8a80;
  --ax-glass: linear-gradient(180deg, rgba(255, 255, 255, .02) 0%, rgba(153, 153, 153, .02) 100%);
  --ax-glass-shadow: inset 0 3px 6px rgba(255, 255, 255, .2), inset 0 -3px 6px rgba(255, 255, 255, .1);
  --ax-h1: clamp(36px, 2.25rem + ((1vw - 3.2px) * 2.143), 64px);
  --ax-h4: clamp(22px, 1.375rem + ((1vw - 3.2px) * .714), 30px);
  --ax-gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--ax-bg); color: var(--ax-text);
  font-family: Figtree, system-ui, sans-serif; font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
/* Netwerkgloed op de achtergrond, zoals de hero van axonverbindt.nl */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 85% 8%, rgba(69, 120, 245, .22), transparent 70%),
    radial-gradient(520px 420px at 0% 100%, rgba(63, 137, 202, .16), transparent 70%),
    radial-gradient(4px 4px at 78% 22%, rgba(255, 214, 170, .9), transparent 60%);
}
[hidden] { display: none !important; }
a { color: var(--ax-white); }
h1, h2, h3 { margin: 0; color: var(--ax-white); font-weight: 500; line-height: 1.2; }
h1 { font-size: var(--ax-h1); letter-spacing: -.04em; margin-bottom: 16px; }
h2 { font-size: var(--ax-h4); margin: 40px 0 16px; letter-spacing: -.02em; }
h1:focus { outline: none; }
mark { background: transparent; color: var(--ax-accent); }
:focus-visible { outline: 2px solid var(--ax-accent); outline-offset: 3px; }

/* Header ---------------------------------------------------------------- */
header.site { max-width: 880px; margin: 0 auto; padding: 24px var(--ax-gutter) 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header.site img { display: block; width: 7.5rem; height: auto; }

main { max-width: 880px; margin: 0 auto; padding: 40px var(--ax-gutter) 64px; }

/* Badge ------------------------------------------------------------------ */
.ax-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 24px; padding: 8px 12px;
  font-size: 14px; line-height: 20px; color: var(--ax-text);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, rgba(153, 153, 153, .04) 100%);
  box-shadow: inset 0 3px 6px rgba(35, 136, 255, .1), inset 0 -3px 6px rgba(35, 136, 255, .1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ax-badge::before { content: '×'; font-size: 16px; line-height: 1; color: var(--ax-white); }

.lead { font-size: clamp(18px, 1.1rem + .4vw, 22px); color: var(--ax-white); margin: 0 0 32px; max-width: 640px; }

/* Glaskaart -------------------------------------------------------------- */
.card {
  position: relative; overflow: hidden;
  background: var(--ax-glass); border-radius: 16px; box-shadow: var(--ax-glass-shadow);
  -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
  padding: 32px;
}
.card::before, .card::after { content: ''; position: absolute; z-index: 0; width: 270px; height: 170px; pointer-events: none; background: no-repeat 0 100% / contain; }
.card::before { left: 0; bottom: 0; background-image: url(/glow-bottom-left.svg); }
.card::after { top: -56px; right: 0; background-image: url(/glow-top-right.svg); }
.card > * { position: relative; z-index: 1; }
@media (max-width: 560px) { .card { padding: 24px 20px; } }

/* Formulier (zoals .ax-form) --------------------------------------------- */
.row { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 16px; }
label { display: block; margin-bottom: 10px; font-size: 16px; line-height: 19px; font-weight: 700; color: var(--ax-text); }
.opt { font-weight: 400; color: var(--ax-soft); }
input, select, textarea {
  display: block; width: 100%; height: 50px; padding: 14px 20px;
  font: inherit; font-size: 16px; line-height: 1.2; color: var(--ax-bg);
  background: #fff; border: 2px solid transparent; border-radius: 24px;
  appearance: none; -webkit-appearance: none;
}
select {
  padding-right: 48px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23001026' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center;
}
input::placeholder { color: #757575; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ax-accent); outline-offset: 0; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--ax-error); }
.err { color: var(--ax-error); font-size: 14px; margin: 8px 0 0 4px; }
.err:empty { display: none; }
.form-err { margin: 0 0 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.avg {
  margin: 8px 0 8px; padding: 16px 20px; border-radius: 16px; font-size: 15px; line-height: 1.5;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
}
.avg p { margin: 0 0 14px; }
.avg a { color: var(--ax-white); text-underline-offset: 3px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; line-height: 1.45; cursor: pointer; margin: 0; color: var(--ax-white); }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin: 1px 0 0; padding: 0; border-radius: 6px; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--ax-accent); }

/* Knoppen (zoals .ax-btn / .ax-form__submit) ------------------------------ */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 52px; padding: 10px 24px; border: 0; border-radius: 9999px;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1; text-decoration: none;
  cursor: pointer; touch-action: manipulation; color: #fff; background: var(--ax-accent);
  transition: background-color .2s ease, color .3s ease;
}
.btn:hover { background: var(--ax-accent-hover); }
.btn.primary { width: 100%; margin-top: 24px; }
.btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.btn.ghost:hover { background: rgba(255, 255, 255, .18); }
/* Witte knop met pijl, zoals "Ontdek wat Axon doet" */
.btn.white { background: #fff; color: var(--ax-bg); font-weight: 500; padding: 8px 8px 8px 24px; }
.btn.white::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ax-accent); border-radius: inherit; transform: scaleX(0); transform-origin: right; transition: transform .35s ease; }
.btn.white:hover { color: #fff; background: #fff; }
.btn.white:hover::before { transform: scaleX(1); transform-origin: left; }
.btn .arrow { width: 36px; height: 36px; background: url(/arrow.svg) center / contain no-repeat; transition: transform .3s ease; }
.btn:hover .arrow { transform: rotate(45deg); }
.btn:disabled { opacity: .6; cursor: default; }

/* Vragen ------------------------------------------------------------------ */
.progress { height: 6px; background: rgba(255, 255, 255, .1); border-radius: 99px; overflow: hidden; margin: 0 0 24px; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, #3F89CA, var(--ax-accent)); border-radius: 99px; transition: width .35s ease; }
.meta { color: var(--ax-soft); font-size: 15px; margin: 0 0 12px; }
.meta #q-thema { color: var(--ax-accent); font-weight: 600; }
#s-vraag h1 { font-size: clamp(28px, 1.75rem + 1.6vw, 44px); letter-spacing: -.03em; }
.opties { display: grid; gap: 12px; margin: 32px 0; }
.optie {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px; padding: 18px 22px; text-align: left;
  font-family: inherit; font-size: 18px; font-weight: 500; line-height: 1.3; color: var(--ax-white);
  background: var(--ax-glass); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; box-shadow: var(--ax-glass-shadow);
  cursor: pointer; touch-action: manipulation; transition: background-color .2s ease, border-color .2s ease;
}
.optie::after { content: ''; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); transition: all .2s ease; }
.optie:hover { background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); }
.optie[aria-pressed="true"] { background-color: rgba(69, 120, 245, .18); border-color: var(--ax-accent); }
.optie[aria-pressed="true"]::after { border-color: var(--ax-accent); background: var(--ax-accent); box-shadow: inset 0 0 0 4px var(--ax-bg); }
.optie:disabled { cursor: progress; }
.nav { display: flex; justify-content: space-between; }

/* Resultaat ---------------------------------------------------------------- */
#s-resultaat h1 span { color: var(--ax-accent); }
#r-profieltekst { color: var(--ax-white); font-size: 18px; max-width: 680px; }
.tijdwinst { margin: 32px 0; padding: 32px; }
.tijdwinst .big { display: block; font-size: clamp(72px, 20vw, 128px); font-weight: 500; line-height: 1; letter-spacing: -.06em; color: var(--ax-white); }
.tijdwinst .unit { display: block; color: var(--ax-accent); font-weight: 600; margin: 8px 0 16px; font-size: 18px; }
.tijdwinst p { margin: 0; color: var(--ax-text); max-width: 600px; }
.themas { list-style: none; padding: 8px 24px; margin: 0 0 24px; }
.themas li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "naam niveau" "meter meter"; gap: 10px 12px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.themas li:last-child { border-bottom: 0; }
.themas .naam { grid-area: naam; color: var(--ax-white); font-weight: 500; }
.themas .niveau { grid-area: niveau; font-weight: 600; color: var(--ax-soft); }
.themas .niveau.sterk { color: var(--ax-accent); }
.themas .niveau.op_weg { color: #8fb0ff; }
.themas .meter { grid-area: meter; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.themas .meter i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.themas .meter i.on { background: var(--ax-accent); }
@media (min-width: 640px) {
  .themas li { grid-template-columns: 1fr 220px 90px; grid-template-areas: "naam meter niveau"; align-items: center; }
  .themas .niveau { text-align: right; }
}
.sent { margin-bottom: 24px !important;

  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 8px; padding: 16px 20px; border-radius: 16px;
  color: var(--ax-white); font-weight: 500; overflow-wrap: anywhere;
  background: rgba(69, 120, 245, .12); border: 1px solid rgba(69, 120, 245, .4);
}
.sent::before { content: '✓'; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ax-accent); color: #fff; display: grid; place-items: center; font-size: 14px; }

/* Netwerkfout + tablet-time-out ------------------------------------------- */
.netfout {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; z-index: 20;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px;
  background: rgba(0, 16, 38, .96); color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.netfout p { margin: 0; font-size: 15px; }
.netfout .btn { flex: none; min-height: 44px; padding: 8px 18px; }
.idle { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0, 16, 38, .75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.idle .card { max-width: 440px; text-align: center; background: var(--ax-theme); color: var(--ax-white); }

/* Privacy-modal ------------------------------------------------------------ */
dialog { border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: 85vh; background: var(--ax-theme); color: var(--ax-text); }
dialog::backdrop { background: rgba(0, 16, 38, .75); }
.dialog-body { padding: 28px 28px 4px; overflow: auto; max-height: calc(85vh - 100px); font-size: 15px; line-height: 1.55; }
.dialog-body h1 { font-size: 26px; }
.dialog-body h2 { font-size: 19px; margin: 24px 0 8px; }
dialog form { padding: 12px 28px 24px; }
dialog .btn.primary { margin-top: 0; }

/* Privacypagina ------------------------------------------------------------ */
body.doc main.prose { margin: 24px auto; max-width: 760px; }
.prose h1 { font-size: 36px; }
.prose h2 { font-size: 22px; margin: 28px 0 8px; }
.muted { color: var(--ax-soft); }

/* Footer ------------------------------------------------------------------- */
footer.site { max-width: 880px; margin: 0 auto; padding: 0 var(--ax-gutter) 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--ax-soft); }
footer.site a { color: var(--ax-soft); text-decoration: none; }
footer.site a:hover { color: var(--ax-white); }

/* Tablet liggend ----------------------------------------------------------- */
@media (min-width: 900px) and (orientation: landscape) {
  main, header.site, footer.site { max-width: 1040px; }
  .opties { grid-template-columns: 1fr 1fr; }
  .optie { min-height: 92px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===================== Mobiel ===================== */
html { -webkit-tap-highlight-color: transparent; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
button, .optie, .btn, select, .check { touch-action: manipulation; }

/* Hover alleen op apparaten met een muis (op touch blijft hover anders "hangen") */
@media (hover: none) {
  .optie:hover { background-color: var(--ax-glass); border-color: rgba(255, 255, 255, .1); }
  .optie[aria-pressed="true"]:hover { background-color: rgba(69, 120, 245, .18); border-color: var(--ax-accent); }
  .btn:hover { background: var(--ax-accent); }
  .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
  .btn.white:hover { color: var(--ax-bg); }
  .btn.white:hover::before { transform: scaleX(0); }
  .btn:hover .arrow { transform: none; }
}
.optie:active { background-color: rgba(69, 120, 245, .12); }
.btn:active { transform: scale(.98); }

@media (max-width: 600px) {
  :root { --ax-gutter: 16px; }
  body { font-size: 16px; }
  header.site { padding-top: 16px; }
  header.site img { width: 6.25rem; }
  main { padding-top: 20px; padding-bottom: 40px; }

  h1 { font-size: 34px; letter-spacing: -.035em; margin-bottom: 12px; }
  h2 { font-size: 22px; margin: 32px 0 12px; }
  .ax-badge { margin-bottom: 16px; padding: 6px 10px; font-size: 13px; }
  .lead { font-size: 17px; margin-bottom: 20px; }

  /* Zware blur-effecten uit op telefoons: sneller scrollen op goedkopere toestellen */
  .card, .optie, .ax-badge { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { padding: 20px 16px; border-radius: 16px; background: rgba(255, 255, 255, .035); }
  .card::before, .card::after { width: 200px; height: 126px; }

  /* Formulier compacter, velden even groot als de duim */
  .row { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .field { margin-bottom: 14px; }
  label { margin-bottom: 8px; font-size: 15px; }
  input, select { height: 52px; padding: 14px 18px; }
  select { padding-right: 44px; background-position: right 18px center; }
  .avg { padding: 14px; font-size: 14px; margin-top: 4px; }
  .avg p { margin-bottom: 12px; }
  .btn { min-height: 56px; font-size: 17px; }
  .btn.primary { margin-top: 20px; }

  /* Vragen */
  .progress { margin-bottom: 18px; }
  .meta { font-size: 14px; margin-bottom: 8px; }
  #s-vraag h1 { font-size: 27px; line-height: 1.22; }
  .opties { gap: 10px; margin: 24px 0; }
  .optie { min-height: 62px; padding: 16px 18px; font-size: 17px; border-radius: 14px; }
  .nav .btn { min-height: 48px; padding: 8px 20px; font-size: 15px; }

  /* Resultaat */
  #r-profieltekst { font-size: 16px; }
  .tijdwinst { margin: 24px 0; padding: 24px 20px; }
  .tijdwinst .big { font-size: 88px; }
  .tijdwinst .unit { font-size: 16px; margin-bottom: 12px; }
  .themas { padding: 4px 16px; }
  .themas li { padding: 14px 0; }
  .sent { padding: 14px 16px; font-size: 15px; }
  #nieuwe-scan { width: 100%; justify-content: space-between; min-height: 56px; }

  /* Overlays */
  .netfout { flex-wrap: wrap; padding: 14px 16px; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .netfout .btn { width: 100%; }
  dialog { width: calc(100vw - 16px); max-height: 90dvh; }
  .dialog-body { padding: 20px 18px 4px; max-height: calc(90dvh - 96px); }
  dialog form { padding: 12px 18px 18px; }

  footer.site { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Heel smalle telefoons (iPhone SE e.d.) */
@media (max-width: 350px) {
  .row { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
  .tijdwinst .big { font-size: 72px; }
}

/* Telefoon liggend: niet te hoog */
@media (max-height: 500px) and (orientation: landscape) {
  header.site { padding-top: 10px; }
  main { padding-top: 12px; }
  .opties { grid-template-columns: 1fr 1fr; }
  .optie { min-height: 54px; }
}

/* Privacytekst: tabellen en lijsten (modal en losse pagina) */
.prose, .dialog-body { overflow-wrap: anywhere; }
.prose p, .dialog-body p, .prose ul, .dialog-body ul { margin: 0 0 12px; }
.prose ul, .dialog-body ul { padding-left: 20px; }
.prose li, .dialog-body li { margin-bottom: 6px; }
.prose strong, .dialog-body strong { color: var(--ax-white); font-weight: 600; }
.prose a, .dialog-body a { color: #8fb0ff; }
.prose table, .dialog-body table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .95em; }
.prose th, .prose td, .dialog-body th, .dialog-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.prose th, .dialog-body th { color: var(--ax-white); font-weight: 600; background: rgba(255, 255, 255, .04); }
@media (max-width: 600px) {
  /* Tabel als gestapelde blokken op smalle schermen */
  .prose table, .dialog-body table, .prose tbody, .dialog-body tbody, .prose tr, .dialog-body tr, .prose td, .dialog-body td { display: block; width: 100%; }
  .prose thead, .dialog-body thead { display: none; }
  .prose tr, .dialog-body tr { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .prose td, .dialog-body td { border: 0; padding: 2px 0; }
  .prose td:first-child, .dialog-body td:first-child { color: var(--ax-white); font-weight: 600; }
  body.doc main.prose { margin: 8px auto; }
  .prose h1 { font-size: 28px; }
}
