/* ============================================================
   Dani The Agent — Buyer Qualification Funnel (/form)
   Self-contained stylesheet (not the full site stylesheet) so this
   paid-traffic page stays light and isolated from the main site.
   Tokens below are copied from css/style.css — keep them in sync if the
   core palette ever changes.
   ============================================================ */
:root {
  --navy-950: #0a1424;
  --navy-900: #121f36;
  --navy-800: #1d2f4f;
  --navy-700: #28405f;
  --lightblue-300: #b6eef8;
  --red-500: #e4392e;
  --red-600: #c62e24;
  --white: #ffffff;
  --offwhite: #eaeaea;
  --offwhite-dim: rgba(234, 234, 234, 0.68);
  --offwhite-faint: rgba(234, 234, 234, 0.4);
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe5b;

  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;

  --radius-pill: 999px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--navy-900);
  color: var(--offwhite);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- Minimal header ---------- */
.funnel-header {
  padding: var(--space-3) 0;
  text-align: center;
}
.funnel-header .brand {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.funnel-header .brand span { color: var(--red-500); }
.funnel-header .subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--offwhite-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.lang-switch button {
  background: transparent;
  border: 1px solid rgba(234, 234, 234, 0.25);
  color: var(--offwhite-faint);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}
.lang-switch button.is-active {
  background: var(--red-500);
  border-color: var(--red-500);
  color: var(--white);
}
.lang-switch button:not(.is-active):hover {
  border-color: var(--lightblue-300);
  color: var(--lightblue-300);
}

/* ---------- Hero (step 0) ---------- */
.funnel-hero {
  padding: var(--space-4) 0 var(--space-5);
  text-align: center;
}
.funnel-hero h1 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
.funnel-hero .subhead {
  font-size: 16px;
  color: var(--offwhite-dim);
  max-width: 46ch;
  margin: 0 auto var(--space-2);
}
.funnel-hero .supporting {
  font-size: 13px;
  color: var(--lightblue-300);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.funnel-hero .trust-line {
  margin-top: var(--space-3);
  font-size: 12.5px;
  color: var(--offwhite-faint);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
  text-decoration: none;
  min-height: 54px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--red-500); color: var(--white); }
.btn-primary:hover { background: var(--red-600); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(234, 234, 234, 0.3); }
.btn-ghost:hover { border-color: var(--lightblue-300); color: var(--lightblue-300); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Quiz card ---------- */
.funnel-card {
  background: var(--navy-800);
  border: 1px solid rgba(182, 238, 248, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3) var(--space-3);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-size: 12.5px;
  color: var(--offwhite-faint);
  font-weight: 600;
}
.progress-track {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(182, 238, 248, 0.14);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.progress-fill {
  height: 100%;
  background: var(--red-500);
  border-radius: var(--radius-pill);
  transition: width 350ms var(--ease-out);
  width: 0%;
}

.question-head {
  margin-bottom: var(--space-3);
}
.question-head h2 {
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.3;
  margin: 0 0 6px;
}
.question-head p {
  font-size: 13.5px;
  color: var(--offwhite-dim);
  margin: 0;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  min-height: 56px;
  border-radius: var(--radius-md);
  background: var(--navy-900);
  border: 1.5px solid rgba(182, 238, 248, 0.14);
  color: var(--white);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.option-card:hover { border-color: rgba(182, 238, 248, 0.35); }
.option-card:active { transform: scale(0.985); }
.option-card .check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(234, 234, 234, 0.35);
  display: grid;
  place-items: center;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.option-card .check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  color: var(--white);
}
.option-card.is-selected {
  border-color: var(--red-500);
  background: rgba(228, 57, 46, 0.12);
}
.option-card.is-selected .check {
  background: var(--red-500);
  border-color: var(--red-500);
}
.option-card.is-selected .check svg { opacity: 1; }

/* ---------- Text / select inputs ---------- */
.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--offwhite-dim);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  border: 1.5px solid rgba(182, 238, 248, 0.16);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
}
.field input::placeholder { color: var(--offwhite-faint); }
.field input:focus {
  outline: none;
  border-color: var(--lightblue-300);
}

/* ---------- Slider (motivation) ---------- */
.slider-value {
  text-align: center;
  margin: var(--space-2) 0;
}
.slider-value b {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--red-500);
  line-height: 1;
}
input[type="range"].slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(182, 238, 248, 0.16);
  appearance: none;
  -webkit-appearance: none;
  margin: var(--space-2) 0;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-500);
  border: 3px solid var(--white);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
input[type="range"].slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-500);
  border: 3px solid var(--white);
  cursor: pointer;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--offwhite-faint);
  gap: var(--space-2);
}
.slider-labels span:last-child { text-align: right; }

/* ---------- Consent ---------- */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: var(--space-3) 0;
  font-size: 12.5px;
  color: var(--offwhite-dim);
  line-height: 1.5;
}
.consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--red-500);
}

/* ---------- Nav row (back + step actions) ---------- */
.step-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--offwhite-faint);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}
.back-btn:hover { color: var(--lightblue-300); }
.back-btn svg { width: 14px; height: 14px; }

.field-error {
  display: none;
  color: var(--red-500);
  font-size: 12.5px;
  margin-top: -8px;
  margin-bottom: var(--space-2);
}
.field-error.is-visible { display: block; }

/* ---------- Step transitions ---------- */
.funnel-step {
  display: none;
}
.funnel-step.is-active {
  display: block;
  animation: step-in var(--dur) var(--ease-out);
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Result screen ---------- */
.result-screen { text-align: center; padding: var(--space-3) 0; }
.result-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
}
.result-screen h2 {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 var(--space-2);
  line-height: 1.3;
}
.result-screen p {
  font-size: 15px;
  color: var(--offwhite-dim);
  max-width: 48ch;
  margin: 0 auto var(--space-4);
}
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}
.result-fallback-note {
  display: none;
  margin-top: var(--space-3);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(182, 238, 248, 0.08);
  border: 1px solid rgba(182, 238, 248, 0.25);
  color: var(--lightblue-300);
  font-size: 13px;
}
.result-fallback-note.is-visible { display: block; }

.loading-spinner {
  display: none;
  width: 32px;
  height: 32px;
  margin: var(--space-4) auto;
  border-radius: 50%;
  border: 3px solid rgba(182, 238, 248, 0.2);
  border-top-color: var(--red-500);
  animation: spin 800ms linear infinite;
}
.loading-spinner.is-visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Trust strip ---------- */
.trust-strip {
  text-align: center;
  padding: var(--space-4) 0;
  color: var(--offwhite-faint);
  font-size: 12.5px;
}
.trust-strip strong { color: var(--offwhite-dim); font-weight: 700; }
.trust-strip .divider {
  width: 32px;
  height: 1px;
  background: rgba(182, 238, 248, 0.25);
  margin: var(--space-2) auto;
}

/* ---------- Disclaimer + footer ---------- */
.funnel-disclaimer {
  padding: var(--space-4) 0 var(--space-2);
  font-size: 11px;
  line-height: 1.6;
  color: var(--offwhite-faint);
  text-align: center;
}
.funnel-footer {
  padding: var(--space-3) 0 calc(var(--space-4) + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--offwhite-faint);
  border-top: 1px solid rgba(182, 238, 248, 0.1);
}
.funnel-footer strong { color: var(--offwhite-dim); }

@media (min-width: 560px) {
  .funnel-card { padding: var(--space-5) var(--space-4) var(--space-4); }
}
