/* =============================================================================
   Portada: la página de venta, con movimiento.
   Va aparte de estilo.css (que comparten todas las páginas) para no tocar "Mi cuenta".
   Todo lo que se mueve se para si el sistema pide menos movimiento (al final del archivo).
   ============================================================================= */

.pagina-portada { background: #f5f8fc; }
.centrado { text-align: center; margin-left: auto; margin-right: auto; }
.sobretitulo {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--azul); margin-bottom: 10px;
}

/* --- Barra de lectura --- */
.progreso-lectura {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, #4dabf7, #69db7c, #f0b429, #ff6b6b);
}

/* --- Barra de arriba: transparente sobre la portada, sólida al bajar --- */
.nav-portada { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent;
               backdrop-filter: none; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.nav-portada .marca, .nav-portada nav a { color: #ffffff; }
.nav-portada.solida { background: rgba(255, 255, 255, 0.9); border-bottom-color: var(--borde); backdrop-filter: blur(14px); }
.nav-portada.solida .marca { color: var(--texto); }
.nav-portada.solida nav a { color: var(--texto-suave); }
.boton-nav { padding: 9px 18px; font-size: 14px; margin-left: 8px; }
/* Entrar / Mi cuenta: en el móvil el menú se esconde, así que este botón se queda siempre a mano */
.boton-cuenta { display: none; padding: 8px 16px; font-size: 14px; margin-left: auto; color: #ffffff;
                border: 1px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.08); }
.boton-cuenta:hover { text-decoration: none; background: rgba(255, 255, 255, 0.16); }
.nav-portada.solida .boton-cuenta { color: var(--texto); border-color: var(--borde); background: #ffffff; }

/* --- Botones extra --- */
.boton-grande { padding: 16px 30px; font-size: 17px; }
.boton-cristal { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.45); color: #ffffff;
                 backdrop-filter: blur(6px); }
/* Un destello que recorre el botón de compra cada pocos segundos. */
.boton-brillo { position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(29, 111, 208, 0.45);
                animation: latido 2.8s ease-in-out infinite; }
.boton-brillo::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg); animation: destello 3.5s ease-in-out infinite;
}
@keyframes destello { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes latido { 0%, 100% { box-shadow: 0 10px 30px rgba(29, 111, 208, 0.45); }
                    50% { box-shadow: 0 12px 42px rgba(29, 111, 208, 0.75); } }

/* =============================================================================
   PORTADA (héroe)
   ============================================================================= */
.heroe { position: relative; min-height: 100vh; padding: 140px 0 160px; overflow: hidden; color: #ffffff;
         display: flex; align-items: center; }
.heroe-fondo { position: absolute; inset: 0; }
/* Las capturas van pasando con un zoom lento (efecto Ken Burns) y fundido entre ellas. */
.heroe-fondo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
                   transform: scale(1.08); transition: opacity 1.6s ease; }
.heroe-fondo img.activa { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.18) translate(1.5%, 1%); } to { transform: scale(1.04) translate(0, 0); } }
.heroe-velo { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.72) 0%, rgba(8, 14, 28, 0.45) 45%, rgba(8, 14, 28, 0.85) 100%),
              radial-gradient(60% 50% at 20% 40%, rgba(29, 111, 208, 0.35), transparent 70%); }
