{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"ink-bleed-on-paper-text-reveal","type":"registry:block","title":"Ink Bleed on Paper Reveal","description":"","dependencies":[],"files":[{"path":"components/we-inc/ink-bleed-on-paper-text-reveal.tsx","type":"registry:component","content":"import { useEffect, useRef, useState, type CSSProperties } from \"react\";\n\nconst HEADLINE = \"Letters that dry slowly and keep for a lifetime.\";\n\nexport default function InkBleedOnPaperTextReveal() {\n  const rootRef = useRef<HTMLElement>(null);\n  const [paused, setPaused] = useState(false);\n\n  useEffect(() => {\n    const el = rootRef.current;\n    if (!el) return;\n    const io = new IntersectionObserver(([e]) => setPaused(!e.isIntersecting));\n    io.observe(el);\n    return () => io.disconnect();\n  }, []);\n\n  const words = HEADLINE.split(\" \");\n\n  return (\n    <section ref={rootRef} data-paused={paused || undefined} className=\"ibp-root relative overflow-hidden px-5 py-20 sm:px-10 sm:py-24\">\n      <style>{`\n        @property --ibp-r { syntax: \"<percentage>\"; inherits: false; initial-value: 0%; }\n        .ibp-root { background: #f4efe4; color: #1b1f2a; }\n        .ibp-paper { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }\n        .ibp-h { font-family: Georgia, \"Iowan Old Style\", \"Times New Roman\", serif; font-weight: 400; font-style: italic;\n          font-size: clamp(2.1rem, 6.4vw, 4.6rem); line-height: 1.1; letter-spacing: -.015em; margin: 0; filter: url(#ibp-fibre); }\n        .ibp-w { display: inline-block; white-space: pre; padding: 0 .04em;\n          -webkit-mask-image: radial-gradient(circle at 30% 60%, #000 var(--ibp-r), transparent calc(var(--ibp-r) + 22%));\n          mask-image: radial-gradient(circle at 30% 60%, #000 var(--ibp-r), transparent calc(var(--ibp-r) + 22%));\n          animation: ibp-bleed 9s cubic-bezier(.3,.6,.2,1) infinite both; animation-delay: calc(var(--i) * 120ms); }\n        @keyframes ibp-bleed {\n          0% { --ibp-r: 0%; filter: blur(3px); opacity: .2 }\n          12% { --ibp-r: 130%; filter: blur(0); opacity: 1 }\n          86% { --ibp-r: 130%; filter: blur(0); opacity: 1 }\n          96%, 100% { --ibp-r: 130%; filter: blur(2px); opacity: 0 } }\n        .ibp-root[data-paused] .ibp-w { animation-play-state: paused; }\n        @media (prefers-reduced-motion: reduce) { .ibp-w { animation: none; --ibp-r: 130%; } }\n      `}</style>\n      <svg className=\"ibp-paper\" aria-hidden=\"true\" focusable=\"false\">\n        <filter id=\"ibp-grain\">\n          <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.85\" numOctaves=\"2\" stitchTiles=\"stitch\" />\n          <feColorMatrix values=\"0 0 0 0 0.45  0 0 0 0 0.38  0 0 0 0 0.28  0 0 0 0.22 0\" />\n        </filter>\n        <filter id=\"ibp-fibre\">\n          <feTurbulence type=\"fractalNoise\" baseFrequency=\"0.9\" numOctaves=\"2\" seed=\"4\" result=\"n\" />\n          <feDisplacementMap in=\"SourceGraphic\" in2=\"n\" scale=\"2.4\" />\n        </filter>\n        <rect width=\"100%\" height=\"100%\" filter=\"url(#ibp-grain)\" />\n      </svg>\n      <div className=\"relative mx-auto max-w-4xl\">\n        <p className=\"text-sm font-semibold uppercase tracking-[0.2em] text-[#7b3f2a]\">Marrow and Quill Stationers</p>\n        <h1 className=\"ibp-h mt-6\">\n          <span className=\"sr-only\">{HEADLINE}</span>\n          <span aria-hidden=\"true\">\n            {words.map((w, i) => (\n              <span key={i} className=\"ibp-w\" style={{ \"--i\": i } as CSSProperties}>\n                {i < words.length - 1 ? `${w} ` : w}\n              </span>\n            ))}\n          </span>\n        </h1>\n        <p className=\"mt-7 max-w-lg text-base leading-relaxed text-[#4a4438] sm:text-lg\">\n          Iron gall and walnut inks mixed in small batches, with cotton paper heavy enough to hold a wet nib without feathering.\n        </p>\n        <a href=\"#\" className=\"mt-8 inline-flex min-h-[44px] items-center rounded-sm bg-[#1b1f2a] px-6 text-sm font-semibold text-[#f4efe4] transition hover:bg-[#2c3242] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1b1f2a] focus-visible:ring-offset-2 focus-visible:ring-offset-[#f4efe4]\">\n          Order a sample set\n        </a>\n      </div>\n    </section>\n  );\n}\n"}]}
