/* ==========================================================================
   Fundación Niños del Rey — sistema de diseño
   Mobile first. Contraste AA (≥ 4.5:1) en todo texto. Objetivos táctiles ≥ 44 px.
   ========================================================================== */

:root {
  /* Base */
  --cream: #FFFCF0;
  --paper: #FFFFFF;
  --ink: #2B2160;          /* texto e íconos — 14.6:1 sobre crema */
  --ink-soft: #4A4378;     /* texto secundario — 8.6:1 sobre crema */
  --primary: #4A30C2;      /* botones — 8.1:1 con blanco */
  --primary-hover: #3A2399;
  --wa: #127C42;           /* WhatsApp accesible — 5.3:1 con blanco */
  --wa-hover: #0D6334;

  /* Pastel del logo (solo fondos y decoración, siempre con texto índigo) */
  --lila: #ECE5FD;
  --celeste: #DDF0FC;
  --verde: #E2F4E0;
  --amarillo: #FFF3C4;
  --rosado: #FDE3EA;

  /* Pastel saturado para trazos decorativos (nunca texto) */
  --lila-2: #B9A5F0;
  --celeste-2: #8FCBEF;
  --verde-2: #A2D69D;
  --amarillo-2: #F5D466;
  --rosado-2: #F3A8BD;

  --line: #E6E0CC;         /* bordes sobre crema */
  --focus: #4A30C2;

  /* Tipografía */
  --font-display: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-body: 1.0625rem;    /* 17 px móvil */
  --fs-small: 1rem;        /* nunca menos de 16 px */
  --fs-lead: clamp(1.125rem, 1rem + .6vw, 1.3125rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 3.4vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.8vw, 2.625rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);

  /* Espaciado (escala 4/8) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --section: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow: 0 1px 2px rgba(43, 33, 96, .05), 0 8px 24px -12px rgba(43, 33, 96, .18);
  --container: 72rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 48em) { :root { --fs-body: 1.125rem; } }

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 var(--s-4); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 500; line-height: 1.25; }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--primary); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--primary-hover); }
strong { font-weight: 700; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--primary); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 40em) { .container { padding-inline: 1.5rem; } }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon-sm { width: 1.125rem; height: 1.125rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 1.0625rem/1.2 var(--font-body);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(1px) scale(.985); }
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px -8px rgba(74, 48, 194, .7); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px -8px rgba(18, 124, 66, .7); }
.btn-wa:hover { background: var(--wa-hover); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--lila); color: var(--ink); }
.btn-sm { min-height: 44px; padding: .5rem 1.1rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 30em) { .btn-row > .btn { width: 100%; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
  font-weight: 700; text-decoration: none; color: var(--primary);
}
.link-arrow .icon { width: 1.2rem; height: 1.2rem; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
/* Subrayado que se dibuja de izquierda a derecha */
.link-arrow, .draw {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(100% - .55rem) / 0 2px;
  transition: background-size .15s var(--ease);
}
.link-arrow:hover, .link-arrow:focus-visible, .draw:hover, .draw:focus-visible { background-size: calc(100% - 1.6rem) 2px; }
.draw:hover, .draw:focus-visible { background-size: 100% 2px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 252, 240, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 70px; height: auto; }
.footer-logo { width: 96px; height: 96px; margin-bottom: var(--s-4); border-radius: 50%; }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.05; }
.brand-small { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: .5rem .9rem;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 700 1rem var(--font-body); cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; inset: 100% 0 auto 0;
  background: var(--cream); border-bottom: 1px solid var(--line);
  padding: var(--s-3) 1rem var(--s-5); max-height: calc(100vh - 4.5rem); overflow-y: auto;
  box-shadow: 0 20px 30px -20px rgba(43, 33, 96, .3);
}
.nav-list { list-style: none; }
.nav-list a, .nav-more-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 48px; padding: .5rem .25rem; border: 0; background: none;
  color: var(--ink); font: 600 1.125rem var(--font-body); text-decoration: none; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.nav-list a[aria-current="page"] { color: var(--primary); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.submenu { list-style: none; padding-left: var(--s-4); display: none; }
.nav-more-btn[aria-expanded="true"] + .submenu { display: block; }
.nav-more-btn .icon { transition: transform .2s var(--ease); }
.nav-more-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-cta { margin-top: var(--s-4); width: 100%; }

@media (min-width: 68em) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: flex; align-items: center; gap: var(--s-4); position: static;
    background: none; border: 0; padding: 0; box-shadow: none; max-height: none; overflow: visible;
  }
  .nav-list { display: flex; align-items: center; gap: .1rem; }
  .nav-list > li { position: relative; }
  .nav-list a, .nav-more-btn {
    width: auto; min-height: 44px; padding: .5rem .7rem; border: 0; border-radius: 999px;
    font-size: 1rem; gap: .25rem;
  }
  .nav-list > li > a, .nav-more-btn { position: relative; }
  .nav-list > li > a::after, .nav-more-btn::after {
    content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .45rem; height: 2px; border-radius: 2px;
    background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .15s var(--ease);
  }
  .nav-more-btn::after { right: 1.85rem; }
  .nav-list > li > a:hover::after, .nav-more-btn:hover::after { transform: scaleX(1); transform-origin: left; }
  .nav-list a[aria-current="page"], .nav-more-btn.is-active { text-decoration: none; color: var(--primary); }
  .nav-list a[aria-current="page"]::after, .nav-more-btn.is-active::after { transform: scaleX(1); }
  .submenu a::after { display: none; }
  .submenu a:hover { background: var(--lila); }
  .submenu { transform-origin: top; animation: drop .2s var(--ease); }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
  .submenu {
    position: absolute; right: 0; top: calc(100% + .5rem); min-width: 16rem; padding: var(--s-2);
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .submenu a { border-radius: var(--radius-sm); width: 100%; justify-content: flex-start; }
  .nav-cta { margin: 0; width: auto; }
}

