import type { ReactNode } from 'react' import { useReveal } from '../hooks/useReveal' import { cx } from '../lib/cx' import { ChevronsIcon } from './Icons' /** `.container` — 1200px max, 16px gutters that grow to 24px from 640px up. */ export function Container({ className, children }: { className?: string; children: ReactNode }) { return (
{children}
) } /** Small uppercase kicker with the leading teal rule. */ export function Eyebrow({ tone = 'light', className, children }: { tone?: Tone; className?: string; children: ReactNode }) { return (
{children}
) } type Tone = 'light' | 'dark' /** * `.lead` type without width or colour, for the one lead that needs its own of * both. Passing those to `SectionLead` instead would not work: Tailwind orders * conflicting utilities by the stylesheet, not by `className`. */ export const leadText = 'mb-0 text-[clamp(18px,2vw,22px)] leading-[1.55] compact:text-[17px] compact:leading-[1.52]' export function SectionLead({ tone = 'light', className, children }: { tone?: Tone; className?: string; children: ReactNode }) { return (

{children}

) } /** * `.section-head` — stacked by default; `split` moves the lead into a second * column from 900px up, right-aligned against the heading. */ export function SectionHead({ eyebrow, title, titleClassName, lead, tone = 'light', split = false, }: { eyebrow: string title: ReactNode titleClassName?: string lead?: ReactNode tone?: Tone split?: boolean }) { const { ref, revealClass } = useReveal() if (!split) { return (
{eyebrow}

{title}

{lead ? {lead} : null}
) } return (
{eyebrow}

{title}

{lead ? ( {lead} ) : null}
) } const sectionTones = { light: 'bg-paper', white: 'bg-white', dark: 'bg-navy text-white', /** For sections that paint their own multi-layer background in index.css. */ none: '', } /** `.section` — the shared vertical rhythm and background variants. */ export function Section({ id, tone = 'light', compact = false, className, children, }: { id?: string tone?: keyof typeof sectionTones compact?: boolean className?: string children: ReactNode }) { return (
{children}
) } /** "Листайте карточки в сторону" — only shown while the row still scrolls. */ export function ScrollHint({ tone = 'light', children }: { tone?: Tone; children: ReactNode }) { return ( ) }