Files
zeekay b029ddffc0 Simplify /beta to three equal pass cards and full-viewport application takeover
- Remove top hero, product tiles, and extra sections on /beta; show the 3 equal-sized pass cards (Beta access, Research access, Design partner) with Enso, Zen, and Kai films
- Fix Design partner film on /beta/design (/models/kai.webm)
- Hide site header, footer, ask bar, and corner mark on /beta/apply, /beta/research, and /beta/design for a full-screen application view with top-right close control

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
2026-11-10 17:13:43 -08:00

26 lines
1.0 KiB
TypeScript

'use client';
/* /beta's page-local entrance observer: plays once at 25% in view by setting data-in. Start states hide only under
html.js and without reduced motion, so server HTML, JS off and reduced motion all show the final page. */
import { useEffect, type RefObject } from 'react';
const calm = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
export function useEnter(ref: RefObject<HTMLElement | null>) {
useEffect(() => {
const root = ref.current;
if (!root) return;
const els = [...root.querySelectorAll<HTMLElement>('[data-enter]')];
if (calm() || typeof IntersectionObserver !== 'function') {
els.forEach((e) => { e.dataset.in = ''; });
return;
}
const io = new IntersectionObserver((list) => list.forEach((e) => {
if (!e.isIntersecting) return;
(e.target as HTMLElement).dataset.in = '';
io.unobserve(e.target);
}), { threshold: 0.2 });
els.forEach((e) => io.observe(e));
return () => io.disconnect();
}, [ref]);
}