/* ==================================================
   NAVIDAD 2026
   SERVICIO TÉCNICO LA ESPERANZA
   devjairo.com
================================================== */


/* ==================================================
   1. CAPA DECORATIVA NAVIDEÑA
================================================== */

.nv-scene {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 25;

    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.nv-scene[hidden] {
    display: none;
}

/* Mantener logo, navegación y pie de página sobre la decoración.
   Solo durante la temporada navideña. */
body.landing:has(.nv-scene:not([hidden])) .landing-header,
body.landing:has(.nv-scene:not([hidden])) .landing-footer {
    z-index: 26;
}


/* ==================================================
   2. CUATRO ESQUINAS NAVIDEÑAS
================================================== */

.nv-corner {
    position: absolute;

    display: block;
    width: clamp(135px, 15vw, 215px);

    height: auto;
    max-width: none;

    opacity: 0.50;

    /* Difuminar hacia el interior para conservar la legibilidad. */
    -webkit-mask-image: radial-gradient(ellipse at var(--nv-corner-origin), #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse at var(--nv-corner-origin), #000 30%, transparent 100%);

    pointer-events: none;
    user-select: none;

    animation: nv-corner-glow 5s ease-in-out infinite alternate;
}


/* Superior izquierda */

.nv-corner--tl {
    --nv-corner-origin: top left;
    top: -8px;
    left: -8px;
}


/* Superior derecha */

.nv-corner--tr {
    --nv-corner-origin: top right;
    top: -8px;
    right: -8px;

    animation-delay: -2s;
}


/* Inferior izquierda */

.nv-corner--bl {
    --nv-corner-origin: bottom left;
    bottom: -8px;
    left: -8px;

    width: clamp(145px, 17vw, 230px);

    animation-delay: -3s;
}


/* Inferior derecha */

.nv-corner--br {
    --nv-corner-origin: bottom right;
    bottom: -8px;
    right: -8px;

    width: clamp(145px, 17vw, 230px);

    animation-delay: -1s;
}


/* Iluminación de las decoraciones */

@keyframes nv-corner-glow {

    0% {
        filter: brightness(0.90);
    }

    100% {
        filter: brightness(1.12);
    }
}


/* ==================================================
   3. LUCES NAVIDEÑAS SUPERIORES
================================================== */

.nv-lights {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;

    display: flex;
    justify-content: space-around;

    border-top: 2px solid rgba(55, 100, 70, 0.65);

    z-index: 3;
}


.nv-bulb {
    position: relative;

    width: 7px;
    height: 12px;

    margin-top: 5px;

    border-radius: 40% 40% 55% 55%;

    color: var(--nv-color, #ffd166);
    background: currentColor;

    box-shadow:
        0 0 6px currentColor,
        0 0 15px currentColor,
        0 0 25px currentColor;

    animation: nv-blink 2.4s ease-in-out infinite alternate;

    animation-delay: var(--nv-delay, 0s);
}


.nv-bulb::before {
    content: "";

    position: absolute;

    top: -5px;
    left: 50%;
    transform: translateX(-50%);

    width: 5px;
    height: 6px;

    background: #263c30;

    border-radius: 2px;
}


@keyframes nv-blink {

    0% {
        opacity: 0.35;
    }

    100% {
        opacity: 1;
    }
}


/* ==================================================
   4. NIEVE ANIMADA
================================================== */

.nv-snow {
    position: absolute;

    inset: 0;

    z-index: 4;

    overflow: hidden;
}


.nv-flake {
    position: absolute;

    top: -15px;
    left: var(--nv-x, 50%);

    width: var(--nv-size, 4px);
    height: var(--nv-size, 4px);

    border-radius: 50%;

    background: #ffffff;

    opacity: var(--nv-opacity, 0.6);

    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.7),
        0 0 8px rgba(170, 220, 255, 0.5);

    animation: nv-snowfall var(--nv-time, 12s) linear infinite;

    animation-delay: var(--nv-delay, 0s);
}


@keyframes nv-snowfall {

    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(
            var(--nv-drift, 30px),
            calc(100vh + 30px),
            0
        );
    }
}


/* ==================================================
   5. ATMÓSFERA DORADA CINEMATOGRÁFICA
================================================== */

.nv-glow {
    position: absolute;

    bottom: -10%;

    width: 65vw;
    height: 45vh;

    z-index: 0;

    background: radial-gradient(
        ellipse,
        rgba(255, 190, 80, 0.23) 0%,
        rgba(255, 130, 40, 0.10) 35%,
        transparent 72%
    );

    animation: nv-glow-motion 9s ease-in-out infinite alternate;
}


.nv-glow--left {
    left: -20%;
}


.nv-glow--right {
    right: -20%;

    animation-delay: -4.5s;
}


@keyframes nv-glow-motion {

    0% {
        opacity: 0.35;

        transform: translateX(-20px) scale(0.95);
    }

    100% {
        opacity: 0.85;

        transform: translateX(25px) scale(1.12);
    }
}


/* ==================================================
   6. PAPÁ NOEL VOLADOR
================================================== */

.nv-sleigh {
    position: absolute;

    top: 32%;
    left: 0;

    width: clamp(240px, 28vw, 420px);

    z-index: 5;

    opacity: 0;

    filter: drop-shadow(
        0 0 12px rgba(255, 190, 70, 0.35)
    );

    animation: nv-sleigh-flight 32s linear infinite;

    animation-delay: 2s;
}


.nv-sleigh img {
    display: block;

    width: 100%;
    height: auto;

    pointer-events: none;
    user-select: none;

    animation: nv-sleigh-float 2.5s ease-in-out infinite;
}


/* Movimiento vertical durante el vuelo */

@keyframes nv-sleigh-float {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}


/* Recorrido de ida y vuelta */

@keyframes nv-sleigh-flight {

    0% {
        transform: translate3d(-120%, 0, 0) scaleX(1);

        opacity: 0.68;
    }

    35% {
        transform: translate3d(
            calc(100vw + 30px),
            -25px,
            0
        ) scaleX(1);

        opacity: 0.68;
    }

    36%, 50% {
        transform: translate3d(
            calc(100vw + 30px),
            -25px,
            0
        ) scaleX(-1);

        opacity: 0;
    }

    51% {
        transform: translate3d(
            calc(100vw + 30px),
            -25px,
            0
        ) scaleX(-1);

        opacity: 0.68;
    }

    86% {
        transform: translate3d(
            -120%,
            15px,
            0
        ) scaleX(-1);

        opacity: 0.68;
    }

    87%, 100% {
        transform: translate3d(-120%, 15px, 0) scaleX(-1);

        opacity: 0;
    }
}


/* ==================================================
   7. ADORNO NAVIDEÑO COLGANTE
================================================== */

.nv-ornament {
    position: absolute;

    top: 16px;
    right: 23%;

    width: clamp(55px, 6vw, 82px);

    z-index: 6;

    opacity: 0.55;

    transform-origin: top center;

    animation: nv-ornament-swing 4s ease-in-out infinite;
}


.nv-ornament img {
    display: block;

    width: 100%;
    height: auto;

    filter: drop-shadow(
        0 0 8px rgba(255, 200, 100, 0.35)
    );
}


@keyframes nv-ornament-swing {

    0%, 100% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }
}


