/* Anchor Point Life - landing
   Brand palette (GUIA-DE-MARCA.md): deep teal #0F5257 (primary), coral #E8735A (accent),
   warm sand #F6F1E7 (background), #12292B (text). Font: Poppins.
   Contrast notes (WCAG AA):
   - Coral buttons use dark --ink text (5.1:1); white on coral is only 3:1.
   - Coral text on sand uses --accent-text (5.3:1).
   - Coral text on teal uses --accent-on-dark (4.8:1 on --primary). */
:root {
  --primary: #0F5257;          /* brand */
  --primary-hover: #1F7F86;    /* lighter teal: hover */
  --primary-deep: #0A3A3E;     /* darker teal: hero edges, footer */
  --accent: #E8735A;           /* brand */
  --accent-hover: #F0907A;     /* lighter coral: button hover, progress gradient */
  --accent-on-dark: #F6AE9C;   /* coral text and icons on teal */
  --accent-text: #A8432C;      /* coral text on sand/white */
  --accent-tint: #FDF0EC;      /* selected option background */
  --bg: #F6F1E7;               /* brand */
  --bg-alt: #EDE5D6;
  --card: #FCFAF5;
  --ink: #12292B;              /* brand */
  --muted: #4E6466;
  --line: #DDD3C2;
  --control: #ABA293;          /* unselected radio ring */
  --white: #FFFFFF;
  --error: #B42318;
  --error-bg: #FEF3F2;

  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 16px;
  --shadow: 0 24px 48px -22px rgba(10, 58, 62, .55), 0 2px 8px rgba(10, 58, 62, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
/* Form-only page: the hero fills the screen and the footer sits at the bottom */
main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > .hero { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; line-height: 1.22; margin: 0; color: var(--primary); letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--white); color: var(--primary); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Focus ring: teal on light surfaces, light coral on teal surfaces */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.site-header :focus-visible, .closing :focus-visible, .site-footer :focus-visible, .sticky-cta :focus-visible {
  outline-color: var(--accent-on-dark);
}

/* ---------- Header ---------- */
.site-header { background: var(--primary); border-bottom: 1px solid rgba(232, 115, 90, .25); position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; box-shadow: 0 0 0 1px rgba(232, 115, 90, .40); border-radius: 50%; }
.wordmark { font-weight: 600; font-size: 1.15rem; color: var(--white); letter-spacing: .005em; white-space: nowrap; }
.wordmark-life { color: var(--accent-on-dark); }
.header-tag { display: none; color: var(--accent-on-dark); font-size: .85rem; font-weight: 500; }

/* ---------- Hero: centered, quiz-first, concentric circles ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 420px at 50% 0%, var(--primary), transparent 70%),
    var(--primary-deep);
  color: var(--white);
  padding: 22px 0 34px;
}
.hero::before {
  /* faint concentric rings, like the Facebook cover */
  content: ""; position: absolute; left: 50%; top: 120px; width: 1600px; height: 1600px; margin-left: -800px;
  background: repeating-radial-gradient(circle at center, transparent 0 63px, rgba(232, 115, 90, .13) 63px 64.5px);
  -webkit-mask-image: radial-gradient(circle at center, #000 0 22%, transparent 55%);
          mask-image: radial-gradient(circle at center, #000 0 22%, transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; gap: 20px; justify-items: center; text-align: center; }
.hero-copy { max-width: 720px; }
.eyebrow {
  display: inline-block; color: var(--accent-on-dark); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; margin-bottom: 12px;
  padding: 5px 12px; border: 1px solid rgba(246, 174, 156, .45); border-radius: 999px;
}
.hero h1 { color: var(--white); font-size: clamp(1.7rem, 6.4vw, 3rem); font-weight: 600; }
.accent { color: var(--accent-on-dark); }
.hero-sub { margin: 14px auto 0; color: rgba(255, 255, 255, .84); font-size: 1.02rem; max-width: 34em; }

.hero-trust {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
}
.hero-trust li {
  position: relative; padding-left: 28px; color: rgba(255, 255, 255, .9); font-weight: 500; font-size: .92rem;
}
.hero-trust li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(232, 115, 90, .20) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8.5' fill='none' stroke='%23F6AE9C' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Form card ---------- */
.form-card {
  width: 100%; max-width: 600px; text-align: left;
  background: var(--white); color: var(--ink);
  border-radius: 20px; box-shadow: var(--shadow);
  padding: 22px 18px 20px;
  scroll-margin-top: 12px;
  position: relative;
}
.form-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.form-card:focus { outline: none; }
.form-head { margin-bottom: 14px; }
.form-text { color: var(--muted); font-size: .95rem; text-align: center; }

.progress-wrap { margin-bottom: 18px; }
.progress { height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width .35s ease;
}
.progress-label { margin-top: 8px; font-size: .8rem; font-weight: 500; color: var(--muted); text-align: center; }

.step.is-entering { animation: stepIn .28s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.question { font-size: 1.2rem; margin-bottom: 14px; text-align: center; }
.question:focus { outline: none; }
.step-text { color: var(--muted); margin: -6px 0 14px; font-size: .92rem; text-align: center; }

.options { display: grid; gap: 10px; }
.option {
  position: relative; width: 100%; min-height: 56px; padding: 14px 16px 14px 50px;
  text-align: left; font: inherit; font-weight: 500; color: var(--primary);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color .15s, background-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.option::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; border: 2px solid var(--control); background: var(--white); transition: all .15s;
}
.option:hover { border-color: var(--accent); }
.option:active { transform: scale(.99); }
.option[aria-pressed="true"] { border-color: var(--primary); background: var(--accent-tint); }
.option[aria-pressed="true"]::before {
  border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8.5' fill='none' stroke='%2312292B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; color: var(--primary); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select {
  width: 100%; height: 52px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230F5257' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 20px no-repeat;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 115, 90, .35); }
.field .is-invalid, .field input.is-invalid, .field select.is-invalid { border-color: var(--error); }

.field-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 4px; }
.field-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.field-check label { font-weight: 400; font-size: .8rem; line-height: 1.5; color: var(--ink); margin: 0; }

.field-error { color: var(--error); font-size: .82rem; font-weight: 500; margin-top: 6px; }
.field-error:empty { display: none; }
.step > .field-error { text-align: center; }

.consent-text { font-size: .76rem; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.consent-text a, .faq a { color: var(--primary); font-weight: 600; }

.submit-error {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--error-bg); color: var(--error); border: 1px solid #FECDCA; font-size: .88rem;
}
.submit-error strong { display: block; }

/* Phone with +1 prefix */
.phone-field { position: relative; }
.phone-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 600; color: var(--primary); pointer-events: none;
}
.field .phone-field input[type="tel"] { padding-left: 46px; }

/* Label for screen readers only (the question is the visible title) */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Spam trap field */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.step-actions .btn-primary { flex: 1 1 auto; }
.step[data-step="1"] .step-actions .btn-primary { flex-basis: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s, transform .1s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-link { background: transparent; color: var(--muted); padding: 0 10px; font-weight: 500; }
.btn-link:hover { color: var(--primary); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: var(--white);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Thanks ---------- */
.thanks { text-align: center; padding: 18px 4px 10px; animation: stepIn .3s ease; }
.thanks-icon {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); background: var(--accent);
  box-shadow: 0 0 0 6px rgba(232, 115, 90, .18), 0 0 0 12px rgba(232, 115, 90, .08);
}
.thanks h2 { font-size: 1.4rem; }
.thanks h2:focus { outline: none; }
.thanks p { margin-top: 10px; color: var(--muted); }

/* ---------- Sections (sand) ---------- */
.section { padding: 56px 0; background: var(--bg); }
.section-alt { background: var(--bg-alt); }
.section-kicker {
  color: var(--accent-text); font-weight: 600; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 8px; text-align: center;
}
.section-title { font-size: clamp(1.5rem, 5vw, 2.2rem); margin-bottom: 30px; text-align: center; }
.section-title::after {
  content: ""; display: block; width: 10px; height: 10px; margin: 16px auto 0; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 0 5px rgba(232, 115, 90, .18);
}

.cards { display: grid; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
}
.card-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); margin-bottom: 16px;
  box-shadow: 0 0 0 5px rgba(232, 115, 90, .16);
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-on-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

.steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--line);
}
.step-num {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: 1.1rem;
  color: var(--accent-on-dark); background: var(--primary);
}
.steps h3 { font-size: 1.08rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: .95rem; }

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px;
}
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 32px 18px 0; font-weight: 600; color: var(--primary); font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 18px; color: var(--muted); font-size: .95rem; }

.closing {
  position: relative; overflow: hidden;
  background: var(--primary); color: var(--white); padding: 64px 0; text-align: center;
}
.closing::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1200px; height: 1200px; margin: -600px 0 0 -600px;
  background: repeating-radial-gradient(circle at center, transparent 0 55px, rgba(232, 115, 90, .12) 55px 56.5px);
  -webkit-mask-image: radial-gradient(circle at center, #000 0 15%, transparent 45%);
          mask-image: radial-gradient(circle at center, #000 0 15%, transparent 45%);
  pointer-events: none;
}
.closing-inner { position: relative; }
.closing-badge {
  width: 132px; height: 132px; margin: 0 auto 24px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(232, 115, 90, .60), 0 0 0 10px rgba(232, 115, 90, .10);
}
@media (min-width: 900px) { .closing-badge { width: 156px; height: 156px; } }
.closing h2 { color: var(--white); font-size: clamp(1.5rem, 5vw, 2.2rem); max-width: 18em; margin: 0 auto; }
.closing p { margin: 12px auto 26px; color: rgba(255, 255, 255, .86); max-width: 32em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-deep); color: rgba(255, 255, 255, .80); padding: 32px 0 40px; font-size: .84rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .wordmark { font-size: 1.05rem; }
.legal { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .14); border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: .78rem; line-height: 1.6; color: rgba(255, 255, 255, .70); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; }
.footer-bottom a { color: var(--accent-on-dark); font-weight: 500; }

/* ---------- Sticky mobile button ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 82, 87, .96); border-top: 1px solid rgba(232, 115, 90, .40);
  animation: slideUp .25s ease;
}
.sticky-cta .btn { width: 100%; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Mobile: push the form as high as possible ---------- */
@media (max-width: 639px) {
  .hero { padding: 18px 0 30px; }
  .hero-inner { gap: 16px; }
  .eyebrow { font-size: .66rem; margin-bottom: 10px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: .92rem; margin-top: 10px; }
  .question { font-size: 1.1rem; }
  .hero-trust { flex-direction: column; align-items: flex-start; }
}

/* ---------- Tablet and desktop ---------- */
@media (min-width: 480px) {
  /* two-column options like the quiz reference; an odd last option spans both */
  .options { grid-template-columns: 1fr 1fr; }
  .options .option:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 640px) {
  .header-tag { display: inline; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .form-card { padding: 30px 32px 26px; }
}

@media (min-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner { gap: 28px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .section { padding: 84px 0; }
  .site-footer { padding-bottom: 40px; }
  .sticky-cta { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