.heroe-contenido { position: relative; z-index: 2; max-width: 900px; }
.heroe h1 { color: #ffffff; font-size: clamp(40px, 6.4vw, 78px); font-weight: 800; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35); }
.degradado { background: linear-gradient(90deg, #ffd43b, #ff8787, #74c0fc, #ffd43b); background-size: 300% 100%;
             -webkit-background-clip: text; background-clip: text; color: transparent; animation: arcoiris 8s linear infinite; }
@keyframes arcoiris { to { background-position: 300% 0; } }
.heroe-texto { font-size: clamp(18px, 2.1vw, 23px); color: rgba(255, 255, 255, 0.9); max-width: 680px; }
.heroe-nota { font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.etiqueta-clara { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); color: #ffffff;
                  backdrop-filter: blur(6px); }
.punto-vivo { width: 8px; height: 8px; border-radius: 50%; background: #69db7c; box-shadow: 0 0 0 0 rgba(105, 219, 124, 0.7);
              animation: pulso 1.8s infinite; display: inline-block; }
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(105, 219, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(105, 219, 124, 0); } }

/* Palabra que va cambiando: "montañas rusas" → "norias" → ... */
.palabra-rotativa { display: inline-block; position: relative; color: #ffd43b; font-weight: 700; min-width: 4ch; }
.palabra-rotativa span { display: inline-block; animation: entra .5s ease both; }
.palabra-rotativa span.sale { animation: sale .35s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(60%) rotateX(-60deg); } to { opacity: 1; transform: none; } }
@keyframes sale { to { opacity: 0; transform: translateY(-60%) rotateX(60deg); } }

/* Globos que suben */
.globos span { position: absolute; bottom: -120px; left: var(--x); width: 34px; height: 42px; border-radius: 50% 50% 48% 48%;
               background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.7), transparent 30%), var(--c);
               opacity: 0.85; z-index: 1; animation: subir var(--t) linear var(--d) infinite; }
.globos span::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 46px; background: rgba(255, 255, 255, 0.5); }
@keyframes subir { 0% { transform: translate(0, 0) rotate(-4deg); } 25% { transform: translate(18px, -30vh) rotate(4deg); }
                   50% { transform: translate(-12px, -60vh) rotate(-3deg); } 100% { transform: translate(10px, -125vh) rotate(3deg); } }

/* La vía con el tren */
.heroe-via { position: absolute; left: 0; right: 0; bottom: 30px; width: 100%; height: 160px; z-index: 1; }
.tren { position: absolute; left: 0; top: 0; z-index: 2; display: flex; gap: 3px;
        offset-path: path("M-40 170 C 120 170, 160 60, 260 60 S 400 190, 520 150 S 640 20, 760 40 S 900 200, 1020 160 S 1160 60, 1260 80 S 1400 170, 1500 170");
        offset-rotate: auto; animation: recorrido 9s cubic-bezier(.55, .1, .45, .9) infinite; }
