/* Legado Eterno - landing (solo formulario, una columna centrada)
   --navy y --gold son los tonos exactos del logo (logos/logo-legado-eterno.png). */
:root {
  --navy: #0C2743;           /* logo */
  --navy-2: #143559;
  --navy-3: #1E4673;
  --navy-deep: #081C31;
  --gold: #CAA129;           /* logo */
  --gold-light: #DDBE62;
  --gold-text: #86680F;      /* dorado con contraste suficiente sobre fondo claro */
  --cream: #FAF7F0;
  --cream-2: #F3EEE2;
  --ink: #1B2433;
  --muted: #566173;
  --line: #DCE1E9;
  --white: #FFFFFF;
  --error: #B42318;
  --error-bg: #FEF3F2;
  --ok: #1F7A4D;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --shadow: 0 18px 40px -18px rgba(12, 39, 67, .35), 0 2px 6px rgba(12, 39, 67, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: radial-gradient(760px 380px at 50% 0%, rgba(202, 161, 41, .12), transparent 70%) no-repeat, var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; color: var(--navy); }
p { margin: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

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

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Encabezado: solo el logo, centrado ---------- */
.site-header { padding-top: 20px; }
.header-inner { display: flex; justify-content: center; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--navy); letter-spacing: .01em; }

/* ---------- Titular + formulario ---------- */
.hero { padding: 20px 0 44px; }
.hero-stack {
  display: grid; gap: 20px; justify-items: center; text-align: center;
  max-width: 640px; margin: 0 auto;
}
.hero h1 { font-size: clamp(1.7rem, 5.6vw, 2.6rem); text-wrap: balance; }
.accent {
  color: var(--gold-text);
  text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 3px; text-underline-offset: 7px;
}
.hero-sub { margin: 12px auto 0; color: var(--muted); font-size: 1rem; 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: 26px; color: var(--muted); font-weight: 600; font-size: .9rem;
}
.hero-trust li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(202, 161, 41, .18) 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='%2386680F' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Tarjeta del formulario ---------- */
.form-card {
  width: 100%; max-width: 600px; text-align: left;
  background: var(--white); color: var(--ink);
  border: 1px solid #ECE6D8; border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px 18px 20px;
  scroll-margin-top: 12px;
}
.form-card:focus { outline: none; }

.progress-wrap { margin-bottom: 18px; }
.progress { height: 6px; background: #ECEFF4; border-radius: 999px; overflow: hidden; max-width: 220px; margin: 0 auto; }
.progress-bar {
  height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width .35s ease;
}
.progress-label { margin-top: 8px; font-size: .82rem; font-weight: 600; 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.25rem; margin-bottom: 16px; text-align: center; text-wrap: balance; }
.question:focus { outline: none; }
.step-text { color: var(--muted); margin: -8px 0 14px; font-size: .95rem; 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: 600; color: var(--navy);
  background: var(--white); 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 #B7C0CE; background: var(--white); transition: all .15s;
}
.option:hover { border-color: var(--navy-3); }
.option:active { transform: scale(.99); }
.option[aria-pressed="true"] { border-color: var(--navy); background: #F2F5FA; }
.option[aria-pressed="true"]::before {
  border-color: var(--gold); background: var(--gold) 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='%230C2743' 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: 600; font-size: .95rem; margin-bottom: 6px; color: var(--navy); }
.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='%230C2743' 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(--navy); box-shadow: 0 0 0 3px rgba(202, 161, 41, .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(--navy); }
.field-check label { font-weight: 400; font-size: .88rem; line-height: 1.45; color: var(--ink); margin: 0; }

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

.consent-text { font-size: .82rem; line-height: 1.45; color: var(--muted); margin-top: 10px; }
.consent-text a { color: var(--navy); 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: .92rem;
}
.submit-error strong { display: block; }

/* Teléfono con prefijo +1 */
.phone-field { position: relative; }
.phone-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--navy); pointer-events: none;
}
.field .phone-field input[type="tel"] { padding-left: 46px; }

/* Etiqueta solo para lectores de pantalla (la pregunta ya hace de título) */
.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;
}

/* Campo trampa */
.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%; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 700; font-size: 1.02rem; 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(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-3); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }
.btn-link { background: transparent; color: var(--muted); padding: 0 10px; font-weight: 600; }
.btn-link:hover { color: var(--navy); }

.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); } }

/* ---------- Gracias ---------- */
.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(--white); background: var(--ok);
  box-shadow: 0 0 0 6px rgba(31, 122, 77, .12);
}
.thanks h2 { font-size: 1.5rem; }
.thanks h2:focus { outline: none; }
.thanks p { margin-top: 10px; color: var(--muted); }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .78); padding: 32px 0 40px; font-size: .88rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { border-radius: 8px; }
.footer-brand span { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--white); }
.legal { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; line-height: 1.55; color: rgba(255, 255, 255, .68); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; }
.footer-bottom a { color: var(--gold-light); font-weight: 600; }

/* ---------- Celular ---------- */
@media (max-width: 639px) {
  .site-header { padding-top: 16px; }
  .hero { padding: 14px 0 32px; }
  .hero-stack { gap: 16px; }
  .hero-sub { font-size: .94rem; }
  .question { font-size: 1.15rem; }
  .hero-trust { flex-direction: column; align-items: flex-start; }
}

/* ---------- Opciones en dos columnas, como la referencia ---------- */
@media (min-width: 480px) {
  .options { grid-template-columns: 1fr 1fr; }
  .options .option:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 640px) {
  .form-card { padding: 30px 32px 26px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  .site-header { padding-top: 32px; }
  .hero { padding: 28px 0 64px; }
  .hero-stack { gap: 26px; }
}

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