/* ==================================================
   8. PARTÍCULAS DORADAS
================================================== */

.nv-spark {
    position: absolute;

    bottom: -10px;
    left: var(--nv-x, 50%);

    width: var(--nv-size, 3px);
    height: var(--nv-size, 3px);

    z-index: 4;

    border-radius: 50%;

    background: #ffd078;

    box-shadow:
        0 0 5px #ffcb6b,
        0 0 12px rgba(255, 170, 45, 0.75);

    opacity: 0;

    animation: nv-spark-rise var(--nv-time, 10s) linear infinite;

    animation-delay: var(--nv-delay, 0s);
}


@keyframes nv-spark-rise {

    0% {
        opacity: 0;

        transform: translate3d(0, 0, 0);
    }

    20% {
        opacity: 0.8;
    }

    75% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;

        transform: translate3d(
            var(--nv-drift, 40px),
            -75vh,
            0
        );
    }
}


/* ==================================================
   9. ANUNCIO NAVIDEÑO
================================================== */

.nv-campaign {
    position: relative;

    z-index: 5;

    width: min(1180px, 92%);

    margin: 15px auto;
    padding: 14px 20px;

    text-align: center;

    color: #ffe0a0;

    background: linear-gradient(
        110deg,
        rgba(150, 15, 30, 0.35),
        rgba(10, 35, 32, 0.80),
        rgba(150, 15, 30, 0.35)
    );

    border: 1px solid rgba(255, 205, 110, 0.50);

    border-radius: 14px;

    font-size: 15px;
    font-weight: 800;

    animation: nv-banner-glow 3s ease-in-out infinite alternate;
}


