"use client"; import { motion, useReducedMotion } from "motion/react"; const EASE_OUT: [number, number, number, number] = [0.16, 1, 0.3, 1]; /** Column centers for the three equal-width step cards (1/6, 1/2, 5/6). */ const NODES = ["16.666%", "50%", "83.333%"]; /** * Decorative data-flow line tying the three "How it works" steps together. * Sequence on first view: nodes pop in, the line draws left-to-right, then a * repeating dash pattern drifts forever to read as data flowing. Uses only * transform and background-position; renders statically under reduced motion. */ export function FlowLine() { const reduce = useReducedMotion() ?? false; const dashes = { backgroundImage: "repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 16px)", }; return (
{/* Line track between the outer nodes */}
{reduce ? (
) : ( )}
{/* Step nodes at each column center */} {NODES.map((left, i) => ( {reduce ? ( ) : ( )} ))}
); }