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 imageColRef = useRef(null); const imgRef = useRef(null); const textColRef = useRef(null); useLayoutEffect(() => { const ctx = gsap.context(() => { // Fade in the whole section gsap.fromTo(containerRef.current, { opacity: 0, y: 50 }, { opacity: 1, y: 0, duration: 1, ease: "power3.out", scrollTrigger: { trigger: containerRef.current, start: "top 80%", once: true } } ); // Desktop specific animations const mm = gsap.matchMedia(); mm.add("(min-width: 1024px)", () => { if (containerRef.current && imageColRef.current && imgRef.current) { // Pinning logic ScrollTrigger.create({ trigger: containerRef.current, start: "top center", end: "bottom center", pin: imageColRef.current, pinSpacing: false, scrub: true, }); // Scroll-to-Zoom logic gsap.fromTo(imgRef.current, { scale: 1 }, { scale: 2.2, ease: "power1.inOut", scrollTrigger: { trigger: containerRef.current, start: "top bottom", end: "bottom top", scrub: 1, } } ); } // Animate steps as they come into view const steps = gsap.utils.toArray('.process-step'); steps.forEach((step: any) => { gsap.fromTo(step, { opacity: 0.3, x: 20 }, { opacity: 1, x: 0, duration: 0.5, scrollTrigger: { trigger: step, start: "top 80%", end: "top 50%", scrub: 0.5, toggleActions: "play reverse play reverse" } } ); }); }); }, containerRef); return () => ctx.revert(); }, []); return (
{/* Image Column - Will be pinned */}
Close up of server lights in dark room
construction

On-Site Support

Technicians dispatched within 2 hours for critical failures in the Bay Area.

{/* Text Content */}
Process

One consultation to begin,
three steps to clarity.

{[ { 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}

))}
); }; export default Process;