.nv-campaign[hidden] {
    display: none;
}


.nv-campaign a {
    color: #ffffff;

    text-decoration: underline;
}


@keyframes nv-banner-glow {

    0% {
        box-shadow: 0 0 8px rgba(255, 190, 70, 0.10);
    }

    100% {
        box-shadow: 0 0 22px rgba(255, 190, 70, 0.35);
    }
}


/* ==================================================
   10. ADAPTACIÓN PARA TABLETS
================================================== */

@media (max-width: 1024px) {

    .nv-corner {
        width: clamp(105px, 17vw, 160px);

        opacity: 0.44;
    }

    .nv-corner--bl,
    .nv-corner--br {
        width: clamp(115px, 18vw, 175px);
    }

    .nv-sleigh {
        width: clamp(190px, 32vw, 300px);

        top: 36%;
    }

    .nv-ornament {
        width: 58px;
    }
}


/* ==================================================
   11. ADAPTACIÓN PARA CELULARES
================================================== */

@media (max-width: 680px) {

    .nv-corner {
        width: clamp(75px, 20vw, 105px);

        opacity: 0.38;
    }

    .nv-corner--bl,
    .nv-corner--br {
        width: clamp(80px, 23vw, 120px);
    }

    .nv-sleigh {
        width: clamp(125px, 38vw, 190px);

        top: 40%;
    }

    .nv-sleigh img {
        opacity: 0.65;
    }

    .nv-ornament {
        width: 38px;

        right: 25%;
        top: 14px;

        opacity: 0.42;
    }

    .nv-bulb {
        width: 5px;
        height: 9px;
    }

    .nv-glow {
        width: 85vw;
        height: 30vh;
    }

    .nv-campaign {
        font-size: 13px;

        padding: 12px;
    }
}


/* ==================================================
   12. ACCESIBILIDAD Y MOVIMIENTO REDUCIDO
================================================== */

@media (prefers-reduced-motion: reduce) {

    .nv-scene *,
    .nv-scene *::before,
    .nv-scene *::after,
    .nv-campaign {
        animation: none !important;
    }

    .nv-sleigh,
    .nv-snow,
    .nv-spark {
        display: none;
    }
}

/* ==================================================
   13. BOTÓN DE MÚSICA NAVIDEÑA
================================================== */

.nv-music-btn {
    position: fixed;

    right: 24px;
    bottom: 100px;

    width: 56px;
    height: 56px;

    display: grid;
    place-items: center;

    z-index: 1000;

    border: 1px solid rgba(255, 209, 102, 0.55);
    border-radius: 50%;

    background: rgba(10, 25, 45, 0.92);

    color: #ffd166;
    font-size: 24px;

    cursor: pointer;
    pointer-events: auto;

    box-shadow: 0 0 18px rgba(255, 190, 70, 0.20);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* Ocultar fuera de la temporada navideña */

.nv-music-btn[hidden] {
    display: none;
}


/* Efecto al pasar el cursor */

.nv-music-btn:hover {
    transform: scale(1.08);

    box-shadow: 0 0 25px rgba(255, 190, 70, 0.45);
}


/* Música activada */

.nv-music-btn[aria-pressed="true"] {
    border-color: #ffd166;

    box-shadow: 0 0 20px rgba(255, 209, 102, 0.50);
}


/* Accesibilidad mediante teclado */

.nv-music-btn:focus-visible {
    outline: 2px solid #ffd166;
    outline-offset: 4px;
}


/* Adaptación para celulares */

@media (max-width: 680px) {

    .nv-music-btn {
        right: 14px;
        bottom: 85px;

        width: 44px;
        height: 44px;

        font-size: 19px;
    }
}


/* Accesibilidad y movimiento reducido */

@media (prefers-reduced-motion: reduce) {

    .nv-music-btn {
        transition: none;
    }
}