/* ---------- Secciones y encabezados ---------- */
.section { padding-block: var(--section); }
.section-tight { padding-block: calc(var(--section) * .6); }
.section-head { max-width: 44rem; margin-bottom: var(--s-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: var(--s-3);
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; letter-spacing: .04em; color: var(--ink-soft);
}
.eyebrow::before { content: ""; width: 1.75rem; height: .5rem; border-radius: 99px; background: linear-gradient(90deg, var(--lila-2), var(--celeste-2), var(--verde-2), var(--amarillo-2), var(--rosado-2)); }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 40rem; }

.bg-lila { background: var(--lila); }
.bg-celeste { background: var(--celeste); }
.bg-verde { background: var(--verde); }
.bg-amarillo { background: var(--amarillo); }
.bg-rosado { background: var(--rosado); }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink .lead, .bg-ink .eyebrow { color: #E4E0FA; }
.bg-ink a:not(.btn) { color: #fff; }

.rounded-band { border-radius: var(--radius-lg); margin-inline: .5rem; }
@media (min-width: 40em) { .rounded-band { margin-inline: 1rem; } }

/* Marcador de contenido pendiente */
.todo { background: var(--amarillo); border-radius: 6px; padding: 0 .3em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 2rem + 4vw, 6rem) clamp(3rem, 2rem + 5vw, 7rem); }
.hero-grid { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 56em) { .hero-grid { grid-template-columns: 1.3fr .7fr; gap: var(--s-7); } }
.hero h1 { margin-bottom: var(--s-5); }
.hero h1 .hl { position: relative; white-space: nowrap; z-index: 0; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .32em; z-index: -1;
  background: var(--amarillo-2); border-radius: 99px; opacity: .75;
  transform-origin: left; animation: grow 1s .3s var(--ease) both;
}
@keyframes grow { from { transform: scaleX(0); } }
.hero .lead { margin-bottom: var(--s-6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); color: var(--ink-soft); font-weight: 600; list-style: none; }
.hero-meta li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta .icon { width: 1.25rem; height: 1.25rem; color: var(--primary); }

.hero-art { display: none; position: relative; max-width: 30rem; margin-inline: auto; width: 100%; }
@media (min-width: 56em) { .hero-art { display: flex; flex-direction: column; align-items: center; } }
.hero-logo { width: 100%; height: auto; }
.hero-card {
  position: relative; margin-top: var(--s-4);
  width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-4) var(--s-5); box-shadow: var(--shadow); text-align: center;
}
.hero-card p { margin: 0; font-weight: 600; font-size: 1rem; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: var(--s-4); }
@media (min-width: 40em) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid { gap: var(--s-5); } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-5);
}
.card h3 { margin-bottom: var(--s-2); }
.card p:last-child { margin-bottom: 0; }
.card .card-foot { margin-top: auto; padding-top: var(--s-3); }
.card-tint { border-color: transparent; }

