/* Slide 05 (business system) entrance motion. Runs while #system.system-run is present (set by system-motion.js
   when the slide is in view and the intro is closed). Opacity and transform only, no layout change.
   Each component (number, title, description, status) is one unit and appears only once it is in view. */

@keyframes sys-title-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sys-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sys-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* One-off, very subtle emphasis of the horizontal line that connects the five components (desktop only). */
@keyframes sys-line {
  0% { border-top-color: rgba(142, 219, 200, 0.22); }
  50% { border-top-color: rgba(142, 219, 200, 0.6); }
  100% { border-top-color: rgba(142, 219, 200, 0.22); }
}

/* The existing reveal wrappers would fade on their own, outside the intro gate; the motion above replaces them. */
#system .solution-intro.reveal,
#system .sys-components.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

#system.system-run .solution-intro > h2 {
  animation: sys-title-in 0.6s cubic-bezier(0.22, 0.8, 0.26, 1) both;
}

#system.system-run .solution-intro > p {
  animation: sys-fade 0.6s ease-out 0.3s both;
}

#system .sys-item.sys-visible {
  animation: sys-rise 0.45s ease-out both;
}
#system .sys-item.sys-visible:nth-child(1) { animation-delay: 0s; }
#system .sys-item.sys-visible:nth-child(2) { animation-delay: 0.11s; }
#system .sys-item.sys-visible:nth-child(3) { animation-delay: 0.22s; }
#system .sys-item.sys-visible:nth-child(4) { animation-delay: 0.33s; }
#system .sys-item.sys-visible:nth-child(5) { animation-delay: 0.44s; }

@media (min-width: 901px) {
  #system.system-run .sys-components {
    animation: sys-line 1.2s ease-out 1s both;
  }
}

@media (prefers-reduced-motion: reduce) {
  #system.system-run,
  #system.system-run *,
  #system .sys-item.sys-visible {
    animation: none !important;
  }
}
