{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-harmonograph",
  "title": "Harmonograph call to action",
  "description": "The closing call to action beside a harmonograph: one unbroken line, the trace of two pendulums, drawn as the section arrives.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/cta-harmonograph.tsx",
      "content": "'use client';\n\n/**\n * cta-harmonograph — the closing call to action, beside a harmonograph: the\n * trace of two swinging pendulums, one unbroken line that a pen draws as the\n * section arrives, spiralling in as the swing dies away.\n *\n * Built on svg-scroll-draw (MIT): https://github.com/DhruvilChauahan0210/scrollfx\n * Needs: react, svg-scroll-draw, and lib/plotter (installed with it).\n * Styling: Tailwind CSS with shadcn/ui tokens. The heading takes one emphasised\n * word between asterisks, set in `font-serif`. The print is a `bg-card` sheet.\n *\n * The copy and buttons are in the server HTML; the line is made in the\n * browser from `seed`. Reduced motion shows it drawn.\n */\n\nimport { useEffect, useState } from 'react';\nimport { ScrollDraw } from 'svg-scroll-draw/react';\nimport 'svg-scroll-draw/no-flash.css';\nimport { harmonograph, scrollWindow } from '@/lib/plotter';\n\nexport interface CtaHarmonographProps {\n  eyebrow?: string;\n  heading?: string;\n  description?: string;\n  primary?: { label: string; href: string };\n  secondary?: { label: string; href: string };\n  caption?: string;\n  seed?: number;\n  className?: string;\n}\n\nfunction Heading({ text }: { text: string }) {\n  return <>{text.split(/(\\*[^*]+\\*)/).map((p, i) => (p.startsWith('*') ? <em key={i} className=\"italic\">{p.slice(1, -1)}</em> : <span key={i}>{p}</span>))}</>;\n}\n\nexport function CtaHarmonograph({\n  eyebrow = 'Begin',\n  heading = 'Ready when *you* are.',\n  description = 'Start free, with every feature, for fourteen days. No card, and your data comes with you if you leave.',\n  primary = { label: 'Start free', href: '#' },\n  secondary = { label: 'Talk to us', href: '#' },\n  caption = 'Pl. — Harmonograph',\n  seed = 34,\n  className = '',\n}: CtaHarmonographProps) {\n  const [d, setD] = useState<string | null>(null);\n  useEffect(() => setD(harmonograph(seed)[0].d), [seed]);\n\n  return (\n    <section className={`mx-auto grid max-w-7xl items-center gap-14 px-6 py-28 sm:px-10 lg:grid-cols-[minmax(0,6fr)_minmax(0,5fr)] lg:gap-24 ${className}`}>\n      <figure>\n        <div className=\"aspect-square w-full rounded-[3px] bg-card p-[5%] shadow-[0_1px_0_rgba(0,0,0,.04),0_18px_40px_-18px_rgba(40,30,10,.3)] dark:shadow-[0_0_0_1px_rgba(255,255,255,.05),0_24px_60px_-20px_rgba(0,0,0,.8)]\">\n          {d && (\n            // One line, finished as the print reaches the middle of the screen.\n            <ScrollDraw easing=\"linear\" trigger={scrollWindow()} className=\"size-full\" aria-hidden>\n              <svg viewBox=\"0 0 1000 1000\" className=\"size-full\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1\" strokeLinecap=\"round\" strokeLinejoin=\"round\" opacity={0.85}>\n                <path d={d} />\n              </svg>\n            </ScrollDraw>\n          )}\n        </div>\n        <figcaption className=\"mt-4 flex justify-between font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground\">\n          <span>{caption}</span>\n          <span>One line · seed {seed}</span>\n        </figcaption>\n      </figure>\n\n      <div className=\"max-w-lg\">\n        <p className=\"font-mono text-[11px] uppercase tracking-[0.22em] text-muted-foreground\">{eyebrow}</p>\n        <h2 className=\"mt-6 font-serif text-[clamp(2.8rem,5.6vw,5rem)] leading-[0.96] tracking-[-0.03em]\">\n          <Heading text={heading} />\n        </h2>\n        <p className=\"mt-6 text-pretty text-[17px] leading-relaxed text-muted-foreground\">{description}</p>\n        <div className=\"mt-10 flex flex-wrap gap-3\">\n          <a href={primary.href} className=\"inline-flex h-12 items-center rounded-full bg-foreground px-7 text-[15px] font-medium text-background transition-transform hover:-translate-y-px\">\n            {primary.label}\n          </a>\n          <a href={secondary.href} className=\"inline-flex h-12 items-center rounded-full border px-7 text-[15px] font-medium transition-colors hover:bg-accent\">\n            {secondary.label}\n          </a>\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll to it: one line spirals in as the swing dies away.",
    "tall": false
  },
  "type": "registry:block"
}