import {Link} from 'react-router'; import {motion} from 'motion/react'; import type {SkinRitualSectionCms} from '~/lib/skinRitual'; import {MOCK_SKIN_RITUAL_SECTION_CMS} from '~/lib/skinRitual'; import {PAGE_TITLE_TYPOGRAPHY_CLASS} from '~/lib/pageTitle'; /** * GROQ: `home` singleton → skin ritual module. * Use with `context.sanity.loadQuery(SKIN_RITUAL_SECTION_GROQ)` or `useQuery` in the browser. */ export const SKIN_RITUAL_SECTION_GROQ = `*[_type == "home" && _id == "home"][0].skinRitualSection{ eyebrow, headlinePrefix, headlineItalic, intro, steps[]{ num, kicker, title, body, duration }, footerText, primaryCtaLabel, primaryCtaHref, sectionBackground, burgundy, gold, charcoal, muted, gridLine, numMuted }` as const; export {MOCK_SKIN_RITUAL_SECTION_CMS}; export type {SkinRitualSectionCms}; function isExternalHref(href: string) { return /^https?:\/\//i.test(href); } function PrimaryCta({ href, background, children, }: { href: string; background: string; children: React.ReactNode; }) { const className = 'inline-flex min-h-[51.844px] w-[min(100%,278.555px)] cursor-pointer items-center justify-center px-[34px] py-[17px] font-["Raleway",sans-serif] text-[14px] font-bold uppercase leading-[19.89px] tracking-[2.3868px] text-white no-underline transition-opacity duration-200 box-border hover:opacity-90'; const style = { boxSizing: 'border-box' as const, background, }; if (isExternalHref(href)) { return ( {children} ); } return ( {children} ); } export type SkinRitualProps = { cms: SkinRitualSectionCms; }; /** * `React/src/app/components/SkinRitual.tsx` — no raster images in reference; CMS-driven copy + grid. */ export function SkinRitual({cms}: SkinRitualProps) { const sectionBg = cms.sectionBackground; const burgundy = cms.burgundy; const gold = cms.gold; const charcoal = cms.charcoal; const muted = cms.muted; const gridLine = cms.gridLine; const numMuted = cms.numMuted; return ( {cms.eyebrow} {cms.headlinePrefix} {cms.headlineItalic} {cms.intro} {cms.steps.map((step, index) => ( {step.num} {step.kicker} {step.title} {step.body} {step.duration} ))} {cms.footerText} {cms.primaryCtaLabel} ); }
{step.num}
{step.kicker}
{step.body}