/* =====================================================================
   Estilo: médico pero cálido. Fondo marfil, verde petróleo profundo,
   un acento terracota-rosado muy medido. Mucho espacio.
   Para cambiar colores, edita solo las variables de :root.
   ===================================================================== */
:root {
  --bg: #fbfaff;
  --surface: #ffffff;
  --soft: #f1effc;        /* lavanda muy suave */
  --soft-2: #fbf1f5;      /* rosa muy suave (lazo) */
  --ink: #1f1b3a;
  --muted: #5d5a73;
  --line: #e6e3ef;
  --primary: #4a3cc0;     /* violeta de la marca */
  --primary-ink: #ffffff;
  --primary-soft: #e6e2fb;
  --accent: #c2578a;      /* rosa del lazo, solo para detalles */
  --danger: #a23b2a;
  --ok: #2f7a4f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 27, 58, .04), 0 8px 24px rgba(31, 27, 58, .06);
  --font-title: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .8em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.4em; border-radius: 999px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: .15s; min-height: 48px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #3a2e9c; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary); }
.btn-link { background: none; border: 0; color: var(--primary); text-decoration: underline; padding: .4em 0; min-height: 0; }
.btn-sm { padding: .55em 1em; min-height: 38px; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); }
.brand b { color: var(--primary); }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); width: 44px; height: 44px; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; gap: 4px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 1.05rem; }
  .nav-toggle { display: block; }
}

/* ---------- secciones de la portada ---------- */
section { padding: 88px 0; }
@media (max-width: 640px) { section { padding: 60px 0; } }
.section-soft { background: var(--soft); }
.section-sand { background: var(--soft-2); }
.section-head { max-width: 680px; margin-bottom: 44px; }

.hero { padding: 64px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin-bottom: 1.8em; }
.hero-photo { aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: .92rem; color: var(--muted); }
.hero-trust span::before { content: "✓"; color: var(--primary); font-weight: 700; margin-right: 6px; }
.hero-stack { position: absolute; inset: 9% 8%; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero-photo { aspect-ratio: auto; }
  .hero-stack { position: relative; inset: auto; padding: 24px 18px; } }

