{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cinema-projector-intro",
  "type": "registry:component",
  "title": "Cinema Projector Intro",
  "description": "A dark theater where the projector beam flickers on over the audience, dust drifts through the light and the screen runs a reel card before the title appears with scratches and flicker. Built for film clubs and screening nights.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "cinematic",
    "cinematic",
    "projector",
    "theater",
    "flicker",
    "intro",
    "events"
  ],
  "docs": "https://hyperblur.dev/effects/cinema-projector-intro",
  "files": [
    {
      "path": "registry/hyperblur/cinema-projector-intro.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/cinema-projector-intro.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CinemaProjectorIntroAction {\n  label: string;\n  href: string;\n}\n\nexport interface CinemaProjectorIntroProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  presenter?: string;\n  reelLabel?: string;\n  title?: string;\n  schedule?: string;\n  cta?: CinemaProjectorIntroAction | null;\n  duration?: number;\n  loop?: boolean;\n  beam?: string;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst css = `\n.hb-vc6 {\n  --hb-vc6-beam: #cfe2ff;\n  --hb-vc6-dur: 12s;\n  --hb-vc6-iter: infinite;\n  position: relative;\n  box-sizing: border-box;\n  display: block;\n  width: 100%;\n  height: 600px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: radial-gradient(80% 60% at 50% 30%, #12141a, #040405 75%);\n  color: #f3f0ea;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-vc6 *, .hb-vc6 *::before, .hb-vc6 *::after { box-sizing: border-box; }\n.hb-vc6-curtain {\n  position: absolute;\n  top: 0;\n  bottom: 22%;\n  z-index: 0;\n  width: 13%;\n  background: repeating-linear-gradient(90deg, #2a0c10 0 14px, #3d1218 14px 22px, #1c080b 22px 30px);\n  box-shadow: inset 0 -40px 60px rgba(0, 0, 0, .7);\n}\n.hb-vc6-curtain[data-side=\"l\"] { left: 0; -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent); mask-image: linear-gradient(90deg, #000 60%, transparent); }\n.hb-vc6-curtain[data-side=\"r\"] { right: 0; -webkit-mask-image: linear-gradient(270deg, #000 60%, transparent); mask-image: linear-gradient(270deg, #000 60%, transparent); }\n.hb-vc6-beam {\n  position: absolute;\n  inset: 0;\n  z-index: 1;\n  pointer-events: none;\n  clip-path: polygon(49.3% 86%, 15% 64%, 15% 7%, 85% 7%, 85% 64%, 50.7% 86%);\n  background:\n    radial-gradient(70% 90% at 50% 88%, color-mix(in srgb, var(--hb-vc6-beam) 34%, transparent), transparent 70%),\n    linear-gradient(0deg, color-mix(in srgb, var(--hb-vc6-beam) 22%, transparent), color-mix(in srgb, var(--hb-vc6-beam) 6%, transparent));\n  mix-blend-mode: screen;\n  animation: hb-vc6-ignite var(--hb-vc6-dur) linear var(--hb-vc6-iter) both, hb-vc6-pulse .18s steps(2, end) infinite;\n}\n@keyframes hb-vc6-ignite {\n  0%, 5% { opacity: 0; }\n  6% { opacity: .6; }\n  7% { opacity: .1; }\n  9% { opacity: 1; }\n  100% { opacity: 1; }\n}\n@keyframes hb-vc6-pulse {\n  0% { filter: brightness(1); }\n  100% { filter: brightness(.88); }\n}\n.hb-vc6-mote {\n  position: absolute;\n  width: 2px;\n  height: 2px;\n  border-radius: 50%;\n  background: #fff;\n  opacity: .55;\n  animation: hb-vc6-mote var(--hb-vc6-m, 9s) ease-in-out infinite alternate;\n}\n@keyframes hb-vc6-mote {\n  from { transform: translate3d(0, 0, 0); }\n  to { transform: translate3d(var(--hb-vc6-dx, 10px), var(--hb-vc6-dy, -20px), 0); }\n}\n.hb-vc6-screen {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  top: 7%;\n  height: 57%;\n  z-index: 2;\n  overflow: hidden;\n  border-radius: 3px;\n  background: #0a0a0b;\n  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 30px 120px -20px color-mix(in srgb, var(--hb-vc6-beam) 30%, transparent);\n}\n.hb-vc6-cycle {\n  position: absolute;\n  inset: 0;\n}\n.hb-vc6[data-loop=\"true\"] .hb-vc6-cycle { animation: hb-vc6-cycle var(--hb-vc6-dur) linear infinite; }\n@keyframes hb-vc6-cycle {\n  0%, 92% { opacity: 1; }\n  98%, 100% { opacity: 0; }\n}\n.hb-vc6-film {\n  position: absolute;\n  inset: 0;\n  display: grid;\n  place-items: center;\n  background: radial-gradient(90% 90% at 50% 50%, #f3eee4, #b9b2a4 80%, #6d675c);\n  animation: hb-vc6-film var(--hb-vc6-dur) linear var(--hb-vc6-iter) both, hb-vc6-flicker .2s steps(3, end) infinite;\n}\n@keyframes hb-vc6-film {\n  0%, 8% { opacity: 0; }\n  9% { opacity: 1; }\n  100% { opacity: 1; }\n}\n@keyframes hb-vc6-flicker {\n  0% { filter: brightness(1) contrast(1.05); }\n  33% { filter: brightness(.9) contrast(1.1); }\n  66% { filter: brightness(1.04) contrast(1); }\n}\n.hb-vc6-reel {\n  position: absolute;\n  inset: 0;\n  display: grid;\n  place-items: center;\n  color: #1a1814;\n  opacity: 0;\n  animation: hb-vc6-reel var(--hb-vc6-dur) linear var(--hb-vc6-iter) both;\n}\n@keyframes hb-vc6-reel {\n  0%, 10% { opacity: 0; }\n  11%, 30% { opacity: 1; }\n  31%, 100% { opacity: 0; }\n}\n.hb-vc6-reel-in { display: flex; flex-direction: column; align-items: center; gap: 10px; }\n.hb-vc6-reel-ring {\n  display: grid;\n  place-items: center;\n  width: clamp(60px, 12cqi, 120px);\n  aspect-ratio: 1;\n  border: 2px solid currentColor;\n  border-radius: 50%;\n  font-family: var(--font-grotesk, var(--font-sans, ui-sans-serif, system-ui, sans-serif));\n  font-size: clamp(28px, 6cqi, 60px);\n  font-weight: 700;\n}\n.hb-vc6-reel-label {\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: clamp(9px, 1.2cqi, 12px);\n  letter-spacing: .4em;\n  text-transform: uppercase;\n}\n.hb-vc6-title-wrap {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 0 6%;\n  color: #15130f;\n  text-align: center;\n  animation: hb-vc6-title var(--hb-vc6-dur) cubic-bezier(.2, .7, .2, 1) var(--hb-vc6-iter) both;\n}\n@keyframes hb-vc6-title {\n  0%, 31% { opacity: 0; transform: scale(1.04); filter: blur(3px); }\n  38%, 100% { opacity: 1; transform: none; filter: blur(0); }\n}\n.hb-vc6-presenter {\n  margin: 0 0 10px;\n  font-size: clamp(9px, 1.15cqi, 12px);\n  font-weight: 600;\n  letter-spacing: .38em;\n  text-transform: uppercase;\n  opacity: .72;\n}\n.hb-vc6-title {\n  margin: 0;\n  font-family: var(--font-grotesk, var(--font-sans, ui-sans-serif, system-ui, sans-serif));\n  font-size: clamp(30px, 7.4cqi, 92px);\n  font-weight: 700;\n  line-height: .88;\n  letter-spacing: -.035em;\n  text-transform: uppercase;\n}\n.hb-vc6-schedule {\n  margin: 12px 0 0;\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: clamp(9.5px, 1.25cqi, 13px);\n  letter-spacing: .14em;\n  text-transform: uppercase;\n  opacity: .78;\n}\n.hb-vc6-scratch {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  width: 1px;\n  background: rgba(30, 26, 20, .55);\n  opacity: 0;\n  animation: hb-vc6-scratch 1.7s steps(1, end) infinite;\n}\n.hb-vc6-scratch:nth-of-type(2) { animation-duration: 2.3s; animation-delay: -.7s; }\n.hb-vc6-scratch:nth-of-type(3) { animation-duration: 3.1s; animation-delay: -1.9s; background: rgba(255, 255, 255, .6); }\n@keyframes hb-vc6-scratch {\n  0% { opacity: .9; left: 22%; }\n  8% { opacity: 0; }\n  31% { opacity: .7; left: 71%; }\n  36% { opacity: 0; }\n  58% { opacity: .8; left: 43%; }\n  62% { opacity: 0; }\n  83% { opacity: .5; left: 88%; }\n  86% { opacity: 0; }\n}\n.hb-vc6-vig {\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  background: radial-gradient(100% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55));\n}\n.hb-vc6-crowd {\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 3;\n  height: 30%;\n  pointer-events: none;\n}\n.hb-vc6-crowd svg { display: block; width: 100%; height: 100%; }\n.hb-vc6-source {\n  position: absolute;\n  left: 50%;\n  top: 86%;\n  z-index: 2;\n  width: 26px;\n  height: 10px;\n  border-radius: 50%;\n  background: #fff;\n  box-shadow: 0 0 20px 8px color-mix(in srgb, var(--hb-vc6-beam) 70%, transparent), 0 0 60px 20px color-mix(in srgb, var(--hb-vc6-beam) 30%, transparent);\n  transform: translate(-50%, -50%);\n  animation: hb-vc6-ignite var(--hb-vc6-dur) linear var(--hb-vc6-iter) both;\n}\n.hb-vc6-cta {\n  position: absolute;\n  left: 50%;\n  bottom: 22px;\n  z-index: 4;\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  height: 42px;\n  padding: 0 20px;\n  border: 1px solid rgba(243, 240, 234, .2);\n  border-radius: 999px;\n  background: rgba(12, 12, 14, .7);\n  color: #f3f0ea;\n  font-size: 13.5px;\n  font-weight: 550;\n  text-decoration: none;\n  white-space: nowrap;\n  transform: translateX(-50%);\n  backdrop-filter: blur(10px);\n  transition: border-color .25s ease, background .25s ease;\n}\n.hb-vc6-cta:hover { border-color: rgba(243, 240, 234, .45); background: rgba(30, 30, 34, .8); }\n.hb-vc6-cta:focus-visible { outline: 2px solid var(--hb-vc6-beam); outline-offset: 3px; }\n.hb-vc6-cta i {\n  width: 7px;\n  height: 7px;\n  border-radius: 50%;\n  background: #ff5a4a;\n  font-style: normal;\n  box-shadow: 0 0 10px #ff5a4a;\n}\n@container (max-width: 600px) {\n  .hb-vc6-screen { left: 6%; right: 6%; }\n  .hb-vc6-beam { clip-path: polygon(49.3% 86%, 6% 64%, 6% 7%, 94% 7%, 94% 64%, 50.7% 86%); }\n  .hb-vc6-curtain { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vc6-beam, .hb-vc6-film, .hb-vc6-title-wrap, .hb-vc6-source, .hb-vc6-mote, .hb-vc6-scratch { animation: none !important; }\n  .hb-vc6[data-loop=\"true\"] .hb-vc6-cycle { animation: none; }\n  .hb-vc6-reel { animation: none; opacity: 0; }\n}\n`;\n\nconst motes = Array.from({ length: 34 }, (_, i) => {\n  const h = Math.imul(i + 3, 2654435761) >>> 0;\n  const h2 = Math.imul(i + 41, 2246822519) >>> 0;\n  return {\n    left: (20 + (h % 6000) / 100).toFixed(2),\n    top: (14 + (h2 % 6800) / 100).toFixed(2),\n    dx: ((h >>> 8) % 40) - 20,\n    dy: -(((h2 >>> 6) % 50) + 10),\n    m: (6 + ((h >>> 4) % 70) / 10).toFixed(1),\n    s: (1 + ((h2 >>> 3) % 3) * 0.5).toFixed(1),\n  };\n});\n\nconst heads = (row: number) =>\n  Array.from({ length: 14 }, (_, i) => {\n    const h = Math.imul(i * 7 + row * 31 + 5, 2654435761) >>> 0;\n    const x = i * 118 + (row ? 60 : 0) + (h % 30) - 15;\n    const r = 34 + (h % 9) + row * 6;\n    return { x, r, y: row ? 270 : 220 + ((h >>> 5) % 14) };\n  });\n\nexport function CinemaProjectorIntro({\n  presenter = \"The Northern Light Film Society presents\",\n  reelLabel = \"Reel\",\n  title = \"Midnight Matinee\",\n  schedule = \"Restored prints · Every Friday · 11:45 PM\",\n  cta = { label: \"See this month's program\", href: \"#\" },\n  duration = 12,\n  loop = true,\n  beam = \"#cfe2ff\",\n  headingAs = \"h1\",\n  className,\n  style,\n  ...rest\n}: CinemaProjectorIntroProps) {\n  const Heading = headingAs;\n  const vars = {\n    \"--hb-vc6-beam\": beam,\n    \"--hb-vc6-dur\": `${duration}s`,\n    \"--hb-vc6-iter\": loop ? \"infinite\" : \"1\",\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <section className={[\"hb-vc6\", className].filter(Boolean).join(\" \")} style={vars} data-loop={loop ? \"true\" : \"false\"} {...rest}>\n      <style href=\"hb-cinema-projector-intro\" precedence=\"default\">{css}</style>\n      <span className=\"hb-vc6-curtain\" data-side=\"l\" aria-hidden=\"true\" />\n      <span className=\"hb-vc6-curtain\" data-side=\"r\" aria-hidden=\"true\" />\n      <div className=\"hb-vc6-beam\" aria-hidden=\"true\">\n        {motes.map((m, i) => (\n          <span\n            key={i}\n            className=\"hb-vc6-mote\"\n            style={{\n              left: `${m.left}%`,\n              top: `${m.top}%`,\n              width: `${m.s}px`,\n              height: `${m.s}px`,\n              \"--hb-vc6-dx\": `${m.dx}px`,\n              \"--hb-vc6-dy\": `${m.dy}px`,\n              \"--hb-vc6-m\": `${m.m}s`,\n            } as React.CSSProperties}\n          />\n        ))}\n      </div>\n      <div className=\"hb-vc6-screen\">\n        <div className=\"hb-vc6-cycle\">\n          <div className=\"hb-vc6-film\">\n            <div className=\"hb-vc6-reel\" aria-hidden=\"true\">\n              <div className=\"hb-vc6-reel-in\">\n                <span className=\"hb-vc6-reel-ring\">1</span>\n                <span className=\"hb-vc6-reel-label\">{reelLabel} one</span>\n              </div>\n            </div>\n            <div className=\"hb-vc6-title-wrap\">\n              {presenter ? <p className=\"hb-vc6-presenter\">{presenter}</p> : null}\n              <Heading className=\"hb-vc6-title\">{title}</Heading>\n              {schedule ? <p className=\"hb-vc6-schedule\">{schedule}</p> : null}\n            </div>\n            <span className=\"hb-vc6-scratch\" aria-hidden=\"true\" />\n            <span className=\"hb-vc6-scratch\" aria-hidden=\"true\" />\n            <span className=\"hb-vc6-scratch\" aria-hidden=\"true\" />\n            <span className=\"hb-vc6-vig\" aria-hidden=\"true\" />\n          </div>\n        </div>\n      </div>\n      <span className=\"hb-vc6-source\" aria-hidden=\"true\" />\n      <div className=\"hb-vc6-crowd\" aria-hidden=\"true\">\n        <svg viewBox=\"0 0 1600 300\" preserveAspectRatio=\"xMidYMax slice\">\n          {[0, 1].map((row) => (\n            <g key={row} fill={row ? \"#020203\" : \"#08080a\"}>\n              {heads(row).map((hd, i) => (\n                <g key={i}>\n                  <ellipse cx={hd.x} cy={hd.y - hd.r * 0.9} rx={hd.r * 0.62} ry={hd.r * 0.78} />\n                  <path d={`M${hd.x - hd.r * 1.5} 300 C${hd.x - hd.r * 1.4} ${hd.y - 4} ${hd.x - hd.r * 0.8} ${hd.y - hd.r * 0.25} ${hd.x} ${hd.y - hd.r * 0.25} C${hd.x + hd.r * 0.8} ${hd.y - hd.r * 0.25} ${hd.x + hd.r * 1.4} ${hd.y - 4} ${hd.x + hd.r * 1.5} 300Z`} />\n                </g>\n              ))}\n            </g>\n          ))}\n        </svg>\n      </div>\n      {cta ? (\n        <a className=\"hb-vc6-cta\" href={cta.href}>\n          <i aria-hidden=\"true\" />\n          {cta.label}\n        </a>\n      ) : null}\n    </section>\n  );\n}\n"
    }
  ]
}