Files
industries/components/homepage2/SlideParallax.tsx
zooqueenandHanzo Dev 19905ecd56 Homepage redesign: investor-narrative slide deck + editorial variant
Adds three home compositions sharing the same investor narrative:

- / (canonical) — restored old composition with Hero + zoo composite,
  Ecosystem, ZooLabsNarrative, ServicesOverview, ResearchHighlights,
  Leadership, TrustedBy, Contact. Adds polished motion (Reveal,
  Parallax wrappers, scroll-linked Hero drift), softer brutalist reset
  (rounded utilities now opt-in), and a Zen5 rainbow-gradient top
  banner.

- /homepage1 — backup of the previous / composition (noindex).

- /homepage2 — 10-slide deck with snap-mandatory CSS scroll snap,
  side-rail slide indicator, alternating brand-color slide washes,
  CSS-3D AI-coin scene behind the Hero (Zen5 family + Cloud / Network
  spokes, perspective + per-coin float keyframes, light blur),
  network-mesh edges, Foundation + Leadership + Traction + Access
  slides, plus the AI-native market-cap composite with NVIDIA as
  public-market comparable.

- /homepage3 — editorial 'Quarterly' variant with serif display,
  masthead, drop cap, ornamental dividers, chapter framing, and a
  colophon footer. Wax-seal red accent on a cream paper surface.

Other changes:
- Navbar: drop rounded floating pill in favour of sharp transparent
  bar with a sharp backdrop-blur strip + border-b-2 black on scroll.
- TopBanner: animated rainbow gradient background (300% width,
  background-position keyframe, prefers-reduced-motion aware).
- Leadership / TeamMemberCard: rounded-full avatars (override the
  brutalist global border-radius reset via data-circle).
- Ecosystem strip: render JPGs at /public/ecosystem/*.jpg with
  emoji fallback only when an image is missing (bear, drought, lake,
  eagle, forest, whale).
- TheStack: each layer card is now a click target to its live
  domain (zenlm.org, zoo.cloud, zoo.network, zoo.fund, zoo.vote).
- public/: new /hero/zooimg.png, /ecosystem/*.jpg, /pe/*.png.
- Reveal / Parallax / ParallaxDivider / ParallaxBackground /
  CoinScene / SlideIndicator / SlideParallax / NetworkAnimation
  primitives under components/.

Co-authored-by: Hanzo Dev <[email protected]>
2026-05-18 22:22:51 -07:00

58 lines
1.6 KiB
TypeScript

"use client";
import { ReactNode, useRef } from "react";
import { motion, useScroll, useTransform, useReducedMotion } from "framer-motion";
/**
* Wraps a slide's content with scroll-linked parallax. As the slide
* enters from below the content drifts up at ~0.4x of scroll velocity,
* passes through neutral at viewport-centre, then continues drifting
* upward as the slide exits to the top. The eye registers the
* differential between content (slow) and the slide frame (snapping)
* as depth — i.e. parallax.
*
* Only ``transform`` and ``opacity`` animate, both compositor-safe,
* so the motion runs entirely on the GPU. ``prefers-reduced-motion``
* flattens distance to zero — the wrapper is still in the tree but
* never moves.
*
* Default ``distance`` is 80 px. Bump it to 120 px for sections where
* you want the content to feel more dramatic (Hero, SeedAsk).
*/
export function SlideParallax({
children,
distance = 80,
className,
}: {
children: ReactNode;
distance?: number;
className?: string;
}) {
const ref = useRef<HTMLDivElement | null>(null);
const reduce = useReducedMotion();
const { scrollYProgress } = useScroll({
target: ref,
offset: ["start end", "end start"],
});
const y = useTransform(
scrollYProgress,
[0, 1],
reduce ? [0, 0] : [distance, -distance],
);
const opacity = useTransform(
scrollYProgress,
[0, 0.15, 0.85, 1],
reduce ? [1, 1, 1, 1] : [0.35, 1, 1, 0.35],
);
return (
<motion.div
ref={ref}
style={{ y, opacity }}
className={`transform-gpu ${className ?? ""}`}
>
{children}
</motion.div>
);
}