/* espacio para foto real: reemplazar por <img> */
.photo-ph { width: 100%; height: 100%; min-height: 220px; display: grid; place-items: center; text-align: center; padding: 24px;
  background: linear-gradient(160deg, #ece9fb 0%, #f8eaf1 100%); color: var(--muted); font-size: .9rem; }
.photo-ph svg { opacity: .45; margin: 0 auto 10px; }
.photo-ph img, .hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.need-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.need { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 500; transition: .15s; }
.need:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.need::after { content: "→"; color: var(--primary); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 26px; position: relative; counter-increment: s; border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary); font-family: var(--font-title); font-size: 1.15rem; margin-bottom: 14px; }
.steps h3 { font-size: 1.12rem; margin-bottom: .3em; }
.steps p { color: var(--muted); margin: 0; font-size: .96rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.includes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 28px; list-style: none; padding: 0; }
.includes li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); position: relative; }
.includes li::before { content: ""; position: absolute; left: 0; top: 19px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' stroke='%234a3cc0' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") center/12px no-repeat; }

.doctor { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: start; }
.doctor .photo { aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; }
.doctor dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; margin: 24px 0; }
.doctor dt { color: var(--muted); font-size: .9rem; }
.doctor dd { margin: 0; }
.editable { background: #fff6d6; border-radius: 4px; padding: 0 4px; }
.quote { font-family: var(--font-title); font-weight: 500; font-size: 1.2rem; line-height: 1.45; border-left: 3px solid var(--accent); padding-left: 20px; margin: 28px 0 0; }
@media (max-width: 860px) { .doctor { grid-template-columns: 1fr; gap: 28px; } .doctor .photo { max-width: 360px; } .doctor dl { grid-template-columns: 1fr; gap: 2px; } .doctor dd { margin-bottom: 10px; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

.products { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; }
.product.featured { border-color: var(--primary); box-shadow: var(--shadow); }
.product ol, .product ul { padding-left: 1.2em; color: var(--muted); }
.product li { margin-bottom: 6px; }
.product .btn { margin-top: auto; align-self: flex-start; }
.tag { display: inline-block; font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; margin-bottom: 12px; }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; color: var(--primary); font-weight: 300; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-right: 36px; }

.cta-final { background: var(--primary); color: #fff; border-radius: 28px; padding: 64px 40px; text-align: center; }
.cta-final h2 { color: #fff; }
.cta-final p { opacity: .85; max-width: 560px; margin: 0 auto 28px; }
.cta-final .btn-row { justify-content: center; }
.cta-final .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.cta-final .btn-ghost:hover { background: rgba(255,255,255,.1); }

.site-footer { padding: 48px 0 100px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.disclaimer { max-width: 620px; }

/* ---------- WhatsApp ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.wa-btn { width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; border: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; }
.wa-menu { background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); min-width: 220px; border: 1px solid var(--line); }
.wa-menu p { margin: 0 0 8px; font-size: .88rem; color: var(--muted); }
.wa-menu a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.wa-menu a:hover { background: var(--soft); }

/* ---------- formularios y tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 520px) { .card { padding: 20px; border-radius: 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 1rem/1.4 var(--font-body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); width: 100%; min-height: 48px; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--font-title); font-size: 1.3rem; margin-bottom: 14px; padding: 0; }
.form-section { padding: 24px 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.hint { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: var(--ink); }

.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 26px; text-align: center; background: #fcfbf8; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--soft); }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.file-item { display: grid; grid-template-columns: 1fr 1fr 130px 36px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.file-item .fname { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item select, .file-item input { min-height: 40px; padding: 8px 10px; font-size: .9rem; }
.file-item button { background: none; border: 0; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
@media (max-width: 640px) { .file-item { grid-template-columns: 1fr 1fr; } .file-item .fname { grid-column: 1 / -1; } }

.steps-progress { display: flex; gap: 6px; margin-bottom: 26px; }
.steps-progress span { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.steps-progress span.on { background: var(--primary); }

/* ---------- utilidades de app ---------- */
.page { padding: 40px 0 120px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  z-index: 100; max-width: 90vw; box-shadow: var(--shadow); font-size: .95rem; }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
.demo-banner { background: #fff3cd; color: #5c4700; font-size: .85rem; padding: 8px 20px; text-align: center; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--primary); white-space: nowrap; }
.badge[data-e="nuevo"] { background: #fde8d9; color: #8a4513; }
.badge[data-e="documentacion_pendiente"] { background: #fff1c2; color: #6b5200; }
.badge[data-e="caso_completo"], .badge[data-e="en_revision_medica"] { background: #e2ecfb; color: #234f8c; }
.badge[data-e="consulta_programada"], .badge[data-e="consulta_realizada"], .badge[data-e="informe_pendiente"] { background: #ece4f7; color: #5b3a8a; }
.badge[data-e="finalizado"], .badge[data-e="en_seguimiento"] { background: #dcefe3; color: #23613e; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
[aria-busy] { opacity: .6; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 2rem; margin-bottom: 18px; }
[hidden] { display: none !important; }

/* ---------- v2: foto en portada, equipo, prevención, medios ---------- */
h1 { letter-spacing: -.025em; }
.hero-photo.real { aspect-ratio: 4 / 5; background: linear-gradient(160deg, #ece9fb, #f8eaf1); overflow: visible; box-shadow: none; }
.hero-photo.real .ph { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.hero-photo.real img { object-position: 50% 20%; }
.float-card { position: absolute; left: -28px; bottom: 28px; max-width: 300px; padding: 16px 18px; font-size: .92rem; }
@media (max-width: 860px) { .hero-photo.real { aspect-ratio: 1 / 1; max-width: 520px; } .float-card { left: 12px; bottom: 12px; right: 12px; max-width: none; } }
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.area .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 12px; }
.area h3 { font-size: 1rem; margin-bottom: .25em; }
.area p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 960px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 340px) { .areas { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .area { padding: 14px; } .area p { font-size: .82rem; } }
.prev-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.prev { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.prev h3 { font-size: 1.05rem; }
.prev p, .prev li { color: var(--muted); font-size: .93rem; }
.prev ul { padding-left: 1.1em; margin: 0; }
@media (max-width: 960px) { .prev-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .prev-grid { grid-template-columns: 1fr; } }
.quiz { margin-top: 28px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .quiz { grid-template-columns: 1fr; } }
.q { margin: 0 0 18px; }
.q > p { font-weight: 600; margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { flex-direction: row; font-weight: 500; font-size: .92rem; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.result { border-radius: 16px; padding: 22px; background: var(--soft); }
.result.alert { background: #fdecf2; }
.result h3 { font-size: 1.1rem; }
.guide-cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; margin-top: 28px; }
.guide-cta h3 { margin: 0 0 4px; }
.media { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.media img { border-radius: 22px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .media { grid-template-columns: 1fr; gap: 24px; } }
.family { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0; }
.family li { background: rgba(255,255,255,.75); border-radius: var(--radius); padding: 20px; }
.family strong { display: block; margin-bottom: 4px; }
@media (max-width: 760px) { .family { grid-template-columns: 1fr; } }
.ref-card { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.ref-card .photo { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; }
.ref-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
@media (max-width: 860px) { .ref-card { grid-template-columns: 1fr; gap: 20px; padding: 20px; } .ref-card .photo { max-width: 300px; } }
.cred { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.cred li { padding-left: 22px; position: relative; font-size: .95rem; }
.cred li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.guide-q { counter-increment: g; padding: 22px 0; border-top: 1px solid var(--line); }
.guide-q h3::before { content: counter(g) ". "; color: var(--primary); }
.guide-q .tip { background: var(--soft-2); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
@media print { .site-header, .site-footer, .wa-float, .demo-banner, .no-print { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
img { height: auto; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--primary-ink); }
