/* ── Water Filter Lead Funnel — Fully Responsive ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #1a6cf6;
  --blue-d:  #1458d4;
  --sky:     #e8f0fe;
  --green:   #059669;
  --red:     #ef4444;
  --dark:    #0f1923;
  --mid:     #3d5166;
  --muted:   #7f96ad;
  --border:  #dde6f0;
  --bg:      #f0f5fc;
  --white:   #ffffff;
  --radius:  16px;
  --shadow:  0 8px 40px rgba(15,25,35,.13);
}

#wfl-root {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--bg);
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 48px;
}

/* ── Card ─────────────────────────────────────────── */
.wfl-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  position: relative;
}

.wfl-card::before {
  content: '';
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #1a6cf6 0%, #38bdf8 100%);
}

/* ── Header ───────────────────────────────────────── */
.wfl-header {
  padding: 28px 40px 0;
  text-align: center;
}

.wfl-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  color: var(--blue);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.wfl-step-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
}

/* ── Progress bar ─────────────────────────────────── */
.wfl-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 40px;
}

.wfl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a6cf6, #38bdf8);
  border-radius: 99px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
  min-width: 4%;
}

/* ── Body ─────────────────────────────────────────── */
.wfl-body {
  padding: 28px 40px 36px;
}

/* ── Question text ────────────────────────────────── */
.wfl-question {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  line-height: 1.38;
  color: var(--dark);
  margin-bottom: 8px;
}

.wfl-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.55;
}

/* ── Options grid ─────────────────────────────────── */
.wfl-options {
  display: grid;
  gap: 10px;
}

.wfl-options.two-col {
  grid-template-columns: 1fr 1fr;
}

/* ── Single option button ─────────────────────────── */
.wfl-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
  background: var(--white);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--mid);
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.wfl-opt:hover { border-color: var(--blue); background: var(--sky); color: var(--blue); box-shadow: 0 0 0 3px rgba(26,108,246,.1); outline: none; }
.wfl-opt.selected { border-color: var(--blue); background: var(--sky); color: var(--blue); }

