/*
 * "3 Easy Steps" micro-animation (assets/js/steps-anim.js).
 * Enqueued only by template-parts/sections/steps.php. Every rule is scoped to
 * .sn-ref-steps.snsa, a class the script adds only when motion is allowed, so
 * the static section is untouched without JS or with reduced motion.
 */

.sn-ref-steps.snsa .sn-ref-step-number {
  position: relative;
  transition: background-color 0.35s ease;
}

.sn-ref-steps.snsa .snsa-active .sn-ref-step-number {
  background-color: #f1f6ff;
}

.sn-ref-steps.snsa .sn-ref-steps__grid h3 {
  transition: transform 0.3s ease, color 0.3s ease;
}

.sn-ref-steps.snsa .snsa-active h3 {
  transform: translateY(-2px);
  color: #0c0d0f;
}

/* Number / checkmark swap: both centred in the existing circle. */
.snsa-num,
.snsa-check {
  grid-area: 1 / 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.snsa-check {
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.snsa-done .snsa-num {
  opacity: 0;
  transform: scale(0.8);
}

.snsa-done .snsa-check {
  opacity: 1;
  transform: scale(1);
}

/* Orbit ring: sits exactly on the circle's 2px border. */
.snsa-orbit {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  overflow: visible;
  pointer-events: none;
  transform: rotate(-90deg);
}

.snsa-orbit circle {
  fill: none;
  stroke: #1767de;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 16 84;
  stroke-dashoffset: 0;
  opacity: 0;
}

/* Travelling pulse and the short trail it leaves on the connector. */
.snsa-pulse,
.snsa-trail {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.snsa-pulse {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #2878f0;
  box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.12);
  will-change: transform, opacity;
}

.snsa-trail {
  height: 1px;
  margin-top: -0.5px;
  background: #6fa1f3;
  transform-origin: 0 50%;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .snsa-orbit,
  .snsa-pulse,
  .snsa-trail,
  .snsa-check {
    display: none !important;
  }
}
