/* Maple Visual Theme Styles */

.maple-leaf {
    /* Container is transparent - SVG defines all visual appearance */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    overflow: visible;
    pointer-events: none;
    z-index: 1000;
    position: relative;
    /* Transform origin at 66% height matches natural leaf pivot point (near petiole) */
    transform-origin: 50% 66%;
}

@keyframes maple-birth {
    from {
        opacity: 0;
        transform: rotate(0deg) scale(0) translateY(15px) translateX(-5px);
    }
    50% {
        opacity: 0.7;
        transform: rotate(90deg) scale(0.8) translateY(5px) translateX(3px);
    }
    to {
        opacity: 1;
        transform: rotate(180deg) scale(1) translateY(0) translateX(0);
    }
}

@keyframes maple-end {
    from {
        opacity: 1;
        transform: rotate(0deg) scale(1) translateY(0) translateX(0);
    }
    50% {
        opacity: 0.5;
        transform: rotate(-90deg) scale(0.7) translateY(-8px) translateX(5px);
    }
    to {
        opacity: 0;
        transform: rotate(-180deg) scale(0) translateY(-15px) translateX(-3px);
    }
}

.maple-leaf.maple-pulse,
.maple-leaf.aurora-pulse {
    /* Pulse only affects brightness/opacity - rotation handled separately by JS */
    animation: maple-pulse-enhanced 2.8s ease-in-out infinite;
}

@keyframes maple-pulse-enhanced {
    0%, 100% {
        opacity: 0.85;
        filter: brightness(1) grayscale(0);
    }
    25% {
        opacity: 0.92;
        filter: brightness(1.06) grayscale(0);
    }
    50% {
        opacity: 1;
        filter: brightness(1.12) grayscale(0);
    }
    75% {
        opacity: 0.92;
        filter: brightness(1.06) grayscale(0);
    }
}

.maple-leaf.aurora-animate {
    animation: maple-leaf-sway 12s ease-in-out infinite;
}

@keyframes maple-leaf-sway {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    20% {
        transform: translate(10px, -8px) rotate(8deg);
    }
    40% {
        transform: translate(-8px, 12px) rotate(-6deg);
    }
    60% {
        transform: translate(6px, 15px) rotate(4deg);
    }
    80% {
        transform: translate(-5px, 8px) rotate(-3deg);
    }
}

.maple-leaf .maple-svg {
    width: 100%;
    height: 100%;
    display: block;
    /* Multiple drop-shadows create depth and warm autumn glow */
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)) 
            drop-shadow(0 0 20px rgba(150,100,50,0.45))
            drop-shadow(0 2px 6px rgba(0,0,0,0.25))
            drop-shadow(0 0 8px rgba(200,100,50,0.3));
    transform-box: fill-box;
    transform-origin: 50% 66%;
    transition: transform 0.3s ease-out;
}

.maple-leaf.maple-pulse .maple-svg,
.maple-leaf.aurora-pulse .maple-svg {
    /* SVG scales independently - preserves container rotation */
    animation: maple-svg-pulse 2.8s ease-in-out infinite;
}

@keyframes maple-svg-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)) 
                drop-shadow(0 0 20px rgba(150,100,50,0.45))
                drop-shadow(0 2px 6px rgba(0,0,0,0.25))
                drop-shadow(0 0 8px rgba(200,100,50,0.3));
    }
    25% {
        transform: scale(1.05);
        filter: drop-shadow(0 5px 14px rgba(0,0,0,0.45)) 
                drop-shadow(0 0 25px rgba(150,100,50,0.5))
                drop-shadow(0 3px 8px rgba(0,0,0,0.3))
                drop-shadow(0 0 12px rgba(200,100,50,0.4));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5)) 
                drop-shadow(0 0 30px rgba(150,100,50,0.6))
                drop-shadow(0 4px 10px rgba(0,0,0,0.35))
                drop-shadow(0 0 16px rgba(200,100,50,0.5));
    }
    75% {
        transform: scale(1.05);
        filter: drop-shadow(0 5px 14px rgba(0,0,0,0.45)) 
                drop-shadow(0 0 25px rgba(150,100,50,0.5))
                drop-shadow(0 3px 8px rgba(0,0,0,0.3))
                drop-shadow(0 0 12px rgba(200,100,50,0.4));
    }
}

.maple-leaf .leaf-path {
    fill-opacity: 1;
    stroke-linecap: round;
}

.maple-leaf .leaf-texture {
    pointer-events: none;
    /* Overlay blend mode creates natural surface texture variation */
    mix-blend-mode: overlay;
}

.maple-leaf .leaf-veins line {
    stroke: rgba(100,50,20,0.35);
    stroke-linecap: round;
    opacity: 0.5;
}