.icon-badge {
  display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 16px;
  margin-bottom: var(--s-4); color: var(--ink);
}
.icon-badge .icon { width: 1.75rem; height: 1.75rem; }

/* Terapias: cada tarjeta toma un color del arcoíris, en orden. */
.therapy-card { border-top: 6px solid var(--c, var(--lila-2)); }
.therapy-card .icon-badge { background: var(--t, var(--lila)); }
.therapy-card:nth-child(5n+1) { --c: var(--lila-2); --t: var(--lila); }
.therapy-card:nth-child(5n+2) { --c: var(--celeste-2); --t: var(--celeste); }
.therapy-card:nth-child(5n+3) { --c: var(--verde-2); --t: var(--verde); }
.therapy-card:nth-child(5n+4) { --c: var(--amarillo-2); --t: var(--amarillo); }
.therapy-card:nth-child(5n+5) { --c: var(--rosado-2); --t: var(--rosado); }
.therapy-card ul { list-style: none; margin: var(--s-2) 0 var(--s-3); }
.therapy-card li { display: flex; gap: .5rem; padding-block: .2rem; }
.therapy-card li .icon { width: 1.2rem; height: 1.2rem; margin-top: .3rem; color: var(--primary); }

/* Ruta de 3 pasos */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s-4); }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }
.steps li { counter-increment: step; position: relative; padding: var(--s-5); padding-top: var(--s-7); background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.steps li::before {
  content: counter(step); position: absolute; top: var(--s-4); left: var(--s-5);
  font: 600 1.125rem/2.25rem var(--font-display); width: 2.25rem; height: 2.25rem; text-align: center;
  background: var(--primary); color: #fff; border-radius: 50%;
}
.steps h3 { margin-bottom: var(--s-2); }
.steps p { margin: 0; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); list-style: none; }
@media (min-width: 48em) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); border-radius: var(--radius); padding: var(--s-5) var(--s-4); text-align: center; border: 1px solid var(--line); }
.stat-num { display: block; font: 600 clamp(2rem, 1.6rem + 2vw, 2.75rem)/1 var(--font-display); margin-bottom: var(--s-2); }
.stat-label { font-size: var(--fs-small); color: var(--ink-soft); font-weight: 600; }

/* Bloque dividido texto + panel */
.split { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 56em) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); } .split.reverse > :first-child { order: 2; } }

/* Monto de apadrinamiento */
.price-card { background: var(--paper); border-radius: var(--radius-lg); padding: var(--s-6); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.price { font: 600 clamp(3rem, 2.4rem + 3vw, 4.5rem)/1 var(--font-display); color: var(--ink); margin: var(--s-2) 0; }
.price small { font-size: .35em; font-weight: 500; color: var(--ink-soft); }

/* Lista con checks */
.checks { list-style: none; display: grid; gap: var(--s-3); }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks .icon { width: 1.4rem; height: 1.4rem; margin-top: .2rem; color: var(--primary); }

/* ---------- Marcadores de foto ---------- */
.photo-slot {
  position: relative; display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.6) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,.45) 0 22%, transparent 23%),
    var(--slot, var(--lila));
  border: 2px dashed rgba(43, 33, 96, .28);
  padding: var(--s-4); color: var(--ink);
}
.photo-slot .icon { width: 2rem; height: 2rem; margin: 0 auto var(--s-2); }
.photo-slot span { display: block; font-weight: 700; font-size: 1rem; max-width: 18rem; }
.photo-slot small { display: block; font-size: 1rem; color: var(--ink-soft); margin-top: .25rem; }
.photo-slot.tall { aspect-ratio: 4 / 5; }

