{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-prism",
  "type": "registry:component",
  "title": "Hero Prism",
  "description": "A glass prism catches a beam of white light and fans it into a living spectrum behind the headline, with a spectrometer scale along the bottom. The spectrum sways on its own and tilts toward the pointer.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "prism",
    "spectrum",
    "light",
    "svg",
    "landing"
  ],
  "docs": "https://hyperblur.dev/effects/hero-prism",
  "files": [
    {
      "path": "registry/hyperblur/hero-prism.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-prism.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroPrismAction {\n  label: string;\n  href: string;\n}\n\nexport interface HeroPrismProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  primaryCta?: HeroPrismAction | null;\n  secondaryCta?: HeroPrismAction | null;\n  showRuler?: boolean;\n  interactive?: boolean;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst css = `\n.hb-vb1 {\n  --hb-vb1-tilt: 0deg;\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  min-height: 640px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: radial-gradient(120% 80% at 50% 0%, #0d0f14 0%, #060607 60%);\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-vb1 *, .hb-vb1 *::before, .hb-vb1 *::after { box-sizing: border-box; }\n.hb-vb1-scene {\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.hb-vb1-tiltg {\n  transform-box: view-box;\n  transform-origin: 662px 196px;\n  transform: rotate(var(--hb-vb1-tilt));\n  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);\n}\n.hb-vb1-fan {\n  transform-box: view-box;\n  transform-origin: 662px 196px;\n  animation: hb-vb1-sway 9s cubic-bezier(.45, 0, .55, 1) infinite alternate;\n}\n@keyframes hb-vb1-sway {\n  from { transform: rotate(-2.2deg); }\n  to { transform: rotate(2.4deg); }\n}\n.hb-vb1-band {\n  mix-blend-mode: screen;\n  animation: hb-vb1-shimmer 5.5s ease-in-out infinite;\n  animation-delay: calc(var(--hb-vb1-i) * -.7s);\n}\n@keyframes hb-vb1-shimmer {\n  0%, 100% { opacity: .78; }\n  50% { opacity: .46; }\n}\n.hb-vb1-photon {\n  stroke-dasharray: 46 640;\n  animation: hb-vb1-travel 3.2s cubic-bezier(.55, 0, .45, 1) infinite;\n}\n@keyframes hb-vb1-travel {\n  from { stroke-dashoffset: 700; }\n  to { stroke-dashoffset: 0; }\n}\n.hb-vb1-glint {\n  animation: hb-vb1-glint 6s ease-in-out infinite;\n}\n@keyframes hb-vb1-glint {\n  0%, 70%, 100% { opacity: .15; }\n  80% { opacity: .9; }\n}\n.hb-vb1-veil {\n  position: absolute;\n  left: 50%;\n  top: 46%;\n  z-index: -1;\n  width: min(760px, 92%);\n  height: 340px;\n  transform: translateX(-50%);\n  background: radial-gradient(closest-side, rgba(6, 6, 7, .82), rgba(6, 6, 7, 0));\n  pointer-events: none;\n}\n.hb-vb1-inner {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  max-width: 980px;\n  margin-top: auto;\n  padding: 300px clamp(20px, 5cqi, 48px) 0;\n  text-align: center;\n}\n.hb-vb1-in { animation: hb-vb1-up .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--hb-vb1-d, 0ms); }\n@keyframes hb-vb1-up {\n  from { opacity: 0; transform: translate3d(0, 16px, 0); filter: blur(6px); }\n  to { opacity: 1; transform: none; filter: none; }\n}\n.hb-vb1-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  margin: 0;\n  color: rgba(237, 237, 237, .7);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 12px;\n  letter-spacing: .08em;\n  text-transform: uppercase;\n}\n.hb-vb1-chip {\n  width: 34px;\n  height: 6px;\n  border-radius: 99px;\n  background: linear-gradient(90deg, #ff3b3b, #ff9b2f, #ffe14d, #3ddc84, #2fb4ff, #4d5bff, #a24dff);\n}\n.hb-vb1-title {\n  max-width: 900px;\n  margin: 20px 0 0;\n  color: #f5f5f5;\n  font-size: clamp(38px, 7cqi, 74px);\n  font-weight: 640;\n  line-height: 1.02;\n  letter-spacing: -.045em;\n  text-wrap: balance;\n}\n.hb-vb1-title span {\n  background: linear-gradient(92deg, #ffffff 0%, #ffffff 42%, #ffd9a8 58%, #b9f0ff 76%, #d8c4ff 100%);\n  -webkit-background-clip: text;\n  background-clip: text;\n  color: transparent;\n}\n.hb-vb1-sub {\n  max-width: 560px;\n  margin: 20px 0 0;\n  color: rgba(237, 237, 237, .6);\n  font-size: clamp(15px, 1.9cqi, 17.5px);\n  line-height: 1.55;\n  text-wrap: pretty;\n}\n.hb-vb1-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }\n.hb-vb1-btn {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  min-height: 46px;\n  padding: 0 22px;\n  border: 1px solid rgba(255, 255, 255, .14);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .04);\n  color: #ededed;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 550;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s ease, border-color .25s ease;\n}\n.hb-vb1-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .26); transform: translateY(-1px); }\n.hb-vb1-btn:active { transform: scale(.98); }\n.hb-vb1-btn:focus-visible { outline: 2px solid #b9f0ff; outline-offset: 3px; }\n.hb-vb1-btn[data-primary] {\n  border: 1px solid transparent;\n  background:\n    linear-gradient(#f5f5f5, #f5f5f5) padding-box,\n    linear-gradient(90deg, #ff3b3b, #ffe14d, #3ddc84, #2fb4ff, #a24dff) border-box;\n  color: #0a0a0a;\n  box-shadow: 0 10px 40px -12px rgba(162, 77, 255, .7), 0 6px 30px -14px rgba(47, 180, 255, .8);\n}\n.hb-vb1-btn[data-primary]:hover { background: linear-gradient(#ffffff, #ffffff) padding-box, linear-gradient(90deg, #ff3b3b, #ffe14d, #3ddc84, #2fb4ff, #a24dff) border-box; }\n.hb-vb1-btn svg { transition: transform .25s ease; }\n.hb-vb1-btn:hover svg { transform: translateX(2px); }\n.hb-vb1-ruler {\n  width: 100%;\n  max-width: 980px;\n  margin-top: auto;\n  padding: 44px clamp(20px, 5cqi, 48px) 26px;\n}\n.hb-vb1-bar {\n  height: 3px;\n  border-radius: 3px;\n  background: linear-gradient(90deg, #7a2dff, #4d5bff, #2fb4ff, #3ddc84, #ffe14d, #ff9b2f, #ff3b3b);\n  opacity: .8;\n}\n.hb-vb1-ticks { display: flex; justify-content: space-between; margin-top: 8px; }\n.hb-vb1-tick {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 6px;\n  color: rgba(237, 237, 237, .38);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 10px;\n}\n.hb-vb1-tick::before { content: \"\"; width: 1px; height: var(--hb-vb1-h, 6px); background: rgba(237, 237, 237, .3); }\n.hb-vb1-tick[data-major]::before { background: rgba(237, 237, 237, .6); }\n.hb-vb1-tick[data-minor] span { visibility: hidden; }\n@container (max-width: 560px) {\n  .hb-vb1-inner { padding-top: 250px; }\n  .hb-vb1-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }\n  .hb-vb1-btn { justify-content: center; }\n  .hb-vb1-tick[data-mid] span { visibility: hidden; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vb1-fan, .hb-vb1-band, .hb-vb1-photon, .hb-vb1-glint, .hb-vb1-in { animation: none; }\n  .hb-vb1-photon { display: none; }\n  .hb-vb1-tiltg, .hb-vb1-btn, .hb-vb1-btn svg { transition: none; }\n}\n`;\n\nconst spectrum = [\"#ff3b3b\", \"#ff8a2f\", \"#ffe14d\", \"#3ddc84\", \"#2fb4ff\", \"#4d5bff\", \"#a24dff\"];\n\nconst bands = spectrum.map((color, i) => {\n  const a = 300 + i * 52;\n  const b = a + 58;\n  return { color, points: `662,196 1320,${a} 1320,${b}` };\n});\n\nconst ticks = Array.from({ length: 17 }, (_, i) => {\n  const nm = 380 + i * 20;\n  const major = i % 4 === 0;\n  const mid = i % 2 === 0 && !major;\n  return { nm, major, mid };\n});\n\nconst defaultPrimary: HeroPrismAction = { label: \"Start splitting data\", href: \"#\" };\nconst defaultSecondary: HeroPrismAction = { label: \"See how it works\", href: \"#\" };\n\nfunction d(ms: number) {\n  return { \"--hb-vb1-d\": `${ms}ms` } as React.CSSProperties;\n}\n\nexport function HeroPrism({\n  eyebrow = \"Spectra 3 · Signal decomposition\",\n  title = \"One stream in. Every signal out.\",\n  subtitle = \"Spectra splits a single firehose of product events into the seven metrics your team actually acts on, refreshed every second and explained in plain language.\",\n  primaryCta = defaultPrimary,\n  secondaryCta = defaultSecondary,\n  showRuler = true,\n  interactive = true,\n  headingAs = \"h1\",\n  className = \"\",\n  style,\n  onPointerMove,\n  onPointerLeave,\n  ...rest\n}: HeroPrismProps) {\n  const Heading = headingAs;\n  const uid = React.useId().replace(/:/g, \"\");\n  const root = React.useRef<HTMLElement>(null);\n  const split = title.lastIndexOf(\" \", Math.floor(title.length * 0.55));\n  const head = split > 0 ? title.slice(0, split) : \"\";\n  const tail = split > 0 ? title.slice(split + 1) : title;\n\n  const move = (event: React.PointerEvent<HTMLElement>) => {\n    onPointerMove?.(event);\n    if (!interactive || !root.current) return;\n    const box = root.current.getBoundingClientRect();\n    const x = (event.clientX - box.left) / box.width - 0.5;\n    root.current.style.setProperty(\"--hb-vb1-tilt\", `${(x * 7).toFixed(2)}deg`);\n  };\n  const leave = (event: React.PointerEvent<HTMLElement>) => {\n    onPointerLeave?.(event);\n    root.current?.style.setProperty(\"--hb-vb1-tilt\", \"0deg\");\n  };\n\n  return (\n    <section ref={root} className={`hb-vb1 ${className}`} style={style} onPointerMove={move} onPointerLeave={leave} {...rest}>\n      <style href=\"hb-hero-prism\" precedence=\"default\">{css}</style>\n      <svg className=\"hb-vb1-scene\" viewBox=\"0 0 1200 720\" preserveAspectRatio=\"xMidYMin slice\" aria-hidden=\"true\">\n        <defs>\n          <filter id={`${uid}-soft`} x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n            <feGaussianBlur stdDeviation=\"16\" />\n          </filter>\n          <filter id={`${uid}-glow`} x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n            <feGaussianBlur stdDeviation=\"3\" />\n          </filter>\n          <linearGradient id={`${uid}-glass`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n            <stop offset=\"0\" stopColor=\"#ffffff\" stopOpacity=\".2\" />\n            <stop offset=\".5\" stopColor=\"#ffffff\" stopOpacity=\".04\" />\n            <stop offset=\"1\" stopColor=\"#9fd8ff\" stopOpacity=\".14\" />\n          </linearGradient>\n          <linearGradient id={`${uid}-beam`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n            <stop offset=\"0\" stopColor=\"#ffffff\" stopOpacity=\"0\" />\n            <stop offset=\".6\" stopColor=\"#ffffff\" stopOpacity=\".55\" />\n            <stop offset=\"1\" stopColor=\"#ffffff\" stopOpacity=\".95\" />\n          </linearGradient>\n          <linearGradient id={`${uid}-fade`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n            <stop offset=\"0\" stopColor=\"#fff\" stopOpacity=\"1\" />\n            <stop offset=\".75\" stopColor=\"#fff\" stopOpacity=\".7\" />\n            <stop offset=\"1\" stopColor=\"#fff\" stopOpacity=\"0\" />\n          </linearGradient>\n          <mask id={`${uid}-mask`}>\n            <rect x=\"0\" y=\"0\" width=\"1400\" height=\"760\" fill={`url(#${uid}-fade)`} />\n          </mask>\n        </defs>\n        <line x1=\"-40\" y1=\"96\" x2=\"541\" y2=\"196\" stroke={`url(#${uid}-beam)`} strokeWidth=\"2.4\" />\n        <line x1=\"-40\" y1=\"96\" x2=\"541\" y2=\"196\" stroke=\"#ffffff\" strokeOpacity=\".35\" strokeWidth=\"9\" filter={`url(#${uid}-glow)`} />\n        <line className=\"hb-vb1-photon\" x1=\"-40\" y1=\"96\" x2=\"541\" y2=\"196\" stroke=\"#ffffff\" strokeWidth=\"3\" strokeLinecap=\"round\" />\n        <g className=\"hb-vb1-tiltg\">\n          <g className=\"hb-vb1-fan\" mask={`url(#${uid}-mask)`}>\n            <g filter={`url(#${uid}-soft)`} opacity=\".85\">\n              {bands.map((band, i) => (\n                <polygon key={i} points={band.points} fill={band.color} opacity=\".55\" />\n              ))}\n            </g>\n            {bands.map((band, i) => (\n              <polygon\n                key={i}\n                className=\"hb-vb1-band\"\n                points={band.points}\n                fill={band.color}\n                style={{ \"--hb-vb1-i\": i } as React.CSSProperties}\n              />\n            ))}\n          </g>\n        </g>\n        <path d=\"M541 196 L662 196\" stroke=\"#ffffff\" strokeOpacity=\".5\" strokeWidth=\"2\" />\n        <polygon points=\"600,84 476,304 724,304\" fill={`url(#${uid}-glass)`} stroke=\"rgba(255,255,255,.55)\" strokeWidth=\"1.4\" strokeLinejoin=\"round\" />\n        <polygon points=\"600,84 476,304 600,250\" fill=\"#ffffff\" opacity=\".05\" />\n        <polygon points=\"600,84 724,304 600,250\" fill=\"#7fd0ff\" opacity=\".05\" />\n        <line x1=\"600\" y1=\"84\" x2=\"600\" y2=\"250\" stroke=\"#ffffff\" strokeOpacity=\".12\" />\n        <line className=\"hb-vb1-glint\" x1=\"590\" y1=\"104\" x2=\"500\" y2=\"264\" stroke=\"#ffffff\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n        <circle cx=\"600\" cy=\"84\" r=\"2.4\" fill=\"#ffffff\" />\n        <ellipse cx=\"600\" cy=\"318\" rx=\"150\" ry=\"8\" fill=\"#000\" opacity=\".6\" filter={`url(#${uid}-glow)`} />\n      </svg>\n      <div className=\"hb-vb1-veil\" aria-hidden=\"true\" />\n      <div className=\"hb-vb1-inner\">\n        {eyebrow ? (\n          <p className=\"hb-vb1-eyebrow hb-vb1-in\" style={d(80)}>\n            <span className=\"hb-vb1-chip\" aria-hidden=\"true\" />\n            {eyebrow}\n          </p>\n        ) : null}\n        <Heading className=\"hb-vb1-title hb-vb1-in\" style={d(180)}>\n          {head ? `${head} ` : null}\n          <span>{tail}</span>\n        </Heading>\n        {subtitle ? (\n          <p className=\"hb-vb1-sub hb-vb1-in\" style={d(300)}>\n            {subtitle}\n          </p>\n        ) : null}\n        {primaryCta || secondaryCta ? (\n          <div className=\"hb-vb1-actions hb-vb1-in\" style={d(420)}>\n            {primaryCta ? (\n              <a className=\"hb-vb1-btn\" data-primary=\"\" href={primaryCta.href}>\n                {primaryCta.label}\n                <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M5 12h14M13 6l6 6-6 6\" />\n                </svg>\n              </a>\n            ) : null}\n            {secondaryCta ? (\n              <a className=\"hb-vb1-btn\" href={secondaryCta.href}>\n                {secondaryCta.label}\n              </a>\n            ) : null}\n          </div>\n        ) : null}\n      </div>\n      {showRuler ? (\n        <div className=\"hb-vb1-ruler hb-vb1-in\" style={d(560)} aria-hidden=\"true\">\n          <div className=\"hb-vb1-bar\" />\n          <div className=\"hb-vb1-ticks\">\n            {ticks.map((tick) => (\n              <span\n                key={tick.nm}\n                className=\"hb-vb1-tick\"\n                data-major={tick.major ? \"\" : undefined}\n                data-mid={tick.mid ? \"\" : undefined}\n                data-minor={!tick.major && !tick.mid ? \"\" : undefined}\n                style={{ \"--hb-vb1-h\": tick.major ? \"10px\" : \"5px\" } as React.CSSProperties}\n              >\n                <span>{tick.nm}</span>\n              </span>\n            ))}\n          </div>\n        </div>\n      ) : null}\n    </section>\n  );\n}\n"
    }
  ]
}