/* ============================================================================
   SERENITY · SITIO PÚBLICO Y LANDING DE CAMPAÑAS  (v2, oct-2026)
   ----------------------------------------------------------------------------
   Sin Bootstrap ni librerías: una hoja, iconos SVG en línea.
   Paleta del logotipo: azul mandala (marca) + verde (conversión).
   Contraste verificado WCAG AA: --brand 6.0:1, --cta 5.1:1, --muted 6.3:1
   sobre blanco y crema.
   ============================================================================ */
:root {
  --bg: #faf7f2;          /* crema cálido */
  --surface: #ffffff;
  --ink: #12303d;         /* títulos */
  --text: #263a44;
  --muted: #4b5c65;
  --line: #e7e1d7;
  --brand: #156a91;       /* azul del logo, oscurecido para AA */
  --brand-soft: #e6f1f6;
  --leaf: #77c24b;        /* verde del logo: solo decoración */
  --leaf-soft: #edf6e6;
  --cta: #3b7d23;         /* verde de conversión (AA con texto blanco) */
  --cta-hover: #2f6a1b;
  --wa: #157a43;
  --focus: #f59e0b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -28px rgba(18, 48, 61, .45);
  --shadow-sm: 0 6px 20px -12px rgba(18, 48, 61, .35);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Lora', Georgia, 'Times New Roman', serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body.s {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.s-skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.s-skip:focus { top: 12px; color: #fff; }

.s-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .s-wrap { padding: 0 28px; } }

/* ── Botones ─────────────────────────────────────────────────── */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1.02rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.s-btn:active { transform: translateY(1px); }
.s-btn-cta { background: var(--cta); color: #fff; }
.s-btn-cta:hover { background: var(--cta-hover); color: #fff; }
.s-btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.s-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.s-btn-ghost .ico-wa { color: var(--wa); }
.s-btn-wa { background: var(--wa); color: #fff; }
.s-btn-wa:hover { background: #0f6436; color: #fff; }
.s-btn-block { width: 100%; }
.s-btn-sm { min-height: 44px; padding: .55em 1.05em; font-size: .95rem; }
.s-btn[disabled], .s-btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.s-btns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479px) { .s-btns .s-btn { width: 100%; } }

/* ── Encabezado ──────────────────────────────────────────────── */
.s-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.s-header .s-wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.s-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; margin-right: auto; }
.s-logo img { width: 52px; height: 52px; object-fit: contain; }
.s-logo span { font-family: var(--font-head); font-size: 1.12rem; line-height: 1.1; }
.s-logo small { display: block; font: 600 .74rem/1.2 var(--font); color: var(--muted); letter-spacing: .02em; }
.s-nav { display: none; gap: 4px; }
.s-nav a { padding: .55em .85em; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
.s-nav a:hover, .s-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.s-head-tel { display: none; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: none; }
.s-acceso { display: none; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--muted); text-decoration: none; }
.s-burger { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--ink); cursor: pointer; }
.s-drawer { display: none; border-top: 1px solid var(--line); background: #fff; padding: 8px 16px 18px; }
.s-drawer.open { display: block; }
.s-drawer a { display: flex; align-items: center; gap: 10px; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
@media (min-width: 992px) {
  .s-nav, .s-acceso { display: flex; }
  .s-burger, .s-drawer, .s-drawer.open { display: none; }
}
@media (min-width: 640px) { .s-head-tel { display: inline-flex; } }
@media (max-width: 420px) { .s-logo span { font-size: 1rem; } .s-logo img { width: 44px; height: 44px; } .s-header .s-head-cta { padding: .5em .9em; font-size: .92rem; } }

/* ── Secciones ───────────────────────────────────────────────── */
.s-sec { padding: 64px 0; }
.s-sec-alt { background: var(--surface); }
.s-sec-brand { background: var(--ink); color: #e9f1f4; }
.s-sec-brand h2, .s-sec-brand h3 { color: #fff; }
@media (min-width: 992px) { .s-sec { padding: 96px 0; } }
.s-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 800 .8rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.s-eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--leaf); }
.s-head { max-width: 760px; margin-bottom: 40px; }
.s-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.s-head.center .s-eyebrow { justify-content: center; }
.s-lead { font-size: 1.15rem; color: var(--muted); }

/* ── Hero institucional (texto + foto real) ──────────────────── */
.s-hero { padding: 40px 0 56px; }
.s-hero-grid { display: grid; gap: 32px; align-items: center; }
.s-hero h1 { margin-bottom: .45em; }
.s-hero p.s-lead { max-width: 36em; }
.s-hero-photo { position: relative; }
.s-hero-photo picture img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.s-hero-photo figcaption { position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,.94); color: var(--ink); padding: 8px 12px; border-radius: 10px; font-size: .88rem; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.s-checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.s-checks li { display: flex; gap: 10px; align-items: flex-start; }
.s-checks .ico { color: var(--cta); margin-top: .2em; }
@media (min-width: 992px) { .s-hero { padding: 64px 0 88px; } .s-hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }

.s-page-hero { padding: 48px 0 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.s-crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.s-crumbs a { color: var(--muted); }

/* ── Tarjetas y rejillas ─────────────────────────────────────── */
.s-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .s-grid-2, .s-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .s-grid-3 { grid-template-columns: repeat(3, 1fr); } .s-grid { gap: 24px; } }
.s-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.s-sec-alt .s-card { background: var(--bg); }
.s-card p:last-child { margin-bottom: 0; }
.s-card .s-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.s-card .s-ic .ico { width: 24px; height: 24px; }
.s-card p { color: var(--muted); }
.s-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 992px) { .s-split { grid-template-columns: 1fr 1fr; gap: 64px; } .s-split.rev > :first-child { order: 2; } }
.s-split picture img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }

/* ── Pasos ───────────────────────────────────────────────────── */
.s-steps { counter-reset: paso; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 768px) { .s-steps { grid-template-columns: repeat(3, 1fr); } }
.s-steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px 24px; }
.s-steps li::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--cta); color: #fff; font-weight: 800; margin-bottom: 14px; }
.s-steps h3 { margin-bottom: .35em; }
.s-steps p { margin: 0; color: var(--muted); }

