{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"reeded-glass-window-with-passing-night-lights-background","type":"registry:block","title":"Reeded Glass with Passing Night Lights","description":"","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/reeded-glass-window-with-passing-night-lights-background.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\n\nconst css = `\n/* Change these: night colour, width of one glass reed, base seconds for a passing light, main lamp colour */\n.rdg{--rdg-night:#0c1626;--rdg-reed:22px;--rdg-speed:14s;--rdg-amber:#ffb45e}\n.rdg{position:relative;isolation:isolate;overflow:hidden;min-height:560px;display:flex;align-items:center;background:linear-gradient(180deg,#0f1b2e,var(--rdg-night));color:#f4efe6;font-family:ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif}\n.rdg-fx{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}\n.rdg-fx *{position:absolute;pointer-events:none}\n.rdg-hero{position:relative;z-index:1;width:100%;max-width:1120px;margin:0 auto;padding:72px 24px;box-sizing:border-box}\n.rdg-eyebrow{margin:0 0 14px;font-size:13px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}\n.rdg-title{margin:0;max-width:15ch;font-size:clamp(34px,5.6vw,60px);line-height:1.04;letter-spacing:-.025em;font-weight:650}\n.rdg-copy{margin:20px 0 30px;max-width:44ch;font-size:clamp(16px,1.6vw,18px);line-height:1.6}\n.rdg-btn{display:inline-block;padding:13px 24px;border-radius:999px;font-size:15px;font-weight:600;text-decoration:none;transition:transform .2s ease}\n.rdg-btn:hover{transform:translateY(-1px)}\n.rdg-btn:focus-visible{outline:3px solid currentColor;outline-offset:4px}\n.rdg[data-paused] *,.rdg[data-paused] *::before,.rdg[data-paused] *::after{animation-play-state:paused!important}\n.rdg[data-reduced] *,.rdg[data-reduced] *::before,.rdg[data-reduced] *::after{animation:none!important}\n@media (prefers-reduced-motion:reduce){.rdg *,.rdg *::before,.rdg *::after{animation:none!important}}\n.rdg-lights{inset:0;-webkit-mask-image:repeating-linear-gradient(90deg,rgba(0,0,0,.3) 0,#000 calc(var(--rdg-reed) * .45),rgba(0,0,0,.3) var(--rdg-reed));mask-image:repeating-linear-gradient(90deg,rgba(0,0,0,.3) 0,#000 calc(var(--rdg-reed) * .45),rgba(0,0,0,.3) var(--rdg-reed))}\n.rdg-l{left:-22%;width:18%;height:80%;border-radius:50%;animation:rdg-pass var(--rdg-speed) linear infinite}\n.rdg-l1{top:8%;background:radial-gradient(closest-side,var(--rdg-amber),rgba(255,180,94,0));animation-duration:calc(var(--rdg-speed) * .8);animation-delay:calc(var(--rdg-speed) * -.35)}\n.rdg-l2{top:22%;height:70%;background:radial-gradient(closest-side,rgba(255,244,222,.9),rgba(255,244,222,0));animation-duration:calc(var(--rdg-speed) * 1.25);animation-delay:calc(var(--rdg-speed) * -.6)}\n.rdg-l3{top:30%;width:12%;background:radial-gradient(closest-side,rgba(255,86,64,.85),rgba(255,86,64,0));animation-direction:reverse;animation-delay:calc(var(--rdg-speed) * -.25)}\n.rdg-l4{top:2%;width:22%;background:radial-gradient(closest-side,rgba(255,170,80,.75),rgba(255,170,80,0));animation-direction:reverse;animation-duration:calc(var(--rdg-speed) * 1.6);animation-delay:calc(var(--rdg-speed) * -1.1)}\n.rdg-l5{top:-10%;width:34%;height:100%;background:radial-gradient(closest-side,rgba(150,210,220,.35),rgba(150,210,220,0));animation-duration:calc(var(--rdg-speed) * 3);animation-delay:calc(var(--rdg-speed) * -1.4)}\n.rdg-l6{top:14%;width:14%;background:radial-gradient(closest-side,rgba(255,200,120,.9),rgba(255,200,120,0));animation-duration:calc(var(--rdg-speed) * .65);animation-delay:calc(var(--rdg-speed) * -.1)}\n.rdg-reeds{inset:0;background:repeating-linear-gradient(90deg,rgba(255,255,255,.09) 0,rgba(255,255,255,0) 3px,rgba(0,0,0,0) calc(var(--rdg-reed) * .55),rgba(0,0,0,.32) calc(var(--rdg-reed) - 2px),rgba(255,255,255,.12) var(--rdg-reed))}\n.rdg-scrim{inset:0;background:linear-gradient(90deg,rgba(9,16,29,.86) 0,rgba(9,16,29,.6) 42%,rgba(9,16,29,.08) 78%)}\n.rdg-eyebrow{color:var(--rdg-amber)}\n.rdg-copy{color:#d5d0c7}\n.rdg-btn{background:var(--rdg-amber);color:#1b1206}\n@keyframes rdg-pass{from{transform:translateX(0)}to{transform:translateX(720%)}}\n@media (max-width:700px){.rdg-scrim{background:linear-gradient(180deg,rgba(9,16,29,.55),rgba(9,16,29,.78))}}\n`;\n\nexport default function ReededGlassNightLights() {\n  const ref = useRef<HTMLElement>(null);\n  const reduce = useReducedMotion();\n\n  useEffect(() => {\n    const el = ref.current;\n    if (!el || reduce || typeof IntersectionObserver === \"undefined\") return;\n    const io = new IntersectionObserver(([entry]) => {\n      if (entry.isIntersecting) el.removeAttribute(\"data-paused\");\n      else el.setAttribute(\"data-paused\", \"\");\n    });\n    io.observe(el);\n    return () => io.disconnect();\n  }, [reduce]);\n\n  return (\n    <section ref={ref} className=\"rdg\" data-reduced={reduce ? \"\" : undefined}>\n      <style>{css}</style>\n      <div className=\"rdg-fx\" aria-hidden=\"true\"><div className=\"rdg-lights\"><div className=\"rdg-l rdg-l1\" /><div className=\"rdg-l rdg-l2\" /><div className=\"rdg-l rdg-l3\" /><div className=\"rdg-l rdg-l4\" /><div className=\"rdg-l rdg-l5\" /><div className=\"rdg-l rdg-l6\" /></div><div className=\"rdg-reeds\" /><div className=\"rdg-scrim\" /></div>\n      <div className=\"rdg-hero\"><p className=\"rdg-eyebrow\">Lantern Street Wine Bar</p><h1 className=\"rdg-title\">Natural wine and small plates behind the fluted glass</h1><p className=\"rdg-copy\">Open from five until late, six nights a week. Walk-ins welcome at the counter; tables can be held for groups of six or more.</p><a className=\"rdg-btn\" href=\"#\">Hold a table</a></div>\n    </section>\n  );\n}\n"}]}
