import type { ReactNode } from 'react';
import Reveal from '@/components/landing/reveal';

/** Title band at the top of every secondary public page. */
export default function PublicPageHeader({
    kicker,
    title,
    intro,
    children,
}: {
    kicker: string;
    title: string;
    intro: ReactNode;
    children?: ReactNode;
}) {
    return (
        <section className="bg-brand-dark px-5 pt-14 pb-14 sm:px-6 lg:px-10 lg:pt-20 lg:pb-20">
            <Reveal className="mx-auto w-full max-w-6xl">
                <p className="mb-3.5 text-xs font-semibold tracking-[0.14em] text-highlight uppercase">
                    {kicker}
                </p>
                <h1 className="max-w-3xl font-display text-[clamp(34px,5vw,56px)] leading-[1.06] font-semibold tracking-[-0.015em] text-balance text-white">
                    {title}
                </h1>
                <div className="mt-5 max-w-[60ch] text-[16.5px] leading-[1.72] text-white/70">
                    {intro}
                </div>
                {children}
            </Reveal>
        </section>
    );
}
