/*
 * Christmas decorations for Kino Brakel. Load after style.css.
 * @layout.latte enables this file from November 1 through January 5.
 * Remove the christmas.css link in @layout.latte to disable the decorations.
 */

@media screen {
    /* Lights hang below the menu and let clicks pass through. */
    #header-menu::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 18px;
        pointer-events: none;
        background-image:
            radial-gradient(ellipse 4px 6px at 16px 5px, #fff2c6 60%, transparent 80%),
            radial-gradient(ellipse 4px 6px at 48px 5px, #da7373 60%, transparent 80%),
            radial-gradient(ellipse 4px 6px at 80px 5px, #fff2c6 60%, transparent 80%),
            radial-gradient(ellipse 11px 12px at 16px 5px, rgba(255, 224, 150, 0.3), transparent),
            radial-gradient(ellipse 11px 12px at 48px 5px, rgba(218, 115, 115, 0.25), transparent),
            radial-gradient(ellipse 11px 12px at 80px 5px, rgba(255, 224, 150, 0.3), transparent);
        background-size: 96px 18px;
        background-repeat: repeat-x;
    }

    .background-curtain {
        isolation: isolate;
    }

    /* One viewport-sized layer moves behind the content using only transform. */
    .background-curtain::before {
        content: "";
        position: fixed;
        top: -240px;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: -1;
        pointer-events: none;
        background-image:
            radial-gradient(circle at 24px 38px, #fff 1px, transparent 2px),
            radial-gradient(circle at 106px 112px, #fff 1.5px, transparent 2.5px),
            radial-gradient(circle at 190px 64px, #fff 1px, transparent 2px),
            radial-gradient(circle at 56px 196px, #fff 1px, transparent 2px),
            radial-gradient(circle at 210px 218px, #fff 1.5px, transparent 2.5px);
        background-size: 240px 240px;
        opacity: 0.35;
        animation: christmas-snowfall 18s linear infinite;
    }

    @keyframes christmas-snowfall {
        from {
            transform: translateY(0);
        }

        to {
            transform: translateY(240px);
        }
    }

    footer {
        position: relative;
    }

    /* A fine row of warm lights along the top edge of the footer. */
    footer::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 8px;
        pointer-events: none;
        background-image:
            radial-gradient(circle at 16px 2px, #f6d995 1px, transparent 2px),
            radial-gradient(ellipse 9px 6px at 16px 2px, rgba(246, 217, 149, 0.25), transparent);
        background-size: 48px 8px;
        background-repeat: repeat-x;
    }

    @media (max-width: 767px) {
        #header-menu::after {
            opacity: 0.85;
        }

        .background-curtain::before {
            background-image:
                radial-gradient(circle at 24px 38px, #fff 1px, transparent 2px),
                radial-gradient(circle at 190px 164px, #fff 1.5px, transparent 2.5px);
            opacity: 0.3;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .background-curtain::before {
            display: none;
        }
    }
}
