/* Capa viva de la página principal: movimiento autónomo y respuesta al scroll.
   No cambia contenido ni la compra; si este archivo falta, el sitio sigue igual. */

/* ── Barra de avance ── */
.avance { position: fixed; inset: 0 0 auto 0; z-index: 90; height: 3px; background: linear-gradient(90deg, var(--oliva), var(--lima)); transform: scaleX(var(--k, 0)); transform-origin: left; pointer-events: none; }

/* ── Red de fondo (canvas) ── */
.red { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cierre { position: relative; overflow: hidden; }
.cierre .wrap { position: relative; }

/* ── Titular: entra palabra por palabra ── */
.vivo .inicio h1 .pal { display: inline-block; opacity: 0; transform: translateY(0.5em); filter: blur(6px); animation: palabra 0.9s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes palabra { to { opacity: 1; transform: none; filter: none; } }

/* ── Retrato: un arco fino y un punto recorren el aro, despacio ── */
.plato { animation-duration: 90s; }
.arco { position: absolute; inset: -12.5%; color: var(--verde-medio); animation: girar 26s linear infinite; pointer-events: none; }
.retrato img { animation: respirar 7s ease-in-out infinite; }
@keyframes respirar {
  0%, 100% { box-shadow: 0 30px 60px -30px rgba(30, 59, 47, 0.45), 0 0 0 0 rgba(110, 140, 58, 0); }
  50% { box-shadow: 0 30px 60px -30px rgba(30, 59, 47, 0.45), 0 0 0 10px rgba(110, 140, 58, 0.1); }
}

/* ── Pulso: una señal recorre la base del inicio ── */
.pulso { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none; }
.pulso svg { display: block; width: 100%; height: 100%; }
.pulso path { stroke: var(--oliva); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0.22; }
.pulso .pulso-vivo { opacity: 1; stroke: var(--verde-medio); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 70 930; stroke-dashoffset: 1000; animation: senal 7s linear infinite; filter: drop-shadow(0 0 3px rgba(110, 140, 58, 0.55)); }
@keyframes senal { to { stroke-dashoffset: 0; } }

/* ── Aparición al hacer scroll ── */
.vivo [data-ver] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease) calc(var(--i, 0) * 80ms), transform 0.8s var(--ease) calc(var(--i, 0) * 80ms); }
.vivo [data-ver].visto { opacity: 1; transform: none; }
.vivo .programa[data-ver] { transform: translateY(26px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.vivo .programa[data-ver].visto { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.vivo .programa[data-ver].visto.listo { transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease); }

/* ── Programas: luz que sigue al puntero y borde vivo en el recomendado ── */
.programas { perspective: 1300px; }
.programa { position: relative; isolation: isolate; }
.programa::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, -30%), rgba(223, 233, 174, 0.55), transparent 62%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.programa:hover::after { opacity: 1; }
.programa.destacado::after { background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, -30%), rgba(223, 233, 174, 0.22), transparent 62%); }
.programa.destacado::before { content: ""; position: absolute; inset: -2px; z-index: -2; border-radius: inherit; background: conic-gradient(from var(--giro, 0deg), transparent 0 62%, var(--lima) 78%, #fff 84%, var(--lima) 90%, transparent 100%); padding: 3px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; filter: blur(1px); pointer-events: none; }
.programa.destacado { background-clip: padding-box; }
.sello { animation: sello 2.8s ease-in-out infinite; }
@keyframes sello { 0%, 100% { box-shadow: 0 0 0 0 rgba(223, 233, 174, 0.55); } 55% { box-shadow: 0 0 0 9px rgba(223, 233, 174, 0); } }

/* ── Botones principales: un destello los recorre ── */
.btn:not(.btn-linea):not(.btn-peligro) { position: relative; overflow: hidden; }
.btn:not(.btn-linea):not(.btn-peligro)::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent); transform: translateX(-160%) skewX(-18deg); animation: destello 9s ease-in-out infinite; pointer-events: none; }
.btn-claro:not(.btn-linea)::after { background: linear-gradient(100deg, transparent, rgba(110, 140, 58, 0.28), transparent); }
@keyframes destello { 0%, 80% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(300%) skewX(-18deg); } }

