/* Keyframe Animations */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -100px) scale(1.1); }
    50% { transform: translate(-100px, 100px) scale(0.9); }
    75% { transform: translate(50px, 50px) scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 10px 50px rgba(220, 53, 69, 0.8); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Base line animation */
.draw-line {
    stroke: var(--primary-red);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawPath 4s ease-in-out forwards infinite;
}

@keyframes drawPath {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
        stroke-width: 0.5;
    }
    10% {
        opacity: 1;
        stroke-width: 1;
    }
    60% {
        stroke-dashoffset: 0;
        opacity: 1;
        stroke-width: 1;
    }
    85% {
        stroke-dashoffset: 0;
        opacity: 1;
        stroke-width: 1;
    }
    100% {
        stroke-dashoffset: -2000;
        opacity: 0;
        stroke-width: 0.5;
    }
}

/* Window glow animation */
.window-glow {
    fill: none;
    stroke: var(--light-red);
    stroke-width: 0;
    opacity: 0;
    animation: windowLight 6s ease-in-out infinite;
}

@keyframes windowLight {
    0%, 40%, 100% {
        fill: none;
        opacity: 0;
    }
    50%, 70% {
        fill: rgba(220, 53, 69, 0.3);
        opacity: 1;
    }
}

/* Staggered timing for different elements */
.house1-base { animation-delay: 0s; }
.house1-roof { animation-delay: 0.2s; }
.house1-details { animation-delay: 0.4s; }
.house1-windows { animation-delay: 0.6s; }

.house2-base { animation-delay: 0.8s; }
.house2-roof { animation-delay: 1s; }
.house2-details { animation-delay: 1.2s; }
.house2-windows { animation-delay: 1.4s; }

.house3-base { animation-delay: 1.6s; }
.house3-roof { animation-delay: 1.8s; }
.house3-details { animation-delay: 2s; }
.house3-windows { animation-delay: 2.2s; }

.landscape-trees { animation-delay: 2.4s; }
.landscape-path { animation-delay: 2.6s; }
.landscape-fence { animation-delay: 2.8s; }
.landscape-details { animation-delay: 3s; }

.skyline { animation-delay: 0.5s; }
.skyline-2 { animation-delay: 1.5s; }

/* Special animations */
.pulse-line {
    stroke: var(--primary-red);
    stroke-width: 1;
    fill: none;
    opacity: 0.6;
    animation: pulsePath 3s ease-in-out infinite;
}

@keyframes pulsePath {
    0%, 100% {
        stroke-width: 0.5;
        opacity: 0.3;
    }
    50% {
        stroke-width: 1.5;
        opacity: 0.8;
    }
}

/* Animated background grid */
.grid-lines {
    stroke: var(--primary-red);
    stroke-width: 0.2;
    opacity: 0.1;
    animation: gridPulse 10s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% {
        opacity: 0.05;
    }
    50% {
        opacity: 0.2;
    }
}