/*
 * Insightful Features Animation block — two-column "how it works" section.
 * Left: heading + an animated fan of converging lines (CSS-only loop).
 * Right: numbered steps and an optional CTA.
 *
 * Declarations inside each rule are ordered alphabetically by property.
 */

.ifa-left {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.ifa-heading {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────
 * Animated lines — all paths draw themselves at once, then stay
 * fully drawn and pulse their stroke color between the initial
 * color and the alt color, in a continuous loop. The lines never
 * disappear.
 * ───────────────────────────────────────────────────────── */

.ifa-lines {
  display: block;
  height: auto;
  width: 100%;
}

.ifa-line {
  animation: ifa-draw-in 1.2s ease-out both;
  fill: transparent;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  stroke-linecap: round;
  stroke-width: 2;
}

/* One-shot: trace the line in. After this it stays fully drawn. */
@keyframes ifa-draw-in {
  from {
    stroke-dashoffset: 700;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* The flowing color front is driven by SMIL <animateTransform> inside the
 * gradient (see template.php) — gradientTransform is not reliably animatable
 * via CSS across browsers. Reduced motion is handled there too (it stops the
 * one-shot draw-in below; the SMIL animation begins paused when reduced). */

@media (prefers-reduced-motion: reduce) {
  .ifa-line {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ─────────────────────────────────────────────────────────
 * Steps column. On large viewports the column matches the height
 * of the left animation and spreads the steps with space-between.
 * ───────────────────────────────────────────────────────── */

.ifa-right {
  display: flex;
  flex-direction: column;
}

.ifa-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .ifa-steps {
    flex: 1;
    gap: var(--spacing-md);
    justify-content: space-between;
  }
}

.ifa-step-number {
  display: block;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}

.ifa-step-title {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0.5rem 0 0;
}

.ifa-step-text {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

.ifa-cta {
  margin-top: var(--spacing-lg);
}
