/* global React, gsap, ScrollTrigger */ function Method() { const t = window.useT(); const sectionRef = React.useRef(null); const whys = [ { n: t('why.0.n'), title: t('why.0.title'), body: t('why.0.body') }, { n: t('why.1.n'), title: t('why.1.title'), body: t('why.1.body') }, { n: t('why.2.n'), title: t('why.2.title'), body: t('why.2.body') }, ]; React.useEffect(() => { if (!window.gsap || !window.ScrollTrigger) return; if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) return; gsap.registerPlugin(ScrollTrigger); const ctx = gsap.context(() => { // Initial hidden state — prevent flicker before trigger fires gsap.set('.method-heading-group', { opacity: 0, y: 20 }); gsap.set('.method-support-copy', { opacity: 0, y: 20 }); gsap.set('.why-cell', { opacity: 0, y: 32 }); // Header block: fade-up gsap.to(['.method-heading-group', '.method-support-copy'], { opacity: 1, y: 0, duration: 0.7, ease: 'expo.out', stagger: 0.08, scrollTrigger: { trigger: sectionRef.current, start: 'top 80%', once: true, }, }); // Differentiator cells: stagger fade-up gsap.to('.why-cell', { opacity: 1, y: 0, duration: 0.85, ease: 'expo.out', stagger: 0.1, scrollTrigger: { trigger: '.why-grid', start: 'top 78%', once: true, }, }); }, sectionRef); return () => ctx.revert(); }, []); // Split title on \n to apply italic terracota to second line const rawTitle = t('method.header.title'); const titleLines = rawTitle.split('\n'); return (
{/* Header */}
{/* Left: eyebrow + h2 */}
{t('method.header.label')}

{titleLines[0]} {titleLines.length > 1 && ( <> {'\n'} {titleLines[1]} )}

{/* Right: supporting copy */}

{t('method.header.description')}

{/* Differentiators grid */}
{whys.map((w, i) => (
{w.n}

{w.title}

{w.body}

))}
); } window.Method = Method;