/* Slide 06 (inspection workflow) entrance motion. Runs while #value.value-run is present (set by value-motion.js
   when the slide is in view and the intro is closed). Opacity and transform only; no layout change.
   The existing reveal wrappers are neutralised here so the gated motion below is the only entrance. */

#value .workflow-intro.reveal,
#value .workflow-steps.reveal,
#value .workflow-proof.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* The earlier .visible animations would run outside the intro gate; this file replaces them. */
#value .workflow-intro.visible > *,
#value .workflow-steps.visible .workflow-step,
#value .workflow-proof.visible {
  animation: none;
}

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

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

@keyframes wf-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progress along the existing line, from the first step to the fifth. Not a real progress indicator. */
@keyframes wf-line-x {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes wf-line-y {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes wf-photo-in {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

#value.value-run .workflow-intro h2 {
  animation: wf-title-in 0.6s cubic-bezier(0.22, 0.8, 0.26, 1) both;
}

#value.value-run .workflow-intro > p:last-child {
  animation: wf-fade 0.5s ease-out 0.25s both;
}

#value.value-run .workflow-steps .workflow-step {
  animation: wf-step-in 0.4s ease-out both;
}
#value.value-run .workflow-steps .workflow-step:nth-child(1) { animation-delay: 0.2s; }
#value.value-run .workflow-steps .workflow-step:nth-child(2) { animation-delay: 0.34s; }
#value.value-run .workflow-steps .workflow-step:nth-child(3) { animation-delay: 0.48s; }
#value.value-run .workflow-steps .workflow-step:nth-child(4) { animation-delay: 0.62s; }
#value.value-run .workflow-steps .workflow-step:nth-child(5) { animation-delay: 0.76s; }

#value.value-run .workflow-steps::before {
  animation: wf-line-x 1s ease-out 0.5s both;
  transform-origin: left center;
}

#value.value-run .workflow-photo img {
  animation: wf-photo-in 0.7s ease-out 1.1s both;
}

@media (max-width: 800px) {
  #value.value-run .workflow-steps::before {
    animation-name: wf-line-y;
    transform-origin: center top;
  }
}

@media (prefers-reduced-motion: reduce) {
  #value.value-run,
  #value.value-run *,
  #value.value-run .workflow-steps::before {
    animation: none !important;
  }
}