/* ── Galería ─────────────────────────────────────────────────── */
.s-gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .s-gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.s-gallery figure { margin: 0; }
.s-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); }
.s-gallery figcaption { font-size: .92rem; font-weight: 700; color: var(--ink); padding: 8px 2px 0; }
.s-gallery figcaption span { display: block; font-weight: 400; color: var(--muted); }

/* ── Lista de confianza ──────────────────────────────────────── */
.s-trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 768px) { .s-trust { grid-template-columns: repeat(2, 1fr); } }
.s-trust li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.s-trust .ico { color: var(--cta); width: 26px; height: 26px; }
.s-trust strong { display: block; color: var(--ink); }
.s-trust span { color: var(--muted); font-size: .97rem; }

/* ── Vista ilustrativa del portal familiar ───────────────────── */
.s-portal { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); max-width: 400px; margin: 0 auto; }
.s-portal-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--ink); padding: 4px 6px 14px; border-bottom: 1px solid var(--line); }
.s-portal-top small { font-weight: 600; color: var(--muted); }
.s-portal-row { display: flex; gap: 12px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); }
.s-portal-row:last-of-type { border-bottom: 0; }
.s-portal-row .s-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.s-portal-row div { flex: 1; }
.s-portal-row strong { display: block; color: var(--ink); font-size: .98rem; }
.s-portal-row span { color: var(--muted); font-size: .9rem; }
.s-pill { font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--leaf-soft); color: #2d5e1a; }
.s-portal-note { font-size: .8rem; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* ── Preguntas frecuentes ────────────────────────────────────── */
.s-faq { max-width: 820px; margin: 0 auto; }
.s-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; }
.s-faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 56px; }
.s-faq summary::-webkit-details-marker { display: none; }
.s-faq summary .ico { transition: transform .2s; color: var(--brand); }
.s-faq details[open] summary .ico { transform: rotate(180deg); }
.s-faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* ── Formulario ──────────────────────────────────────────────── */
.s-form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .s-form-card { padding: 32px; } }
.s-form-card h2 { font-size: 1.6rem; margin-bottom: .3em; }
.s-form-card > p { color: var(--muted); }
.s-field { margin-bottom: 16px; }
.s-field label, .s-field legend { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: .98rem; }
.s-field .opc { font-weight: 400; color: var(--muted); }
.s-input { position: relative; }
.s-input .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.s-input input {
  width: 100%; min-height: 52px; padding: 12px 14px 12px 44px; font: 400 1.05rem var(--font); color: var(--ink);
  border: 1.5px solid #cfc7ba; border-radius: var(--radius-sm); background: #fff;
}
.s-input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21,106,145,.15); }
.s-input input[aria-invalid="true"] { border-color: #b42318; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: var(--ink); }
.s-err { color: #b42318; font-size: .92rem; font-weight: 600; margin-top: 6px; }
.s-alert { background: #fdecea; color: #8a1c12; border: 1px solid #f5c2bc; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; }
fieldset.s-field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.s-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.s-chips label { margin: 0; position: relative; }
.s-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s-chips span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid #cfc7ba; border-radius: var(--radius-sm); font-weight: 600; color: var(--text); text-align: center; line-height: 1.25; cursor: pointer; background: #fff; font-size: .95rem; }
.s-chips input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.s-chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.s-check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--text); margin: 6px 0 18px; }
.s-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.s-reassure { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .93rem; color: var(--muted); }
.s-reassure li { display: flex; gap: 8px; align-items: center; }
.s-reassure .ico { color: var(--cta); width: 18px; height: 18px; }
.s-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Datos de contacto ───────────────────────────────────────── */
.s-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.s-contact li { display: flex; gap: 14px; align-items: flex-start; }
.s-contact .s-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.s-contact strong { display: block; color: var(--ink); }
.s-contact a { font-weight: 700; text-decoration: none; }
.s-map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); }

