/* Mobile first: pensado para 360 px de ancho; se adapta a pantallas grandes al final.
   Paleta "cálida" adaptada de deliverables/prompt-diseno-ui.md (contraste verificado a mano,
   ver notas en cada color: los tonos claros de referencia no llegaban a 4.5:1 con texto blanco). */
:root {
  --bg: #fbf8f3;
  --wash: #f6efe1;           /* crema un poco más marcado, para tarjetas de "problema" y detalles */
  --card: #ffffff;
  --text: #1a2328;
  --muted: #4a5560;
  --primary: #b8522d;        /* terracota oscuro: pasa 4.9:1 con texto blanco (el D96B43 original solo daba 3.4:1) */
  --primary-hover: #8f3e1f;  /* 7.3:1 */
  --primary-light: #d96b43;  /* solo decorativo: círculos, chips, siempre con --text encima (4.67:1), nunca con blanco */
  --primary-wash: #f4e3d0;   /* fondo muy claro para chips con --text encima */
  --wa: #2a6f54;             /* 6:1 con blanco */
  --wa-hover: #1c5240;
  --accent: #315c85;         /* azul sobrio: insignias y "más elegido" (7:1 con blanco) */
  --line: #e6dcc8;
  --warn-bg: #fff4d6;
  --offer-bg: #e2f3e8;
  --offer-text: #0d4b26;
  --footer-bg: #1a2328;
  --footer-text: #cbd3da;
  --radius: 16px;
  --radius-lg: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 112.5%; } /* 18 px de base: todo lo demás va en rem y escala con esto, pensado para lectores de 60+ */
body {
  margin: 0;
  padding-bottom: 88px; /* espacio para el botón fijo de WhatsApp */
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.1875rem; /* ~19px */
  line-height: 1.6;
}
main, footer { max-width: 760px; margin: 0 auto; }
section { padding: 34px 16px; }
h1 { font-size: 2.15rem; line-height: 1.2; letter-spacing: -0.01em; font-weight: 800; margin: 0 0 16px; }
h2 { font-size: 1.7rem; line-height: 1.25; font-weight: 800; margin: 0 0 6px; }
h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--primary); }
.section-lead { color: var(--muted); font-size: 1.0625rem; margin: 0 0 22px; }

.hero { padding-top: 22px; text-align: center; }
.brand-logo { display: block; width: 170px; max-width: 55%; height: auto; margin: 0 auto 14px; }
.brand { font-weight: 800; color: var(--primary); letter-spacing: .02em; margin-bottom: 14px; font-size: 1.1rem; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-wash); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 1rem; font-weight: 700; margin-bottom: 18px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin-left: auto; margin-right: auto; }
.hero .btn-group { display: grid; gap: 12px; max-width: 420px; margin: 22px auto 0; }
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 1rem; font-weight: 600;
}
.trust-row span { white-space: nowrap; }

.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; width: 100%;
  padding: 12px 18px; margin: 0;
  border: 2px solid var(--primary); border-radius: var(--radius);
  background: var(--primary); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: #fff; color: var(--primary); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--primary-wash); color: var(--primary-hover); }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.btn-wa:hover, .btn-wa:focus-visible { background: var(--wa-hover); border-color: var(--wa-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover, .btn-outline:focus-visible { border-color: var(--primary); color: var(--primary); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.problems { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.problems li {
  background: var(--wash); border-left: 5px solid var(--primary-light);
  border-radius: 12px; padding: 14px 16px;
}
.problems .solved {
  display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  color: var(--wa); font-weight: 700; font-size: 1rem;
}

.cards { display: grid; gap: 16px; }
.card {
  position: relative; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; padding-top: 34px;
  display: flex; flex-direction: column; gap: 12px;
}
.card.featured { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-wash); }
.card-tag {
  position: absolute; top: 0; right: 0;
  background: var(--wash); color: var(--text);
  font-size: .85rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 0 var(--radius-lg) 0 12px;
}
.card.featured .card-tag { background: var(--primary); color: #fff; }
.card-benefits { list-style: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.card-benefits li { padding-left: 26px; position: relative; font-size: 1.02rem; }
.card-benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--wa); font-weight: 800; }

