{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "simple-hero-section",
  "title": "Simple Hero Section",
  "description": "A landing page hero with an announcement pill, a headline whose words blur in one by one with an accent highlight, two buttons, avatar and rating proof, and a product window that rises in, over a grid and a glow that drifts toward the pointer.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/simple-hero-section/simple-hero-section.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useMotionValue, useReducedMotion, useSpring, useTransform } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport interface HeroAction {\n  label: string;\n  href?: string;\n  onClick?: () => void;\n}\n\nexport interface SimpleHeroSectionProps {\n  /** Small pill above the title, e.g. a launch. Pass null to hide it. */\n  announcement?: { tag?: string; label: string; href?: string } | null;\n  title?: string;\n  /** Part of the title to set in the accent style. Must appear in the title. */\n  highlight?: string;\n  description?: string;\n  primaryAction?: HeroAction | null;\n  secondaryAction?: HeroAction | null;\n  /** Social proof under the buttons. Pass null to hide it. */\n  proof?: { avatars?: string[]; text: string; rating?: number } | null;\n  /** Shown under the text with a soft fade at its bottom edge. Defaults to a drawn product window; pass null to hide. */\n  media?: React.ReactNode;\n  align?: \"center\" | \"left\";\n  /** Accent used for the highlighted words and the background glow. */\n  accent?: string;\n  /** Background glow drifts toward the pointer. */\n  interactive?: boolean;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: {\n    bg: \"#0A0A0A\",\n    text: \"#F5F4F1\",\n    muted: \"rgba(245,244,241,0.62)\",\n    faint: \"rgba(245,244,241,0.38)\",\n    border: \"rgba(255,255,255,0.1)\",\n    pill: \"rgba(255,255,255,0.04)\",\n    primary: \"#F5F4F1\",\n    onPrimary: \"#0A0A0A\",\n    secondary: \"rgba(255,255,255,0.06)\",\n    grid: \"rgba(255,255,255,0.06)\",\n    window: \"#121212\",\n    windowLine: \"rgba(255,255,255,0.08)\",\n    ring: \"rgba(245,244,241,0.6)\",\n  },\n  light: {\n    bg: \"#FAFAF8\",\n    text: \"#0A0A0A\",\n    muted: \"rgba(10,10,10,0.62)\",\n    faint: \"rgba(10,10,10,0.4)\",\n    border: \"rgba(10,10,10,0.1)\",\n    pill: \"rgba(10,10,10,0.03)\",\n    primary: \"#0A0A0A\",\n    onPrimary: \"#FAFAF8\",\n    secondary: \"rgba(10,10,10,0.05)\",\n    grid: \"rgba(10,10,10,0.06)\",\n    window: \"#FFFFFF\",\n    windowLine: \"rgba(10,10,10,0.08)\",\n    ring: \"rgba(10,10,10,0.5)\",\n  },\n};\n\nconst DEFAULT_AVATARS = [\"/demo/41.webp\", \"/demo/42.webp\", \"/demo/44.webp\", \"/demo/49.webp\"];\n\nfunction Action({ action, primary, p }: { action: HeroAction; primary?: boolean; p: (typeof PALETTES)[\"dark\"] }) {\n  const cls = \"inline-flex h-11 items-center justify-center gap-2 rounded-full px-5 text-[15px] font-medium no-underline transition-[transform,opacity] duration-150 hover:opacity-90 active:scale-[0.98] outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const style: React.CSSProperties = primary\n    ? { background: p.primary, color: p.onPrimary, [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.bg }\n    : { background: p.secondary, color: p.text, border: `1px solid ${p.border}`, [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.bg };\n  const inner = (\n    <>\n      {action.label}\n      {primary && (\n        <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n          <path d=\"M3 8h10M9 4l4 4-4 4\" />\n        </svg>\n      )}\n    </>\n  );\n  return action.href ? (\n    <a href={action.href} onClick={action.onClick} className={cls} style={style}>\n      {inner}\n    </a>\n  ) : (\n    <button type=\"button\" onClick={action.onClick} className={cn(cls, \"cursor-pointer border-0\")} style={style}>\n      {inner}\n    </button>\n  );\n}\n\n/* A drawn product window, so the hero looks finished before you add your own screenshot. */\nfunction DefaultMedia({ p, accent, reduce }: { p: (typeof PALETTES)[\"dark\"]; accent: string; reduce: boolean }) {\n  const bars = [62, 80, 45, 92, 70, 58, 86];\n  return (\n    <div className=\"overflow-hidden rounded-[14px] border shadow-[0_30px_80px_-30px_rgba(0,0,0,0.5)]\" style={{ background: p.window, borderColor: p.border }}>\n      <div className=\"flex items-center gap-1.5 border-b px-4 py-3\" style={{ borderColor: p.windowLine }}>\n        {[0, 1, 2].map((i) => (\n          <span key={i} className=\"h-2.5 w-2.5 rounded-full\" style={{ background: p.windowLine }} />\n        ))}\n        <span className=\"ml-3 h-2 w-40 rounded-full\" style={{ background: p.windowLine }} />\n      </div>\n      <div className=\"grid grid-cols-[140px_1fr] gap-0 max-sm:grid-cols-1\">\n        <div className=\"flex flex-col gap-2.5 border-r p-4 max-sm:hidden\" style={{ borderColor: p.windowLine }}>\n          {[70, 52, 64, 48, 58].map((w, i) => (\n            <span key={i} className=\"h-2 rounded-full\" style={{ width: `${w}%`, background: i === 1 ? accent : p.windowLine, opacity: i === 1 ? 0.8 : 1 }} />\n          ))}\n        </div>\n        <div className=\"p-5\">\n          <div className=\"grid grid-cols-3 gap-3\">\n            {[\"2,481\", \"94%\", \"12 days\"].map((v, i) => (\n              <div key={v} className=\"min-w-0 rounded-lg border p-2.5 sm:p-3\" style={{ borderColor: p.windowLine }}>\n                <span className=\"block h-1.5 w-10 rounded-full\" style={{ background: p.windowLine }} />\n                <span className=\"mt-2 block text-[12px] font-semibold whitespace-nowrap tabular-nums sm:text-[15px]\" style={{ color: i === 0 ? accent : p.text }}>\n                  {v}\n                </span>\n              </div>\n            ))}\n          </div>\n          <div className=\"mt-4 flex h-28 items-end gap-2 rounded-lg border p-3\" style={{ borderColor: p.windowLine }}>\n            {bars.map((h, i) => (\n              <motion.span\n                key={i}\n                className=\"flex-1 rounded-t-[4px]\"\n                style={{ background: i === 3 ? accent : p.windowLine }}\n                initial={reduce ? false : { height: \"8%\" }}\n                animate={{ height: `${h}%` }}\n                transition={{ delay: reduce ? 0 : 0.7 + i * 0.06, type: \"spring\", stiffness: 140, damping: 18 }}\n              />\n            ))}\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nexport function SimpleHeroSection({\n  announcement = { tag: \"New\", label: \"Roadmaps now sync with your code\", href: \"#\" },\n  title = \"Plan the whole quarter in one afternoon\",\n  highlight = \"one afternoon\",\n  description = \"Specs, roadmaps and releases in one calm workspace. Your team always knows what ships next, without another status meeting.\",\n  primaryAction = { label: \"Start for free\", href: \"#\" },\n  secondaryAction = { label: \"Book a demo\", href: \"#\" },\n  proof = { avatars: DEFAULT_AVATARS, text: \"Loved by 9,000+ product teams\", rating: 4.9 },\n  media,\n  align = \"center\",\n  accent = \"#7C8CFF\",\n  interactive = true,\n  theme = \"dark\",\n  className,\n}: SimpleHeroSectionProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const ref = React.useRef<HTMLElement>(null);\n  const mx = useMotionValue(0.5);\n  const my = useMotionValue(0.3);\n  const sx = useSpring(mx, { stiffness: 60, damping: 20 });\n  const sy = useSpring(my, { stiffness: 60, damping: 20 });\n  const glow = useTransform([sx, sy], ([x, y]: number[]) => `radial-gradient(600px circle at ${x * 100}% ${y * 100}%, ${accent}33, transparent 70%)`);\n  const centered = align === \"center\";\n\n  // Split the title into words; words inside the highlight get the accent style.\n  const words = React.useMemo(() => {\n    const at = highlight ? title.indexOf(highlight) : -1;\n    const parts: { w: string; hi: boolean }[] = [];\n    const push = (text: string, hi: boolean) => text.split(/\\s+/).filter(Boolean).forEach((w) => parts.push({ w, hi }));\n    if (at < 0) push(title, false);\n    else {\n      push(title.slice(0, at), false);\n      push(highlight!, true);\n      push(title.slice(at + highlight!.length), false);\n    }\n    return parts;\n  }, [title, highlight]);\n\n  const show = media === undefined ? <DefaultMedia p={p} accent={accent} reduce={reduce} /> : media;\n  const rise = (delay: number) => (reduce ? {} : { initial: { opacity: 0, y: 14 }, animate: { opacity: 1, y: 0 }, transition: { delay, duration: 0.55, ease: [0.2, 0.7, 0.2, 1] as const } });\n\n  return (\n    <section\n      ref={ref}\n      onPointerMove={(e) => {\n        if (!interactive || reduce || !ref.current) return;\n        const r = ref.current.getBoundingClientRect();\n        mx.set((e.clientX - r.left) / r.width);\n        my.set((e.clientY - r.top) / r.height);\n      }}\n      className={cn(\"relative isolate w-full overflow-hidden\", className)}\n      style={{ background: p.bg, color: p.text }}\n    >\n      <div\n        aria-hidden=\"true\"\n        className=\"pointer-events-none absolute inset-0 -z-10\"\n        style={{\n          backgroundImage: `linear-gradient(${p.grid} 1px, transparent 1px), linear-gradient(90deg, ${p.grid} 1px, transparent 1px)`,\n          backgroundSize: \"56px 56px\",\n          maskImage: \"radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%)\",\n          WebkitMaskImage: \"radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%)\",\n        }}\n      />\n      <motion.div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0 -z-10\" style={{ background: glow }} />\n\n      <div className={cn(\"mx-auto flex max-w-5xl flex-col px-6 pt-20 pb-16 sm:pt-28\", centered ? \"items-center text-center\" : \"items-start text-left\")}>\n        {announcement && (\n          <motion.div {...rise(0)}>\n            <a\n              href={announcement.href ?? \"#\"}\n              className=\"group inline-flex items-center gap-2 rounded-full border py-1 pr-3 pl-1 text-[13px] no-underline transition-colors outline-none focus-visible:ring-2\"\n              style={{ borderColor: p.border, background: p.pill, color: p.muted, [\"--tw-ring-color\" as string]: p.ring }}\n            >\n              {announcement.tag && (\n                <span className=\"rounded-full px-2 py-0.5 text-[11.5px] font-semibold\" style={{ background: accent, color: \"#0A0A0A\" }}>\n                  {announcement.tag}\n                </span>\n              )}\n              <span className=\"transition-colors group-hover:text-current\" style={{ color: p.text }}>\n                {announcement.label}\n              </span>\n              <svg width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" className=\"transition-transform group-hover:translate-x-0.5\" aria-hidden=\"true\">\n                <path d=\"m6 3 5 5-5 5\" />\n              </svg>\n            </a>\n          </motion.div>\n        )}\n\n        <h1 className={cn(\"mt-6 mb-0 max-w-[18ch] text-[40px] leading-[1.05] font-semibold tracking-[-0.035em] sm:text-[60px] lg:text-[68px]\", centered && \"mx-auto\")} aria-label={title}>\n          {words.map((x, i) => (\n            <motion.span\n              key={i}\n              aria-hidden=\"true\"\n              className=\"inline-block whitespace-pre\"\n              initial={reduce ? false : { opacity: 0, y: \"0.35em\", filter: \"blur(6px)\" }}\n              animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n              transition={{ delay: reduce ? 0 : 0.08 + i * 0.05, duration: 0.6, ease: [0.2, 0.7, 0.2, 1] }}\n              style={x.hi ? { backgroundImage: `linear-gradient(90deg, ${accent}, ${p.text})`, WebkitBackgroundClip: \"text\", backgroundClip: \"text\", color: \"transparent\" } : undefined}\n            >\n              {x.w}\n              {i < words.length - 1 ? \" \" : \"\"}\n            </motion.span>\n          ))}\n        </h1>\n\n        {description && (\n          <motion.p {...rise(0.35)} className={cn(\"mt-5 mb-0 max-w-[560px] text-[16px] leading-[1.6] sm:text-[18px]\", centered && \"mx-auto\")} style={{ color: p.muted }}>\n            {description}\n          </motion.p>\n        )}\n\n        {(primaryAction || secondaryAction) && (\n          <motion.div {...rise(0.45)} className={cn(\"mt-8 flex flex-wrap gap-3\", centered && \"justify-center\")}>\n            {primaryAction && <Action action={primaryAction} primary p={p} />}\n            {secondaryAction && <Action action={secondaryAction} p={p} />}\n          </motion.div>\n        )}\n\n        {proof && (\n          <motion.div {...rise(0.55)} className={cn(\"mt-8 flex items-center gap-3\", centered && \"justify-center\")}>\n            {proof.avatars && proof.avatars.length > 0 && (\n              <div className=\"flex -space-x-2\">\n                {proof.avatars.slice(0, 5).map((src) => (\n                  // eslint-disable-next-line @next/next/no-img-element\n                  <img key={src} src={src} alt=\"\" width={32} height={32} className=\"h-8 w-8 rounded-full object-cover\" style={{ boxShadow: `0 0 0 2px ${p.bg}` }} />\n                ))}\n              </div>\n            )}\n            <div className=\"text-left text-[13px] leading-[1.35]\">\n              {proof.rating !== undefined && (\n                <span className=\"flex items-center gap-1\" style={{ color: p.text }} aria-label={`Rated ${proof.rating} out of 5`}>\n                  {[0, 1, 2, 3, 4].map((i) => (\n                    <svg key={i} width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill={i < Math.round(proof.rating!) ? \"#F5B83D\" : p.border} aria-hidden=\"true\">\n                      <path d=\"M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8Z\" />\n                    </svg>\n                  ))}\n                  <span className=\"ml-1 tabular-nums\">{proof.rating}</span>\n                </span>\n              )}\n              <span style={{ color: p.faint }}>{proof.text}</span>\n            </div>\n          </motion.div>\n        )}\n\n        {show && (\n          <motion.div\n            className=\"relative mt-14 w-full\"\n            initial={reduce ? false : { opacity: 0, y: 40, scale: 0.98 }}\n            animate={{ opacity: 1, y: 0, scale: 1 }}\n            transition={{ delay: reduce ? 0 : 0.6, duration: 0.8, ease: [0.2, 0.7, 0.2, 1] }}\n          >\n            {show}\n            <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-x-0 bottom-0 h-1/3\" style={{ background: `linear-gradient(to bottom, transparent, ${p.bg})` }} />\n          </motion.div>\n        )}\n      </div>\n    </section>\n  );\n}\n\nexport default SimpleHeroSection;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}