/* ===================== JOURNEY (scroll-driven tiers) ===================== */
function Journey() {
const ref = React.useRef(null);
const [active, setActive] = React.useState(0);
const [progress, setProgress] = React.useState(0);
React.useEffect(() => {
const onScroll = () => {
if (!ref.current) return;
const rect = ref.current.getBoundingClientRect();
const vh = window.innerHeight;
const total = rect.height - vh;
const p = Math.max(0, Math.min(1, -rect.top / total));
setProgress(p);
const idx = Math.min(TIERS.length - 1, Math.floor(p * TIERS.length * 0.999));
setActive(idx);
};
onScroll();
window.addEventListener("scroll", onScroll, { passive: true });
return () => window.removeEventListener("scroll", onScroll);
}, []);
return (
Wherever you are, there's a clear next step. We help businesses move through these four tiers — starting wherever makes sense for you. {t.blurb}Four tiers, one direction: up.
: React.createElement(Icon[t.icon])}
{t.headline}
{t.bullets.map((b, j) => (