/* QF-003 Afslanken: toegangscheck funnel
   Design tokens afgeleid van dokteronline.com (live site + brandbook). */

:root {
  /* Merk */
  --teal: #316e74;
  --teal-dark: #284f54;
  --teal-soft: #1d9f8a;
  --lime: #73cf11;
  --lime-dark: #5fae0c;
  --mint: #deeeee;
  --bg: #f1f6f8;
  --surface: #ffffff;
  --ink: #1d1c1c;
  --ink-soft: #4a5658;
  --line: #d7e3e5;
  --trust: #00b67a;
  --shadow: 0 10px 30px rgba(40, 79, 84, 0.10);
  --shadow-sm: 0 4px 14px rgba(40, 79, 84, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 640px;
  --font: "Manrope", "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--teal); }

/* Layout */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 48px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Topbar + progress */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 16px 0 12px;
}
.topbar-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--teal);
}
.logo-img { width: auto; height: 24px; display: block; }
.back-btn {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--ink-soft);
  font-size: 15px; font-weight: 600; padding: 6px 8px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px; visibility: hidden;
}
.back-btn:hover { background: var(--mint); }
.back-btn.show { visibility: visible; }

.progress-wrap { margin-top: 12px; }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-soft); font-weight: 600;
  margin-bottom: 7px;
}
.progress-track {
  height: 8px; background: var(--mint);
  border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal-soft), var(--teal));
  border-radius: 99px;
  transition: width .45s cubic-bezier(.22,.61,.36,1);
}
.topbar.hide-progress .progress-wrap { display: none; }

/* Screen container */
main { flex: 1; display: flex; flex-direction: column; }
.screen { padding-top: 18px; }
.screen[hidden] { display: none; }

/* Animation */
.fade-in { animation: fadeUp .42s cubic-bezier(.22,.61,.36,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Typography */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--teal);
  background: var(--mint); padding: 6px 12px; border-radius: 99px;
  letter-spacing: .01em; margin-bottom: 16px;
}
h1 {
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.15; letter-spacing: -0.02em; font-weight: 800;
  margin-bottom: 14px;
}
.lede { font-size: 17px; color: var(--ink-soft); margin-bottom: 22px; }

/* Pijn-lijst (intro) */
.pain-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0 0 26px; }
.pain-list li {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  font-size: 15.5px; font-weight: 600; color: var(--ink);
}
.pain-list svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--ink-soft); }

/* Voordelen-checklist (intro) */
.benefits { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 0 0 44px; }
.benefits li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.benefits .tick {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: var(--mint); color: var(--teal); display: grid; place-items: center;
}
.benefits .tick svg { width: 13px; height: 13px; }

/* Intro-beeld (transparant lijn-icoon, vervangt de vinkjes) - volledig in beeld, geen kader */
.intro-photo {
  display: block; width: auto; max-width: 72%; max-height: 280px;
  margin: 4px auto 28px; object-fit: contain;
}

/* Vinkjes-lijst op het "Wist je dat?"-scherm */
.benefits-howto { max-width: 440px; margin: 18px auto 18px; text-align: left; }
.q-title {
  font-size: clamp(22px, 5.5vw, 27px);
  line-height: 1.2; letter-spacing: -0.02em; font-weight: 800;
  margin-bottom: 8px;
}
.q-help { font-size: 15px; color: var(--ink-soft); margin-bottom: 22px; }

