import { motion, useScroll, useTransform, useSpring } from "framer-motion";
import { useRef, useEffect, useState } from "react";
import { FileText, Figma, Code, Rocket, ArrowRight, Smartphone, Monitor, Palette, Database, Cloud, CheckCircle } from "lucide-react";
import { Button } from "./ui/button";
import { GridPattern } from "./GridPattern";
const steps = [
{
id: "discovery",
title: "Define the Scope",
subtext: "We begin by understanding your vision, identifying key problems, and drafting a well-defined scope with clear goals and deliverables.",
icon: FileText,
visual: "workspace_parallax",
color: "from-blue-500/20 to-cyan-500/20"
},
{
id: "design",
title: "Designing the Experience",
subtext: "Our designers craft intuitive and stunning user interfaces in Figma, turning requirements into clickable, user-first prototypes.",
icon: Figma,
visual: "figma_canvas_animation",
color: "from-purple-500/20 to-pink-500/20"
},
{
id: "development",
title: "Engineering the Solution",
subtext: "We bring designs to life with clean, scalable code—choosing the right tech stack to ensure performance and longevity.",
icon: Code,
visual: "code_editor_animation",
color: "from-green-500/20 to-emerald-500/20"
},
{
id: "launch",
title: "Launch & Beyond",
subtext: "We ship your product with confidence—ensuring QA, deployment, and post-launch support to keep it growing.",
icon: Rocket,
visual: "launch_animation",
color: "from-orange-500/20 to-red-500/20"
}
];
const WorkspaceVisual = ({ inView }: { inView: boolean }) => {
return (
{/* Floating Documents */}
{/* Sticky Notes */}
{/* Pointer Highlighting */}
);
};
const FigmaCanvasVisual = ({ inView }: { inView: boolean }) => {
return (
{/* UI Frames */}
{/* Design Tools */}
);
};
const CodeEditorVisual = ({ inView }: { inView: boolean }) => {
const [typedText, setTypedText] = useState("");
const codeSnippet = "const app = () => {\n return Hello World
\n}";
useEffect(() => {
if (inView) {
let i = 0;
const interval = setInterval(() => {
if (i < codeSnippet.length) {
setTypedText(codeSnippet.slice(0, i + 1));
i++;
} else {
clearInterval(interval);
}
}, 100);
return () => clearInterval(interval);
} else {
setTypedText("");
}
}, [inView]);
return (
{/* Code Editor Interface */}
{/* Typed Code */}
{typedText}
{/* Tech Stack Icons */}
);
};
const LaunchVisual = ({ inView }: { inView: boolean }) => {
return (
{/* Rocket Animation */}
{/* Analytics Dashboard */}
{/* Success Indicators */}
);
};
const ProcessStep = ({ step, index, inView }: { step: typeof steps[0]; index: number; inView: boolean }) => {
const Icon = step.icon;
const renderVisual = () => {
switch (step.visual) {
case "workspace_parallax":
return ;
case "figma_canvas_animation":
return ;
case "code_editor_animation":
return ;
case "launch_animation":
return ;
default:
return null;
}
};
const isEven = index % 2 === 0;
return (
{/* Content */}
{step.title}
{step.subtext}
{/* Visual */}
{renderVisual()}
);
};
export const ScrollParallaxProcess = () => {
const containerRef = useRef(null);
const { scrollYProgress } = useScroll({
target: containerRef,
offset: ["start end", "end start"]
});
const springScrollProgress = useSpring(scrollYProgress, {
stiffness: 100,
damping: 30,
restDelta: 0.001
});
const y1 = useTransform(springScrollProgress, [0, 1], [0, -100]);
const y2 = useTransform(springScrollProgress, [0, 1], [0, -200]);
const y3 = useTransform(springScrollProgress, [0, 1], [0, -50]);
return (
{/* Parallax Background Elements */}
How We Turn an Idea into a{" "}
Scalable Product
Our proven process transforms your vision into reality through strategic planning,
thoughtful design, and expert engineering—every step of the way.
{steps.map((step, index) => (
))}
{/* Final CTA */}
);
};