Skip to content

Make the landing-page scroll narrative work on mobile#50

Merged
acarril merged 1 commit into
mainfrom
feature/mobile-landing-narrative
Jun 1, 2026
Merged

Make the landing-page scroll narrative work on mobile#50
acarril merged 1 commit into
mainfrom
feature/mobile-landing-narrative

Conversation

@acarril

@acarril acarril commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

The landing page (docs/index.html) reads beautifully on desktop but collapses on mobile: the fixed full-viewport hero canvas stays frozen mid-screen while the stacked text scrolls through it, leaving the figure and text overlapping into an illegible mess.

This PR adapts the curated scroll narrative to narrow screens using the canonical mobile scrollytelling pattern, while leaving desktop pixel-identical.

  • Sticky figure band: the canvas is wrapped in .scrolly/.stage. On desktop the stage stays position:fixed full-viewport (unchanged); on mobile (<= 760px) it becomes position:sticky, a 46vh top band with an opaque paper background. Text scenes scroll under the pinned figure.
  • Mobile figure composition (drawHero): a MOB branch retunes the vertical layout to band-relative fractions (baseY/amp, effect panel, std-diff readout; dock disabled since the band is already top-pinned), trims the small tau value labels and inline sub-captions for legibility, repositions the hidden-U cue below the dot lanes, and re-centers the align=0 dot cloud (it was seeded for the desktop right-half).
  • Scroll progress bar: thin mobile-only bar pinned to the bottom of the band.
  • Active-text detection: IntersectionObserver rootMargin is now mobile-aware so scene text un-dims in the lower reading band.

The continuous scroll-scrubbed morph (effect gap 4pp -> 9pp, std-diff 0.94 -> 0.04) is fully preserved on mobile.

Notes

  • The WSGA math object is untouched -- node specs/verify_hero_math.mjs still passes (std-diff 0.941 -> 0.041, gap 4.0 -> 9.0pp).
  • Desktop rendering is unchanged (verified with headless screenshots at 1440x900).
  • prefers-reduced-motion renders the static balanced end-state inside the band; scene text is real DOM (no-JS safe).
  • Docs-only change -- no version bump required per CLAUDE.md.

Test Plan

  • node specs/verify_hero_math.mjs passes
  • Desktop screenshot (1440x900) identical to current main
  • Mobile (390x844) -- figure pinned in the top 46vh band, no text/figure overlap
  • All four narrative states verified on mobile (setup / mid-reweight / balanced / caveat)
  • Reduced-motion renders the balanced end-state in the band
  • Spot-check on a real phone

Convert the fixed full-viewport hero canvas into a sticky 46vh top band
that the text scenes scroll under (mobile scrollytelling), so the figure
and text no longer overlap on narrow screens. Desktop is unchanged.

- DOM: wrap canvas in .scrolly/.stage; stage is fixed on desktop,
  position:sticky height:46vh on mobile with an opaque paper background.
- drawHero: mobile vertical-composition branch (band-relative baseY/amp,
  effect panel, std-diff readout; dock disabled); trim tau value labels
  and sub-captions; reposition the hidden-U cue; center the dot cloud.
- Add a mobile-only scroll progress bar.
- Mobile-aware IntersectionObserver rootMargin for active-text in the band.

WSGA math object untouched (verify_hero_math.mjs still passes).
Docs-only change; no version bump required.
@acarril acarril merged commit 4684b7e into main Jun 1, 2026
8 checks passed
@acarril acarril deleted the feature/mobile-landing-narrative branch June 1, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant