/* ==========================================================
   iPad-vragenlijst (kioskmodus)
   ========================================================== */

body.kiosk {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}
body.kiosk input, body.kiosk textarea { -webkit-user-select: text; user-select: text; }

.k-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px;
  background: rgba(251, 247, 242, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

/* ---------- Voortgang ---------- */
.steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.steps[hidden] { display: none; }
.steps li {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 650; color: var(--muted);
}
.steps li + li::before { content: ""; width: 24px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.steps .dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line-strong); font-weight: 800;
}
.steps li.is-active { color: var(--ink); }
.steps li.is-active .dot { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(255, 107, 53, .18); }
.steps li.is-done .dot { border-color: var(--ink); background: var(--ink); color: #fff; }
.steps li.is-done + li::before, .steps li.is-active + li::before { background: var(--ink); }
.steps .label { white-space: nowrap; }
@media (max-width: 1100px) { .steps .label { display: none; } }

.progress-bar { height: 4px; background: var(--line); }
.progress-bar span { display: block; height: 100%; background: var(--brand); transition: width .35s ease; }

/* ---------- Hoofdgebied ---------- */
.k-main { flex: 1; display: flex; justify-content: center; padding: 40px 32px 140px; }
.k-card { width: 100%; max-width: 760px; }

.screen { display: none; animation: screen-in .3s ease-out; }
.screen.is-active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-dark);
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

.statement {
  display: flex; gap: 14px;
  padding: 18px 20px; margin: 8px 0 28px;
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1.05rem; color: var(--ink);
}
.statement svg { flex: none; width: 24px; height: 24px; color: var(--brand-dark); margin-top: 1px; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
  display: grid; gap: 24px;
}

/* ---------- Welkom ---------- */
.welcome { text-align: center; padding-top: 4vh; }
.welcome .hero-mark { width: 96px; height: 96px; margin: 0 auto 28px; display: block; }
.welcome h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.welcome .lead { margin: 0 auto 36px; }
.welcome-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 48px 0 32px; text-align: left;
}
.welcome-facts div {
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.welcome-facts strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.welcome-facts span { font-size: .9rem; color: var(--muted); }
@media (max-width: 700px) { .welcome-facts { grid-template-columns: 1fr; } }

.lang { display: inline-flex; gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.lang button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer;
}
.lang button.is-active { background: var(--ink); color: #fff; }
.lang button:disabled { cursor: not-allowed; opacity: .5; }

/* ---------- Handtekening ---------- */
.sig-wrap {
  position: relative; border: 2px dashed var(--line-strong); border-radius: var(--r);
  background: #fff; overflow: hidden;
}
.sig-wrap.has-error { border-color: var(--danger); background: var(--danger-soft); }
.sig-wrap canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; }
.sig-wrap .sig-line { position: absolute; left: 32px; right: 32px; bottom: 52px; border-bottom: 1.5px solid var(--line-strong); pointer-events: none; }
.sig-wrap .sig-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #b3b9c6; font-weight: 600; pointer-events: none; transition: opacity .2s;
}
.sig-wrap.is-signed .sig-placeholder { opacity: 0; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* ---------- Controle ---------- */
.review { display: grid; gap: 16px; }
.review-block { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; }
.review-block header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-block h3 { margin: 0; }
.review-block dl { margin: 0; display: grid; grid-template-columns: 220px 1fr; }
.review-block dt, .review-block dd { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.review-block dt { color: var(--muted); font-size: .95rem; }
.review-block dd { font-weight: 650; }
.review-block img { max-width: 260px; height: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sand); }
@media (max-width: 640px) { .review-block dl { grid-template-columns: 1fr; } .review-block dd { border-top: 0; padding-top: 0; } }

.lang-sm { padding: 4px; }
.lang-sm button { padding: 6px 12px; font-size: .85rem; }
.sig-error { color: var(--danger); font-weight: 600; font-size: .88rem; }
.spinner {
  width: 44px; height: 44px; margin: 20vh auto 0; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit-error {
  margin-top: 16px; padding: 16px 20px; border-radius: var(--r);
  background: var(--danger-soft); color: var(--danger); font-weight: 650;
}

/* ---------- Bedankt ---------- */
.done { text-align: center; padding-top: 6vh; }
.done .check-anim {
  width: 112px; height: 112px; margin: 0 auto 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--success-soft); color: var(--success);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.done .check-anim svg { width: 56px; height: 56px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done .ref { display: inline-block; margin: 8px 0 32px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; }
.countdown { color: var(--muted); font-size: .95rem; margin-top: 20px; }

/* ---------- Actiebalk ---------- */
.k-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  padding: 16px 32px calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.k-footer .inner { width: 100%; max-width: 760px; display: flex; justify-content: space-between; gap: 12px; }
.k-footer[hidden] { display: none; }

@media (max-width: 640px) {
  .k-header { padding: 12px 16px; }
  .k-main { padding: 28px 16px 130px; }
  .panel { padding: 20px; }
  .k-footer { padding-left: 16px; padding-right: 16px; }
  .btn-lg { padding: 0 20px; }
}

.lock-link {
  margin-top: 28px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px;
}

/* ==========================================================
   Startscherm & vergrendelscherm (hero)
   ========================================================== */

/* Decoratieve achtergrond, alleen buiten de invulstappen */
.k-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .4s; }
body.is-intro .k-bg { opacity: 1; }
body.is-intro { background: linear-gradient(160deg, #fffaf5 0%, var(--sand) 45%, #f6efe6 100%); }
.k-bg .blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.k-bg .blob-1 { width: 620px; height: 620px; right: -220px; bottom: -260px; background: radial-gradient(circle at 35% 35%, #ff8a5c, var(--brand) 60%, #f0541c); opacity: .95; }
.k-bg .blob-2 { width: 340px; height: 340px; left: -160px; top: 120px; background: radial-gradient(circle, rgba(255, 107, 53, .16), rgba(255, 107, 53, 0) 70%); }
.k-bg .ring { position: absolute; width: 420px; height: 420px; right: 140px; bottom: 60px; border-radius: 50%; border: 2px solid rgba(20, 33, 61, .08); }
.k-bg .dots {
  position: absolute; left: 40px; bottom: 60px; width: 220px; height: 160px;
  background-image: radial-gradient(rgba(20, 33, 61, .16) 1.6px, transparent 1.6px); background-size: 18px 18px;
}
body.is-intro .k-header { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.is-intro .progress-bar { opacity: 0; }

/* Breder kader voor de hero */
.k-card:has(> .hero.is-active) { max-width: 1120px; }

.hero.is-active {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
  column-gap: 56px; row-gap: 40px; padding-top: 2vh;
}
.hero-text h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.08; margin-bottom: 18px; }
.hero-text .lead { margin: 0 0 30px; font-size: 1.15rem; }
.hl {
  color: var(--brand-dark);
  background: linear-gradient(transparent 62%, rgba(255, 107, 53, .2) 62%, rgba(255, 107, 53, .2) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.hero-lang { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-label { font-weight: 700; font-size: .9rem; color: var(--muted); }
.hero-lang .lang { box-shadow: var(--shadow-sm); }
.hero-lang .lang button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: .95rem; }
.flag { width: 20px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.flag-nl { background: linear-gradient(#ae1c28 0 33.3%, #fff 33.3% 66.6%, #21468b 66.6%); }
.flag-en {
  background:
    linear-gradient(#c8102e, #c8102e) center / 100% 2px no-repeat,
    linear-gradient(#c8102e, #c8102e) center / 2px 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 5px no-repeat,
    linear-gradient(#fff, #fff) center / 5px 100% no-repeat,
    #012169;
}

.btn-xl { min-height: 68px; padding: 0 36px; font-size: 1.2rem; border-radius: 20px; box-shadow: 0 10px 30px rgba(255, 107, 53, .4); }
.btn-xl svg { width: 24px; height: 24px; transition: transform .2s; }
.btn-xl:hover svg { transform: translateX(4px); }

/* Illustratie */
.hero-art { position: relative; justify-self: center; width: min(100%, 400px); aspect-ratio: 320 / 400; }
.hero-art .doc { width: 100%; height: 100%; transform: rotate(3deg); filter: drop-shadow(0 30px 50px rgba(20, 33, 61, .18)); }
.screen.is-active .hero-art .doc { animation: doc-in .7s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes doc-in { from { opacity: 0; transform: rotate(8deg) translateY(30px); } }
.hero-art .sig { stroke-dasharray: 520; stroke-dashoffset: 520; }
.screen.is-active .hero-art .sig { animation: sign 1.6s .6s ease-out forwards; }
@keyframes sign { to { stroke-dashoffset: 0; } }
.seal {
  position: absolute; right: -6px; bottom: 16%; width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; background: var(--success); color: #fff;
  box-shadow: 0 10px 24px rgba(26, 158, 143, .4), 0 0 0 6px #fff;
}
.seal svg { width: 34px; height: 34px; }
.screen.is-active .seal { animation: pop .5s 2s cubic-bezier(.2, 1.4, .4, 1) both; }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px; background: #fff; color: var(--ink);
  font-weight: 700; font-size: .88rem; white-space: nowrap; box-shadow: var(--shadow);
}
.chip svg { width: 18px; height: 18px; color: var(--brand-dark); }
.chip-1 { left: -34px; top: 18%; }
.chip-2 { right: -30px; top: 6%; }
.chip-3 { left: -18px; bottom: 9%; }
.screen.is-active .chip { animation: float-in .5s both, bob 5s ease-in-out infinite; }
.screen.is-active .chip-1 { animation-delay: .9s, 1.4s; }
.screen.is-active .chip-2 { animation-delay: 1.1s, 2.4s; }
.screen.is-active .chip-3 { animation-delay: 1.3s, 3.2s; }
@keyframes float-in { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* Feiten */
.facts { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); border-radius: var(--r);
}
.fact-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.fact-ic svg { width: 22px; height: 22px; }
.facts strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.facts span { font-size: .9rem; color: var(--muted); line-height: 1.4; }

.hero-foot { grid-column: 1 / -1; text-align: center; margin-top: -16px; }
.lock-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 0; }
.lock-link svg { width: 16px; height: 16px; }

/* Vergrendelscherm */
.hero--locked.is-active { padding-top: 10vh; }
.unlock-card {
  justify-self: center; width: min(100%, 420px); padding: 32px; display: grid; gap: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.unlock-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--ink); color: #fff; }
.unlock-icon svg { width: 32px; height: 32px; }

/* iPad staand & kleiner */
@media (max-width: 1000px) {
  .hero.is-active { grid-template-columns: 1fr; text-align: center; padding-top: 0; row-gap: 32px; }
  .hero-text { order: 2; }
  .hero-art { order: 1; width: min(62%, 300px); }
  .hero--locked .hero-text { order: 1; }
  .hero--locked .unlock-card { order: 2; text-align: left; }
  .hero-text .lead { margin-inline: auto; }
  .hero-lang { justify-content: center; }
  .facts { order: 3; text-align: left; }
  .hero-foot { order: 4; }
  .k-bg .blob-1 { width: 460px; height: 460px; right: -200px; bottom: -220px; }
}
@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr; }
  .facts li { text-align: left; }
  .hero-art { width: min(70%, 240px); }
  .chip { font-size: .78rem; padding: 8px 11px; }
  .chip-1 { left: -24px; } .chip-2 { right: -22px; } .chip-3 { left: -12px; }
  .btn-xl { width: 100%; }
  .k-bg .ring, .k-bg .dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art *, .chip, .seal { animation: none !important; }
  .hero-art .sig { stroke-dashoffset: 0; }
}
