/* ============================================================ Agency BRN — Header + Hero + Trust strip + Problem ============================================================ */ const { useState, useEffect, useRef, useContext } = React; /* ---------- Header ---------- */ const SERVICE_SLUGS = [ "website-design-landing-pages", "google-business-profile-optimization", "crm-setup", "marketing-automation", "ai-powered-business-systems", "paid-traffic-strategy", "real-estate-rental-lead-systems", ]; function Header() { const { lang, setLang, t, basePath = "" } = useContext(window.LanguageContext); const [scrolled, setScrolled] = useState(false); const [open, setOpen] = useState(false); const [servicesOpen, setServicesOpen] = useState(false); const [mobileServicesOpen, setMobileServicesOpen] = useState(false); const servicesCloseTimer = useRef(null); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); useEffect(() => { document.body.style.overflow = open ? "hidden" : ""; }, [open]); // Close dropdowns on outside click useEffect(() => { if (!servicesOpen) return; const onDoc = (e) => { if (!e.target.closest(".nav__services")) setServicesOpen(false); }; document.addEventListener("click", onDoc); return () => document.removeEventListener("click", onDoc); }, [servicesOpen]); const homeHref = (frag) => `${basePath}index.html${frag}`; const servicePageHref = (slug) => `${basePath}services/${slug}.html`; const servicesIndexHref = `${basePath}services/`; const navItems = [ { href: homeHref("#home"), label: t.nav.home }, { href: homeHref("#about"), label: t.nav.about }, { isServices: true, label: t.nav.services }, { href: homeHref("#industries"), label: t.nav.industries }, { href: homeHref("#growth"), label: t.nav.growth }, { href: homeHref("#blog"), label: t.nav.blog }, { href: homeHref("#contact"), label: t.nav.contact }, ]; const openServices = () => { clearTimeout(servicesCloseTimer.current); setServicesOpen(true); }; const scheduleCloseServices = () => { clearTimeout(servicesCloseTimer.current); servicesCloseTimer.current = setTimeout(() => setServicesOpen(false), 180); }; // Service titles come from translations const serviceItems = (t.services.items || []).map((s, i) => ({ slug: SERVICE_SLUGS[i], title: s.title, })); return (
BRN Agency BRN
{["en", "pt", "es"].map((code) => ( ))}
{t.ctaShort}
{navItems.map((n, idx) => n.isServices ? (
{mobileServicesOpen && (
{serviceItems.map((it) => ( setOpen(false)} > {it.title} ))} setOpen(false)} className="mobile-menu__view-all"> {t.nav.viewAllServices || "View All Services"} →
)}
) : ( setOpen(false)}> {n.label} ) )} setOpen(false)}> {t.cta}
); } /* Small inline icon picker for the services dropdown — reuses Icon set */ function ServiceMenuIcon({ slug }) { const map = { "website-design-landing-pages": Icon.Web, "google-business-profile-optimization": Icon.Gmaps, "crm-setup": Icon.Crm, "marketing-automation": Icon.Automation, "ai-powered-business-systems": Icon.Ai, "paid-traffic-strategy": Icon.Ads, "real-estate-rental-lead-systems": Icon.House, }; const I = map[slug] || Icon.Sparkle; return ; } window.ServiceMenuIcon = ServiceMenuIcon; window.SERVICE_SLUGS = SERVICE_SLUGS; /* ---------- Hero ---------- */ function Hero() { const { t } = useContext(window.LanguageContext); const c = t.hero.cards; return (
{t.hero.eyebrow}

{t.hero.h1A} {t.hero.h1Grad} {t.hero.h1B}

{t.hero.sub}

{t.hero.trustLine}
{t.hero.trustLocal}
{/* 1. Website performance */}
{c.website.label} ● LIVE
{c.website.uptime}
99.98%
{c.website.load}
0.8s
{c.website.visitors}
2,847 ↑ 12%
{/* 2. CRM pipeline */}
{c.crm.label}
{[ { label: c.crm.new, count: 12, color: "linear-gradient(135deg, #3B82F6, #06B6D4)" }, { label: c.crm.qualified, count: 7, color: "linear-gradient(135deg, #8B5CF6, #EC4899)" }, { label: c.crm.booked, count: 4, color: "linear-gradient(135deg, #10B981, #22D3EE)" }, ].map((s, i) => (
{s.label} {s.count}
{Array.from({ length: Math.min(s.count, 4) }).map((_, j) => ( ))}
))}
{/* 3. Google Business visibility */}
{c.gbp.label}
4.9
★★★★★
142 {c.gbp.reviews}
{c.gbp.appears}
{/* 4. AI assistant */}
{c.ai.label}
{c.ai.title}
{c.ai.body}
SMS Email WhatsApp
{/* 5. Lead growth analytics */}
{c.analytics.label} 30d
{c.analytics.value}
↑ {c.analytics.delta}
{c.analytics.caption}
{/* 6. Automation status */}
{c.automation.label} {c.automation.live}
{c.automation.count.split(" ")[0]}
{c.automation.running}
{/* 7. Review growth */}
{c.reviews.label}
{c.reviews.value}
{c.reviews.caption}
{[26, 40, 32, 58, 44, 70, 88].map((h, i) => ( ))}
{/* 8. Quote requests */}
{c.quotes.label}
{c.quotes.value}
{c.quotes.caption}
{c.quotes.conversion}
{c.quotes.conversionValue}
); } /* ---------- Trust strip ---------- */ function TrustStrip() { const { t } = useContext(window.LanguageContext); const icons = [, , , , ]; return (
{t.trust.label}
{t.trust.items.map((label, i) => ( {React.cloneElement(icons[i], { width: 18, height: 18 })} {label} ))}
); } /* ---------- Problem ---------- */ function Problem() { const { t } = useContext(window.LanguageContext); return (
{t.problem.eyebrow}

{t.problem.h2A} {t.problem.h2Grad} {t.problem.h2B}

{t.problem.body}

{t.problem.body2}

{t.problem.stats.map((s, i) => (
{s.value}
{s.label}
))}
); } window.Header = Header; window.Hero = Hero; window.TrustStrip = TrustStrip; window.Problem = Problem;