import {AbiirEyebrow} from '~/components/AbiirEyebrow'; import type {AbiirHomeHeroCms} from '~/lib/homeHero'; import {ABIIR_WIDE_CONTENT_SHELL_CLASS} from '~/lib/springGlowBanner'; import heroBrandSetNewSrc from '~/assets/hero-brand-set-new.png'; import heroBrandSetNewMobileSrc from '~/assets/hero-brand-set-new_mobile.png'; /** Figma hero band height + marquee. */ const FIGMA_HERO_H = 978; const FIGMA_MARQUEE_H = 68; /** Cropped mobile brand set (`hero-brand-set-new_mobile.png`, transparent padding removed). */ const MOBILE_HERO_IMAGE_W = 1092; const MOBILE_HERO_IMAGE_H = 887; /** Hero band background (left → right). */ const HERO_BG_GRADIENT_START = '#ae7f6b'; const HERO_BG_GRADIENT_END = '#cb9287'; function toHeroImageData( input: | { id?: string | null; url: string; altText?: string | null; width?: number | null; height?: number | null; } | null | undefined, ) { if (!input?.url) return null; return { id: input.id ?? undefined, url: input.url, altText: input.altText ?? '', width: input.width ?? undefined, height: input.height ?? undefined, }; } const HERO_IMAGE_STATIC = toHeroImageData({ id: 'hero-brand-set-new', url: heroBrandSetNewSrc, altText: 'ABiiR Skincare — Hydra Serum, Moisturizer & Gua Sha', width: 1710, height: FIGMA_HERO_H, }); function pickHeroImageData(cms: AbiirHomeHeroCms) { if (cms.image?.url) { return toHeroImageData({ id: cms.image.id, url: cms.image.url, altText: cms.image.alt, width: cms.image.width, height: cms.image.height, }); } return HERO_IMAGE_STATIC; } function isExternalHref(href: string) { return /^https?:\/\//i.test(href); } function HeroCtaLink({ href, className, style, children, }: { href: string; className?: string; style?: React.CSSProperties; children: React.ReactNode; }) { return ( {children} ); } /** Figma icon564:2080 — 15×15 */ function HeroCtaArrowIcon({className}: {className?: string}) { return ( ); } export type AbiirHomeHeroProps = { cms: AbiirHomeHeroCms; }; /** * Hero (legacy layout): left copy + brand set image — desktop `hero-brand-set-new.png`, * mobile (< lg) `hero-brand-set-new_mobile.png`. CMS hero image stays single-src for all breakpoints. * Band background: linear `#ae7f6b` → `#cb9277`. Radial `#eac5a5` glow behind the image (tight radius). */ export function AbiirHomeHero({cms}: AbiirHomeHeroProps) { const heroBurgundy = cms.accentBurgundy; const usesStaticHeroImage = !cms.image?.url; const imageData = pickHeroImageData(cms); const heroGradient = `linear-gradient(to right, ${HERO_BG_GRADIENT_START}, ${HERO_BG_GRADIENT_END})`; /** Behind the photo: smaller circle, `#eac5a5` strongest at center, transparent at outer edge. */ const imageRadialGlow = `radial-gradient(circle min(32vw, 260px) at 50% 50%, rgba(234,197,165,0.68) 0%, rgba(234,197,165,0.28) 48%, rgba(234,197,165,0.06) 72%, transparent 100%)`; return (
{/* Soft light orbs (legacy Figma accents) */}
{/* Copy column */}
{cms.eyebrow}

{cms.headlineLine1Prefix} {cms.headlineLine1Italic} {cms.headlineLine2Prefix} {cms.headlineLine2Accent}

{cms.body}

{cms.primaryCtaLabel} {cms.secondaryCtaLabel}
{/* Image column — mobile: full-bleed cropped asset; lg+: cover + radial glow */}
{imageData ? ( usesStaticHeroImage ? ( <> {imageData.altText {imageData.altText ) : ( <> {imageData.altText ) ) : null}
{/* Marquee — full width */}
{[0, 1].map((i) => (

{cms.marqueeText}

))}
); } export type {AbiirHomeHeroCms} from '~/lib/homeHero';