/* ─────────────────────────────────────────────────────────────────────────
   Hero2 — refined circuitry animation
   Loaded only by index2.html. Does not affect Hero.jsx or index.html.
   ───────────────────────────────────────────────────────────────────────── */

/* Subtle background grid drift — slow, ambient */
@keyframes h2-grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 64px 64px; }
}

/* Glow pulse used on hubs / status LEDs */
@keyframes h2-hub-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* Faint blink for the always-on LEDs */
@keyframes h2-led {
  0%, 88%, 100% { opacity: 0.35; }
  92%           { opacity: 1; }
  96%           { opacity: 0.55; }
}

/* Soft horizontal scan that washes across the board */
@keyframes h2-scan {
  0%   { transform: translateX(-15%); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { transform: translateX(115%); opacity: 0; }
}

/* Caption + PCB cross-fade */
@keyframes h2-fade-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes h2-pcb-fade-in {
  0%   { opacity: 0; transform: translateY(14px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes h2-pcb-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes h2-glow-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.65; }
}

/* ── Reusable classes ── */
.h2-grid {
  animation: h2-grid-drift 28s linear infinite;
}
.h2-hub        { animation: h2-hub-pulse 2.6s ease-in-out infinite; }
.h2-hub.delay1 { animation-delay: 0.4s; }
.h2-hub.delay2 { animation-delay: 0.9s; }
.h2-hub.delay3 { animation-delay: 1.3s; }
.h2-hub.delay4 { animation-delay: 1.8s; }
.h2-hub.delay5 { animation-delay: 2.2s; }

.h2-led        { animation: h2-led 4s ease-in-out infinite; }
.h2-led.delay1 { animation-delay: 0.8s; }
.h2-led.delay2 { animation-delay: 1.7s; }
.h2-led.delay3 { animation-delay: 2.6s; }

.h2-scan { animation: h2-scan 9s ease-in-out infinite; }

.h2-text-fade { animation: h2-fade-in 600ms ease both; }
.h2-pcb-fade  { animation: h2-pcb-fade-in 700ms ease both; }
.h2-pcb-img   { animation: h2-pcb-float 6s ease-in-out infinite; }
.h2-pcb-glow  { animation: h2-glow-pulse 4s ease-in-out infinite; }

/* Reduce motion — disable looping decorative animations */
@media (prefers-reduced-motion: reduce) {
  .h2-grid, .h2-hub, .h2-led, .h2-scan, .h2-pcb-img, .h2-pcb-glow {
    animation: none !important;
  }
}
