/* ==========================================================================
   iMove quiz funnels (piano-quote.html, hot-tub-quote.html)
   One question per screen, mobile-first, in the style of the Perspective
   funnels these pages replace. Shared by every funnel page; the questions
   live in each page's <script type="application/json" id="funnel-config">.
   Prefix: .fn-
   ========================================================================== */

body.funnel {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(900px 500px at 50% -120px, rgba(1, 167, 253, 0.16), transparent 70%),
    linear-gradient(180deg, #f3f9fd 0%, #eaf3f9 100%);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.fn-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar ---- */
.fn-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(216, 226, 237, 0.9);
}

.fn-top-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 12px;
}

.fn-back {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.fn-back:hover,
.fn-back:focus-visible {
  background: #eaf7ff;
  outline: none;
}

.fn-back[disabled] {
  opacity: 0;
  pointer-events: none;
}

.fn-brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

.fn-brand img {
  height: 34px;
  width: auto;
}

.fn-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.fn-call:hover {
  background: var(--deep-blue);
}

.fn-progress {
  height: 4px;
  background: #dde7f0;
}

.fn-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.35s ease;
}

/* ---- Card ---- */
.fn-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 12px 48px;
}

.fn-card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid rgba(216, 226, 237, 0.8);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(6, 21, 55, 0.1);
  padding: 22px 20px 26px;
}

.fn-step {
  animation: fn-enter 0.28s ease both;
}

.fn-step[hidden] {
  display: none;
}

@keyframes fn-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fn-step {
    animation: none;
  }

  .fn-progress-bar {
    transition: none;
  }
}

.fn-step-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fn-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fn-title {
  margin: 0 0 10px;
  color: var(--navy);
  font-family: "Exo 2", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 5.2vw, 1.85rem);
  line-height: 1.18;
  text-transform: none; /* styles.css capitalises every word of h1 */
}

.fn-title:focus {
  outline: none; /* headings receive focus for screen readers only */
}

/* The shared script injects a floating WhatsApp bubble on every page. Keep it
   visible here too (Daniel, 22 Nov) and leave room at the bottom of the page
   so it never sits over the last button or the footer links. */
body.funnel .fn-shell {
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.fn-lede,
.fn-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.fn-hint {
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.fn-hero-img {
  display: block;
  width: 100%;
  height: auto; /* beats the width/height attributes used for layout stability */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 0 18px;
  background: #e8f1f8;
}

.fn-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.fn-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eaf7ff;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.fn-trust li .fn-stars {
  color: #f5a623;
  letter-spacing: 1px;
}

/* ---- Answer tiles ---- */
.fn-options {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fn-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.fn-option:hover,
.fn-option:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(1, 167, 253, 0.14);
  outline: none;
}

.fn-option:active {
  transform: scale(0.99);
}

.fn-option.is-selected {
  border-color: var(--blue);
  background: #eaf7ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.fn-option-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf7ff;
  font-size: 1.35rem;
  line-height: 1;
}

.fn-option.is-selected .fn-option-icon {
  background: var(--white);
}

.fn-option-label {
  flex: 1 1 auto;
}

.fn-option-chevron {
  flex: 0 0 auto;
  color: #a2b0c2;
  font-size: 1.1rem;
}

/* ---- Fields ---- */
.fn-fields {
  display: grid;
  gap: 14px;
}

.fn-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.fn-field label small {
  color: var(--muted);
  font-weight: 500;
}

.fn-field input,
.fn-field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fn-field textarea {
  min-height: 118px;
  resize: vertical;
}

.fn-field input:focus,
.fn-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(1, 167, 253, 0.14);
  outline: none;
}

.fn-field.is-invalid input,
.fn-field.is-invalid textarea {
  border-color: #d92d20;
}

.fn-field-error {
  display: none;
  margin: 6px 0 0;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 600;
}

.fn-field.is-invalid .fn-field-error {
  display: block;
}

.fn-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ---- Buttons ---- */
.fn-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.fn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fn-btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(1, 167, 253, 0.32);
}

.fn-btn-primary:hover,
.fn-btn-primary:focus-visible {
  background: #0096e6;
  transform: translateY(-1px);
  outline: none;
}

.fn-btn-primary[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.fn-btn-green {
  background: #22c55e;
  color: var(--white);
}

.fn-btn-ghost {
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  font-weight: 700;
}

.fn-btn-ghost:hover {
  color: var(--navy);
  background: #f3f7fb;
}

.fn-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.fn-note a {
  color: var(--navy);
}

.fn-error {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef3f2;
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 600;
}

.fn-error[hidden] {
  display: none;
}

/* ---- Thank-you ---- */
.fn-thanks {
  text-align: center;
}

.fn-thanks-mark {
  width: 72px;
  height: 72px;
  margin: 6px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  color: var(--white);
  font-size: 2rem;
  box-shadow: 0 14px 30px rgba(1, 167, 253, 0.3);
}

.fn-summary {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f3f8fc;
  text-align: left;
  font-size: 0.88rem;
}

.fn-summary dt {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

.fn-summary dt:first-child {
  margin-top: 0;
}

.fn-summary dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 600;
}

/* ---- Footer ---- */
.fn-footer {
  padding: 10px 16px 28px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: center;
}

.fn-footer a {
  color: var(--muted);
}

@media (min-width: 640px) {
  .fn-main {
    padding: 32px 16px 64px;
  }

  .fn-card {
    padding: 30px 30px 34px;
  }
}
