import { cn } from "@/lib/utils"; /** * Persian / Vazirmatn type scale. * Avoid tracking-tight (hurts Arabic script). Keep clear step between levels. * H1 hero → H2 sections → H3 cards/subheads → H4 small titles. */ const levels = { 1: "text-3xl font-bold leading-[1.35] text-pretty sm:text-4xl sm:leading-[1.3] lg:text-5xl lg:leading-[1.25]", 2: "text-2xl font-bold leading-[1.4] text-pretty sm:text-3xl sm:leading-[1.35]", 3: "text-xl font-semibold leading-[1.45]", 4: "text-lg font-semibold leading-[1.5]", } as const; type HeadingProps = React.ComponentProps<"h1"> & { as?: "h1" | "h2" | "h3" | "h4"; level?: keyof typeof levels; }; export function Heading({ as, level = 2, className, ...props }: HeadingProps) { const Tag = as ?? (`h${level}` as "h1" | "h2" | "h3" | "h4"); return ; }