{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-product-shot",
  "title": "Hero with product shot",
  "description": "Centered hero over a dot grid with a tilting, parallax product mock that goes live on click (numbers roll, chart grows, floating booking toast), avatar trust row and a trial dialog with email validation and an inbox success state.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://goodui.dev/r/avatar.json",
    "https://goodui.dev/r/badge.json",
    "https://goodui.dev/r/button.json",
    "https://goodui.dev/r/dialog.json",
    "https://goodui.dev/r/dot-grid.json",
    "https://goodui.dev/r/input.json",
    "https://goodui.dev/r/number-flow.json",
    "https://goodui.dev/r/success-check.json",
    "https://goodui.dev/r/tilt-card.json"
  ],
  "files": [
    {
      "path": "registry/blocks/marketing/hero-product-shot.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ArrowRight, CalendarCheck, Check, Play, Sparkles, Star, TrendingUp } from \"lucide-react\"\nimport { Avatar, AvatarGroup } from \"@/components/goodui/avatar\"\nimport { Badge } from \"@/components/goodui/badge\"\nimport { Button } from \"@/components/goodui/button\"\nimport { Dialog } from \"@/components/goodui/dialog\"\nimport { Input } from \"@/components/goodui/input\"\nimport { DotGrid } from \"@/components/goodui/dot-grid\"\nimport { TiltCard, TiltCardLayer } from \"@/components/goodui/tilt-card\"\nimport { SuccessCheck } from \"@/components/goodui/success-check\"\nimport { NumberFlow } from \"@/components/goodui/number-flow\"\nimport { cn } from \"@/lib/utils\"\n\n/* ---------- Demo data ---------- */\n\nconst CLIENTS = [\"Maya Chen\", \"Leo Park\", \"Priya Nair\", \"Sam Okafor\", \"Lena Fischer\"]\nconst BARS = [42, 58, 51, 74, 66, 88, 79]\nconst BARS_LIVE = [48, 66, 60, 82, 74, 96, 91]\nconst DAYS = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"]\nconst UPCOMING = [\n  { time: \"9:30\", client: \"Grace Kim\", service: \"Cut & blow-dry\", color: \"var(--chart-1)\" },\n  { time: \"11:00\", client: \"Daniel Ortiz\", service: \"Beard trim\", color: \"var(--chart-2)\" },\n  { time: \"2:15\", client: \"Mia Rossi\", service: \"Balayage\", color: \"var(--chart-4)\" },\n]\n\n/* ---------- Product mock ---------- */\n\nfunction ProductMock({ live }: { live: boolean }) {\n  const bars = live ? BARS_LIVE : BARS\n  return (\n    <div className=\"flex h-full w-full overflow-hidden rounded-xl border bg-card text-card-foreground shadow-2xl\" aria-hidden=\"true\">\n      <div className=\"hidden w-32 shrink-0 flex-col gap-1 border-r bg-muted/40 p-3 sm:flex\">\n        <div className=\"mb-3 flex items-center gap-2 px-1\">\n          <span className=\"size-5 rounded-md bg-primary\" />\n          <span className=\"h-2 w-14 rounded bg-foreground/70\" />\n        </div>\n        {[\"Calendar\", \"Clients\", \"Services\", \"Reports\", \"Settings\"].map((n, i) => (\n          <div key={n} className={cn(\"flex items-center gap-2 rounded-md px-2 py-1.5\", i === 0 && \"bg-background shadow-xs\")}>\n            <span className={cn(\"size-3 rounded-sm\", i === 0 ? \"bg-primary\" : \"bg-muted-foreground/30\")} />\n            <span className={cn(\"h-1.5 rounded\", i === 0 ? \"w-12 bg-foreground/70\" : \"w-10 bg-muted-foreground/30\")} />\n          </div>\n        ))}\n      </div>\n      <div className=\"flex min-w-0 flex-1 flex-col gap-3 p-3 sm:p-4\">\n        <div className=\"flex items-center justify-between\">\n          <div>\n            <div className=\"text-[11px] text-muted-foreground\">This week</div>\n            <div className=\"text-sm font-semibold\">Bookings overview</div>\n          </div>\n          <span className={cn(\"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium\", live ? \"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300\" : \"bg-muted text-foreground/80\")}>\n            <span className={cn(\"size-1.5 rounded-full\", live ? \"bg-emerald-500\" : \"bg-muted-foreground/50\")} /> {live ? \"Live\" : \"Paused\"}\n          </span>\n        </div>\n        <div className=\"grid grid-cols-3 gap-2\">\n          {[\n            { label: \"Bookings\", value: live ? 148 : 126, suffix: \"\" },\n            { label: \"Revenue\", value: live ? 9840 : 8320, prefix: \"$\" },\n            { label: \"No-shows\", value: live ? 2 : 5, suffix: \"%\" },\n          ].map((k) => (\n            <div key={k.label} className=\"rounded-lg border bg-background p-2\">\n              <div className=\"text-[10px] text-muted-foreground\">{k.label}</div>\n              <div className=\"text-sm font-semibold tabular-nums\">\n                <NumberFlow value={k.value} prefix={k.prefix} suffix={k.suffix} />\n              </div>\n            </div>\n          ))}\n        </div>\n        <div className=\"flex min-h-24 flex-1 items-end gap-1.5 rounded-lg border bg-background p-2 pt-4\">\n          {bars.map((h, i) => (\n            <div key={i} className=\"flex flex-1 flex-col items-center justify-end gap-1 self-stretch\">\n              <div className=\"w-full rounded-sm bg-primary/70 transition-[height] duration-700 ease-out\" style={{ height: `${Math.round(h * 0.8)}px` }} />\n              <span className=\"text-[9px] text-muted-foreground\">{DAYS[i]}</span>\n            </div>\n          ))}\n        </div>\n        <div className=\"hidden flex-col gap-1 sm:flex\">\n          {UPCOMING.map((u) => (\n            <div key={u.client} className=\"flex items-center gap-2 rounded-md border bg-background px-2 py-1\">\n              <span className=\"h-5 w-0.5 rounded-full\" style={{ background: u.color }} />\n              <span className=\"w-8 text-[10px] tabular-nums text-muted-foreground\">{u.time}</span>\n              <span className=\"text-[11px] font-medium\">{u.client}</span>\n              <span className=\"ml-auto text-[10px] text-muted-foreground\">{u.service}</span>\n            </div>\n          ))}\n        </div>\n      </div>\n    </div>\n  )\n}\n\n/* ---------- Block ---------- */\n\nexport default function HeroProductShot() {\n  const [live, setLive] = React.useState(false)\n  const [open, setOpen] = React.useState(false)\n  const [email, setEmail] = React.useState(\"\")\n  const [error, setError] = React.useState<string | null>(null)\n  const [sent, setSent] = React.useState(false)\n\n  const submit = () => {\n    if (!/^\\S+@\\S+\\.\\S+$/.test(email)) {\n      setError(\"Enter a valid work email\")\n      return\n    }\n    setError(null)\n    setSent(true)\n  }\n\n  return (\n    <div className=\"p-4 md:p-6\">\n      <section className=\"relative overflow-hidden rounded-3xl border bg-background\">\n        <DotGrid fade=\"radial\" gap={22} className=\"absolute inset-0\" />\n        <div aria-hidden=\"true\" className=\"pointer-events-none absolute -top-40 left-1/2 h-80 w-[36rem] -translate-x-1/2 rounded-full bg-primary/15 blur-3xl\" />\n        <div className=\"relative mx-auto flex max-w-5xl flex-col items-center px-5 pt-14 pb-10 text-center sm:px-8 sm:pt-20\">\n          <Badge variant=\"soft\" tone=\"primary\" shape=\"pill\" icon={<Sparkles />} animation=\"shine\">\n            New: AI receptionist answers your missed calls\n          </Badge>\n          <h1 className=\"mt-5 max-w-3xl font-heading text-4xl font-semibold tracking-tight text-balance sm:text-6xl\">\n            The booking page your clients <span className=\"bg-gradient-to-r from-primary via-violet-500 to-fuchsia-500 bg-clip-text text-transparent\">actually use</span>\n          </h1>\n          <p className=\"mt-5 max-w-xl text-base text-balance text-muted-foreground sm:text-lg\">\n            Online booking, reminders, deposits and a calendar your whole team lives in. Set up in an afternoon, no card required.\n          </p>\n          <div className=\"mt-7 flex w-full flex-col justify-center gap-3 sm:w-auto sm:flex-row\">\n            <Button size=\"lg\" animation=\"arrow\" shadow=\"glow\" iconRight={<ArrowRight />} onClick={() => { setSent(false); setOpen(true) }}>\n              Start free trial\n            </Button>\n            <Button size=\"lg\" variant=\"outline\" tone=\"neutral\" iconLeft={<Play />} aria-pressed={live} onClick={() => setLive((v) => !v)}>\n              {live ? \"Pause the demo\" : \"See it live\"}\n            </Button>\n          </div>\n          <div className=\"mt-6 flex flex-col items-center gap-3 sm:flex-row sm:gap-4\">\n            <AvatarGroup size=\"sm\" max={5}>\n              {CLIENTS.map((n) => (\n                <Avatar key={n} name={n} size=\"sm\" />\n              ))}\n            </AvatarGroup>\n            <div className=\"flex items-center gap-1.5 text-sm text-muted-foreground\">\n              <span className=\"flex text-amber-500\" role=\"img\" aria-label=\"4.9 out of 5 stars\">\n                {Array.from({ length: 5 }, (_, i) => (\n                  <Star key={i} className=\"size-3.5 fill-current\" />\n                ))}\n              </span>\n              <span>\n                <strong className=\"font-semibold text-foreground\">4.9</strong> from 2,400+ studios\n              </span>\n            </div>\n          </div>\n        </div>\n        <div className=\"relative mx-auto max-w-5xl px-5 pb-0 sm:px-10\">\n          <TiltCard maxTilt={5} scale={1.01} glare={false} className=\"rounded-t-2xl border-0 bg-transparent shadow-none\" containerClassName=\"w-full\">\n            <div className=\"relative aspect-[16/10] w-full sm:aspect-[16/8.5]\">\n              <TiltCardLayer depth={10} className=\"absolute inset-0\">\n                <ProductMock live={live} />\n              </TiltCardLayer>\n              <TiltCardLayer depth={50} className=\"absolute top-12 -right-2 sm:top-14 sm:-right-6\">\n                <div className=\"flex items-center gap-2 rounded-xl border bg-card px-3 py-2 text-xs shadow-lg\">\n                  <span className=\"flex size-7 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400\">\n                    <CalendarCheck className=\"size-4\" />\n                  </span>\n                  <div>\n                    <div className=\"font-medium\">New booking</div>\n                    <div className=\"text-muted-foreground\">Ava T. · Balayage · Fri 2:30</div>\n                  </div>\n                </div>\n              </TiltCardLayer>\n              <TiltCardLayer depth={40} className=\"absolute bottom-6 -left-2 hidden sm:block\">\n                <div className=\"flex items-center gap-2 rounded-xl border bg-card px-3 py-2 text-xs shadow-lg\">\n                  <TrendingUp className=\"size-4 text-primary\" />\n                  <span>\n                    <strong className=\"font-semibold\">+38%</strong> rebookings\n                  </span>\n                </div>\n              </TiltCardLayer>\n            </div>\n          </TiltCard>\n        </div>\n        <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-background to-transparent\" />\n      </section>\n\n      <Dialog\n        open={open}\n        onOpenChange={setOpen}\n        title={sent ? \"Check your inbox\" : \"Start your 14-day trial\"}\n        description={sent ? undefined : \"No card needed. Your booking page goes live today.\"}\n        icon={<Sparkles />}\n        size=\"sm\"\n        animation=\"scale\"\n        footer={\n          sent ? (\n            <Button fullWidth onClick={() => setOpen(false)}>Done</Button>\n          ) : (\n            <div className=\"flex w-full justify-end gap-2\">\n              <Button variant=\"ghost\" tone=\"neutral\" onClick={() => setOpen(false)}>Cancel</Button>\n              <Button iconRight={<ArrowRight />} onClick={submit}>Create account</Button>\n            </div>\n          )\n        }\n      >\n        {sent ? (\n          <div className=\"flex flex-col items-center gap-3 py-2 text-center\">\n            <SuccessCheck size={64} />\n            <p className=\"text-sm text-muted-foreground\">\n              We sent a sign-in link to <strong className=\"text-foreground\">{email}</strong>.\n            </p>\n          </div>\n        ) : (\n          <form\n            className=\"flex flex-col gap-3\"\n            onSubmit={(e) => {\n              e.preventDefault()\n              submit()\n            }}\n          >\n            <Input label=\"Work email\" type=\"email\" placeholder=\"you@studio.com\" value={email} onValueChange={setEmail} state={error ? \"error\" : \"default\"} message={error} shakeKey={error ?? undefined} autoFocus />\n            <ul className=\"grid gap-1.5 text-xs text-muted-foreground\">\n              {[\"Unlimited bookings during the trial\", \"Import clients from a spreadsheet\", \"Cancel any time, keep your data\"].map((t) => (\n                <li key={t} className=\"flex items-center gap-2\">\n                  <Check className=\"size-3.5 text-emerald-600 dark:text-emerald-400\" /> {t}\n                </li>\n              ))}\n            </ul>\n          </form>\n        )}\n      </Dialog>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/goodui/hero-product-shot.tsx"
    }
  ],
  "categories": [
    "marketing"
  ],
  "type": "registry:block"
}
