diff --git a/src/scripts/site.js b/src/scripts/site.js index eaddeb7..7c52ea4 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -44,14 +44,11 @@ } if (sw) { - if (reduce) { - if (fill) fill.style.height = "100%"; - stages.forEach(function (stage) { stage.classList.add("lit"); }); - } else { - var onsc = function () { if (!tick) { tick = true; requestAnimationFrame(spine); } }; - addEventListener("scroll", onsc, { passive: true }); - addEventListener("resize", onsc); - spine(); - } + var onsc = function () { if (!tick) { tick = true; requestAnimationFrame(spine); } }; + addEventListener("scroll", onsc, { passive: true }); + addEventListener("resize", onsc); + addEventListener("load", onsc); + if ("ResizeObserver" in window) new ResizeObserver(onsc).observe(sw); + spine(); } })(); diff --git a/src/styles/global.css b/src/styles/global.css index f49532b..1e18bc5 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -25,30 +25,37 @@ .skip:focus{top:12px;} /* lush jewel-tone ambient + faint feather-eye field. - Three soft auras drift on their own clocks; only transform changes, so the - whole backdrop stays on the compositor instead of repainting gradients. */ + Three soft, blurred auras drift on their own clocks; only transform + changes, so the whole backdrop stays on the compositor. */ .ambient{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;background:var(--bg);} - .aura{position:absolute;border-radius:50%;will-change:transform;transform:translate3d(0,0,0);} - .aura.a1{width:74vmax;height:74vmax;top:-34vmax;right:-18vmax; - background:radial-gradient(closest-side, rgba(142,123,240,.19), rgba(142,123,240,.06) 56%, transparent 74%); + .aura{position:absolute;will-change:transform;transform:translate3d(0,0,0); + filter:blur(clamp(48px,7vmax,100px));} + .aura.a1{width:78vmax;height:62vmax;top:-32vmax;right:-14vmax; + background: + radial-gradient(52% 58% at 42% 46%, rgba(142,123,240,.18), transparent 74%), + radial-gradient(46% 52% at 64% 56%, rgba(142,123,240,.09), transparent 78%); animation:aura-a 46s ease-in-out infinite alternate;animation-delay:-14s;} - .aura.a2{width:60vmax;height:60vmax;top:14%;left:-26vmax; - background:radial-gradient(closest-side, rgba(43,212,196,.14), rgba(43,212,196,.045) 56%, transparent 74%); + .aura.a2{width:68vmax;height:52vmax;top:8%;left:-30vmax; + background: + radial-gradient(50% 56% at 44% 48%, rgba(43,212,196,.13), transparent 74%), + radial-gradient(44% 50% at 62% 58%, rgba(43,212,196,.065), transparent 78%); animation:aura-b 58s ease-in-out infinite alternate;animation-delay:-31s;} - .aura.a3{width:46vmax;height:46vmax;bottom:-18vmax;left:36%; - background:radial-gradient(closest-side, rgba(59,160,240,.12), rgba(59,160,240,.04) 56%, transparent 74%); + .aura.a3{width:56vmax;height:42vmax;bottom:-18vmax;left:34%; + background: + radial-gradient(50% 56% at 46% 46%, rgba(59,160,240,.11), transparent 74%), + radial-gradient(44% 50% at 62% 58%, rgba(59,160,240,.055), transparent 78%); animation:aura-c 72s ease-in-out infinite alternate;animation-delay:-7s;} @keyframes aura-a{ from{transform:translate3d(0,0,0) scale(1);} - to{transform:translate3d(-8%,9%,0) scale(1.15);} + to{transform:translate3d(-8%,9%,0) scale(1.08);} } @keyframes aura-b{ - from{transform:translate3d(0,0,0) scale(1.06);} - to{transform:translate3d(9%,-6%,0) scale(.92);} + from{transform:translate3d(0,0,0) scale(1.04);} + to{transform:translate3d(9%,-6%,0) scale(.96);} } @keyframes aura-c{ - from{transform:translate3d(0,0,0) scale(.96);} - to{transform:translate3d(-7%,-11%,0) scale(1.12);} + from{transform:translate3d(0,0,0) scale(.97);} + to{transform:translate3d(-7%,-11%,0) scale(1.06);} } .grain{position:fixed;inset:0;z-index:1;pointer-events:none;opacity:.35;mix-blend-mode:overlay; background-image:radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);background-size:3px 3px;} @@ -78,9 +85,10 @@ /* fade the peacock into the canvas at the bottom so it dissolves, not slices */ .hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:34%;z-index:2;pointer-events:none; background:linear-gradient(to bottom, transparent, var(--bg) 92%);} - /* `--bob` is the total vertical travel of the hero mark: 5px means it drifts - 2.5px up and 2.5px down from where it sits. Raise or lower it to taste. */ - .hero-peacock{--bob:5px;--bob-speed:7s; + /* `--bob` is the total vertical travel of the hero mark: 6px means it drifts + 3px up and 3px down from where it sits. Raise or lower it to taste. + The reduced-motion block at the end of this file stops the bob. */ + .hero-peacock{--bob:6px;--bob-speed:6s; position:absolute;right:clamp(-180px,-7vw,-60px);top:clamp(78px,11vh,150px); width:min(1020px,72vw);aspect-ratio:660/748;z-index:1;pointer-events:none; filter:drop-shadow(0 0 50px rgba(59,160,240,.22)) drop-shadow(0 30px 80px rgba(142,123,240,.16));