/*
 * Estilos propios de /lp/terror. Se cargan solo en esa landing (slot `head`
 * de la vista) y todo va acotado a .lp--terror para no tocar el resto del
 * sitio. Los colores salen de las variables del landing (--accent-color,
 * --body-background…), así que cambiar el acento en el admin recolorea
 * niebla, divisores y botones.
 */

/* ------------------------------------------------------------------
 * Tipografía: serif itálica en los títulos de sección
 * ------------------------------------------------------------------ */

.lp--terror {
    --lp-serif: 'Alegreya', Georgia, 'Times New Roman', serif;
}

.lp--terror .lpTitle {
    font-family: var(--lp-serif);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.lp--terror .lpEyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.lp--terror .lpEyebrow::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color));
}

/* ------------------------------------------------------------------
 * Grano: un SVG feTurbulence fijo sobre toda la landing
 * ------------------------------------------------------------------ */

.lp--terror {
    position: relative;
}

.lp--terror::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ------------------------------------------------------------------
 * Hero: viñeta y niebla baja
 * ------------------------------------------------------------------ */

.lp--terror .lpHero {
    position: relative;
}

.lp--terror .lpHero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 20%, transparent 50%, var(--body-background) 100%),
        linear-gradient(180deg, transparent 70%, var(--body-background) 100%);
}

.lp--terror .lpFog {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -30%;
    height: 22rem;
    z-index: 6;
    pointer-events: none;
    overflow: hidden;
}

