{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"sunset-haze-over-warm-paper-gradient-background","type":"registry:block","title":"Sunset Haze Over Warm Paper","description":"","dependencies":[],"files":[{"path":"components/we-inc/sunset-haze-over-warm-paper-gradient-background.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\n\nconst css = `\n  /* Change these first:\n     --shp-paper: the paper colour everything sits on\n     --shp-orange, --shp-rose, --shp-ochre: the haze colours (r, g, b)\n     --shp-speed: base drift time; larger is calmer */\n  .shp-hero { --shp-paper: #f3eadb; --shp-orange: 226, 122, 68; --shp-rose: 204, 104, 104; --shp-ochre: 228, 172, 92; --shp-speed: 30s;\n    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 600px;\n    background: var(--shp-paper); font-family: ui-sans-serif, system-ui, sans-serif; }\n  .shp-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }\n  .shp-haze { position: absolute; border-radius: 50%; will-change: transform; }\n  .shp-h1 { left: -20%; bottom: -45%; width: 90%; height: 95%; background: radial-gradient(closest-side, rgba(var(--shp-orange), .8), rgba(var(--shp-orange), .3) 55%, transparent); animation: shp-a var(--shp-speed) ease-in-out -8s infinite alternate; }\n  .shp-h2 { right: -25%; bottom: -35%; width: 85%; height: 90%; background: radial-gradient(closest-side, rgba(var(--shp-rose), .62), rgba(var(--shp-rose), .2) 55%, transparent); animation: shp-b calc(var(--shp-speed) * 1.3) ease-in-out -14s infinite alternate; }\n  .shp-h3 { left: 20%; bottom: -20%; width: 70%; height: 55%; background: radial-gradient(closest-side, rgba(var(--shp-ochre), .55), transparent); animation: shp-a calc(var(--shp-speed) * .8) ease-in-out -3s infinite alternate-reverse; }\n  .shp-h4 { left: 5%; top: -40%; width: 90%; height: 70%; background: radial-gradient(closest-side, rgba(150, 120, 150, .2), transparent); animation: shp-b calc(var(--shp-speed) * 1.6) ease-in-out -20s infinite alternate; }\n  .shp-sun { position: absolute; left: 50%; bottom: 6%; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%;\n    background: radial-gradient(closest-side, rgba(255, 236, 206, .95), rgba(250, 200, 150, .5) 45%, transparent);\n    animation: shp-sink calc(var(--shp-speed) * 1.5) ease-in-out -10s infinite alternate; }\n  .shp-paper { position: absolute; inset: 0; opacity: .12; mix-blend-mode: multiply;\n    background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03 .12' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .55 0 0 0 0 .45 0 0 0 -1.4 1.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23f%29'/%3E%3C/svg%3E\"); }\n  .shp-grain { position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;\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='.8' 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  .shp-hero[data-shp-paused] * { animation-play-state: paused !important; }\n  @keyframes shp-a { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(14%, -8%) scale(1.15); } }\n  @keyframes shp-b { 0% { transform: translate(0, 0) scale(1.1); } 100% { transform: translate(-16%, -6%) scale(.95); } }\n  @keyframes shp-sink { 0% { transform: translateY(-30px); opacity: 1; } 100% { transform: translateY(40px); opacity: .7; } }\n  @media (prefers-reduced-motion: reduce) { .shp-hero * { animation: none !important; } }\n`;\n\nexport default function SunsetHazeOverWarmPaper() {\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-shp-paused\", !entry.isIntersecting));\n    io.observe(root);\n    return () => io.disconnect();\n  }, []);\n\n  return (\n    <section ref={rootRef} className=\"shp-hero relative isolate flex min-h-[600px] items-center justify-center overflow-hidden\">\n      <style>{css}</style>\n      <div className=\"shp-sky\" aria-hidden=\"true\">\n        <div className=\"shp-haze shp-h1\" />\n        <div className=\"shp-haze shp-h2\" />\n        <div className=\"shp-haze shp-h3\" />\n        <div className=\"shp-haze shp-h4\" />\n        <div className=\"shp-sun\" />\n        <div className=\"shp-paper\" />\n        <div className=\"shp-grain\" />\n      </div>\n      <div className=\"mx-auto w-full max-w-[46rem] px-6 pb-[140px] pt-24 text-center sm:px-10 sm:pb-[150px] sm:pt-[110px]\">\n        <p className=\"text-[13px] font-semibold uppercase tracking-[0.16em] text-[#7a3a1c]\">Marigold Press &middot; Letterpress studio</p>\n        <h1 className=\"mt-[18px] font-serif text-[34px] font-medium leading-[1.08] text-[#2a1a10] sm:text-[58px]\">Wedding invitations printed by hand on cotton paper.</h1>\n        <p className=\"mx-auto mt-5 max-w-[32rem] text-lg leading-relaxed text-[#4a3426]\">Deep impressions, mixed inks and envelopes lined to match. Proofs arrive by post within ten working days.</p>\n        <a href=\"#\" className=\"mt-8 inline-flex h-12 items-center rounded px-[26px] text-[15px] font-semibold text-[#f8efe2] bg-[#2a1a10] hover:bg-[#452a1a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2a1a10] focus-visible:ring-offset-2 focus-visible:ring-offset-[#f3eadb]\">Request a sample pack</a>\n      </div>\n    </section>\n  );\n}\n"}]}
