/* Hero scene motion. CSS only: every loop runs on SVG groups.
   Animated elements never carry a transform attribute (the CSS animation would
   replace it); position them with an outer <g transform>. */
:root {
  --itc-red: #f72f26;
  --itc-yellow: #fbbc05;
  --itc-green: #27c93d;
  --itc-blue: #1071ff;
  --itc-line: #c7c7c7;
}

/* ---------- hero scene ---------- */
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: "museo_sans500", system-ui, sans-serif;
}

.hero-art [class*='ha-'] {
  transform-box: fill-box;
  transform-origin: center;
}
.ha-float { animation: ha-float 6s ease-in-out infinite; }
.ha-flow { stroke-dasharray: 5 7; animation: ha-flow 1.6s linear infinite; }
.ha-pulse-dot { stroke-dasharray: 8 100; animation: ha-pulse-dot 3s linear infinite; }
.ha-ring { animation: ha-spin 80s linear infinite; }
.ha-ring-rev { animation: ha-spin 100s linear infinite reverse; }
.ha-ray { animation: ha-ray 4s ease-in-out infinite both; }
.ha-draw { stroke-dasharray: 100; animation: ha-draw 8s ease-out infinite both; }
.ha-area { animation: ha-area 8s ease-out infinite both; }
.ha-type { transform-origin: left center !important; animation: ha-type 8s ease-out infinite both; }
.ha-seq { animation: ha-seq 8s ease-out infinite both; }
.ha-pop { animation: ha-pop 8s ease-out infinite both; }
.ha-stamp { animation: ha-stamp 8s cubic-bezier(.2, .9, .3, 1.2) infinite both; }
.ha-ping { animation: ha-ping 2.2s ease-out infinite; }
.ha-blink { animation: ha-blink 1.1s steps(2, start) infinite; }
.ha-typing { animation: ha-typing 1.4s ease-in-out infinite; }
.ha-price-old { animation: ha-price-old 8s ease-in-out infinite both; }
.ha-price-new { animation: ha-price-new 8s ease-in-out infinite both; }

@keyframes ha-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ha-flow { to { stroke-dashoffset: -24; } }
@keyframes ha-pulse-dot { from { stroke-dashoffset: 8; } to { stroke-dashoffset: -100; } }
@keyframes ha-spin { to { transform: rotate(360deg); } }
@keyframes ha-ray { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes ha-draw {
  0%, 6% { stroke-dashoffset: 100; opacity: 1; }
  30%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ha-area { 0%, 18% { opacity: 0; } 34%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ha-type {
  0% { opacity: 1; transform: scaleX(0); }
  10%, 88% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
@keyframes ha-seq {
  0% { opacity: 0; transform: translateY(10px) scale(.96); }
  7%, 88% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: none; }
}
@keyframes ha-pop {
  0% { opacity: 0; transform: translateY(8px) scale(.92); }
  6% { opacity: 1; transform: scale(1.02); }
  9%, 90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes ha-stamp {
  0%, 30% { opacity: 0; transform: scale(1.6) rotate(-4deg); }
  36% { opacity: 1; transform: scale(.95) rotate(0); }
  40%, 90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes ha-ping { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes ha-blink { to { opacity: 0; } }
@keyframes ha-typing { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ha-price-old { 0%, 45% { opacity: 1; transform: none; } 48%, 94% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
@keyframes ha-price-new { 0%, 47% { opacity: 0; transform: translateY(6px); } 51%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(6px); } }

/* ---------- reduced motion: stop everything, show the final state ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-art * {
    animation: none !important;
    transition: none !important;
  }
  .hero-art .ha-pulse-dot, .hero-art .ha-ping, .hero-art .ha-price-old { opacity: 0; }
}
