{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"sea-glass-radial-gradient-stack-background","type":"registry:block","title":"Sea Glass Radial Gradient Stack","description":"","dependencies":[],"files":[{"path":"components/we-inc/sea-glass-radial-gradient-stack-background.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\n\nconst css = `\n  /* Change these first:\n     the four colours in .sgl-glass (frosted greens and blues)\n     --sgl-speed: how long the pools take to wander\n     .sgl-frost opacity: how frosted the surface looks */\n  @property --sgl-x1 { syntax: \"<percentage>\"; inherits: false; initial-value: 18%; }\n  @property --sgl-y1 { syntax: \"<percentage>\"; inherits: false; initial-value: 24%; }\n  @property --sgl-x2 { syntax: \"<percentage>\"; inherits: false; initial-value: 82%; }\n  @property --sgl-y2 { syntax: \"<percentage>\"; inherits: false; initial-value: 30%; }\n  @property --sgl-x3 { syntax: \"<percentage>\"; inherits: false; initial-value: 60%; }\n  @property --sgl-y3 { syntax: \"<percentage>\"; inherits: false; initial-value: 88%; }\n  .sgl-hero { --sgl-speed: 28s;\n    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 580px;\n    background: #e9efe9; font-family: ui-sans-serif, system-ui, sans-serif; }\n  .sgl-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }\n  .sgl-glass { position: absolute; inset: 0;\n    background:\n      radial-gradient(42% 55% at var(--sgl-x1) var(--sgl-y1), rgba(150, 206, 190, .85), transparent 70%),\n      radial-gradient(40% 50% at var(--sgl-x2) var(--sgl-y2), rgba(146, 186, 210, .75), transparent 70%),\n      radial-gradient(50% 45% at var(--sgl-x3) var(--sgl-y3), rgba(178, 214, 168, .7), transparent 70%),\n      radial-gradient(60% 60% at 30% 100%, rgba(120, 178, 176, .55), transparent 70%),\n      linear-gradient(160deg, #eef3ee, #dfe9e6);\n    animation: sgl-wander var(--sgl-speed) ease-in-out -7s infinite alternate; }\n  .sgl-sheen { position: absolute; top: -20%; bottom: -20%; left: 0; width: 45%;\n    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .42) 46%, rgba(255, 255, 255, .12) 62%, rgba(255, 255, 255, 0) 100%);\n    animation: sgl-sheen 18s ease-in-out -6s infinite alternate; }\n  .sgl-frost { position: absolute; inset: 0; opacity: .4; mix-blend-mode: soft-light;\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  .sgl-hero[data-sgl-paused] * { animation-play-state: paused !important; }\n  @keyframes sgl-wander {\n    0% { --sgl-x1: 10%; --sgl-y1: 20%; --sgl-x2: 88%; --sgl-y2: 24%; --sgl-x3: 70%; --sgl-y3: 92%; }\n    50% { --sgl-x1: 28%; --sgl-y1: 40%; --sgl-x2: 72%; --sgl-y2: 12%; --sgl-x3: 46%; --sgl-y3: 78%; }\n    100% { --sgl-x1: 20%; --sgl-y1: 70%; --sgl-x2: 80%; --sgl-y2: 58%; --sgl-x3: 36%; --sgl-y3: 18%; }\n  }\n  @keyframes sgl-sheen { 0% { transform: translateX(-80%) skewX(-14deg); } 100% { transform: translateX(220%) skewX(-14deg); } }\n  @media (prefers-reduced-motion: reduce) { .sgl-hero * { animation: none !important; } }\n`;\n\nexport default function SeaGlassRadialGradientStack() {\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-sgl-paused\", !entry.isIntersecting));\n    io.observe(root);\n    return () => io.disconnect();\n  }, []);\n\n  return (\n    <section ref={rootRef} className=\"sgl-hero relative isolate flex min-h-[580px] items-center justify-center overflow-hidden\">\n      <style>{css}</style>\n      <div className=\"sgl-sky\" aria-hidden=\"true\">\n        <div className=\"sgl-glass\" />\n        <div className=\"sgl-sheen\" />\n        <div className=\"sgl-frost\" />\n      </div>\n      <div className=\"mx-auto w-full max-w-[44rem] px-6 py-24 text-center sm:px-10 sm:py-[110px]\">\n        <p className=\"text-[13px] font-semibold uppercase tracking-[0.2em] text-[#2c5c58]\">Low Tide Ceramics</p>\n        <h1 className=\"mt-[18px] text-[34px] font-semibold leading-[1.08] tracking-tight text-[#0f3332] sm:text-[56px]\">Stoneware glazed in the colours of the shoreline.</h1>\n        <p className=\"mx-auto mt-5 max-w-[32rem] text-lg leading-relaxed text-[#2d4d4b]\">Mugs, bowls and serving plates thrown in a seaside workshop and fired in small kilns of thirty pieces at a time.</p>\n        <a href=\"#\" className=\"mt-8 inline-flex h-12 items-center rounded-[14px] bg-[#0f3332] px-[26px] text-[15px] font-semibold text-[#eef6f2] hover:bg-[#18504e] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#0f3332] focus-visible:ring-offset-2 focus-visible:ring-offset-[#e9efe9]\">Shop the autumn kiln</a>\n      </div>\n    </section>\n  );\n}\n"}]}