/* ── Cómo funciona: los pasos se encienden conforme avanzas ── */
.vivo .pasos li::before { transition: background 0.5s var(--ease), color 0.5s, box-shadow 0.5s, transform 0.5s var(--ease); }
.vivo .pasos li.hecho::before { background: var(--verde); border-color: var(--verde); color: #fff; box-shadow: 0 0 0 6px rgba(110, 140, 58, 0.16), 0 0 22px rgba(110, 140, 58, 0.55); transform: scale(1.06); }
.vivo .pasos li::after { transition: opacity 0.5s, border-color 0.5s; }
.vivo .pasos li.hecho::after { opacity: 1; border-color: var(--verde-medio); border-top-style: solid; }
.vivo .pasos li b, .vivo .pasos li { transition: color 0.5s; }

/* ── Halo que acompaña al puntero (solo con mouse) ── */
.halo { position: fixed; left: -11rem; top: -11rem; z-index: 0; width: 22rem; height: 22rem; border-radius: 50%; background: radial-gradient(circle, rgba(207, 237, 231, 0.55), transparent 65%); mix-blend-mode: multiply; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.halo.activo { opacity: 1; }

@media (max-width: 960px) {
  .vivo .pasos li.hecho::after { border-top-style: none; border-left-style: solid; }
}

/* Con «reducir movimiento»: se detiene lo que gira o se desplaza; quedan los pulsos y las apariciones suaves */
@media (prefers-reduced-motion: reduce) {
  .arco, .retrato img, .btn::after, .pulso .pulso-vivo { animation: none !important; }
  .vivo [data-ver] { transform: none; }
  .vivo .inicio h1 .pal { animation-duration: 0.01s; }
}

/* ── Títulos de sección: una línea fina se traza al aparecer ── */
.vivo .seccion .intro h2, .vivo .seccion .wrap > h2 { position: relative; padding-bottom: 1.1rem; }
.vivo .seccion .intro h2::after, .vivo .seccion .wrap > h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.2rem; height: 2px; background: var(--oliva); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) 0.35s; }
.vivo .seccion [data-ver].visto h2::after, .vivo .seccion h2[data-ver].visto::after { transform: scaleX(1); }
.vivo .cierre h2 { padding-bottom: 0; }
.vivo .cierre h2::after { display: none; }

/* ── Rendimiento ── */
.fuera, .fuera * , .fuera *::before, .fuera *::after { animation-play-state: paused !important; }

/* Modo ligero (táctil o pantalla angosta): mismo diseño, sin los efectos que más trabajo le dan al teléfono */
.ligero .acuarela { filter: blur(24px); }
.ligero .acuarela i { animation: none; }
.ligero .cabecera { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(246, 242, 233, 0.97); }
.ligero .inicio h1 .pal { filter: none; }
.ligero .pulso .pulso-vivo { filter: none; }
.ligero .retrato img, .ligero .sello { animation: none; }
.ligero .btn:not(.btn-linea):not(.btn-peligro)::after { display: none; }
.ligero .programa.destacado::before { display: none; }
.ligero .programa.destacado { box-shadow: 0 0 0 2px var(--lima), 0 30px 60px -34px rgba(30, 59, 47, 0.6); }
.ligero .halo { display: none; }

/* ── Diseño sobrio (22-nov-2026): sin acuarela ni adornos en movimiento. Una foto, un titular, la credencial y el botón. ── */
h1 { font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; }
h2 { font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0; }
h3, .marca b, .datos b, .retrato figcaption b, .precio b { font-variation-settings: "SOFT" 0, "WONK" 0; }
.inicio { background: var(--marfil); border-bottom: 1px solid var(--linea); }
.lema { font: 600 0.95rem/1.4 var(--sans); letter-spacing: 0.01em; color: var(--verde-medio); }
.vivo .inicio h1 .pal { filter: none; transform: translateY(0.25em); animation-duration: 0.6s; }
.retrato::before { content: ""; position: absolute; inset: -5%; border: 1px solid rgba(30, 59, 47, 0.22); border-radius: 50%; }
.retrato img { animation: none; box-shadow: 0 24px 50px -30px rgba(30, 59, 47, 0.5); }
.retrato figcaption { border: 1px solid var(--linea); border-radius: 0.4rem; box-shadow: none; max-width: 15rem; }
.sello { animation: none; }
.btn:not(.btn-linea):not(.btn-peligro)::after { display: none; }
.programa.destacado::before { display: none; }
.programa.destacado, .ligero .programa.destacado { box-shadow: 0 30px 60px -36px rgba(30, 59, 47, 0.6); }
.programa { transform: none !important; }
.inicio { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
