{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-magnetic-orb",
  "type": "registry:component",
  "title": "CTA Magnetic Orb",
  "description": "A full-bleed gradient call to action where the color pool follows the pointer and a round button, wrapped in rotating ring text, is pulled toward the cursor and spins faster on hover. A big headline and three proof stats sit beside it.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "cta",
    "cta",
    "gradient",
    "magnetic",
    "pointer",
    "full-bleed",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/cta-magnetic-orb",
  "files": [
    {
      "path": "registry/hyperblur/cta-magnetic-orb.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/cta-magnetic-orb.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CtaMagneticOrbStat {\n  value: string;\n  label: string;\n}\n\nexport interface CtaMagneticOrbProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  cta?: { label: string; href: string };\n  ringText?: string;\n  stats?: CtaMagneticOrbStat[];\n  strength?: number;\n  accent?: string;\n  accent2?: string;\n}\n\nconst css = `\n.hb-wc5 {\n  --hb-wc5-a: #7c3aed;\n  --hb-wc5-b: #fb7185;\n  --hb-wc5-mx: 70%;\n  --hb-wc5-my: 50%;\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  background: #08070b;\n  color: #fff;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wc5 *, .hb-wc5 *::before, .hb-wc5 *::after { box-sizing: border-box; }\n.hb-wc5-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }\n.hb-wc5-pool {\n  position: absolute;\n  inset: -20%;\n  background:\n    radial-gradient(38% 44% at var(--hb-wc5-mx) var(--hb-wc5-my), color-mix(in srgb, var(--hb-wc5-b) 70%, transparent), transparent 70%),\n    radial-gradient(50% 60% at 18% 30%, color-mix(in srgb, var(--hb-wc5-a) 85%, transparent), transparent 70%),\n    radial-gradient(45% 55% at 60% 110%, color-mix(in srgb, var(--hb-wc5-a) 60%, #0ea5e9), transparent 70%),\n    linear-gradient(120deg, #120a24, #08070b 70%);\n  transition: background-position .6s ease;\n  filter: saturate(1.15);\n}\n.hb-wc5-blob { position: absolute; width: 46cqi; aspect-ratio: 1; border-radius: 50%; filter: blur(60px); opacity: .55; mix-blend-mode: screen; }\n.hb-wc5-blob:nth-child(2) { left: 8%; top: -18%; background: var(--hb-wc5-a); animation: hb-wc5-drift 18s cubic-bezier(.45, 0, .55, 1) infinite alternate; }\n.hb-wc5-blob:nth-child(3) { right: -6%; bottom: -30%; background: var(--hb-wc5-b); animation: hb-wc5-drift 22s cubic-bezier(.45, 0, .55, 1) infinite alternate-reverse; }\n.hb-wc5-grain {\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  opacity: .22;\n  mix-blend-mode: overlay;\n  background-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>\");\n  pointer-events: none;\n}\n.hb-wc5-lines { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: calc(100% / 6) 100%; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }\n.hb-wc5-inner { display: grid; gap: 40px; align-items: center; max-width: 1200px; margin: 0 auto; padding: 80px 22px; }\n.hb-wc5-eyebrow { display: inline-flex; align-items: center; gap: 8px; width: max-content; margin: 0 0 20px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); font-size: 13px; font-weight: 550; }\n.hb-wc5-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; font-style: normal; }\n.hb-wc5-title { margin: 0; max-width: 12ch; font-family: var(--font-grotesk), var(--font-sans), sans-serif; font-size: clamp(42px, 8.2cqi, 96px); font-weight: 600; line-height: .96; letter-spacing: -.045em; text-wrap: balance; }\n.hb-wc5-sub { margin: 22px 0 0; max-width: 470px; color: rgba(255, 255, 255, .72); font-size: 17px; line-height: 1.55; }\n.hb-wc5-stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 34px 0 0; padding: 0; list-style: none; }\n.hb-wc5-stats li { display: grid; gap: 2px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); }\n.hb-wc5-stats b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }\n.hb-wc5-stats span { color: rgba(255, 255, 255, .6); font-size: 13px; }\n.hb-wc5-stage { position: relative; display: grid; place-items: center; min-height: 260px; }\n.hb-wc5-halo { position: absolute; width: 300px; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); }\n.hb-wc5-halo::after { content: \"\"; position: absolute; inset: 34px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .14); animation: hb-wc5-spin 40s linear infinite reverse; }\n.hb-wc5-magnet { position: relative; transform: translate3d(var(--hb-wc5-x, 0px), var(--hb-wc5-y, 0px), 0); transition: transform .6s cubic-bezier(.2, .9, .25, 1.25); }\n.hb-wc5-orb {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 200px;\n  aspect-ratio: 1;\n  border-radius: 50%;\n  color: #0b0614;\n  text-decoration: none;\n  outline: none;\n}\n.hb-wc5-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: hb-wc5-spin 22s linear infinite; }\n.hb-wc5-orb:hover .hb-wc5-ring, .hb-wc5-orb:focus-visible .hb-wc5-ring { animation-duration: 7s; }\n.hb-wc5-ring text { fill: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; }\n.hb-wc5-core {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 118px;\n  aspect-ratio: 1;\n  border-radius: 50%;\n  background: radial-gradient(circle at 35% 28%, #fff, #f3eefe 45%, #d9cdfb);\n  box-shadow: 0 0 0 10px rgba(255, 255, 255, .1), 0 24px 60px -10px color-mix(in srgb, var(--hb-wc5-b) 80%, transparent), inset 0 -8px 18px rgba(124, 58, 237, .25);\n  transform: translate3d(calc(var(--hb-wc5-x, 0px) * .35), calc(var(--hb-wc5-y, 0px) * .35), 0) scale(var(--hb-wc5-s, 1));\n  transition: transform .6s cubic-bezier(.2, .9, .25, 1.25), box-shadow .3s ease;\n}\n.hb-wc5-orb:hover .hb-wc5-core { --hb-wc5-s: 1.06; box-shadow: 0 0 0 16px rgba(255, 255, 255, .12), 0 30px 70px -10px color-mix(in srgb, var(--hb-wc5-b) 90%, transparent), inset 0 -8px 18px rgba(124, 58, 237, .25); }\n.hb-wc5-orb:active .hb-wc5-core { --hb-wc5-s: .95; }\n.hb-wc5-orb:focus-visible .hb-wc5-core { outline: 2px solid #fff; outline-offset: 20px; }\n.hb-wc5-core svg { width: 30px; height: 30px; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }\n.hb-wc5-orb:hover .hb-wc5-core svg { transform: rotate(-45deg); }\n.hb-wc5-label { position: absolute; top: calc(100% + 18px); left: 50%; transform: translateX(-50%); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }\n@keyframes hb-wc5-spin { to { transform: rotate(360deg); } }\n@keyframes hb-wc5-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(12%, 16%) scale(1.15); } }\n@container (min-width: 760px) {\n  .hb-wc5-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding: 120px 48px; }\n  .hb-wc5-stage { min-height: 380px; }\n  .hb-wc5-halo { width: 360px; }\n  .hb-wc5-orb { width: 236px; }\n  .hb-wc5-core { width: 138px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-wc5 *, .hb-wc5 *::before, .hb-wc5 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst defaultStats: CtaMagneticOrbStat[] = [\n  { value: \"11 min\", label: \"average setup\" },\n  { value: \"38%\", label: \"fewer status meetings\" },\n  { value: \"4.9/5\", label: \"from 2,300 reviews\" },\n];\n\nexport function CtaMagneticOrb({\n  eyebrow = \"Free for teams up to 10\",\n  title = \"Your roadmap, shipped before Friday.\",\n  subtitle = \"Plan sprints, track releases and keep every stakeholder in the loop from one quiet workspace.\",\n  cta = { label: \"Start building\", href: \"#\" },\n  ringText = \"Start free trial · 14 days · no card needed · \",\n  stats = defaultStats,\n  strength = 0.4,\n  accent = \"#7c3aed\",\n  accent2 = \"#fb7185\",\n  className = \"\",\n  style,\n  onPointerMove,\n  onPointerLeave,\n  ...rest\n}: CtaMagneticOrbProps) {\n  const root = React.useRef<HTMLElement>(null);\n  const magnet = React.useRef<HTMLDivElement>(null);\n  const id = React.useId().replace(/:/g, \"\");\n\n  const move = (e: React.PointerEvent<HTMLElement>) => {\n    onPointerMove?.(e);\n    const el = root.current;\n    const m = magnet.current;\n    if (!el || !m || e.pointerType === \"touch\") return;\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    const r = el.getBoundingClientRect();\n    el.style.setProperty(\"--hb-wc5-mx\", `${(((e.clientX - r.left) / r.width) * 100).toFixed(1)}%`);\n    el.style.setProperty(\"--hb-wc5-my\", `${(((e.clientY - r.top) / r.height) * 100).toFixed(1)}%`);\n    const stage = m.parentElement;\n    if (!stage) return;\n    const s = stage.getBoundingClientRect();\n    const dx = e.clientX - (s.left + s.width / 2);\n    const dy = e.clientY - (s.top + s.height / 2);\n    const near = Math.hypot(dx, dy) < Math.max(220, s.width * 0.7);\n    const k = near ? Math.max(0, Math.min(1, strength)) : 0;\n    const cap = 70;\n    m.style.setProperty(\"--hb-wc5-x\", `${Math.max(-cap, Math.min(cap, dx * k)).toFixed(1)}px`);\n    m.style.setProperty(\"--hb-wc5-y\", `${Math.max(-cap, Math.min(cap, dy * k)).toFixed(1)}px`);\n  };\n\n  const leave = (e: React.PointerEvent<HTMLElement>) => {\n    onPointerLeave?.(e);\n    magnet.current?.style.setProperty(\"--hb-wc5-x\", \"0px\");\n    magnet.current?.style.setProperty(\"--hb-wc5-y\", \"0px\");\n  };\n\n  const vars = { \"--hb-wc5-a\": accent, \"--hb-wc5-b\": accent2, ...style } as React.CSSProperties;\n\n  return (\n    <section ref={root} className={`hb-wc5 ${className}`} style={vars} onPointerMove={move} onPointerLeave={leave} {...rest}>\n      <style href=\"hb-cta-magnetic-orb\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wc5-bg\" aria-hidden=\"true\">\n        <div className=\"hb-wc5-pool\" />\n        <div className=\"hb-wc5-blob\" />\n        <div className=\"hb-wc5-blob\" />\n      </div>\n      <div className=\"hb-wc5-lines\" aria-hidden=\"true\" />\n      <div className=\"hb-wc5-grain\" aria-hidden=\"true\" />\n      <div className=\"hb-wc5-inner\">\n        <div>\n          {eyebrow ? (\n            <p className=\"hb-wc5-eyebrow\">\n              <i aria-hidden=\"true\" />\n              {eyebrow}\n            </p>\n          ) : null}\n          <h2 className=\"hb-wc5-title\">{title}</h2>\n          {subtitle ? <p className=\"hb-wc5-sub\">{subtitle}</p> : null}\n          {stats.length ? (\n            <ul className=\"hb-wc5-stats\">\n              {stats.map((s) => (\n                <li key={s.label}>\n                  <b>{s.value}</b>\n                  <span>{s.label}</span>\n                </li>\n              ))}\n            </ul>\n          ) : null}\n        </div>\n        <div className=\"hb-wc5-stage\">\n          <span className=\"hb-wc5-halo\" aria-hidden=\"true\" />\n          <div ref={magnet} className=\"hb-wc5-magnet\">\n            <a className=\"hb-wc5-orb\" href={cta.href} aria-label={cta.label}>\n              <svg className=\"hb-wc5-ring\" viewBox=\"0 0 200 200\" aria-hidden=\"true\">\n                <defs>\n                  <path id={`${id}-p`} d=\"M100 100m-84 0a84 84 0 1 1 168 0a84 84 0 1 1-168 0\" />\n                </defs>\n                <text>\n                  <textPath href={`#${id}-p`} textLength=\"520\" lengthAdjust=\"spacing\">\n                    {ringText}\n                  </textPath>\n                </text>\n              </svg>\n              <span className=\"hb-wc5-core\">\n                <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n                  <path d=\"M5 12h13M13 6l6 6-6 6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                </svg>\n              </span>\n              <span className=\"hb-wc5-label\" aria-hidden=\"true\">{cta.label}</span>\n            </a>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}