/** Shared section shell: anchor id + centered header (eyebrow / title / subtitle) + content. */ import type { ReactNode } from "react"; import { useReveal } from "../lib/reveal"; export function Section({ id, eyebrow, title, subtitle, children, className = "", }: { id?: string; eyebrow?: string; title?: string; /** A list renders one line per entry (deliberate breaks, e.g. the 1×/100× pair); a string wraps naturally. */ subtitle?: string | readonly string[]; children: ReactNode; className?: string; }) { const ref = useReveal(); return (
{(eyebrow || title || subtitle) && (
{eyebrow && (

{eyebrow}

)} {title && (

{title}

)} {subtitle && (

{typeof subtitle === "string" ? subtitle : subtitle.map((line) => ( {line} ))}

)}
)} {children}
); }