.wfl-opt .opt-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.wfl-opt .opt-text { flex: 1; line-height: 1.3; }
.wfl-opt .opt-check { width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .18s; font-size: 12px; }
.wfl-opt.selected .opt-check { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── YES / NO large buttons ───────────────────────── */
.wfl-yesno { grid-template-columns: 1fr 1fr; }
.wfl-yesno .wfl-opt { flex-direction: column; justify-content: center; padding: 26px 16px; text-align: center; gap: 8px; min-height: 110px; }
.wfl-yesno .wfl-opt .opt-icon { font-size: 34px; }
.wfl-yesno .wfl-opt .opt-text { font-size: 17px; font-weight: 700; }
.wfl-yesno .wfl-opt .opt-check { display: none; }

/* ── Input fields ─────────────────────────────────── */
.wfl-field { margin-bottom: 14px; }
.wfl-field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.wfl-field input { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 12px; font-size: 16px; font-family: 'DM Sans', sans-serif; color: var(--dark); outline: none; transition: border-color .18s, box-shadow .18s; background: #fff; -webkit-appearance: none; appearance: none; }
.wfl-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,108,246,.12); }
.wfl-field input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.wfl-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── CTA Button ───────────────────────────────────── */
.wfl-btn { display: block; width: 100%; padding: 17px 20px; background: linear-gradient(135deg, #1a6cf6, #1458d4); color: #fff; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700; font-family: 'DM Sans', sans-serif; cursor: pointer; margin-top: 22px; transition: opacity .2s, transform .15s, box-shadow .2s; letter-spacing: .02em; -webkit-tap-highlight-color: transparent; touch-action: manipulation; box-shadow: 0 4px 16px rgba(26,108,246,.35); }
.wfl-btn:hover { opacity: .92; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,108,246,.4); }
.wfl-btn:active { transform: translateY(0); }
.wfl-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Disqualified ─────────────────────────────────── */
.wfl-disq { padding: 52px 40px; text-align: center; }
.wfl-disq .icon { font-size: 56px; margin-bottom: 16px; display: block; }
.wfl-disq h2 { font-family: 'DM Serif Display', Georgia, serif; font-size: 24px; color: var(--dark); margin-bottom: 10px; line-height: 1.3; }
.wfl-disq p { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 380px; margin: 0 auto; }

/* ── Success ──────────────────────────────────────── */
.wfl-success { padding: 52px 40px; text-align: center; }
.wfl-success .icon { font-size: 60px; margin-bottom: 16px; display: block; }
.wfl-success h2 { font-family: 'DM Serif Display', Georgia, serif; font-size: 26px; color: var(--dark); margin-bottom: 10px; line-height: 1.3; }
.wfl-success p { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 380px; margin: 0 auto; }
.wfl-success .highlight { background: var(--sky); border-radius: 12px; padding: 16px 20px; margin: 20px auto 0; font-size: 15px; color: var(--blue); font-weight: 600; max-width: 380px; }

/* ── Trust badges ─────────────────────────────────── */
.wfl-trust { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px 24px; padding: 14px 40px 26px; border-top: 1px solid var(--border); }
.wfl-trust span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ── Animations ───────────────────────────────────── */
.wfl-step { animation: stepIn .28s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

/* ── Misc ─────────────────────────────────────────── */
.wfl-error { font-size: 12px; color: var(--red); margin-top: 6px; min-height: 18px; }
.wfl-spinner { display: inline-block; width: 17px; height: 17px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════ */

/* Large desktop 1280px+ */
@media (min-width: 1280px) {
  #wfl-root { padding: 48px 24px 64px; align-items: center; min-height: 100vh; }
  .wfl-card { max-width: 620px; }
  .wfl-question { font-size: 24px; }
}

/* Desktop / laptop 1024–1279px */
@media (min-width: 1024px) and (max-width: 1279px) {
  #wfl-root { padding: 40px 24px 56px; align-items: center; min-height: 100vh; }
  .wfl-card { max-width: 580px; }
}

/* Tablet landscape 768–1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  #wfl-root { padding: 32px 32px 48px; }
  .wfl-card { max-width: 100%; border-radius: 20px; }
  .wfl-header { padding: 28px 32px 0; }
  .wfl-progress-track { margin: 0 32px; }
  .wfl-body { padding: 26px 32px 32px; }
  .wfl-question { font-size: 21px; }
  .wfl-trust { padding: 14px 32px 24px; }
  .wfl-disq, .wfl-success { padding: 44px 32px; }
}

/* Tablet portrait 600–767px */
@media (min-width: 600px) and (max-width: 767px) {
  #wfl-root { padding: 24px 20px 40px; }
  .wfl-card { max-width: 100%; border-radius: 18px; }
  .wfl-header { padding: 24px 28px 0; }
  .wfl-progress-track { margin: 0 28px; }
  .wfl-body { padding: 24px 28px 30px; }
  .wfl-question { font-size: 20px; }
  .wfl-yesno .wfl-opt { min-height: 100px; padding: 22px 12px; }
  .wfl-trust { padding: 12px 28px 22px; }
}

/* Large phone 480–599px */
@media (min-width: 480px) and (max-width: 599px) {
  #wfl-root { padding: 16px 14px 36px; }
  .wfl-card { border-radius: 16px; }
  .wfl-header { padding: 20px 20px 0; }
  .wfl-progress-track { margin: 0 20px; }
  .wfl-body { padding: 20px 20px 26px; }
  .wfl-question { font-size: 19px; }
  .wfl-sub { margin-bottom: 18px; }
  .wfl-yesno .wfl-opt { min-height: 96px; padding: 18px 10px; }
  .wfl-yesno .wfl-opt .opt-icon { font-size: 28px; }
  .wfl-yesno .wfl-opt .opt-text { font-size: 15px; }
  .wfl-trust { padding: 12px 20px 20px; gap: 10px 16px; }
  .wfl-disq, .wfl-success { padding: 36px 20px; }
}

/* Small phone up to 479px */
@media (max-width: 479px) {
  #wfl-root { padding: 10px 10px 32px; }
  .wfl-card { border-radius: 14px; }
  .wfl-card::before { height: 4px; }
  .wfl-header { padding: 16px 16px 0; }
  .wfl-logo { font-size: 14px; }
  .wfl-step-label { font-size: 11px; margin-bottom: 12px; }
  .wfl-progress-track { margin: 0 16px; height: 5px; }
  .wfl-body { padding: 16px 16px 22px; }
  .wfl-question { font-size: 18px; line-height: 1.35; margin-bottom: 6px; }
  .wfl-sub { font-size: 12px; margin-bottom: 16px; }
  /* Keep YES/NO 2-col on small phones */
  .wfl-yesno { grid-template-columns: 1fr 1fr; }
  .wfl-yesno .wfl-opt { min-height: 88px; padding: 14px 8px; gap: 6px; }
  .wfl-yesno .wfl-opt .opt-icon { font-size: 26px; }
  .wfl-yesno .wfl-opt .opt-text { font-size: 14px; }
  /* Stack 2-col choice options on tiny screens */
  .wfl-options.two-col { grid-template-columns: 1fr; }
  .wfl-opt { padding: 13px 14px; font-size: 14px; }
  .wfl-opt .opt-icon { font-size: 20px; }
  /* Stack first/last name */
  .wfl-field-row { grid-template-columns: 1fr; }
  .wfl-field input { padding: 13px 14px; }
  .wfl-btn { padding: 15px 16px; font-size: 15px; margin-top: 18px; }
  .wfl-trust { flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px 18px; }
  .wfl-disq, .wfl-success { padding: 30px 16px; }
  .wfl-disq .icon, .wfl-success .icon { font-size: 46px; }
  .wfl-disq h2, .wfl-success h2 { font-size: 21px; }
  .wfl-disq p, .wfl-success p { font-size: 14px; }
  .wfl-success .highlight { font-size: 13px; padding: 14px 16px; }
}

/* Touch device — better tap UX */
@media (hover: none) and (pointer: coarse) {
  .wfl-opt { min-height: 52px; }
  .wfl-yesno .wfl-opt { min-height: 90px; }
  .wfl-btn { min-height: 52px; }
  .wfl-opt:hover { border-color: var(--border); background: var(--white); color: var(--mid); box-shadow: none; }
  .wfl-btn:hover { opacity: 1; transform: none; box-shadow: 0 4px 16px rgba(26,108,246,.35); }
  .wfl-opt:active { border-color: var(--blue); background: var(--sky); color: var(--blue); }
  .wfl-btn:active { opacity: .88; }
}