.tren i { width: 20px; height: 11px; border-radius: 4px 4px 2px 2px; background: #ff6b6b; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
.tren i:nth-child(2) { background: #f0b429; } .tren i:nth-child(3) { background: #4dabf7; } .tren i:nth-child(4) { background: #69db7c; }
@keyframes recorrido { from { offset-distance: 0%; } to { offset-distance: 100%; } }
/* El dibujo de la vía se estira al ancho de la ventana, pero el recorrido del tren no:
   se ajusta con la misma escala desde el JavaScript (variable --escala-via). */
.tren { transform-origin: 0 0; }
.heroe .tren-capa { position: absolute; left: 0; right: 0; bottom: 30px; height: 160px; pointer-events: none; }

.bajar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; width: 28px; height: 44px;
         border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 16px; }
.bajar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
              background: #ffffff; animation: rueda 1.6s ease-in-out infinite; }
@keyframes rueda { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* =============================================================================
   CINTA de novedades
   ============================================================================= */
.cinta { overflow: hidden; background: linear-gradient(90deg, #1d6fd0, #7048e8, #d6336c, #f08c00); padding: 16px 0;
         transform: rotate(-1.2deg) scale(1.03); margin: -18px 0 0; position: relative; z-index: 3; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.cinta-pista { display: flex; gap: 46px; width: max-content; animation: deslizar 38s linear infinite; }
.cinta span { color: #ffffff; font-weight: 700; font-size: 17px; white-space: nowrap; }
@keyframes deslizar { to { transform: translateX(-50%); } }

/* =============================================================================
   CIFRAS
   ============================================================================= */
.cifras { padding: 64px 0 24px; }
.rejilla-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.cifra { text-align: center; padding: 26px 18px; border-radius: 20px; background: #ffffff; border: 1px solid var(--borde);
         box-shadow: 0 8px 24px rgba(22, 40, 70, 0.06); }
.cifra b { display: block; font-size: clamp(38px, 4.5vw, 54px); font-weight: 800; letter-spacing: -0.03em;
           background: linear-gradient(135deg, #1d6fd0, #7048e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cifra span { color: var(--texto-suave); font-size: 15px; }

/* =============================================================================
   DESTACADOS (imagen + texto, alternados)
   ============================================================================= */
.destacado { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; margin: 0 0 96px; }
.destacado-invertido .destacado-imagen { order: 2; }
.destacado-imagen { border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px rgba(22, 40, 70, 0.22);
                    transform-style: preserve-3d; transition: transform .25s ease; will-change: transform; }
.destacado-imagen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s ease; }
.destacado-imagen:hover img { transform: scale(1.06); }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
        background: rgba(29, 111, 208, 0.1); color: var(--azul); margin-bottom: 14px; }
.destacado-texto h3 { font-size: clamp(24px, 2.6vw, 34px); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding: 7px 0 7px 32px; position: relative; color: #3d4d63; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%;
                    background: rgba(31, 157, 85, 0.14); color: var(--verde); font-weight: 800; font-size: 13px;
                    display: grid; place-items: center; }

/* Apariciones con dirección */
.con-animaciones .aparece.desde-izquierda { transform: translateX(-60px); }
.con-animaciones .aparece.desde-derecha { transform: translateX(60px); }
.con-animaciones .aparece.desde-izquierda.visible, .con-animaciones .aparece.desde-derecha.visible { transform: none; }
.con-animaciones .aparece { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }

/* =============================================================================
   TARJETAS
   ============================================================================= */
.tarjetas-seccion { background: linear-gradient(180deg, #f5f8fc, #eaf1fb); }
.tarjeta-viva { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tarjeta-viva:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(22, 40, 70, 0.14); border-color: rgba(29, 111, 208, 0.4); }
.tarjeta-viva:hover .tarjeta-icono { animation: saltito .6s ease; }
@keyframes saltito { 30% { transform: translateY(-8px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } 100% { transform: none; } }
.tarjeta-viva .tarjeta-icono { background: linear-gradient(135deg, rgba(29, 111, 208, 0.12), rgba(112, 72, 232, 0.16)); }

/* =============================================================================
   GALERÍA: carrusel infinito
   ============================================================================= */
.galeria-seccion { background: #0f1724; color: #ffffff; overflow: hidden; }
.galeria-seccion h2 { color: #ffffff; }
.galeria-seccion .lead { color: rgba(255, 255, 255, 0.75); }
.galeria-seccion .sobretitulo { color: #74c0fc; }
.carrusel { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.carrusel-pista { display: flex; gap: 22px; width: max-content; animation: deslizar 60s linear infinite; padding: 12px 0 18px; }
.carrusel:hover .carrusel-pista { animation-play-state: paused; }
.carrusel figure { margin: 0; width: min(560px, 78vw); border-radius: 18px; overflow: hidden; cursor: zoom-in; flex: none;
                   background: #18233a; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); transition: transform .3s ease; }
.carrusel figure:hover { transform: translateY(-6px) scale(1.02); }
.carrusel img { aspect-ratio: 16 / 9; object-fit: cover; }
.carrusel figcaption { padding: 12px 16px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }

/* =============================================================================
   PASOS
   ============================================================================= */
.pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px;
         position: relative; counter-reset: paso; }
.pasos li { text-align: center; padding: 30px 22px; background: #ffffff; border: 1px solid var(--borde); border-radius: 20px; position: relative; }
.pasos li:nth-child(2) { transition-delay: .15s; } .pasos li:nth-child(3) { transition-delay: .3s; }
.paso-numero { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
               font-size: 24px; font-weight: 800; color: #ffffff; background: linear-gradient(135deg, #1d6fd0, #7048e8);
               box-shadow: 0 10px 24px rgba(112, 72, 232, 0.35); }
.pasos li.visible .paso-numero { animation: aparecerNumero .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes aparecerNumero { from { transform: scale(0) rotate(-90deg); } to { transform: none; } }

/* =============================================================================
   PRECIO, con borde de colores girando
   ============================================================================= */
.precio-seccion { background: radial-gradient(60% 60% at 50% 30%, rgba(112, 72, 232, 0.10), transparent 70%); }
.precio-marco { position: relative; max-width: 480px; margin: 0 auto; padding: 3px; border-radius: 26px; overflow: hidden; }
.precio-marco::before { content: ''; position: absolute; inset: -60%;
  background: conic-gradient(#1d6fd0, #7048e8, #d6336c, #f0b429, #2f9e44, #1d6fd0); animation: girar 6s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.precio-marco .precio-caja { position: relative; max-width: none; border: none; border-radius: 23px; background: #ffffff; }
.precio-pie { margin-top: 14px; font-size: 13px; }
/* Los dos planes, uno al lado del otro (el anual con el borde de colores). */
.planes-portada { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px;
                  max-width: 900px; margin: 0 auto; align-items: center; }
.plan-portada { padding: 34px 30px; border: 1px solid var(--borde); border-radius: 24px; background: #ffffff; text-align: center;
                box-shadow: 0 10px 28px rgba(22, 40, 70, 0.08); }
.planes-portada .precio-marco { max-width: none; margin: 0; }
.planes-portada .precio-caja { padding: 40px 30px; }
.planes-portada .precio-numero { font-size: 52px; }
.planes-portada p { font-size: 15px; }

/* =============================================================================
   LLAMADA FINAL con fuegos artificiales
   ============================================================================= */
.final { position: relative; overflow: hidden; color: #ffffff; padding: 110px 0;
         background: radial-gradient(70% 90% at 50% 100%, #3b2a7a, #0f1724 70%); }
.final h2 { color: #ffffff; font-size: clamp(30px, 4.4vw, 52px); }
.final .lead { color: rgba(255, 255, 255, 0.8); margin-bottom: 30px; }
.final .contenedor { position: relative; z-index: 2; }
.fuegos i { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0;
            box-shadow: 0 -60px #ffd43b, 42px -42px #ff8787, 60px 0 #74c0fc, 42px 42px #69db7c,
                        0 60px #da77f2, -42px 42px #ffd43b, -60px 0 #ff8787, -42px -42px #74c0fc;
            animation: explotar 3.2s ease-out infinite; }
.fuegos i:nth-child(1) { left: 14%; top: 30%; animation-delay: 0s; }
.fuegos i:nth-child(2) { left: 82%; top: 26%; animation-delay: .8s; }
.fuegos i:nth-child(3) { left: 30%; top: 70%; animation-delay: 1.6s; }
.fuegos i:nth-child(4) { left: 70%; top: 66%; animation-delay: 2.2s; }
.fuegos i:nth-child(5) { left: 50%; top: 18%; animation-delay: 2.8s; }
@keyframes explotar { 0% { transform: scale(0.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* =============================================================================
   Botón de compra fijo (solo en el móvil)
   ============================================================================= */
.compra-fija { display: none; }
@media (max-width: 760px) {
  .compra-fija { display: block; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 70; text-align: center;
                 padding: 15px; border-radius: 999px; font-weight: 700; color: #ffffff;
                 background: linear-gradient(135deg, #1d6fd0, #7048e8); box-shadow: 0 12px 30px rgba(29, 111, 208, 0.45);
                 transform: translateY(120%); transition: transform .3s ease; }
  .compra-fija.visible { transform: none; }
  .compra-fija:hover { text-decoration: none; }
  .destacado { grid-template-columns: 1fr; gap: 26px; margin-bottom: 64px; }
  .destacado-invertido .destacado-imagen { order: 0; }
  .boton-nav { display: none; }
  .boton-cuenta { display: inline-block; white-space: nowrap; flex-shrink: 0; }
  .nav-portada .marca { min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .heroe { padding: 120px 0 150px; }
  .heroe-via { height: 110px; }
  footer { padding-bottom: 90px; }
}

/* Menos movimiento si el sistema lo pide */
@media (prefers-reduced-motion: reduce) {
  .heroe-fondo img.activa, .globos span, .tren, .cinta-pista, .carrusel-pista, .degradado, .boton-brillo,
  .boton-brillo::after, .precio-marco::before, .fuegos i, .bajar span, .punto-vivo { animation: none !important; }
  .fuegos, .globos, .tren { display: none; }
}

/* El precio en grande dentro de su caja (el "IVA incluido" de al lado va pequeño). */
.precio-numero .precio-texto, .precio-numero .precio-anual { font-size: inherit; color: inherit; font-weight: inherit; }
/* La cinta va inclinada y un poco más ancha que la pantalla: que no salga barra de lado. */
html:has(.pagina-portada), .pagina-portada { overflow-x: clip; }
