// Round 2 — Hero (2 variations), repositioned // Smooth-scroll to the "How it works" section. Used by the hero secondary CTA. function scrollToHowItWorks(e) { if (e && e.preventDefault) e.preventDefault(); const el = typeof document !== 'undefined' && document.getElementById('how-it-works'); if (el && typeof el.scrollIntoView === 'function') { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } function Hero({ variant = 'A', copy, onCta }) { if (variant === 'B') return ; return ; } function HeroTypographic({ copy, onCta }) { const h = copy.hero; // Track viewport so we can switch to vertical layout on mobile. const [w, setW] = React.useState(typeof window !== 'undefined' ? window.innerWidth : 1280); React.useEffect(() => { const onR = () => setW(window.innerWidth); window.addEventListener('resize', onR); return () => window.removeEventListener('resize', onR); }, []); const isMobile = w < 768; const isTablet = w >= 768 && w < 1024; // 50/50 on tablet, 55/45 on desktop const cols = isTablet ? '1fr 1fr' : '55fr 45fr'; // Mobile: keep the original vertical layout if (isMobile) { return ( {h.eyebrowA} {h.titleA[0]} {h.titleA[1]} {h.subA} {copy.cta} {h.ctaSecondary} ); } // Desktop / tablet: split-screen, image full-bleed to the right edge. return ( {/* LEFT — content, vertically centered with generous padding */} {h.eyebrowA} {h.titleA[0]} {h.titleA[1]} {h.subA} {copy.cta} {h.ctaSecondary} {/* RIGHT — full-bleed image, flush to viewport right edge */} ); } function HeroSplit({ copy, onCta }) { const h = copy.hero; return ( {h.eyebrowA} {h.titleB[0]} {h.titleB[1]} {h.titleB[2]} {h.subB} {copy.cta} {h.ctaSecondary} → ); } Object.assign(window, { Hero });
{h.subA}
{h.subB}