import React, { useRef } from 'react'; import { motion, useScroll, useTransform } from 'framer-motion'; import { Dumbbell, Cpu, Utensils, TrendingUp } from 'lucide-react'; const STEPS = [ { icon: Dumbbell, title: "Input", subtitle: "Log Training", description: "You log your workout (e.g., Heavy Leg Day, 90 min).", color: "bg-blue-500" }, { icon: Cpu, title: "Process", subtitle: "Analysis", description: "The Co-Pilot analyzes your metabolic state and recovery needs.", color: "bg-purple-500" }, { icon: Utensils, title: "Output", subtitle: "The Plan", description: "You get a specific food target: 'Eat 60g Carbs + 40g Protein now.'", color: "bg-primary-500" }, { icon: TrendingUp, title: "Result", subtitle: "Optimization", description: "You wake up stronger, not fatter. Performance is prioritized.", color: "bg-green-500" } ]; export const Logic: React.FC = () => { const containerRef = useRef(null); const { scrollYProgress } = useScroll({ target: containerRef, offset: ["start end", "end start"] }); const lineHeight = useTransform(scrollYProgress, [0, 0.8], ["0%", "100%"]); return (
{/* Background Effects */}

The Logic

How FitMate turns your sweat into data, and data into direction.

{/* Connecting Line */}
{STEPS.map((step, idx) => ( {/* Content Card */}
Step 0{idx + 1}

{step.subtitle}

{step.title}

{step.description}

{/* Icon Marker */}
{/* Empty spacer for layout balance */}
))}
); };