.price-box { background: var(--wash); border-radius: 14px; padding: 14px 16px; }
.price-box .list-price { display: block; text-decoration: line-through; color: var(--muted); font-size: .95rem; margin: 0 0 4px; }
.price-box .offer-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-box .offer-number { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.price-box .offer-pill { background: var(--offer-bg); color: var(--offer-text); font-size: .9rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.price-box .note { display: block; margin-top: 6px; color: var(--muted); font-size: 1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--primary-wash); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.step p { margin: 4px 0 0; color: var(--muted); }
.step strong { display: block; color: var(--text); font-size: 1.1rem; }

.notice { background: var(--warn-bg); border: 1px solid #e6c766; border-radius: var(--radius); padding: 18px; }
.notice ul { margin: 8px 0 0; padding-left: 22px; }
.notice .badge-pill { background: rgba(255,255,255,.6); }

.about { text-align: center; }
.about-logo { display: block; width: 96px; height: auto; margin: 0 auto 14px; }

form { display: grid; gap: 16px; }
label, legend { font-weight: 700; display: block; margin-bottom: 6px; }
fieldset { border: 0; padding: 0; margin: 0; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; min-height: 52px; padding: 10px 14px;
  font: inherit; color: var(--text);
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus { border-color: var(--primary); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin-bottom: 8px; min-height: 48px; }
.check-card { padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.check-card:has(:checked) { border-color: var(--primary); background: var(--primary-wash); }
.check-card input { margin-top: 0; }
.check-name { display: block; font-weight: 700; }
.check-desc { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; line-height: 1.4; margin-top: 4px; }
.check input { width: 28px; height: 28px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.chip-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip-options label {
  border: 2px solid var(--line); border-radius: 14px; padding: 12px; text-align: center;
  font-weight: 700; cursor: pointer; margin: 0; min-height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.chip-options label:has(:checked) { border-color: var(--primary); background: var(--primary-wash); }
.chip-options input { width: 20px; height: 20px; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { padding: 14px; border-radius: 10px; font-weight: 700; }
.msg[hidden] { display: none; }
.msg.ok { background: var(--offer-bg); color: var(--offer-text); }
.msg.err { background: #fde8e6; color: #7a1a12; }
.msg.err a { color: inherit; text-decoration: underline; }
.msg.sending { background: var(--primary-wash); color: var(--text, inherit); }
.msg.sending::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: 10px; vertical-align: -0.15em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar 0.8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .msg.sending::before { animation: none; } }
.btn:disabled { opacity: 0.7; cursor: wait; }

details { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 10px; }
summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; font-weight: 800; margin-left: 12px; }
details[open] summary::after { content: "–"; }
details p { margin-top: 0; }

footer { background: var(--footer-bg); color: var(--footer-text); padding: 0; margin-top: 12px; }
footer .footer-inner { max-width: 760px; margin: 0 auto; padding: 28px 16px 32px; }
footer details { background: transparent; border-color: rgba(255,255,255,.18); }
footer summary { color: #fff; }
footer summary::after { color: var(--primary-light); }
footer a { color: #fff; font-weight: 700; }
footer p { color: var(--footer-text); font-size: .95rem; }

.wa-fixed {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 243, .96); border-top: 1px solid var(--line);
}
.wa-fixed .btn { max-width: 760px; margin: 0 auto; }

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
  .step { flex-direction: column; align-items: center; text-align: center; }
  .chip-options { grid-template-columns: 1fr 1fr; max-width: 420px; margin: 0 auto; }
}
@media (min-width: 720px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  .hero .btn-group { grid-auto-flow: column; max-width: none; }
  .btn { width: auto; }
  .wa-fixed .btn { display: flex; width: 100%; }
  footer .footer-cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
