// Slim page hero used at the top of every subpage. // Dark teal anchor band, eyebrow + h1 + subhead, optional CTA row. function PageHero({ eyebrow, title, italic, subhead, detail, ctas, primaryGold }) { return (
{eyebrow && (
{eyebrow}
)}

{title} {italic && <> {italic}}

{subhead && (

{subhead}

)} {detail && (

{detail}

)} {ctas && ctas.length > 0 && (
{ctas.map((c, i) => { const primary = c.variant !== 'outline'; const gold = primary && primaryGold; return ( { if (gold) { e.currentTarget.style.background = '#fff'; e.currentTarget.style.color = '#3F8074'; e.currentTarget.style.borderColor = '#fff'; } else if (primary) { e.currentTarget.style.background = '#3F8074'; e.currentTarget.style.color = '#fff'; e.currentTarget.style.borderColor = '#3F8074'; } else { e.currentTarget.style.background = '#faf9f6'; e.currentTarget.style.color = '#163F34'; e.currentTarget.style.borderColor = '#faf9f6'; } }} onMouseLeave={e => { if (gold) { e.currentTarget.style.background = '#C4924A'; e.currentTarget.style.color = '#fff'; e.currentTarget.style.borderColor = '#C4924A'; } else if (primary) { e.currentTarget.style.background = '#faf9f6'; e.currentTarget.style.color = '#163F34'; e.currentTarget.style.borderColor = '#faf9f6'; } else { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = '#faf9f6'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.4)'; } }} >{c.label} ); })}
)}
); } // Calendly inline embed used inside CTABand when calendar=true. function CTABandCalendly({ url }) { const ref = React.useRef(null); const [height, setHeight] = React.useState(660); React.useEffect(() => { if (!url || !ref.current) return; const existing = document.querySelector('script[data-calendly]'); if (!existing) { const s = document.createElement('script'); s.src = 'https://assets.calendly.com/assets/external/widget.js'; s.async = true; s.setAttribute('data-calendly', 'true'); document.body.appendChild(s); } else if (window.Calendly && window.Calendly.initInlineWidget) { window.Calendly.initInlineWidget({ url, parentElement: ref.current }); } }, [url]); React.useEffect(() => { if (document.querySelector('link[data-calendly-css]')) return; const link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'https://assets.calendly.com/assets/external/widget.css'; link.setAttribute('data-calendly-css', 'true'); document.head.appendChild(link); }, []); // Snap container to the height Calendly's iframe actually needs. React.useEffect(() => { function onMessage(e) { if (!e.data || typeof e.data !== 'object') return; if (e.data.event === 'calendly.page_height') { const raw = e.data.payload && e.data.payload.height; const h = typeof raw === 'number' ? raw : parseInt(raw, 10); if (h > 100) setHeight(h); } } window.addEventListener('message', onMessage); return () => window.removeEventListener('message', onMessage); }, []); return (
); } function CTABand({ eyebrow, title, italic, body, primaryHref = 'contact.html', primaryLabel = 'Book A Free Call', secondaryHref, secondaryLabel, calendar = false, calendlyUrl = 'https://calendly.com/chekbooks-schedule/30min' }) { return (
{eyebrow &&
{eyebrow}
}

{title}{italic && <> {italic}}

{body &&

{body}

}
{ e.currentTarget.style.background = '#fff'; e.currentTarget.style.color = '#163F34'; e.currentTarget.style.borderColor = '#fff'; }} onMouseLeave={e => { e.currentTarget.style.background = '#3F8074'; e.currentTarget.style.color = '#fff'; e.currentTarget.style.borderColor = '#3F8074'; }} >{primaryLabel} {secondaryHref && { e.currentTarget.style.background = '#faf9f6'; e.currentTarget.style.color = '#163F34'; e.currentTarget.style.borderColor = '#faf9f6'; }} onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = '#faf9f6'; e.currentTarget.style.borderColor = 'rgba(255,255,255,0.4)'; }} >{secondaryLabel}}
); } // Generic section heading block used inside content sections. function SectionHeading({ eyebrow, title, subhead, align = 'center' }) { return (
{eyebrow &&
{eyebrow}
}

{title}

{subhead &&

{subhead}

}
); } Object.assign(window, { PageHero, CTABand, SectionHeading });