{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"dawn-sky-gradient-slowly-brightening-background","type":"registry:block","title":"Dawn Sky Gradient That Slowly Brightens","description":"","dependencies":[],"files":[{"path":"components/we-inc/dawn-sky-gradient-slowly-brightening-background.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\n\nconst css = `\n  /* Change these first:\n     the three colour sets in @keyframes dwn-rise (night, early, risen)\n     --dwn-speed: how long one brightening takes; it then eases back\n     .dwn-grain opacity: grain strength */\n  @property --dwn-top { syntax: \"<color>\"; inherits: true; initial-value: #1b2a55; }\n  @property --dwn-mid { syntax: \"<color>\"; inherits: true; initial-value: #66577f; }\n  @property --dwn-low { syntax: \"<color>\"; inherits: true; initial-value: #e09678; }\n  @property --dwn-sea { syntax: \"<color>\"; inherits: true; initial-value: #2c2f4c; }\n  .dwn-hero { --dwn-speed: 32s; --dwn-top: #1b2a55; --dwn-mid: #66577f; --dwn-low: #e09678; --dwn-sea: #2c2f4c;\n    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-start; min-height: 620px;\n    background: linear-gradient(180deg, var(--dwn-top) 0%, var(--dwn-mid) 50%, var(--dwn-low) 76%);\n    font-family: ui-sans-serif, system-ui, sans-serif;\n    animation: dwn-rise var(--dwn-speed) ease-in-out -11s infinite alternate; }\n  .dwn-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }\n  .dwn-sun { position: absolute; left: 62%; top: 76%; width: 70vmax; height: 70vmax; max-width: 980px; max-height: 980px; border-radius: 50%;\n    background: radial-gradient(closest-side, rgba(255, 232, 196, 1), rgba(255, 196, 146, .55) 18%, rgba(255, 170, 130, .12) 52%, transparent 75%);\n    transform: translate(-50%, -38%); animation: dwn-sun var(--dwn-speed) ease-in-out -11s infinite alternate; }\n  .dwn-water { position: absolute; left: 0; right: 0; top: 76%; bottom: 0; background: linear-gradient(180deg, var(--dwn-low) 0%, var(--dwn-sea) 30%, #151827 100%); }\n  .dwn-shine { position: absolute; left: 62%; top: 76%; width: 46%; height: 22%; transform: translateX(-50%);\n    background: repeating-linear-gradient(180deg, rgba(255, 222, 186, .5) 0 2px, transparent 3px 7px);\n    -webkit-mask-image: radial-gradient(50% 100% at 50% 0%, #000 0%, rgba(0,0,0,.35) 45%, transparent 100%); mask-image: radial-gradient(50% 100% at 50% 0%, #000 0%, rgba(0,0,0,.35) 45%, transparent 100%);\n    animation: dwn-sun var(--dwn-speed) ease-in-out -11s infinite alternate; animation-name: dwn-glint; }\n  .dwn-disc { position: absolute; left: 62%; top: 76%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;\n    background: radial-gradient(closest-side, #fff4e2 60%, rgba(255, 228, 190, .6) 80%, transparent);\n    animation: dwn-disc var(--dwn-speed) ease-in-out -11s infinite alternate; }\n  .dwn-cloud { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(250, 196, 170, .38), rgba(250, 196, 170, 0)); }\n  .dwn-cloud-a { left: -10%; top: 54%; width: 70%; height: 40px; animation: dwn-drift 70s linear -20s infinite alternate; }\n  .dwn-cloud-b { right: -15%; top: 63%; width: 60%; height: 26px; opacity: .8; animation: dwn-drift 90s linear -50s infinite alternate-reverse; }\n  .dwn-grain { position: absolute; inset: 0; 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='.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  .dwn-hero[data-dwn-paused], .dwn-hero[data-dwn-paused] * { animation-play-state: paused !important; }\n  @keyframes dwn-rise {\n    0% { --dwn-top: #0d1533; --dwn-mid: #2f2d55; --dwn-low: #8a5a72; --dwn-sea: #1c1d33; }\n    100% { --dwn-top: #2d4a7e; --dwn-mid: #8f7fa6; --dwn-low: #f2b98e; --dwn-sea: #3f4466; }\n  }\n  @keyframes dwn-sun { 0% { transform: translate(-50%, -22%); opacity: .55; } 100% { transform: translate(-50%, -50%); opacity: 1; } }\n  @keyframes dwn-disc { 0% { transform: translateY(30px); } 100% { transform: translateY(-6px); } }\n  @keyframes dwn-glint { 0% { opacity: .35; } 100% { opacity: 1; } }\n  @keyframes dwn-drift { to { transform: translateX(12%); } }\n  @media (prefers-reduced-motion: reduce) { .dwn-hero, .dwn-hero * { animation: none !important; } }\n`;\n\nexport default function DawnSkyGradientBrightening() {\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-dwn-paused\", !entry.isIntersecting));\n    io.observe(root);\n    return () => io.disconnect();\n  }, []);\n\n  return (\n    <section ref={rootRef} className=\"dwn-hero relative isolate flex min-h-[620px] items-start overflow-hidden\">\n      <style>{css}</style>\n      <div className=\"dwn-sky\" aria-hidden=\"true\">\n        <div className=\"dwn-cloud dwn-cloud-a\" />\n        <div className=\"dwn-cloud dwn-cloud-b\" />\n        <div className=\"dwn-sun\" />\n        <div className=\"dwn-disc\" />\n        <div className=\"dwn-water\" />\n        <div className=\"dwn-shine\" />\n        <div className=\"dwn-grain\" />\n      </div>\n      <div className=\"mx-auto w-full max-w-5xl px-6 pb-[220px] pt-[104px] sm:px-10 sm:pb-[230px] sm:pt-[120px]\">\n        <p className=\"text-sm font-semibold uppercase tracking-[0.12em] text-[#f3dccb]\">Harbour Dawn Rowing Club</p>\n        <h1 className=\"mt-4 max-w-[40rem] text-4xl font-semibold leading-[1.1] text-white [text-shadow:0_1px_18px_rgba(20,24,50,.35)] sm:text-6xl\">On the water before the city wakes up.</h1>\n        <p className=\"mt-5 max-w-[32rem] text-lg leading-relaxed text-[#f1ecf4] [text-shadow:0_1px_12px_rgba(20,24,50,.35)]\">Coached sessions at first light, four days a week. Boats, oars and a hot drink on the pontoon are included.</p>\n        <a href=\"#\" className=\"mt-[34px] inline-flex h-12 items-center rounded-full bg-[#1b2140] px-[26px] text-[15px] font-semibold text-white hover:bg-[#10142a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-[#1b2140]\">Join a 6am session</a>\n      </div>\n    </section>\n  );\n}\n"}]}