/* ── Cierre ──────────────────────────────────────────────────── */
.s-close-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 992px) { .s-close-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* ── Pie ─────────────────────────────────────────────────────── */
.s-footer { background: var(--ink); color: #d6e3e9; padding: 56px 0 28px; font-size: .97rem; }
.s-footer a { color: #fff; }
.s-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.s-foot-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .s-foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.s-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.s-foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.s-foot-brand img { width: 56px; height: 56px; background: #fff; border-radius: 14px; padding: 4px; }
.s-foot-brand strong { font-family: var(--font-head); color: #fff; font-size: 1.15rem; }
.s-foot-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .9rem; color: #b9cbd3; }
.s-foot-bottom button { background: none; border: 0; color: #fff; text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* ── WhatsApp flotante y barra fija (móvil) ──────────────────── */
.s-wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); }
.s-wa-float .ico { width: 28px; height: 28px; }
.s-wa-float:hover { color: #fff; background: #0f6436; }
@media (min-width: 992px) { .s-wa-float { display: none; } }
.s-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(0,0,0,.4); }
.s-mbar .s-btn { flex: 1; min-height: 50px; }
.s-mbar .s-btn-wa { flex: 0 0 auto; padding: 0 18px; }
body.s-has-mbar { padding-bottom: 78px; }
@media (min-width: 992px) { .s-mbar { display: none; } body.s-has-mbar { padding-bottom: 0; } }

/* ── Aviso de cookies ────────────────────────────────────────── */
.s-consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.45); padding: 18px; max-width: 560px; font-size: .95rem; }
.s-consent[hidden] { display: none; }
.s-consent p { margin-bottom: 12px; }
.s-consent strong { color: var(--ink); }
.s-consent .s-btns { gap: 8px; }
.s-consent .s-btn { min-height: 46px; padding: .5em 1.1em; font-size: .95rem; flex: 1 1 auto; }
.s-consent fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.s-consent label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.s-consent label input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.s-consent label small { display: block; color: var(--muted); }
@media (min-width: 768px) { .s-consent { left: 24px; bottom: 24px; } }
body.s-has-mbar .s-consent { bottom: 90px; }
@media (min-width: 992px) { body.s-has-mbar .s-consent { bottom: 24px; } }

/* ── Aviso de privacidad (texto) ─────────────────────────────── */
.s-prose { max-width: 780px; }
.s-prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.s-prose h3 { margin-top: 1.2em; }

/* ── Animación discreta ──────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .s-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .s-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Aviso de cookies compacto en teléfono: no debe tapar la propuesta. */
@media (max-width: 767px) {
  .s-consent { padding: 14px; font-size: .88rem; }
  .s-consent p { margin-bottom: 10px; }
  .s-consent > .s-btns .s-btn { flex: 1 1 40%; min-height: 44px; }
  .s-consent > .s-btns [data-c="config"] { flex-basis: 100%; min-height: 36px; border: 0; text-decoration: underline; background: none; }
}

/* Encabezado: nada de renglones partidos. */
.s-nav a, .s-header .s-btn, .s-acceso, .s-head-tel { white-space: nowrap; }
/* Celular angosto o con letra grande: nada puede ensanchar la página. */
.s-hero-grid > *, .s-close-grid > *, .s-split > *, .s-logo { min-width: 0; }
h1, h2, .s-btn { overflow-wrap: break-word; }
@media (max-width: 479px) { .s-header .s-btn-wa { display: none; } /* la barra inferior ya trae WhatsApp */ }
@media (min-width: 992px) and (max-width: 1199px) { .s-nav a { padding: .5em .6em; font-size: .95rem; } .s-logo span { font-size: 1rem; } }
/* En teléfono el CTA ya está en el hero y el WhatsApp flota: la barra solo lleva marca y menú. */
@media (max-width: 559px) { .s-header .s-head-cta { display: none; } }