.lp--terror .lpFog span {
    position: absolute;
    inset: 0;
    background-color: var(--accent-color);
    opacity: 0.1;
    -webkit-mask-image: radial-gradient(55% 38% at 30% 62%, #000 0%, transparent 68%),
        radial-gradient(45% 42% at 75% 60%, #000 0%, transparent 68%);
    mask-image: radial-gradient(55% 38% at 30% 62%, #000 0%, transparent 68%),
        radial-gradient(45% 42% at 75% 60%, #000 0%, transparent 68%);
    animation: lpFogDrift 4s ease-in-out infinite alternate;
}

.lp--terror .lpFog span:nth-child(2) {
    opacity: 0.05;
    -webkit-mask-image: radial-gradient(40% 40% at 55% 66%, #000 0%, transparent 68%),
        radial-gradient(32% 34% at 10% 58%, #000 0%, transparent 68%);
    mask-image: radial-gradient(40% 40% at 55% 66%, #000 0%, transparent 68%),
        radial-gradient(32% 34% at 10% 58%, #000 0%, transparent 68%);
    animation-duration: 64s;
    animation-direction: alternate-reverse;
}

@keyframes lpFogDrift {
    from { transform: translateX(-4%) scaleY(1); }
    to { transform: translateX(4%) scaleY(1.12); }
}

/* ------------------------------------------------------------------
 * Secciones: fondos alternados y borde rasgado
 * ------------------------------------------------------------------ */

.lp--terror .lpSection {
    position: relative;
    padding-block: 5rem;
}

.lp--terror .lpSection--light {
    background: linear-gradient(180deg, var(--body-background-light) 0%, var(--body-background) 100%);
}

/* Borde rasgado: la forma la da el SVG (máscara), el color el fondo claro. */
.lp--terror .lpSection--light::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -1.75rem;
    height: 1.8rem;
    pointer-events: none;
    background-color: var(--body-background-light);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24 L0 18 L14 12 L31 19 L52 8 L70 17 L88 11 L104 20 L126 6 L147 16 L162 10 L184 21 L203 9 L222 18 L240 12 L258 22 L279 7 L296 15 L315 11 L336 19 L352 6 L371 16 L388 10 L400 17 L400 24 Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24 L0 18 L14 12 L31 19 L52 8 L70 17 L88 11 L104 20 L126 6 L147 16 L162 10 L184 21 L203 9 L222 18 L240 12 L258 22 L279 7 L296 15 L315 11 L336 19 L352 6 L371 16 L388 10 L400 17 L400 24 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}


/* ------------------------------------------------------------------
 * Botones del hero
 * ------------------------------------------------------------------ */

.lp--terror .mrButton--primary{
    position: relative;
    box-shadow:
        0 4px 15px rgba(11, 48, 121, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3) !important; /* Efecto 3D sutil */

    &::before{
        position: absolute;
        inset: 0;
        transition: inherit;
        background: linear-gradient(15deg, rgba(0,0,0,0.2), rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.3));
        mix-blend-mode: multiply;
        content:'';
    }

    &:hover{
        opacity: 1;
        filter: brightness(1.1);
        &::before{
            background-size: 120% 100%;
        }
    }

    * {
        position: relative;
        z-index: 1;
    }
}

.lp--terror .lpActions .mrButton--primary {
    box-shadow: 0 0 0 1px var(--accent-color-20), 0 0 24px -4px var(--accent-color-20);
    animation: lpGlow 4s ease-in-out infinite;
}

@keyframes lpGlow {
    0%, 100% { box-shadow: 0 0 0 1px var(--accent-color-20), 0 0 24px -4px var(--accent-color-20); }
    50% { box-shadow: 0 0 0 1px var(--accent-color), 0 0 36px -2px var(--accent-color-20); }
}

/* ------------------------------------------------------------------
 * Tarjetas de subgénero y video
 * ------------------------------------------------------------------ */

.lp--terror .lpGenre {
    border-top: 2px solid transparent;
    transition: border-color 0.4s ease, transform 0.4s ease;
}

.lp--terror .lpGenre:hover {
    border-top-color: var(--accent-color);
    transform: translateY(-2px);
}

.lp--terror .lpVideo {
    position: relative;
    display: block;
    cursor: pointer;
}

.lp--terror .lpVideo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.6) contrast(1.1);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.lp--terror .lpVideo:hover img {
    filter: saturate(0.9) contrast(1.05);
    transform: scale(1.02);
}

.lp--terror .lpVideo__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp--terror .lpVideo__play span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: var(--accent-color);
    color: var(--body-background);
    font-size: 1.5rem;
    box-shadow: 0 0 40px -6px var(--accent-color);
    transition: transform 0.3s ease;
}

.lp--terror .lpVideo:hover .lpVideo__play span {
    transform: scale(1.08);
}

/* ------------------------------------------------------------------
 * Sistemas: tarjetas más bajas en 4 columnas
 * ------------------------------------------------------------------ */

@media (min-width: 640px) {
    .lp--terror .lpSystems a {
        aspect-ratio: 1.75;
    }
}

/* ------------------------------------------------------------------
 * Movimiento con freno
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .lp--terror .lpFog span,
    .lp--terror .lpActions .mrButton--primary {
        animation: none;
    }
}

/* ------------------------------------------------------------------
 * Tajada B: entrada al hacer scroll, vela, murciélagos e iconos
 * ------------------------------------------------------------------ */

/* Entrada: el script del landing agrega .is-in cuando el bloque entra en pantalla. */
.lp--terror [data-lp-reveal]:not(.contents),
.lp--terror [data-lp-reveal].contents > .tableCard {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease var(--lp-reveal-delay, 0ms), transform 0.7s ease var(--lp-reveal-delay, 0ms);
}

.lp--terror [data-lp-reveal].is-in:not(.contents),
.lp--terror [data-lp-reveal].is-in.contents > .tableCard {
    opacity: 1;
    transform: none;
}

/* Vela en el eyebrow de temporada: la llama parpadea, el halo respira. */
.lp--terror .lpFlame {
    position: relative;
    display: inline-block;
    width: 0.55rem;
    height: 0.85rem;
    margin-right: 0.25rem;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, #fff3c4 0%, #ffb648 55%, #e2581b 100%);
    transform-origin: 50% 100%;
    animation: lpFlicker 1.6s ease-in-out infinite;
}

.lp--terror .lpFlame::after {
    content: '';
    position: absolute;
    inset: -0.6rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 182, 72, 0.35), transparent 70%);
    animation: lpHalo 2.4s ease-in-out infinite;
}

@keyframes lpFlicker {
    0%, 100% { transform: scaleY(1) rotate(0deg); filter: brightness(1); }
    30% { transform: scaleY(1.12) rotate(-3deg); filter: brightness(1.15); }
    55% { transform: scaleY(0.94) rotate(2deg); filter: brightness(0.95); }
    80% { transform: scaleY(1.06) rotate(-1deg); filter: brightness(1.1); }
}

@keyframes lpHalo {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

.lp--terror .lpEyebrow__until {
    color: var(--body-text-muted);
    letter-spacing: 0.12em;
}

/* Murciélagos: solo en modo temporada. Cruzan el hero muy despacio. */
.lp--terror .lpBats {
    position: absolute;
    inset: 0;
    z-index: 7;
    overflow: hidden;
    pointer-events: none;
}

.lp--terror .lpBat {
    position: absolute;
    width: 2.2rem;
    color: var(--body-text-muted);
    opacity: 0.45;
    filter: drop-shadow(0 0 6px var(--accent-color-20));
    animation: lpBatFly var(--bat-duration, 38s) linear infinite, lpBatFlap 0.5s ease-in-out infinite alternate;
    animation-delay: var(--bat-delay, 0s), 0s;
}

.lp--terror .lpBat:nth-child(1) { top: 12%; --bat-duration: 42s; --bat-delay: -6s; width: 1.8rem; }
.lp--terror .lpBat:nth-child(2) { top: 22%; --bat-duration: 36s; --bat-delay: -20s; }
.lp--terror .lpBat:nth-child(3) { top: 8%;  --bat-duration: 50s; --bat-delay: -33s; width: 1.4rem; }
.lp--terror .lpBat:nth-child(4) { top: 30%; --bat-duration: 44s; --bat-delay: -12s; width: 2.6rem; }
.lp--terror .lpBat:nth-child(5) { top: 17%; --bat-duration: 58s; --bat-delay: -45s; width: 1.6rem; }

@keyframes lpBatFly {
    0% { left: -6%; transform: translateY(0); }
    25% { transform: translateY(-18px); }
    50% { transform: translateY(10px); }
    75% { transform: translateY(-12px); }
    100% { left: 106%; transform: translateY(0); }
}

@keyframes lpBatFlap {
    from { scale: 1 1; }
    to { scale: 1 0.72; }
}

/* Iconos de subgénero */
.lp--terror .lpGenre__icon {
    opacity: 0.8;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lp--terror .lpGenre:hover .lpGenre__icon {
    opacity: 1;
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .lp--terror [data-lp-reveal]:not(.contents),
    .lp--terror [data-lp-reveal].contents > .tableCard {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .lp--terror .lpFlame,
    .lp--terror .lpFlame::after,
    .lp--terror .lpBat {
        animation: none;
    }
}
