{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"vhs-tracking-wobble-text-with-scanlines","type":"registry:block","title":"VHS Tracking Wobble Text","description":"","dependencies":[],"files":[{"path":"components/we-inc/vhs-tracking-wobble-text-with-scanlines.tsx","type":"registry:component","content":"import { useEffect, useRef, useState } from \"react\";\n\nconst headline = \"Be kind, rewind.\";\n\nexport default function VhsTrackingWobbleText() {\n  const root = useRef<HTMLElement>(null);\n  const [visible, setVisible] = useState(true);\n\n  useEffect(() => {\n    const el = root.current;\n    if (!el) return;\n    const io = new IntersectionObserver(([entry]) => setVisible(entry.isIntersecting));\n    io.observe(el);\n    return () => io.disconnect();\n  }, []);\n\n  return (\n    <section\n      ref={root}\n      data-paused={visible ? \"false\" : \"true\"}\n      className=\"w10vhs relative overflow-hidden bg-[#1a1315] px-5 py-20 sm:px-10 sm:py-24\"\n    >\n      <style>{`\n        .w10vhs { --w10vhs-ink: #f4e6cf; --w10vhs-warm: #ff6f59; --w10vhs-cool: #4fd1c5; --w10vhs-speed: 6s; }\n        .w10vhs-bg { background: radial-gradient(80% 70% at 50% 40%, #3a2526 0%, #1a1315 70%); }\n        .w10vhs-scan { background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.28) 0 2px, transparent 2px 4px); }\n        .w10vhs-band { position: absolute; left: 0; right: 0; height: 18%; top: 0; transform: translateY(-120%); background: linear-gradient(to bottom, transparent, rgba(255,240,220,0.07) 40%, rgba(255,240,220,0.12) 50%, rgba(255,240,220,0.07) 60%, transparent); animation: w10vhs-band var(--w10vhs-speed) linear infinite; }\n        .w10vhs-stack { position: relative; display: inline-grid; }\n        .w10vhs-stack > span { grid-area: 1 / 1; }\n        .w10vhs-base { color: var(--w10vhs-ink); text-shadow: -2px 0 rgba(255,111,89,0.55), 2px 0 rgba(79,209,197,0.5), 0 0 18px rgba(255,200,160,0.25); animation: w10vhs-wobble 2.8s ease-in-out infinite; }\n        .w10vhs-tear { color: var(--w10vhs-ink); text-shadow: -5px 0 var(--w10vhs-warm), 5px 0 var(--w10vhs-cool); clip-path: inset(0 0 100% 0); animation: w10vhs-tear var(--w10vhs-speed) linear infinite; }\n        .w10vhs-osd { animation: w10vhs-osd 1.6s steps(1, end) infinite; }\n        @keyframes w10vhs-wobble { 0%, 100% { transform: translateX(0) skewX(0deg); } 30% { transform: translateX(1.5px) skewX(-0.6deg); } 60% { transform: translateX(-1px) skewX(0.4deg); } }\n        @keyframes w10vhs-band { from { transform: translateY(-120%); } to { transform: translateY(580%); } }\n        @keyframes w10vhs-tear {\n          0% { clip-path: inset(0 0 100% 0); transform: translateX(0); }\n          20% { clip-path: inset(0 0 82% 0); transform: translateX(9px); }\n          40% { clip-path: inset(30% 0 52% 0); transform: translateX(-7px); }\n          60% { clip-path: inset(58% 0 24% 0); transform: translateX(11px); }\n          80% { clip-path: inset(84% 0 0 0); transform: translateX(-5px); }\n          100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }\n        }\n        @keyframes w10vhs-osd { 0% { opacity: 1; } 50% { opacity: 0.35; } }\n        .w10vhs[data-paused=\"true\"] .w10vhs-band, .w10vhs[data-paused=\"true\"] .w10vhs-base, .w10vhs[data-paused=\"true\"] .w10vhs-tear, .w10vhs[data-paused=\"true\"] .w10vhs-osd { animation-play-state: paused; }\n        @media (prefers-reduced-motion: reduce) {\n          .w10vhs-band, .w10vhs-base, .w10vhs-osd { animation: none; }\n          .w10vhs-band { transform: translateY(210%); }\n          .w10vhs-tear { animation: none; clip-path: inset(46% 0 40% 0); transform: translateX(6px); }\n        }\n      `}</style>\n      <div aria-hidden=\"true\" className=\"w10vhs-bg pointer-events-none absolute inset-0\" />\n      <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0 overflow-hidden\">\n        <div className=\"w10vhs-band\" />\n      </div>\n      <div aria-hidden=\"true\" className=\"absolute left-5 top-5 font-mono text-sm tracking-widest text-[#f4e6cf] sm:left-8 sm:top-7\">\n        <span className=\"w10vhs-osd\">PLAY ▶</span>\n      </div>\n      <div aria-hidden=\"true\" className=\"absolute right-5 top-5 font-mono text-sm tracking-widest text-[#f4e6cf] sm:right-8 sm:top-7\">SP 0:04:12</div>\n      <div className=\"relative mx-auto max-w-4xl pt-6 text-center\">\n        <p className=\"font-mono text-xs uppercase tracking-[0.28em] text-[#d9b99a]\">Corner Video Club · since 1991</p>\n        <h1 className=\"mt-6 font-serif text-[clamp(46px,9vw,108px)] font-bold italic leading-none tracking-tight\">\n          <span className=\"sr-only\">{headline}</span>\n          <span aria-hidden=\"true\" className=\"w10vhs-stack\">\n            <span className=\"w10vhs-base\">{headline}</span>\n            <span className=\"w10vhs-tear\">{headline}</span>\n          </span>\n        </h1>\n        <p className=\"mx-auto mt-7 max-w-lg text-base leading-relaxed text-[#e3d3bd] sm:text-lg\">\n          Four thousand tapes, two working VCRs to borrow, and a late return box that never closes.\n        </p>\n        <a\n          href=\"#\"\n          className=\"mt-9 inline-flex h-12 items-center rounded-md border border-[#f4e6cf]/60 px-6 font-mono text-sm uppercase tracking-widest text-[#f4e6cf] transition hover:bg-[#f4e6cf] hover:text-[#1a1315] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#4fd1c5] focus-visible:ring-offset-2 focus-visible:ring-offset-[#1a1315]\"\n        >\n          Browse the shelves\n        </a>\n      </div>\n      <div aria-hidden=\"true\" className=\"w10vhs-scan pointer-events-none absolute inset-0\" />\n    </section>\n  );\n}\n"}]}
