:root {
  color-scheme: dark;
  /* Una sola paleta para toda la web: noche índigo con mango de acento. */
  --noche: #14163a; --noche-alta: #191c47; --superficie: #1d2152; --hundido: rgba(20, 22, 58, .6);
  --indigo: #5b5ff0; --bruma: #93a8e0; --mango: #ffb547; --papel: #ffffff; --tinta: #1d2040; --wa: #25d366;
  --fondo: var(--noche);
  --texto: #eef0ff;
  --suave: #a9b8e6;
  --borde: rgba(147, 168, 224, .18);
  --marca: var(--mango);
  --marca-2: #ffd98f;
  --marca-tenue: rgba(255, 181, 71, .14);
  --error: #ff9a9e;
  --radio: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 17px/1.65 "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
main.centrada { display: grid; place-items: center; }
/* Las páginas interiores comparten el resplandor que deriva en la portada. */
body:not(.inicio)::before {
  content: ""; position: fixed; inset: -20% -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 78% 22%, rgba(91, 95, 240, .42), transparent 70%),
    radial-gradient(30% 40% at 12% 80%, rgba(255, 181, 71, .12), transparent 70%),
    radial-gradient(35% 45% at 40% 6%, rgba(147, 168, 224, .16), transparent 70%);
  animation: deriva 18s ease-in-out infinite alternate;
}
@keyframes deriva { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
@keyframes aparecer { to { opacity: 1; } }
@keyframes entrar { from { opacity: 0; transform: translateY(26px); } }
a { color: var(--marca); }
.contenedor { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.barra { border-bottom: 1px solid var(--borde); background: rgba(20, 22, 58, .72); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 3; }
header.barra .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); font-weight: 700; font-size: 1.15rem; }
.marca img { width: 34px; height: 34px; border-radius: 9px; }
nav.menu { display: flex; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
nav.menu a { position: relative; padding: 6px 0; color: var(--bruma); text-decoration: none; transition: color .2s; }
nav.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--mango); transform: scaleX(0); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
nav.menu a:hover, nav.menu a[aria-current] { color: #fff; }
nav.menu a[aria-current]::after { transform: scaleX(1); }
.heroe { padding: 72px 0 48px; }
.heroe h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 800; line-height: 1.02; margin: 0 0 18px; letter-spacing: -.035em; animation: entrar .9s cubic-bezier(.2, .8, .2, 1) both; }
.heroe h1 span { background: linear-gradient(120deg, var(--mango), var(--marca-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heroe p { font-size: 1.15rem; color: var(--suave); max-width: 640px; margin: 0; animation: entrar .9s .15s cubic-bezier(.2, .8, .2, 1) both; }
/* Botones: los mismos en todas las páginas. */
.boton, .cta, .boton-plan { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border: 0; border-radius: 12px; font: 600 1rem "Instrument Sans", sans-serif; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.boton.principal, .cta, .boton-plan { background: var(--mango); color: #2a1a00; box-shadow: 0 10px 30px -10px rgba(255, 181, 71, .7); }
.boton.principal:hover, .cta:hover, .boton-plan:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(255, 181, 71, .85); }
.boton-plan:disabled { opacity: .6; cursor: progress; }
.boton.secundario { color: #fff; border: 1px solid rgba(147, 168, 224, .35); }
.boton.secundario:hover { background: rgba(147, 168, 224, .12); }
.cta { margin-top: 12px; }
.acciones-pagina { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding-bottom: 32px; }
.tarjeta { background: linear-gradient(160deg, var(--superficie), var(--noche-alta)); border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; }
.tarjeta h2, .tarjeta h3 { margin: 0 0 8px; font-size: 1.15rem; }
.tarjeta p { margin: 0; color: var(--suave); font-size: .97rem; }
.etiqueta { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--marca); background: var(--marca-tenue); padding: 3px 10px; border-radius: 99px; margin-bottom: 12px; }
section.bloque { padding: 24px 0 40px; }
section.bloque > h2 { font-size: 1.6rem; margin: 0 0 16px; }
.nube { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.nube .tarjeta { flex: 1 1 300px; }
ul.lista { margin: 8px 0 0; padding-left: 20px; color: var(--suave); }
.documento { width: 100%; background: linear-gradient(160deg, var(--superficie), var(--noche-alta)); border: 1px solid var(--borde); border-radius: 28px; padding: clamp(22px, 4vw, 48px); margin: 40px auto 56px; max-width: 820px; animation: entrar .8s cubic-bezier(.2, .8, .2, 1) both; }
.error { color: var(--error); }
.documento h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 800; line-height: 1.05; margin: 0 0 10px; letter-spacing: -.03em; }
.documento .fecha { color: var(--suave); margin: 0 0 28px; font-size: .95rem; }
.documento h2 { font-size: 1.22rem; margin: 34px 0 10px; }
.documento p, .documento li { color: #dfe4ff; }
.documento .aviso { background: var(--marca-tenue); border-left: 4px solid var(--marca); padding: 14px 18px; border-radius: 8px; margin: 18px 0; }
footer.pie { border-top: 1px solid var(--borde); padding: 28px 0 40px; color: var(--bruma); font-size: .92rem; }
footer.pie .contenedor { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.pie a { color: var(--bruma); }

/* Toque de mano: subrayado que se dibuja solo y notas escritas al margen. */
.trazo { position: relative; display: inline-block; white-space: nowrap; }
.trazo svg { position: absolute; left: -2%; bottom: -.17em; width: 104%; height: .2em; overflow: visible; fill: none; stroke: var(--mango); stroke-width: 3; stroke-linecap: round; }
.trazo path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dibujar .9s .9s ease-out forwards; }
@keyframes dibujar { to { stroke-dashoffset: 0; } }
.nota-mano { display: inline-block; margin: 14px 0 0; font: 600 1.45rem/1.15 "Caveat", cursive; color: var(--mango) !important; transform: rotate(-1.6deg); transform-origin: left center; }
.nota-mano a { color: inherit; }
.nota-mano span { display: block; margin-top: 2px; text-align: right; }

/* Menú desplegable en móvil */
.menu-boton { display: none; width: 44px; height: 44px; margin-right: -8px; padding: 0; place-items: center; background: transparent; border: 0; border-radius: 10px; color: #fff; cursor: pointer; }
.menu-boton span, .menu-boton span::before, .menu-boton span::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, background .2s; }
.menu-boton span { position: relative; }
.menu-boton span::before, .menu-boton span::after { content: ""; position: absolute; left: 0; }
.menu-boton span::before { transform: translateY(-7px); }
.menu-boton span::after { transform: translateY(7px); }
.menu-boton[aria-expanded="true"] span { background: transparent; }
.menu-boton[aria-expanded="true"] span::before { background: #fff; transform: rotate(45deg); }
.menu-boton[aria-expanded="true"] span::after { background: #fff; transform: rotate(-45deg); }
@media (max-width: 820px) {
  .menu-boton { display: grid; }
  nav.menu.desplegable { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 6px 20px 14px; background: var(--noche); border-bottom: 1px solid var(--borde); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .7); font-size: 1.05rem; }
  nav.menu.desplegable.abierto { display: flex; animation: entrar .25s cubic-bezier(.2, .8, .2, 1); }
  nav.menu.desplegable a { padding: 12px 0; border-bottom: 1px solid var(--borde); }
  nav.menu.desplegable a:last-child { border-bottom: 0; }
  nav.menu.desplegable a::after { display: none; }
  nav.menu.desplegable a[aria-current] { color: var(--mango); font-weight: 600; }
}

/* WhatsApp flotante */
.wa-flotante { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wa-flotante svg { width: 60px; height: 60px; padding: 13px; box-sizing: border-box; border-radius: 50%; background: var(--wa); color: #fff; animation: latir-wa 2.6s ease-in-out infinite; }
.wa-flotante .wa-globo { background: #fff; color: #0f3d26; font-weight: 600; padding: 8px 14px; border-radius: 14px 14px 4px 14px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .4); opacity: 0; transform: translateX(10px); animation: globo 8s 2.5s ease-in-out infinite; }
.wa-flotante:hover .wa-globo, .wa-flotante:focus-visible .wa-globo { opacity: 1; transform: none; animation: none; }
@keyframes latir-wa { 0%, 100% { box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45), 0 0 0 0 rgba(37, 211, 102, .55); } 50% { box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45), 0 0 0 14px rgba(37, 211, 102, 0); } }
@keyframes globo { 0%, 8% { opacity: 0; transform: translateX(10px); } 14%, 50% { opacity: 1; transform: none; } 58%, 100% { opacity: 0; transform: translateX(10px); } }
@media (max-width: 860px) {
  .wa-flotante { right: 14px; bottom: 14px; }
  .wa-flotante .wa-globo { display: none; }
  .wa-flotante svg { width: 54px; height: 54px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

h1, h2, h3, .marca { font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif; }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 600px) {
  header.barra .contenedor { min-height: 56px; flex-wrap: nowrap; }
  nav.menu { gap: 14px; font-size: .88rem; }
  nav.menu:not(.desplegable) { flex-wrap: nowrap; }
  nav.menu:not(.desplegable) a[href^="/#"], nav.menu:not(.desplegable) a[href^="#"], nav.menu:not(.desplegable) a[href="/privacidad/"] { display: none; }
}
