/* Decorative current: solid brand colours, no flashing or background video. */
.hero-circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.circuit-track { stroke: #c9c9c9; stroke-width: 1.25; }
.hero-circuit .circuit-track { stroke: #363636; }
.circuit-track path, .circuit-track circle, .current-packet { vector-effect: non-scaling-stroke; }
.circuit-current { stroke: #94192d; stroke-width: 2.5; stroke-linecap: round; }
.hero-circuit .circuit-current { stroke: #c33b50; }
.current-packet { opacity: 0; stroke-dasharray: 7 93; }
.electric-bulb { width: 32px; height: 38px; display: block; flex: 0 0 auto; overflow: visible; }
.bulb-outline, .bulb-rays { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bulb-rays { opacity: .55; }
.bulb-current { fill: #c33b50; }
.showcase-electric-icon { display: grid; place-items: center; width: 48px; height: 52px; flex-shrink: 0; color: #fff; }
.showcase-copy .showcase-kicker { gap: 14px; margin-bottom: 20px; }

/* A compact junction above the service cards carries the visual theme into the page. */
.services-circuit { position: relative; height: 82px; margin-top: 24px; overflow: hidden; pointer-events: none; }
.services-circuit-board { position: absolute; inset: 0; width: 100%; height: 100%; }
.services-circuit-hub { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 52px; height: 52px; background: #161616; color: #fff; border: 1px solid #414141; border-bottom: 3px solid #94192d; }
.services-circuit-hub .electric-bulb { width: 28px; height: 35px; }
.home-service-directory .home-service-groups { margin-top: 9px; }

/* JS opts into motion only when allowed, visible and in the viewport. Static by default. */
.electrical-motion-on .current-packet { animation: jta-circuit-current 6s linear infinite; animation-play-state: paused; }
.electrical-motion-on .current-packet:nth-child(2) { animation-delay: -2s; }
.electrical-motion-on .current-packet:nth-child(3) { animation-delay: -4s; }
.electrical-motion-on .current-packet:nth-child(4) { animation-delay: -1s; }
.electrical-motion-on .current-packet:nth-child(5) { animation-delay: -3s; }
.electrical-motion-on .bulb-rays { animation: jta-bulb-breathe 4.8s ease-in-out infinite; animation-play-state: paused; }
.electrical-motion-on .bulb-current { animation: jta-bulb-breathe 4.8s ease-in-out -1.2s infinite; animation-play-state: paused; }
.electrical-motion-on [data-electric-scene].is-in-view :is(.current-packet, .bulb-rays, .bulb-current) { animation-play-state: running; }
@keyframes jta-circuit-current {
    0% { stroke-dashoffset: 100; opacity: 0; }
    12%, 85% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes jta-bulb-breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* Entrance animation never hides content pending JavaScript or an observer callback. */
.electrical-motion-on .electric-enter { animation: jta-section-enter 560ms cubic-bezier(.2,.7,.25,1) both; }
.electric-enter[data-electric-stagger="1"] { animation-delay: 55ms; }
.electric-enter[data-electric-stagger="2"] { animation-delay: 110ms; }
.electric-enter[data-electric-stagger="3"] { animation-delay: 165ms; }
@keyframes jta-section-enter { from { opacity: .72; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
.motion-control { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: #c9c9c9; font: inherit; font-size: .7rem; line-height: 1.4; cursor: pointer; text-align: left; }
.motion-control[hidden] { display: none; }
.motion-control svg { width: 14px; height: 14px; flex: 0 0 auto; }
.motion-control:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.motion-control:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.motion-control:disabled { cursor: default; text-decoration: none; }
.motion-play-symbol, .motion-control[data-paused="true"] .motion-pause-symbol { display: none; }
.motion-control[data-paused="true"] .motion-play-symbol { display: block; }
.showcase-copy > .motion-control { align-self: flex-start; margin-top: 8px; }
.footer-bottom .motion-control { color: inherit; font-size: inherit; }
.electrical-motion-off :is(.home-service-group,.directory-category,.service-card,.project-card,.portfolio-item,.svc-option,.svc-energy-card,.service-link-grid > a)::after { animation: none !important; }
@media (max-width: 760px) {
    .showcase-electric-icon { width: 38px; height: 42px; }
    .showcase-electric-icon .electric-bulb { width: 28px; height: 34px; }
    .showcase-copy .showcase-kicker { gap: 10px; margin-bottom: 17px; }
    .hero-circuit .circuit-track > path:last-of-type, .hero-circuit .circuit-track > circle:last-child { display: none; }
    .services-circuit { height: 64px; margin-top: 19px; }
    .services-circuit-board { width: max(100%, 540px); left: 50%; transform: translateX(-50%); }
    .services-circuit-hub { width: 44px; height: 46px; }
    .services-circuit-hub .electric-bulb { width: 24px; height: 31px; }
}
@media (prefers-reduced-motion: reduce) {
    .current-packet { opacity: 0 !important; animation: none !important; }
    .bulb-rays, .bulb-current, .electric-enter { animation: none !important; }
}
@media (forced-colors: active) {
    .hero-circuit, .services-circuit { display: none; }
    .bulb-outline, .bulb-rays { stroke: CanvasText; }
    .bulb-current { fill: CanvasText; }
}
@media print {
    .hero-circuit, .services-circuit, .motion-control, .showcase-electric-icon { display: none !important; }
    .electric-enter { animation: none !important; }
}
