{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"film-colour-wash-gradient-with-grain-background","type":"registry:block","title":"Film Colour Wash With Grain","description":"","dependencies":[],"files":[{"path":"components/we-inc/film-colour-wash-gradient-with-grain-background.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\n\nconst css = `\n  /* Change these first:\n     --flm-shadow and --flm-light: the two halves of the colour grade (r, g, b)\n     --flm-leak: the warm light leak (r, g, b)\n     .flm-grain opacity: how much film grain shows */\n  .flm-hero { --flm-shadow: 34, 86, 92; --flm-light: 196, 118, 52; --flm-leak: 232, 92, 48;\n    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: 620px;\n    background: #15110f; font-family: ui-sans-serif, system-ui, sans-serif; }\n  .flm-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }\n  .flm-wash { position: absolute; border-radius: 50%; }\n  .flm-teal { left: -30%; top: -40%; width: 100%; height: 150%; background: radial-gradient(closest-side, rgba(var(--flm-shadow), .95), rgba(var(--flm-shadow), .35) 60%, transparent); animation: flm-pan 24s ease-in-out -7s infinite alternate; }\n  .flm-amber { right: -35%; top: -30%; width: 95%; height: 140%; background: radial-gradient(closest-side, rgba(var(--flm-light), .78), rgba(var(--flm-light), .25) 60%, transparent); animation: flm-pan 30s ease-in-out -19s infinite alternate-reverse; }\n  .flm-leak { position: absolute; right: -12%; top: -10%; width: 45%; height: 120%; border-radius: 50%;\n    background: radial-gradient(closest-side, rgba(var(--flm-leak), .55), rgba(var(--flm-leak), .14) 55%, transparent);\n    mix-blend-mode: screen; animation: flm-leak 9s ease-in-out -2s infinite; }\n  .flm-vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(8, 6, 5, .75) 100%); }\n  .flm-grain { position: absolute; inset: -60px; opacity: .3; mix-blend-mode: overlay;\n    background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23g%29'/%3E%3C/svg%3E\");\n    animation: flm-jitter .9s steps(1) infinite; }\n  .flm-hero[data-flm-paused] * { animation-play-state: paused !important; }\n  @keyframes flm-pan { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(12%, 6%) scale(1.12); } }\n  @keyframes flm-leak { 0%, 100% { opacity: .55; transform: translateY(0); } 38% { opacity: 1; transform: translateY(-4%); } 46% { opacity: .7; } 70% { opacity: .9; transform: translateY(3%); } }\n  @keyframes flm-jitter { 0% { transform: translate(0, 0); } 20% { transform: translate(-23px, 14px); } 40% { transform: translate(17px, -31px); } 60% { transform: translate(-9px, 27px); } 80% { transform: translate(29px, 5px); } }\n  @media (prefers-reduced-motion: reduce) { .flm-hero * { animation: none !important; } }\n`;\n\nexport default function FilmColourWashWithGrain() {\n  const rootRef = useRef<HTMLElement>(null);\n\n  // Pauses every animation while the hero is off screen.\n  useEffect(() => {\n    const root = rootRef.current;\n    if (!root) return;\n    const io = new IntersectionObserver(([entry]) => root.toggleAttribute(\"data-flm-paused\", !entry.isIntersecting));\n    io.observe(root);\n    return () => io.disconnect();\n  }, []);\n\n  return (\n    <section ref={rootRef} className=\"flm-hero relative isolate flex min-h-[620px] items-end overflow-hidden\">\n      <style>{css}</style>\n      <div className=\"flm-sky\" aria-hidden=\"true\">\n        <div className=\"flm-wash flm-teal\" />\n        <div className=\"flm-wash flm-amber\" />\n        <div className=\"flm-leak\" />\n        <div className=\"flm-vignette\" />\n        <div className=\"flm-grain\" />\n      </div>\n      <div className=\"mx-auto w-full max-w-6xl px-6 pb-[72px] pt-[120px] sm:px-10 sm:pb-[88px] sm:pt-[140px]\">\n        <p className=\"font-mono text-[13px] uppercase tracking-[0.1em] text-[#e8c9a6]\">Northlight Film Lab</p>\n        <h1 className=\"mt-4 max-w-[46rem] text-4xl font-semibold leading-[1.04] tracking-tight text-[#f7efe4] sm:text-[66px]\">Your rolls, developed and scanned within the week.</h1>\n        <p className=\"mt-5 max-w-[34rem] text-lg leading-relaxed text-[#e3d8cb]\">C-41, black and white and slide film, processed in small batches and scanned at full resolution by people who still shoot.</p>\n        <a href=\"#\" className=\"mt-8 inline-flex h-12 items-center rounded-sm bg-[#f2e6d6] px-[26px] text-[15px] font-semibold text-[#1c1511] hover:bg-[#fff8ee] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#f2e6d6] focus-visible:ring-offset-2 focus-visible:ring-offset-[#15110f]\">Post us your film</a>\n      </div>\n    </section>\n  );\n}\n"}]}