/* Galería */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter-btn {
  min-height: 44px; padding: .5rem 1.1rem; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); font: 700 1rem var(--font-body); cursor: pointer;
}
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.gallery { list-style: none; display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 36em) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery figcaption { padding-top: var(--s-2); font-weight: 600; }
.gallery .tag { display: inline-block; font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.gallery li[hidden] { display: none; }

/* Noticias */
.news { list-style: none; display: grid; gap: var(--s-4); }
@media (min-width: 48em) { .news { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); } }
.news-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.news-card .news-top { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--t, var(--lila)); }
.news-card .news-top .icon { width: 1.75rem; height: 1.75rem; }
.news-kind { font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem; }
.news-date { margin-left: auto; font-weight: 600; font-size: 1rem; }
.news-body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.news-body .btn-row { margin-top: auto; padding-top: var(--s-3); }

/* Aviso */
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--radius); background: var(--amarillo); border: 1px solid var(--amarillo-2); }
.notice .icon { margin-top: .15rem; }
.notice p { margin: 0; }

/* Equipo */
.team { list-style: none; display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48em) { .team { grid-template-columns: repeat(4, 1fr); gap: var(--s-5); } }
.member { text-align: center; }
.member .avatar { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--s-3); background: var(--t, var(--lila)); border: 2px dashed rgba(43,33,96,.25); }
.member .avatar .icon { width: 2.25rem; height: 2.25rem; }
.member:nth-child(5n+2) { --t: var(--celeste); } .member:nth-child(5n+3) { --t: var(--verde); }
.member:nth-child(5n+4) { --t: var(--amarillo); } .member:nth-child(5n+5) { --t: var(--rosado); }
.member p { margin: 0; }
.member .role { color: var(--ink-soft); font-size: 1rem; }

/* Tabla de transparencia */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 32rem; }
caption { text-align: left; padding: var(--s-4) var(--s-5) 0; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
th, td { text-align: left; padding: .9rem var(--s-5); border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: var(--lila); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Barras de uso de fondos (sin datos inventados: se rellenan con porcentajes reales) */
.bars { list-style: none; display: grid; gap: var(--s-4); }
.bar-label { display: flex; justify-content: space-between; gap: var(--s-3); font-weight: 600; margin-bottom: .35rem; }
.bar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--c, var(--lila-2)); }

