/* MundoNovelas - Jesienna magia 1.0.7 - delikatne lampiony i liście */

.am-autumn-target {
    position: relative;
    overflow: visible;
}

#am-autumn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    height: min(33.333vw, 724px);
    pointer-events: none;
    user-select: none;
    background-image: url("./images/autumn_overlay_lanterns_light_v107.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
}

html.am-overlay-active body {
    position: relative;
}

@media (max-width: 700px) {
    #am-autumn-overlay {
        height: min(46vw, 360px);
        background-size: 100% auto;
    }
}

@media (min-width: 2173px) {
    #am-autumn-overlay {
        height: 724px;
        background-size: cover;
        background-position: top center;
    }
}

/* Spadające liście - osobna, nieklikalna warstwa na całym ekranie */
#am-falling-leaves {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    contain: layout paint style;
}

.am-falling-leaf {
    position: absolute;
    top: -12vh;
    left: var(--am-left);
    display: block;
    width: 1em;
    height: 1em;
    font-size: var(--am-size);
    line-height: 1;
    opacity: var(--am-opacity);
    filter: drop-shadow(0 2px 2px rgba(61, 30, 12, .18));
    will-change: transform;
    animation: am-leaf-fall var(--am-duration) linear var(--am-delay) infinite;
}

@keyframes am-leaf-fall {
    0% {
        transform: translate3d(0, -12vh, 0) rotate(0deg);
    }
    35% {
        transform: translate3d(calc(var(--am-drift) * .45), 34vh, 0) rotate(calc(var(--am-rotate) * .35));
    }
    70% {
        transform: translate3d(calc(var(--am-drift) * -.25), 75vh, 0) rotate(calc(var(--am-rotate) * .72));
    }
    100% {
        transform: translate3d(var(--am-drift), 116vh, 0) rotate(var(--am-rotate));
    }
}

@media (prefers-reduced-motion: reduce) {
    #am-falling-leaves {
        display: none !important;
    }
}
