{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "golden-hour-cta",
  "type": "registry:block",
  "title": "Golden Hour CTA",
  "description": "CTA Section built with Golden Hour (sunset scene background): a sunset that turns to night when you send. A take on the animated background (backdrop). A closing call to action across a full-width Golden Hour scene. The sun sets as the section comes into view and the road's lights come on; describing a trip and sending it brings out the night and the moon.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "blocks",
    "cta-sections",
    "cta",
    "animated-background"
  ],
  "docs": "Live preview and the components it's built with: https://keyframeui.com/blocks/cta-sections/golden-hour-cta",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://keyframeui.com/r/golden-hour.json"
  ],
  "files": [
    {
      "path": "components/golden-hour-cta.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { useInView } from \"motion/react\";\n\nimport { GoldenHour } from \"@/components/ui/golden-hour\";\n\n/* ── Content ─────────────────────────────────────────────────\n * Everything you'd change to make the section yours: the copy,\n * the field's prompt and the hours the scene is lit for on the\n * way in, once it's in view and after the visitor sends it.\n * ─────────────────────────────────────────────────────────── */\n\nconst EYEBROW = \"Meander\";\nconst HEADLINE = \"Your next weekend starts with one sentence.\";\nconst SUBLINE =\n  \"Say where you'd like to wake up. Meander plans the days around the light and links every stop to where it found it.\";\nconst FIELD_LABEL = \"Describe your trip\";\nconst PLACEHOLDER = \"A slow weekend by the sea\";\nconst BUTTON = \"Plan it\";\nconst NOTE = \"Free for your first three trips. No card needed.\";\nconst SENT = \"Planning now. Your trip and its sources land in your inbox in about a minute.\";\n\n/** Hours of the day (0–24) for the scene: scrolling toward it, once it's in view, and after sending. */\nconst HOURS = { before: 17.6, inView: 19.1, sent: 21.8 };\n\n/* ── Section ─────────────────────────────────────────────── */\n\nexport function GoldenHourCta() {\n  const ref = React.useRef<HTMLElement>(null);\n  const inView = useInView(ref, { amount: 0.45 });\n  const [trip, setTrip] = React.useState(\"\");\n  const [sent, setSent] = React.useState(false);\n  const hour = sent ? HOURS.sent : inView ? HOURS.inView : HOURS.before;\n\n  return (\n    <section ref={ref} aria-labelledby=\"golden-hour-cta-title\" className=\"bg-zinc-950\">\n      <GoldenHour\n        time={hour}\n        horizon={0.64}\n        className=\"flex min-h-[38rem] flex-col items-center px-6 pt-20 pb-64 text-center text-white sm:min-h-[44rem] sm:pt-28\"\n      >\n        <p className=\"flex items-center gap-2 text-sm font-medium text-white/80\">\n          <MeanderMark className=\"size-4\" />\n          {EYEBROW}\n        </p>\n        <h2\n          id=\"golden-hour-cta-title\"\n          className=\"mt-5 max-w-[18ch] text-4xl/[1.04] font-medium tracking-[-0.035em] text-balance sm:text-6xl/[1]\"\n        >\n          {HEADLINE}\n        </h2>\n        <p className=\"mt-5 max-w-lg text-base/7 text-pretty text-white/80 sm:text-lg/8\">{SUBLINE}</p>\n\n        <div className=\"mt-9 w-full max-w-xl\" aria-live=\"polite\">\n          {sent ? (\n            <p className=\"flex min-h-14 items-center justify-center gap-2 rounded-full bg-zinc-950/25 px-6 py-3 text-sm font-medium ring-1 ring-white/25 backdrop-blur-xl\">\n              <CheckIcon className=\"size-4 shrink-0\" />\n              {SENT}\n            </p>\n          ) : (\n            <form\n              onSubmit={(event) => {\n                event.preventDefault();\n                if (trip.trim()) setSent(true);\n              }}\n              className=\"flex h-14 items-center gap-2 rounded-full bg-zinc-950/25 p-1.5 ring-1 ring-white/25 backdrop-blur-xl transition-shadow duration-200 focus-within:ring-white/70\"\n            >\n              <label htmlFor=\"golden-hour-cta-trip\" className=\"sr-only\">\n                {FIELD_LABEL}\n              </label>\n              <input\n                id=\"golden-hour-cta-trip\"\n                value={trip}\n                onChange={(event) => setTrip(event.target.value)}\n                placeholder={PLACEHOLDER}\n                autoComplete=\"off\"\n                className=\"h-full min-w-0 flex-1 bg-transparent pl-5 text-[15px] text-white outline-none placeholder:text-white/70\"\n              />\n              <button\n                type=\"submit\"\n                className=\"h-full shrink-0 rounded-full bg-white px-6 text-sm font-medium text-zinc-950 transition-[background-color,scale] duration-150 ease-out hover:bg-white/90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white active:scale-[0.97]\"\n              >\n                {BUTTON}\n              </button>\n            </form>\n          )}\n        </div>\n        <p className=\"mt-4 text-sm text-white/70\">{NOTE}</p>\n      </GoldenHour>\n    </section>\n  );\n}\n\n/* ── Icons ───────────────────────────────────────────────── */\n\nfunction MeanderMark({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 16 16\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.6} aria-hidden>\n      <path d=\"M3 14c0-3 4-3 4-6S4 5 6 2.5M9.5 14c0-2.5 3.5-2.5 3.5-5\" strokeLinecap=\"round\" />\n    </svg>\n  );\n}\n\nfunction CheckIcon({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 16 16\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8} aria-hidden>\n      <path d=\"m3.5 8.5 3 3 6-7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n"
    }
  ]
}