/* Acordeón (recursos, preguntas) */
.accordion { display: grid; gap: var(--s-3); }
details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 56px; padding: var(--s-4) var(--s-5); cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.1875rem;
}
summary::-webkit-details-marker { display: none; }
summary .icon { transition: transform .2s var(--ease); }
details[open] summary .icon { transform: rotate(180deg); }
.details-body { padding: 0 var(--s-5) var(--s-5); }
.details-body ul { padding-left: 1.25rem; margin-bottom: var(--s-4); }
.details-body li { margin-bottom: .35rem; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: var(--s-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); }
@media (min-width: 40em) { .form { padding: var(--s-6); } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); } }
.field { display: grid; gap: .35rem; }
.field label, .field legend { font-weight: 700; }
.field .hint { font-size: 1rem; color: var(--ink-soft); margin: 0; }
input, select, textarea {
  width: 100%; min-height: 52px; padding: .75rem 1rem;
  font: 400 1.0625rem/1.4 var(--font-body); color: var(--ink);
  background: var(--cream); border: 2px solid #BDB6D6; border-radius: var(--radius-sm);
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); outline: 3px solid rgba(74, 48, 194, .25); outline-offset: 0; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B3261E; }
.error-msg { color: #B3261E; font-weight: 700; font-size: 1rem; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; border: 2px solid #BDB6D6; background: var(--cream); cursor: pointer; font-weight: 600; }
.choice input:checked + label { background: var(--lila); border-color: var(--primary); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.check-line { display: flex; gap: .75rem; align-items: flex-start; }
.check-line input { width: 1.5rem; height: 1.5rem; min-height: 0; margin-top: .15rem; accent-color: var(--primary); flex: none; }
.form-status { margin: 0; font-weight: 700; }
.form-note { font-size: 1rem; color: var(--ink-soft); margin: 0; }

/* Mapa */
.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--celeste); }
@media (min-width: 48em) { .map { aspect-ratio: 16 / 10; } }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Canales de contacto */
.channel { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 72px; transition: border-color .2s, transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { a.channel:hover { border-color: #CFC6E8; color: var(--ink); transform: translateY(-2px); box-shadow: 0 14px 24px -16px rgba(43, 33, 96, .25); } }
a.channel { transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.channel .icon-badge { margin: 0; flex: none; }
.channel strong { display: block; }
.channel span { color: var(--ink-soft); overflow-wrap: anywhere; }

/* Página interior: encabezado */
.page-hero { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); position: relative; overflow: hidden; }
.page-hero .lead { margin-bottom: 0; }
.page-hero::after {
  content: ""; position: absolute; right: -6rem; top: -6rem; width: 18rem; height: 18rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 52%, var(--rosado-2) 53% 58%, transparent 59%, transparent 63%, var(--amarillo-2) 64% 69%, transparent 70%, transparent 74%, var(--verde-2) 75% 80%, transparent 81%);
  opacity: .55;
}
@media (min-width: 48em) { .page-hero::after { width: 26rem; height: 26rem; right: -8rem; top: -9rem; } }
.page-hero > .container { position: relative; z-index: 1; }

/* Llamado final */
.cta-band { text-align: center; padding: var(--s-7) var(--s-5); border-radius: var(--radius-lg); }
.cta-band .btn-row { justify-content: center; }
.cta-band .lead { margin-inline: auto; }

/* Cita / declaración */
.statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 1.2rem + 1vw, 2rem); line-height: 1.3; max-width: 46rem; margin: 0; }

/* Prosa larga */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-5); }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: var(--s-4); }
.prose li { margin-bottom: .4rem; }

