Files
site/.agent/memories/motion-pass-2026-11-01.md
T

79 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Motion pass: drifting backdrop, lighting nodes, bobbing peacock
Date: 2026-11-01
## Request
1. The backdrop was two static gradient blobs; make it dynamic.
2. The four nodes on the path spine were static; light each one as its stage
is reached.
3. The hero peacock was static; bob it up and down 4–6px, ease-in-out, and
expose the amount for the user to tweak.
4. Apply the `--irid` gradient to the "Project" half of the footer wordmark.
## Changes
- `src/layouts/Base.astro`
- `.ambient` now holds three `<span class="aura a1/a2/a3">` layers instead of
one element with two background gradients.
- `src/styles/global.css`
- Auras are individual, two-lobe radial gradients, heavily blurred
(`filter:blur(clamp(48px,7vmax,100px))`), each drifting and scaling on its
own clock (46s/58s/72s, negative delays, `alternate` + `ease-in-out`).
Only `transform` changes, so the backdrop stays on the compositor.
- Hero peacock gets `--bob:6px` (total travel, i.e. ±3px) and
`--bob-speed:6s`; `@keyframes peacock-bob` runs `translate3d` between
`calc(var(--bob) * -.5)` and `calc(var(--bob) * .5)`.
- Nodes now have a visible unlit state (dark disc + inset hairline ring) and a
lit state: iridescent fill, teal/blue halo, slight scale, plus a one-shot
`node-ping` ring. The old `.stage.in .node` rule was replaced by
`.stage.lit .node` so lighting follows the spine, not text reveal.
- Footer `.ft .roller .b` ("Project") uses `background:var(--irid)` with
`background-clip:text` and transparent text fill.
- `src/scripts/site.js`
- The spine handler computes the fill tip against the spine's real top (10px)
and height (wrap height − 20px), then compares each node's centre against
it. A node gets `.lit` when the fill reaches it and stays lit (completed
milestones, no flicker on small scroll jitter).
- The same scroll-linked logic runs under reduced motion, so nodes still
respond; only the CSS animation/transitions are stopped. The previous
reduce branch force-lit every node and filled the spine to 100%, which made
the path look pre-completed.
- Recomputes on `load` and via `ResizeObserver` as well as scroll/resize, so
late font/layout shifts do not leave the fill or nodes out of sync.
## Tuning
- Peacock travel: `.hero-peacock { --bob: 6px; }` in `global.css` (total px,
split half above and half below the resting position).
- Peacock tempo: `.hero-peacock { --bob-speed: 6s; }`.
- Backdrop softness: the `filter:blur(...)` radius on `.aura`, the two
`radial-gradient` layers per aura, and the `@keyframes aura-*` translate /
scale values for `.aura.a1/.a2/.a3`.
## Verified (headless Chromium via CDP, built site)
- Auras report their own `aura-*` animations and their transform matrices change
over time; computed `filter` is `blur(100px)` at 1440px.
- Peacock `animation-name: peacock-bob`, duration 6s, `--bob: 6px`; sampled
range 4.88px over a partial cycle (the full cycle is 6px).
- Scrolling the path lit nodes in order (`0000 → 1000 → 1100 → 1110 → 1111`)
while the spine fill advanced 0→100%, in both normal and reduced-motion mode.
- Reduced motion: peacock/aura animations `none` and the fill starts at 0%; nodes
stay unlit until scrolling reaches them. This is what the user saw as
"peacock stays still / nodes lit by default".
- 390px: no horizontal overflow.
- Footer "Project" computed `background-image` is the iridescent
`linear-gradient(120deg, …)`, `background-clip: text`, text fill transparent.
- `npm run build` passes (5 routes); no console/page errors.
## Notes
- Nodes intentionally stay lit after the fill passes them; scrolling up shrinks
the line but does not erase completed stages.
- The peacock/aura motion is intentionally off when the visitor (or the
developer's machine) has `prefers-reduced-motion: reduce`. If the bob looks
frozen, check that setting first.
- Screenshots and verification scripts live in `/tmp/opencode` and are not
committed.