/* Hero SVG line trace animation
   Draws architectural line traces over mockup screenshots
   using stroke-dasharray/dashoffset CSS animation */

.hero-canvas {
    position: relative;
    overflow: hidden;
}

.hero-canvas .hero-frame {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}
.hero-canvas .hero-frame.active {
    opacity: 1;
    position: relative;
}

/* SVG line trace overlay */
.hero-canvas .line-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.hero-canvas .line-overlay path,
.hero-canvas .line-overlay line,
.hero-canvas .line-overlay rect,
.hero-canvas .line-overlay circle {
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0;
}

/* Animate lines when frame becomes active */
.hero-frame.active .line-overlay path,
.hero-frame.active .line-overlay line,
.hero-frame.active .line-overlay rect {
    animation: traceLine 2s ease-out forwards;
    opacity: 1;
}

.hero-frame.active .line-overlay circle {
    animation: fadeInDot 0.3s ease-out forwards;
    opacity: 0;
}

/* Stagger the line animations */
.hero-frame.active .line-overlay *:nth-child(1) { animation-delay: 0.2s; }
.hero-frame.active .line-overlay *:nth-child(2) { animation-delay: 0.4s; }
.hero-frame.active .line-overlay *:nth-child(3) { animation-delay: 0.6s; }
.hero-frame.active .line-overlay *:nth-child(4) { animation-delay: 0.8s; }
.hero-frame.active .line-overlay *:nth-child(5) { animation-delay: 1.0s; }
.hero-frame.active .line-overlay *:nth-child(6) { animation-delay: 1.2s; }
.hero-frame.active .line-overlay *:nth-child(7) { animation-delay: 1.4s; }
.hero-frame.active .line-overlay *:nth-child(8) { animation-delay: 1.6s; }
.hero-frame.active .line-overlay *:nth-child(9) { animation-delay: 1.8s; }
.hero-frame.active .line-overlay *:nth-child(10) { animation-delay: 2.0s; }
.hero-frame.active .line-overlay *:nth-child(11) { animation-delay: 2.2s; }
.hero-frame.active .line-overlay *:nth-child(12) { animation-delay: 2.4s; }

@keyframes traceLine {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0.3;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.7;
    }
}

@keyframes fadeInDot {
    0% { opacity: 0; r: 0; }
    100% { opacity: 0.6; r: 3; }
}

/* Glow effect for lines */
.line-overlay.blue path,
.line-overlay.blue line,
.line-overlay.blue rect { stroke: #4F6BED; filter: drop-shadow(0 0 3px rgba(79,107,237,0.5)); }
.line-overlay.blue circle { fill: #4F6BED; filter: drop-shadow(0 0 3px rgba(79,107,237,0.5)); }

.line-overlay.green path,
.line-overlay.green line,
.line-overlay.green rect { stroke: #10B981; filter: drop-shadow(0 0 3px rgba(16,185,129,0.5)); }
.line-overlay.green circle { fill: #10B981; filter: drop-shadow(0 0 3px rgba(16,185,129,0.5)); }

.line-overlay.amber path,
.line-overlay.amber line,
.line-overlay.amber rect { stroke: #F59E0B; filter: drop-shadow(0 0 3px rgba(245,158,11,0.5)); }
.line-overlay.amber circle { fill: #F59E0B; filter: drop-shadow(0 0 3px rgba(245,158,11,0.5)); }

/* Auto-cycle timer bar */
.hero-timer {
    height: 2px;
    background: transparent;
    position: relative;
    overflow: hidden;
}
.hero-timer .hero-timer-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    transition: width linear;
}
.hero-timer .hero-timer-bar.running {
    width: 100%;
}