/* Regla arcoíris */
.rainbow-rule { display: flex; height: 8px; }
.rainbow-rule span { flex: 1; }
.rainbow-rule span:nth-child(1) { background: var(--lila-2); } .rainbow-rule span:nth-child(2) { background: var(--celeste-2); }
.rainbow-rule span:nth-child(3) { background: var(--verde-2); } .rainbow-rule span:nth-child(4) { background: var(--amarillo-2); }
.rainbow-rule span:nth-child(5) { background: var(--rosado-2); }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: var(--section); padding-bottom: 6rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: var(--s-6); padding-block: var(--s-7) var(--s-5); }
@media (min-width: 56em) { .footer-grid { grid-template-columns: 1.2fr 1.3fr 1fr; } }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin-bottom: var(--s-2); }
.footer-note { color: #D9D4F5; }
.footer-title { font-family: var(--font-display); font-weight: 500; font-size: 1.125rem; margin-bottom: var(--s-3); color: #E4E0FA; }
.footer-links { list-style: none; columns: 2; column-gap: var(--s-5); }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; }
.footer-contact { list-style: none; display: grid; gap: var(--s-1); }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; }
.footer-contact .icon { width: 1.3rem; height: 1.3rem; }
.break { overflow-wrap: anywhere; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); padding-block: var(--s-4); color: #D9D4F5; }
.footer-bottom p { margin: 0; font-size: 1rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 56px; min-width: 56px; padding: 0 1.1rem 0 1rem; border-radius: 999px;
  background: var(--wa); color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(13, 99, 52, .6), 0 0 0 3px var(--cream);
  transition: transform .2s var(--ease), background-color .2s;
}
.wa-float:hover { background: var(--wa-hover); color: #fff; transform: translateY(-2px); }
.wa-float .icon { width: 1.75rem; height: 1.75rem; }
@media (max-width: 30em) { .wa-float { padding: 0; justify-content: center; } .wa-float-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Animación de entrada (sutil, respeta reducir movimiento) ---------- */
/* ---------- Tarjetas con enlace: toda la tarjeta es clickeable y se eleva 2px ---------- */
.card-link { transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.card-link .stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (hover: hover) and (pointer: fine) {
  .card-link:hover { transform: translateY(-2px); border-color: #CFC6E8; box-shadow: 0 14px 24px -16px rgba(43, 33, 96, .25); }
  .card-link:hover .link-arrow { background-size: calc(100% - 1.6rem) 2px; }
  .card-link:hover .link-arrow .icon { transform: translateX(3px); }
}
.card-link:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-link:focus-within :focus-visible { outline: none; }

/* ---------- Entrada del hero (una vez, al cargar) ---------- */
.m-enter [data-enter] h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.m-enter [data-enter] h1 .w > span { display: inline-block; transform: translateY(105%); }
.m-enter [data-enter] .enter-up { opacity: 0; transform: translateY(12px); }
.m-enter [data-enter] .hero-art { opacity: 0; transform: scale(.98); }
.m-entered [data-enter] h1 .w > span { transform: none; transition: transform .7s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms); }
.m-entered [data-enter] .enter-up, .m-entered [data-enter] .hero-art { opacity: 1; transform: none; transition: opacity .52s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms), transform .52s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms); }
.m-entered [data-enter] .hero-art { transition-duration: .9s; }
/* Respaldo: si el JS falla, todo se ve igual */
.m-enter-done:not(.m-entered) [data-enter] h1 .w > span,
.m-enter-done:not(.m-entered) [data-enter] .enter-up,
.m-enter-done:not(.m-entered) [data-enter] .hero-art { opacity: 1; transform: none; }

/* ---------- Momento: frase que se ilumina palabra por palabra al deslizar ---------- */
.moment { padding-block: clamp(5rem, 4rem + 8vw, 10rem); }
.moment-text {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(1.875rem, 1.2rem + 3.2vw, 4rem); line-height: 1.14; margin: 0; max-width: 62rem; text-wrap: balance;
}
.moment-text .mw { transition: color .25s linear; }
.js-moment .moment-text .mw { color: var(--moment-off, #C9C3DE); }
.js-moment .moment-text .mw.on { color: inherit; }
.bg-ink .moment-text .mw { --moment-off: #5D5490; }
.moment-text em { font-style: normal; }
.moment-text em, .js-moment .moment-text em .mw.on { background: linear-gradient(transparent 62%, var(--amarillo-2) 62% 92%, transparent 92%); }
.js-moment .moment-text em { background: none; }
.bg-ink .moment-text em, .bg-ink.moment .moment-text em .mw.on, .bg-ink .moment-text em .mw.on { background: none; color: var(--amarillo-2); }

/* ---------- Cierre tipográfico antes del pie ---------- */
.close-type { padding-block: var(--s-7) 0; }
.close-type p { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.25rem, 1.4rem + 4.5vw, 5.5rem); line-height: 1; letter-spacing: -.02em; margin: 0; color: #fff; }
.close-type p span { color: var(--amarillo-2); }

/* ---------- Banda oscura (índigo) ---------- */
.bg-ink .checks .icon { color: var(--amarillo-2); }
.bg-ink .eyebrow::before { opacity: .9; }
.bg-ink .price-card { border-color: transparent; }
.band-ink { border-radius: var(--radius-lg); margin-inline: .5rem; }
@media (min-width: 40em) { .band-ink { margin-inline: 1rem; } }

/* ---------- Deslizamiento suave (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
html.lenis { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .m-enter [data-enter] h1 .w > span, .m-enter [data-enter] .enter-up, .m-enter [data-enter] .hero-art { opacity: 1 !important; transform: none !important; }
  .js-moment .moment-text .mw { color: inherit; }
}

/* Utilidades */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.stack > * + * { margin-top: var(--s-4); }
.center { text-align: center; }
.bg-ink .price-card .eyebrow, .bg-ink .card .eyebrow { color: var(--ink-soft); }
.wa-float { transition: transform .2s var(--ease), background-color .2s, opacity .2s; }
.wa-float.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; }
.prize-list { padding-left: 1.4rem; margin-bottom: var(--s-4); columns: 2 14rem; column-gap: var(--s-5); }
.prize-list li { margin-bottom: .3rem; break-inside: avoid; }
