/* ================================================================
   Final Expense Quiz Funnel — Mario Filian, Licensed Insurance Agent
   Design goal: trusted, calm, effortless to read for low-vision seniors.
   - Serif headlines (established / permanent) + system sans body (clarity).
   - Near-black ink on white, navy trust accent (ties to his blue blazer).
   - 19px base body, 60px tap targets, generous space, minimal motion.
   No web-font downloads: renders fast and clean on old Android.
   ================================================================ */

:root {
  --ink: #14181f;          /* near-black text */
  --ink-soft: #33404f;     /* still AA on white (>7:1), for secondary text */
  --paper: #ffffff;
  --navy: #123a6b;         /* brand / primary action — ~9:1 on white */
  --navy-deep: #0d2b4f;    /* pressed / hover */
  --tint: #eef3fa;         /* soft trust panel background */
  --line: #c9d4e2;         /* hairline dividers / input borders */
  --green: #176b35;        /* success accent (icon), AA on white */
  --focus: #ff9e1b;        /* high-visibility focus ring, non-brand so it pops */

  --serif: Georgia, "Times New Roman", "Nimbus Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --maxw: 34rem;           /* ~544px reading column */
  --tap: 3.75rem;          /* 60px minimum tap target */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;      /* 19px base */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;  /* fallback for older browsers */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* --- Screen scaffolding --- */
.screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.screen[hidden] { display: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  padding-top: max(2rem, env(safe-area-inset-top));
}
.wrap--center { text-align: center; }

/* ================= Typography ================= */
.eyebrow {
  font-size: 1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.6rem;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.1rem;        /* ~34px */
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
  color: var(--ink);
}
.hero-state {
  color: var(--navy);
  white-space: nowrap;
}

.hero-sub {
  font-size: 1.25rem;       /* 20px */
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 1.4rem;
}

.q-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.9rem;        /* ~30px */
  line-height: 1.25;
  margin: 0.25rem 0 0.5rem;
  color: var(--ink);
}
.q-help {
  font-size: 1.125rem;      /* 18px */
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

/* ================= Buttons ================= */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 1rem 1.25rem;
  font-family: var(--sans);
  font-size: 1.3125rem;     /* 21px */
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn--primary {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--navy-deep);
}
.btn--primary:hover { background: var(--navy-deep); }
.btn--primary:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: 0.65; cursor: default; }

.btn--secondary {
  background: #ffffff;
  color: var(--navy);
  border-color: var(--navy);
  margin-top: 1.5rem;
}
.btn--secondary:hover { background: var(--tint); }

/* ================= Trust row (landing) ================= */
.trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
  padding: 1.1rem 1.15rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-left: 6px solid var(--navy);
  border-radius: 12px;
}
.trust__photo {
  flex: 0 0 auto;
  width: 80px;
  height: 100px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(18, 58, 107, 0.25);
}
.trust__lines { margin: 0; }
.trust__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3125rem;
  margin: 0;
  color: var(--ink);
}
.trust__role { margin: 0.1rem 0 0; font-size: 1.0625rem; color: var(--ink); }
.trust__npn { margin: 0.1rem 0 0; font-size: 1rem; color: var(--ink-soft); }
.trust__badge {
  display: inline-block;
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

/* ================= Progress ================= */
.progress { margin-bottom: 1.5rem; }
.progress__bar {
  height: 12px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--navy);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.progress__label {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ================= Answer options (big tap cards) ================= */
.options { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 0.5rem; }
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--tap);
  padding: 1.05rem 1.25rem;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem;       /* 20px */
  font-weight: 600;
  text-align: left;
  border: 2px solid var(--navy);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { background: var(--tint); }
.option:active { background: #e3ecf7; transform: translateY(1px); }
.option__chevron { flex: 0 0 auto; color: var(--navy); font-size: 1.5rem; line-height: 1; }

/* ================= Form ================= */
.field { display: block; margin-bottom: 1.25rem; }
.field__label {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 1.25rem;       /* 20px — also prevents iOS zoom */
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--navy);
  border-radius: 12px;
}
.field__input::placeholder { color: #6a7686; }
.field__input:focus { border-color: var(--navy-deep); }
.field__input[aria-invalid="true"] { border-color: #b3261e; background: #fff6f5; }

.consent {
  font-size: 1rem;          /* 16px — legible, per brief "small but legible" */
  line-height: 1.5;
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 0.5rem 0 1.25rem;
}

.form-error {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #b3261e;
  background: #fff6f5;
  border: 2px solid #b3261e;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
}

/* ================= Back link ================= */
.backlink {
  align-self: flex-start;
  margin-top: 1.5rem;
  padding: 0.6rem 0.25rem;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================= Thank you ================= */
.ty-photo {
  width: 200px;
  height: 250px;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 14px rgba(18, 58, 107, 0.28);
  margin: 0.5rem auto 1.5rem;
}
.ty-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.ty-body { font-size: 1.25rem; line-height: 1.55; margin: 0; color: var(--ink); }
.ty-phone {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  text-underline-offset: 3px;
}

/* ================= Exit screen ================= */
.exit-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  margin: 0.5rem auto 1rem;
  background: var(--tint);
  border-radius: 50%;
}

/* ================= Compliance footer ================= */
.compliance {
  flex-shrink: 0;
  max-width: var(--maxw);
  width: 100%;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.compliance p {
  margin: 0;
  font-size: 0.9375rem;     /* 15px — small but legible, high contrast */
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ================= Focus visibility (accessibility floor) ================= */
:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ================= Motion ================= */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ================= Larger phones / small tablets ================= */
@media (min-width: 40rem) {
  body { font-size: 1.25rem; }
  .hero-title { font-size: 2.6rem; }
  .wrap { padding-top: 3rem; }
}
