/* McKool Smith Holiday 2024 - v1.6 */

/*--------------------*\
    Base Styles
\*--------------------*/
body {
    background: #002e5d;
    margin: 0;
    min-height: 100vh;
}

.wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/*--------------------*\
    Image Preloader
\*--------------------*/
.preloader {
    width: 0;
    height: 0;
    display: none;
    background-image: 
        url('../img/bg.webp?v=1.6'),
        url('../img/rink.webp?v=1.6'),
        url('../img/tree1.webp?v=1.6'),
        url('../img/tree2.webp?v=1.6'),
        url('../img/skatera.webp?v=1.6'),
        url('../img/skaterb.webp?v=1.6'),
        url('../img/skaterc.webp?v=1.6'),
        url('../img/skaterd.webp?v=1.6'),
        url('../img/play.png?v=1.6');
}

/*--------------------*\
    Header Elements
\*--------------------*/
.happy-holidays {
    position: relative;
    width: 35%;
    height: auto;
    max-width: 500px;
    min-width: 300px;
    z-index: 10;
    animation: wiggle 0.25s ease-in-out infinite;
}

.best-wishes {
    position: relative;
    width: 60%;
    height: auto;
    max-width: 530px;
    min-width: 200px;
    margin: -0.5rem 0 1% 0;
    z-index: 10;
}

.logo {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 2%;
    min-width: 200px;
    max-width: 400px;
}

/*--------------------*\
    Scene Structure
\*--------------------*/
.background {
    position: relative;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    aspect-ratio: 200/100;
    background-image: url('../img/bg.webp?v=1.6');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.rink {
    position: relative;
    background-image: url('../img/rink.webp?v=1.6');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 353/100;
}

/* Trees */
.tree1, .tree2 {
    position: absolute;
    width: 16.666%;
    height: 85%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    bottom: 0;
}

.tree1 {
    background-image: url('../img/tree1.webp?v=1.6');
    left: 10%;
    bottom: 25%;
    z-index: 3;
}

.tree2 {
    background-image: url('../img/tree2.webp?v=1.6');
    right: 12%;
    top: -45%;
    z-index: 1;
}

/* Stage and Skaters */
.stage {
    display: block;
    width: 66.666%;
    aspect-ratio: 4/1;
    position: absolute;
    overflow: hidden;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 2;
}

.skater {
    height: 50%;
    aspect-ratio: 1/1;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.2s ease-out;
    background-size: 600% 200%;
    background-position: 0 0;
}

.skater.a { background-image: url('../img/skatera.webp?v=1.6'); }
.skater.b { background-image: url('../img/skaterb.webp?v=1.6'); }
.skater.c { background-image: url('../img/skaterc.webp?v=1.6'); }
.skater.d { background-image: url('../img/skaterd.webp?v=1.6'); }

/*--------------------*\
    Controls & UI
\*--------------------*/
.audio-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 0;
    z-index: 100;
    transition: background-color 0.3s;
    overflow: hidden;
}

.audio-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}

.audio-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: url('../img/play.png?v=1.6');
    background-position: top;
    transition: transform 0.2s ease;
}

.audio-toggle[aria-pressed="true"]::before {
    transform: translateY(-50%);
}

.locations {
    text-align: center;
    color: white;
    font-family: Arial, sans-serif;
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

/*--------------------*\
    Snowfall Effect
\*--------------------*/
.snowfall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99;
}

.snowflake {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0;
    will-change: transform, opacity;
}

/*--------------------*\
    Animations
\*--------------------*/
@keyframes wiggle {
    0% { transform: rotate(0deg); }
    16.666% { transform: rotate(1deg); }
    33.333% { transform: rotate(-1deg); }
    50% { transform: rotate(0deg); }
    66.666% { transform: rotate(1deg); }
    83.333% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

@keyframes fall {
    0% {
        transform: translateY(-50px) translateX(-5px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.8; }
    25% { transform: translateY(25vh) translateX(5px) rotate(90deg); }
    50% { transform: translateY(50vh) translateX(-5px) rotate(180deg); }
    75% { transform: translateY(75vh) translateX(5px) rotate(270deg); }
    90% { opacity: 0.8; }
    100% {
        transform: translateY(100vh) translateX(-5px) rotate(360deg);
        opacity: 0;
    }
}

/*--------------------*\
    Media Queries
\*--------------------*/
/* Large screens (≤1366px) */
@media (max-width: 1366px) {
    .background {
        max-width: 1366px;
        aspect-ratio: 16/9;
        background-image: url('../img/bg2.webp?v=1.6');
    }
    .best-wishes { width: 35%; }
    .rink { max-width: 1000px; }
    .logo { margin-top: 1%; }
}

/* Medium screens (≤960px) */
@media (max-width: 960px) {
    .background {
        background-image: url('../img/bg3.webp?v=1.6');
    }
    .happy-holidays { width: 50%; }
    .best-wishes {
        width: 80%;
        margin: 1% 0 9% 0;
    }
    .rink { max-width: 800px; }
    .logo { margin-top: 3%; }
}

/* Small screens (≤600px) */
@media (max-width: 600px) {
    .best-wishes {
        width: 80%;
        margin: 0 0 12% 0;
    }
    .logo {
        max-width: 300px;
        margin-top: 10%;
    }
    .locations {
        font-size: 0.875rem;
        padding: 0 1rem;
        line-height: 1.75;
    }
}