{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glyph-field-cta",
  "type": "registry:block",
  "title": "Glyph Field CTA",
  "description": "CTA Section built with Glyph Field (ASCII art effect): your logo printed in monospace glyphs. A take on the ASCII art (monospace) and animated background (backdrop). A closing call to action on a dark panel: the headline, the install command with a copy button, and two links beside your logo printed in monospace glyphs. The mark decodes into place as it scrolls into view and inks in the accent under the pointer.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "blocks",
    "cta-sections",
    "cta",
    "ascii-art",
    "animated-background"
  ],
  "docs": "Live preview and the components it's built with: https://keyframeui.com/blocks/cta-sections/glyph-field-cta",
  "registryDependencies": [
    "https://keyframeui.com/r/glyph-field.json"
  ],
  "files": [
    {
      "path": "components/glyph-field-cta.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { GlyphField } from \"@/components/ui/glyph-field\";\n\n/* ── Content ─────────────────────────────────────────────────\n * Everything you'd change to make the section yours. MARK is\n * your logo as one SVG path; Glyph Field prints it in type.\n * ─────────────────────────────────────────────────────────── */\n\n/** The one accent: the glyph ink and the primary button. */\nconst ACCENT = { light: \"#ea580c\", dark: \"#fb923c\" };\n\n/** Your logo as a single path, and the viewBox it was drawn in. */\nconst MARK = {\n  path: \"M1 7.5c4.2-.9 8 1.2 11 5 3-3.8 6.8-5.9 11-5-4.4 1.4-8.1 5-11 10.5C9.1 12.5 5.4 8.9 1 7.5Z\",\n  viewBox: \"0 3 24 18\",\n  label: \"The Tern mark, printed in type\",\n};\n\nconst HEADLINE = \"Your next chart is\";\nconst HEADLINE_QUIET = \"one sentence away.\";\nconst SUBLINE =\n  \"Install the CLI and sign in once, in your own terminal. From then on your agent adds the events, the tracking and the charts you ask for.\";\nconst COMMAND = \"npx tern@latest init\";\nconst PRIMARY_CTA = { label: \"Start free\", href: \"#start\" };\nconst SECONDARY_CTA = { label: \"Read the docs\", href: \"#docs\" };\n\n/* ── Section ─────────────────────────────────────────────── */\n\nconst focusRing =\n  \"outline-none focus-visible:ring-2 focus-visible:ring-white/70 focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950\";\n\nexport function GlyphFieldCta() {\n  return (\n    <section\n      style={{ \"--accent-light\": ACCENT.light, \"--accent-dark\": ACCENT.dark } as React.CSSProperties}\n      className=\"bg-white [--accent:var(--accent-light)] dark:bg-zinc-950 dark:[--accent:var(--accent-dark)]\"\n    >\n      <div className=\"mx-auto max-w-6xl px-6 py-24 sm:py-32\">\n        <div className=\"grid overflow-hidden rounded-3xl bg-zinc-950 text-white ring-1 ring-zinc-950/10 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] dark:bg-zinc-900 dark:ring-white/10\">\n          <div className=\"flex flex-col justify-center px-6 pt-12 pb-4 sm:px-12 sm:pt-16 lg:py-20\">\n            <h2 className=\"max-w-[14ch] text-4xl/[1.05] font-semibold tracking-[-0.035em] text-balance sm:text-5xl/[1.02]\">\n              {HEADLINE} <span className=\"text-zinc-500\">{HEADLINE_QUIET}</span>\n            </h2>\n            <p className=\"mt-5 max-w-md text-base/7 text-pretty text-zinc-400\">{SUBLINE}</p>\n\n            <CopyCommand command={COMMAND} />\n\n            <div className=\"mt-8 flex flex-wrap items-center gap-x-6 gap-y-3\">\n              <a\n                href={PRIMARY_CTA.href}\n                className={`inline-flex h-11 items-center gap-1.5 rounded-full bg-(--accent) px-5 text-sm font-medium text-white transition-[filter,scale] duration-150 hover:brightness-110 active:scale-[0.97] dark:text-zinc-950 ${focusRing}`}\n              >\n                {PRIMARY_CTA.label}\n                <ArrowIcon className=\"size-3.5\" />\n              </a>\n              <a\n                href={SECONDARY_CTA.href}\n                className={`rounded-md text-sm font-medium text-zinc-300 underline-offset-4 transition-colors hover:text-white hover:underline ${focusRing}`}\n              >\n                {SECONDARY_CTA.label}\n              </a>\n            </div>\n          </div>\n\n          <GlyphField\n            path={MARK.path}\n            viewBox={MARK.viewBox}\n            label={MARK.label}\n            cellSize={11}\n            glyphClassName=\"text-zinc-500\"\n            accentClassName=\"text-(--accent)\"\n            className=\"h-72 sm:h-96 lg:h-auto lg:min-h-[30rem]\"\n          />\n        </div>\n      </div>\n    </section>\n  );\n}\n\n/* ── The install command ─────────────────────────────────── */\n\nfunction CopyCommand({ command }: { command: string }) {\n  const [copied, setCopied] = React.useState(false);\n  const timer = React.useRef(0);\n  React.useEffect(() => () => window.clearTimeout(timer.current), []);\n\n  const copy = async () => {\n    try {\n      await navigator.clipboard.writeText(command);\n    } catch {\n      return;\n    }\n    setCopied(true);\n    window.clearTimeout(timer.current);\n    timer.current = window.setTimeout(() => setCopied(false), 1600);\n  };\n\n  return (\n    <div className=\"mt-8 flex h-11 max-w-sm items-center gap-3 rounded-xl bg-white/[0.06] pr-1.5 pl-4 ring-1 ring-white/10\">\n      <span className=\"text-zinc-500 select-none\" aria-hidden>\n        $\n      </span>\n      <code className=\"min-w-0 flex-1 truncate font-mono text-[13px] text-zinc-100\">{command}</code>\n      <button\n        type=\"button\"\n        onClick={copy}\n        aria-label={copied ? \"Copied\" : \"Copy the install command\"}\n        className={`grid size-8 shrink-0 place-items-center rounded-lg text-zinc-400 transition-colors hover:bg-white/10 hover:text-white ${focusRing}`}\n      >\n        {copied ? <CheckIcon className=\"size-4 text-(--accent)\" /> : <CopyIcon className=\"size-4\" />}\n      </button>\n      <span className=\"sr-only\" aria-live=\"polite\">\n        {copied ? \"Copied to the clipboard\" : \"\"}\n      </span>\n    </div>\n  );\n}\n\n/* ── Icons ───────────────────────────────────────────────── */\n\nfunction ArrowIcon({ 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.5 8h9m-3.5-3.5L12.5 8 9 11.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n\nfunction CopyIcon({ className }: { className?: string }) {\n  return (\n    <svg viewBox=\"0 0 16 16\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.4} aria-hidden>\n      <rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8\" rx=\"1.8\" />\n      <path d=\"M10.5 3.5a1.5 1.5 0 0 0-1.5-1H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.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"
    }
  ]
}