/* Option cards */
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 18px;
  font-size: 16.5px; font-weight: 600; color: var(--ink);
  transition: border-color .18s, background .18s, transform .12s;
}
.option:hover { border-color: var(--teal-soft); }
.option:active { transform: scale(.99); }
.option .tick {
  width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid var(--line); flex: 0 0 auto;
  display: grid; place-items: center; transition: all .18s;
}
.option .tick svg { width: 14px; height: 14px; opacity: 0; }
.option.selected { border-color: var(--teal); background: #f3fafb; }
.option.selected .tick { background: var(--teal); border-color: var(--teal); }
.option.selected .tick svg { opacity: 1; color: #fff; }
.option-emoji {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: var(--mint); display: grid; place-items: center;
}
.option-emoji svg { width: 21px; height: 21px; color: var(--teal); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border: none; border-radius: 99px;
  padding: 17px 24px; font-size: 17px; font-weight: 800;
  letter-spacing: -0.01em; text-decoration: none;
  transition: transform .12s, box-shadow .18s, background .18s;
}
.btn-primary { background: var(--lime); color: #14310a; box-shadow: 0 4px 12px rgba(115,207,17,.22); }
.btn-primary:hover { background: var(--lime-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(49,110,116,.20); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-teal:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink-soft); font-weight: 700; box-shadow: none; }
.btn-ghost:hover { color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.eyebrow svg { width: 15px; height: 15px; flex: 0 0 auto; }
.cta-sub svg { width: 14px; height: 14px; flex: 0 0 auto; }
.match .freq svg { width: 15px; height: 15px; flex: 0 0 auto; }
.cta-row { margin-top: 28px; }
.cta-sub {
  text-align: center; font-size: 13.5px; color: var(--ink-soft);
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 7px;
}

/* Trust row */
.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.trust-item svg { width: 17px; height: 17px; color: var(--teal-soft); flex: 0 0 auto; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; color: var(--trust); }

/* Hero visual */
.hero-card {
  background: linear-gradient(160deg, var(--teal), var(--teal-soft));
  color: #fff; border-radius: var(--radius); padding: 22px;
  margin-bottom: 26px; box-shadow: var(--shadow);
}
.hero-card .quote { font-size: 16px; font-style: italic; line-height: 1.45; }
.hero-card .quote-src { font-size: 13px; opacity: .85; margin-top: 10px; font-style: normal; }

/* Interlude */
.interlude { text-align: center; padding: 28px 4px; }
.interlude .glyph {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
  background: var(--mint); display: grid; place-items: center;
}
.interlude .glyph svg { width: 30px; height: 30px; color: var(--teal); }
.interlude h2 { font-size: 23px; letter-spacing: -.02em; margin-bottom: 12px; }
.interlude p { color: var(--ink-soft); font-size: 16.5px; max-width: 460px; margin: 0 auto; }

/* Loading */
.loading { text-align: center; padding: 44px 4px; }
.spinner {
  width: 54px; height: 54px; margin: 0 auto 26px;
  border: 4px solid var(--mint); border-top-color: var(--teal);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 24px; }
.checklist { max-width: 340px; margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 13px; }
.check-item {
  display: flex; align-items: center; gap: 12px; font-size: 15.5px;
  color: var(--ink-soft); font-weight: 600; opacity: .35; transition: opacity .4s;
}
.check-item.on { opacity: 1; color: var(--ink); }
.check-item .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--line); display: grid; place-items: center;
}
.check-item.on .dot { background: var(--teal); border-color: var(--teal); }
.check-item .dot svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.check-item.on .dot svg { opacity: 1; }

/* Email capture */
.field { margin-top: 22px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field input {
  width: 100%; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; font-size: 16px; font-family: inherit; background: var(--surface);
}
.field input:focus { outline: none; border-color: var(--teal); }
.bmi-readout {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--mint); color: var(--teal);
  font-weight: 700; font-size: 16px; text-align: center;
}
.privacy { font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; text-align: center; }
.privacy svg { width: 13px; height: 13px; vertical-align: -2px; }

/* Result */
.result-head { margin-bottom: 8px; }
.result-head .eyebrow { background: #e7f6ed; color: var(--trust); }
.result-intro { color: var(--ink-soft); margin-bottom: 24px; }
.match-cards { display: flex; flex-direction: column; gap: 16px; }
.match {
  background: var(--surface); border: 1.5px solid #cfe6e3;
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.match .freq {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--teal);
  background: var(--mint); padding: 5px 11px; border-radius: 99px; margin-bottom: 12px;
}
.match h3 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.match-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.match-price { font-size: 17px; font-weight: 800; color: var(--ink); }
.match-effect {
  font-size: 13px; font-weight: 700; color: var(--trust);
  background: #e7f6ed; padding: 4px 11px; border-radius: 99px;
}
.match p { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 18px; }
.match .btn { font-size: 16px; padding: 15px 20px; margin-top: auto; }

.reversal {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f3fafb; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-top: 22px; font-size: 14.5px; color: var(--ink-soft);
}
.reversal svg { width: 22px; height: 22px; color: var(--teal); flex: 0 0 auto; margin-top: 1px; }
.reversal strong { color: var(--ink); }
.result-foot { text-align: center; margin-top: 22px; }
.result-foot a { font-weight: 700; }
.disclaimer {
  font-size: 12px; color: var(--ink-soft); margin-top: 30px;
  padding-top: 18px; border-top: 1px solid var(--line); line-height: 1.5;
}

/* Desktop polish */
@media (min-width: 768px) {
  body { font-size: 18px; }
  .app { padding: 0 24px 64px; }
  .screen { padding-top: 26px; }
  .match-cards { flex-direction: row; }
  .match { flex: 1; }
}

/* Feedback-widget (rechtsonder) */
.fb-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: #fff; border: none;
  border-radius: 99px; padding: 13px 18px; font-size: 14.5px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(40,79,84,.28);
}
.fb-btn svg { width: 18px; height: 18px; }
.fb-btn:hover { background: var(--teal-dark); }
.fb-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 51;
  width: min(340px, calc(100vw - 36px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(40,79,84,.22);
  padding: 18px; display: none;
}
.fb-panel.open { display: block; animation: fadeUp .25s ease both; }
.fb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fb-head strong { font-size: 16px; }
.fb-close { border: none; background: transparent; color: var(--ink-soft); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 8px; }
.fb-close:hover { background: var(--mint); }
.fb-ctx { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.fb-ctx b { color: var(--teal); font-weight: 700; }
.fb-panel textarea {
  width: 100%; min-height: 96px; resize: vertical;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; font-family: inherit; font-size: 15px;
}
.fb-panel textarea:focus { outline: none; border-color: var(--teal); }
.fb-actions { display: flex; gap: 10px; margin-top: 12px; }
.fb-actions .btn { padding: 12px 16px; font-size: 15px; }
.fb-toast {
  position: fixed; right: 18px; bottom: 78px; z-index: 52;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); display: none;
}
.fb-toast.show { display: block; animation: fadeUp .25s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .fade-in { animation: none; }
}
