import React, { useLayoutEffect, useRef } from 'react'; import { motion } from 'framer-motion'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; gsap.registerPlugin(ScrollTrigger); const Process: React.FC = () => { const containerRef = useRef(null); const imgRef = useRef(null); useLayoutEffect(() => { const ctx = gsap.context((self) => { // Dramatic Zoom Animation if (containerRef.current && imgRef.current) { gsap.fromTo(imgRef.current, { scale: 1, transformOrigin: 'center center' }, { scale: 2.0, ease: "none", scrollTrigger: { trigger: containerRef.current, start: "top bottom", end: "bottom top", scrub: true, } } ); } // Animate steps - even slower, one by one appearance const steps = gsap.utils.selector(containerRef.current)('.process-step'); steps.forEach((step: any, index: number) => { gsap.fromTo(step, { opacity: 0, y: 60 }, { opacity: 1, y: 0, duration: 2, ease: "power3.out", scrollTrigger: { trigger: step, start: "top 95%", end: "top 40%", toggleActions: "play reverse play reverse", scrub: 1.5 } } ); }); }, containerRef); return () => ctx.revert(); }, []); return (
{/* Fixed Background Image - constrained to this section via clip-path */}
Modern server rack infrastructure {/* Gradient overlay for text readability */}
{/* Content - positioned relative, scrolls over the fixed image */}
{/* Header - Static on mobile, fixed on desktop */}
Process

One consultation to begin,
three steps to clarity.

{/* Spacer for first screen - shortened */}
{/* Steps - LEFT side on desktop, full width on mobile */}
{[ { num: "1", title: "Audit & Assess", desc: "We dive deep into your current infrastructure to identify vulnerabilities and opportunities for optimization." }, { num: "2", title: "Implement & Secure", desc: "Our team deploys the necessary hardware and software solutions with minimal disruption to your daily operations." }, { num: "3", title: "Monitor & Maintain", desc: "Ongoing 24/7 monitoring ensures problems are solved before you even notice them." } ].map((step, i) => (
{step.num}

{step.title}

{step.desc}

))}
{/* End spacer - shortened */}
); }; export default Process;