{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cinema-light-leak",
  "type": "registry:component",
  "title": "Cinema Light Leak",
  "description": "A golden-hour coastline shot on film, with warm light leaks drifting across the frame, an edge burn, moving grain, gate weave and a running timecode. The caption sits low on the left like a home-movie title.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "cinematic",
    "cinematic",
    "light leak",
    "film grain",
    "analog",
    "super 8",
    "hero"
  ],
  "docs": "https://hyperblur.dev/effects/cinema-light-leak",
  "files": [
    {
      "path": "registry/hyperblur/cinema-light-leak.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/cinema-light-leak.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface CinemaLightLeakProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  reel?: string;\n  title?: string;\n  caption?: string;\n  location?: string;\n  intensity?: number;\n  grain?: number;\n  speed?: number;\n  warm?: string;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst css = `\n.hb-vc5 {\n  --hb-vc5-warm: #ff7a2f;\n  --hb-vc5-int: .85;\n  --hb-vc5-grain: .5;\n  --hb-vc5-speed: 1;\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  align-items: flex-end;\n  width: 100%;\n  min-height: 580px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0605;\n  color: #fff6ea;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-vc5 *, .hb-vc5 *::before, .hb-vc5 *::after { box-sizing: border-box; }\n.hb-vc5-gate {\n  position: absolute;\n  inset: -6px;\n  z-index: 0;\n  animation: hb-vc5-weave calc(.9s / var(--hb-vc5-speed)) steps(1, end) infinite;\n}\n@keyframes hb-vc5-weave {\n  0% { transform: translate3d(0, 0, 0); }\n  20% { transform: translate3d(.6px, -1px, 0); }\n  40% { transform: translate3d(-.4px, .8px, 0); }\n  60% { transform: translate3d(.8px, .4px, 0); }\n  80% { transform: translate3d(-.6px, -.6px, 0); }\n}\n.hb-vc5-gate svg { display: block; width: 100%; height: 100%; filter: saturate(1.15) contrast(1.05); }\n.hb-vc5-sway { animation: hb-vc5-sway calc(7s / var(--hb-vc5-speed)) ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }\n@keyframes hb-vc5-sway {\n  from { transform: rotate(-1.4deg); }\n  to { transform: rotate(1.2deg); }\n}\n.hb-vc5-leak {\n  position: absolute;\n  z-index: 1;\n  border-radius: 50%;\n  pointer-events: none;\n  mix-blend-mode: screen;\n  filter: blur(40px);\n  opacity: 0;\n}\n.hb-vc5-leak[data-k=\"a\"] {\n  left: -20%;\n  top: -30%;\n  width: 70%;\n  height: 120%;\n  background: radial-gradient(closest-side, var(--hb-vc5-warm), color-mix(in srgb, var(--hb-vc5-warm) 40%, #ff2a5a) 55%, transparent);\n  animation: hb-vc5-a calc(9s / var(--hb-vc5-speed)) cubic-bezier(.45, 0, .55, 1) infinite;\n}\n.hb-vc5-leak[data-k=\"b\"] {\n  right: -25%;\n  top: 10%;\n  width: 60%;\n  height: 100%;\n  background: radial-gradient(closest-side, #ffd27a, color-mix(in srgb, var(--hb-vc5-warm) 70%, #ffd27a) 50%, transparent);\n  animation: hb-vc5-b calc(11s / var(--hb-vc5-speed)) cubic-bezier(.45, 0, .55, 1) infinite;\n}\n.hb-vc5-leak[data-k=\"c\"] {\n  left: 30%;\n  bottom: -50%;\n  width: 50%;\n  height: 80%;\n  background: radial-gradient(closest-side, #ff3d6e, transparent);\n  animation: hb-vc5-c calc(13s / var(--hb-vc5-speed)) cubic-bezier(.45, 0, .55, 1) infinite;\n}\n@keyframes hb-vc5-a {\n  0%, 100% { opacity: 0; transform: translate3d(-10%, 0, 0) scale(.9); }\n  30% { opacity: calc(var(--hb-vc5-int) * .9); }\n  55% { opacity: calc(var(--hb-vc5-int) * .55); transform: translate3d(18%, 6%, 0) scale(1.15); }\n  70% { opacity: 0; }\n}\n@keyframes hb-vc5-b {\n  0%, 100% { opacity: 0; transform: translate3d(10%, 0, 0); }\n  40% { opacity: 0; }\n  62% { opacity: calc(var(--hb-vc5-int) * .8); transform: translate3d(-14%, -8%, 0) scale(1.2); }\n  85% { opacity: calc(var(--hb-vc5-int) * .2); }\n}\n@keyframes hb-vc5-c {\n  0%, 100% { opacity: calc(var(--hb-vc5-int) * .25); transform: translate3d(0, 0, 0); }\n  50% { opacity: calc(var(--hb-vc5-int) * .6); transform: translate3d(-30%, -10%, 0) scale(1.3); }\n}\n.hb-vc5-burn {\n  position: absolute;\n  inset: 0;\n  z-index: 2;\n  pointer-events: none;\n  background: linear-gradient(90deg, color-mix(in srgb, var(--hb-vc5-warm) 90%, #fff), transparent 30%);\n  mix-blend-mode: screen;\n  opacity: 0;\n  animation: hb-vc5-burn calc(9s / var(--hb-vc5-speed)) ease-out infinite;\n}\n@keyframes hb-vc5-burn {\n  0%, 26%, 100% { opacity: 0; }\n  28% { opacity: calc(var(--hb-vc5-int) * .7); }\n  34% { opacity: 0; }\n}\n.hb-vc5-grain {\n  position: absolute;\n  inset: -50%;\n  z-index: 3;\n  width: 200%;\n  height: 200%;\n  pointer-events: none;\n  opacity: var(--hb-vc5-grain);\n  mix-blend-mode: overlay;\n  animation: hb-vc5-grain .5s steps(5, end) infinite;\n}\n@keyframes hb-vc5-grain {\n  0% { transform: translate3d(0, 0, 0); }\n  20% { transform: translate3d(-6%, 4%, 0); }\n  40% { transform: translate3d(4%, -7%, 0); }\n  60% { transform: translate3d(-3%, -3%, 0); }\n  80% { transform: translate3d(7%, 5%, 0); }\n  100% { transform: translate3d(0, 0, 0); }\n}\n.hb-vc5-frame {\n  position: absolute;\n  inset: 0;\n  z-index: 4;\n  pointer-events: none;\n  border-radius: 18px;\n  box-shadow: inset 0 0 0 10px #050302, inset 0 0 90px 30px rgba(0, 0, 0, .75);\n}\n.hb-vc5-hud {\n  position: absolute;\n  top: 22px;\n  left: 30px;\n  right: 30px;\n  z-index: 5;\n  display: flex;\n  justify-content: space-between;\n  color: rgba(255, 238, 214, .85);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 11px;\n  letter-spacing: .16em;\n  text-transform: uppercase;\n  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);\n}\n.hb-vc5-tc { font-variant-numeric: tabular-nums; }\n.hb-vc5-tc::before {\n  content: \"\";\n  display: inline-block;\n  width: 7px;\n  height: 7px;\n  margin-right: 8px;\n  border-radius: 50%;\n  background: #ff4a3a;\n  vertical-align: 1px;\n  animation: hb-vc5-rec 1.2s steps(1, end) infinite;\n}\n@keyframes hb-vc5-rec {\n  50% { opacity: .2; }\n}\n.hb-vc5-copy {\n  position: relative;\n  z-index: 5;\n  max-width: 640px;\n  padding: 0 clamp(24px, 5cqi, 64px) clamp(36px, 6cqi, 64px);\n}\n.hb-vc5-reel {\n  margin: 0 0 12px;\n  color: rgba(255, 238, 214, .7);\n  font-family: var(--font-mono, ui-monospace, monospace);\n  font-size: 11px;\n  letter-spacing: .26em;\n  text-transform: uppercase;\n}\n.hb-vc5-title {\n  margin: 0;\n  font-family: var(--font-grotesk, var(--font-sans, ui-sans-serif, system-ui, sans-serif));\n  font-size: clamp(40px, 8.6cqi, 108px);\n  font-weight: 700;\n  line-height: .9;\n  letter-spacing: -.04em;\n  text-shadow: 0 4px 40px rgba(0, 0, 0, .4);\n}\n.hb-vc5-caption {\n  max-width: 440px;\n  margin: 16px 0 0;\n  color: rgba(255, 246, 234, .82);\n  font-size: clamp(14px, 1.7cqi, 16px);\n  line-height: 1.55;\n}\n.hb-vc5-loc {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin-top: 18px;\n  padding: 6px 12px;\n  border: 1px solid rgba(255, 238, 214, .26);\n  border-radius: 999px;\n  background: rgba(20, 10, 6, .35);\n  color: rgba(255, 238, 214, .9);\n  font-size: 12px;\n  backdrop-filter: blur(6px);\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vc5-gate, .hb-vc5-sway, .hb-vc5-burn, .hb-vc5-grain, .hb-vc5-tc::before { animation: none; }\n  .hb-vc5-leak { animation: none; opacity: calc(var(--hb-vc5-int) * .4); }\n}\n`;\n\nfunction pad(n: number) {\n  return String(n).padStart(2, \"0\");\n}\n\nexport function CinemaLightLeak({\n  reel = \"Reel 02 · Kodak 500T\",\n  title = \"Summer, unedited\",\n  caption = \"Eleven days of salt, static and borrowed cars, cut together from the rolls we almost threw away.\",\n  location = \"Cabo da Roca, Portugal\",\n  intensity = 0.85,\n  grain = 0.5,\n  speed = 1,\n  warm = \"#ff7a2f\",\n  headingAs = \"h1\",\n  className,\n  style,\n  ...rest\n}: CinemaLightLeakProps) {\n  const Heading = headingAs;\n  const uid = React.useId().replace(/[^a-zA-Z0-9]/g, \"\");\n  const tcRef = React.useRef<HTMLSpanElement>(null);\n\n  React.useEffect(() => {\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    let frame = 14 * 24 * 60 + 8;\n    const id = window.setInterval(() => {\n      frame += 1;\n      const f = frame % 24;\n      const s = Math.floor(frame / 24) % 60;\n      const m = Math.floor(frame / 1440) % 60;\n      if (tcRef.current) tcRef.current.textContent = `00:${pad(m)}:${pad(s)}:${pad(f)}`;\n    }, 1000 / 24);\n    return () => window.clearInterval(id);\n  }, []);\n\n  const vars = {\n    \"--hb-vc5-warm\": warm,\n    \"--hb-vc5-int\": String(intensity),\n    \"--hb-vc5-grain\": String(grain),\n    \"--hb-vc5-speed\": String(speed),\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <section className={[\"hb-vc5\", className].filter(Boolean).join(\" \")} style={vars} {...rest}>\n      <style href=\"hb-cinema-light-leak\" precedence=\"default\">{css}</style>\n      <div className=\"hb-vc5-gate\" aria-hidden=\"true\">\n        <svg viewBox=\"0 0 1600 900\" preserveAspectRatio=\"xMidYMid slice\">\n          <defs>\n            <linearGradient id={`hb-vc5-sky-${uid}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n              <stop offset=\"0\" stopColor=\"#3b2a4a\" />\n              <stop offset=\".4\" stopColor=\"#c4646a\" />\n              <stop offset=\".62\" stopColor=\"#ffb07a\" />\n              <stop offset=\".64\" stopColor=\"#ffd6a4\" />\n              <stop offset=\"1\" stopColor=\"#2d3348\" />\n            </linearGradient>\n            <linearGradient id={`hb-vc5-sea-${uid}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n              <stop offset=\"0\" stopColor=\"#e89a7a\" />\n              <stop offset=\".3\" stopColor=\"#5a4a62\" />\n              <stop offset=\"1\" stopColor=\"#16141e\" />\n            </linearGradient>\n          </defs>\n          <rect width=\"1600\" height=\"900\" fill={`url(#hb-vc5-sky-${uid})`} />\n          <circle cx=\"1040\" cy=\"560\" r=\"64\" fill=\"#fff0d0\" opacity=\".95\" />\n          <circle cx=\"1040\" cy=\"560\" r=\"150\" fill=\"#ffd9a0\" opacity=\".25\" />\n          <rect y=\"576\" width=\"1600\" height=\"324\" fill={`url(#hb-vc5-sea-${uid})`} />\n          {[0, 1, 2, 3, 4, 5, 6].map((i) => (\n            <rect key={i} x={1000 - i * 18} y={590 + i * 22} width={80 + i * 36} height={3 + i * 0.6} rx=\"2\" fill=\"#ffe2b8\" opacity={(0.7 - i * 0.08).toFixed(2)} />\n          ))}\n          <path d=\"M0 620 C120 600 220 560 330 590 C430 616 520 650 600 720 L600 900 L0 900Z\" fill=\"#120c10\" />\n          <path d=\"M1280 900 L1340 660 C1380 640 1440 630 1600 620 L1600 900Z\" fill=\"#0e0a0e\" />\n          <g className=\"hb-vc5-sway\">\n            <path d=\"M250 900 C255 780 262 690 276 590\" stroke=\"#0b0709\" strokeWidth=\"9\" fill=\"none\" />\n            <path d=\"M276 590 C230 560 190 570 150 600 M276 590 C250 540 210 520 170 520 M276 590 C300 540 340 520 390 530 M276 590 C330 570 370 590 400 630 M276 590 C280 545 300 510 320 490\" stroke=\"#0b0709\" strokeWidth=\"7\" strokeLinecap=\"round\" fill=\"none\" />\n          </g>\n        </svg>\n      </div>\n      <span className=\"hb-vc5-leak\" data-k=\"a\" aria-hidden=\"true\" />\n      <span className=\"hb-vc5-leak\" data-k=\"b\" aria-hidden=\"true\" />\n      <span className=\"hb-vc5-leak\" data-k=\"c\" aria-hidden=\"true\" />\n      <span className=\"hb-vc5-burn\" aria-hidden=\"true\" />\n      <svg className=\"hb-vc5-grain\" aria-hidden=\"true\">\n        <filter id={`hb-vc5-noise-${uid}`}>\n          <feTurbulence type=\"fractalNoise\" baseFrequency=\".9\" numOctaves=\"2\" stitchTiles=\"stitch\" />\n          <feColorMatrix values=\"0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2\" />\n        </filter>\n        <rect width=\"100%\" height=\"100%\" filter={`url(#hb-vc5-noise-${uid})`} />\n      </svg>\n      <span className=\"hb-vc5-frame\" aria-hidden=\"true\" />\n      <div className=\"hb-vc5-hud\" aria-hidden=\"true\">\n        <span className=\"hb-vc5-tc\" ref={tcRef}>00:14:00:08</span>\n        <span>24 fps · 1.85 : 1</span>\n      </div>\n      <div className=\"hb-vc5-copy\">\n        {reel ? <p className=\"hb-vc5-reel\">{reel}</p> : null}\n        <Heading className=\"hb-vc5-title\">{title}</Heading>\n        {caption ? <p className=\"hb-vc5-caption\">{caption}</p> : null}\n        {location ? (\n          <span className=\"hb-vc5-loc\">\n            <svg width=\"12\" height=\"12\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\"><path d=\"M8 14.5s5-4.6 5-8.5a5 5 0 1 0-10 0c0 3.9 5 8.5 5 8.5Z\" stroke=\"currentColor\" strokeWidth=\"1.5\" /><circle cx=\"8\" cy=\"6\" r=\"1.8\" fill=\"currentColor\" /></svg>\n            {location}\n          </span>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}