I need to understand the initial website loading experience - specifically what happens when the page first loads before video/images appear. The user sees a blank/empty screen first, then the video/placeholder image "jumps in."
Explore:
The main app entry point and root layout - what renders initially
Any splash screen, loading state, or skeleton components
How the main video/hero content loads (look for video players, hero images, background videos)
The routing setup - what's the landing/home page
Any existing loading/transition animations
Focus on understanding the sequence: what renders first → what triggers the content to appear → any existing transition logic.
Search thoroughly - check src/pages, src/app, App.tsx, main.tsx, index.tsx patterns. Also check for any "landing", "home", "splash", "loading", "skeleton" components.
Assistant
I'll help you understand the initial loading experience and page startup sequence. Let me explore the codebase systematically.
Assistant
Let me search more specifically for the app entry point:
Assistant
Now let me find and examine the main app entry point:
Assistant
Now let me check the HomePage and ReighLoading components:
Assistant
Now let me check the HeroSection and look at the first-load experience for authenticated users:
Assistant
Now let me check what happens for authenticated users going to the travel-between-images tool:
Assistant
Now let me look at the actual video travel tool page load and what happens when authenticated:
Assistant
Let me get the fill-bar animation definition:
Assistant
Perfect! Now let me check the VideoLightbox and VideoItem components mentioned in the git status to see how videos are displayed:
Assistant
Now let me check what media loading looks like with HoverScrubVideo and understand the image loading pipeline:
Assistant
Excellent! Now let me get a comprehensive overview by looking at the preloading system and what happens during the initial page render:
Assistant
User
Assistant
I'll thoroughly explore the codebase to understand the current implementation before evaluating the proposed approach.
Assistant
Let me look at the film grain animation pattern and the rest of the CSS file to understand existing animation patterns, and also check the GlassSidePane mask usage.
Assistant
Now let me check the tailwind config for existing animation definitions and the bg-film-grain utility, and look at the HeroSection to understand the loading bar animation coordination.
Assistant
Now let me check the end of the index.css file to understand where new CSS should go, and also check browser compatibility details.
Assistant
Now let me verify the vite/build tooling to understand if @property will be handled correctly, and check the browserslist/targets.
Assistant
Good -- autoprefixer is configured, which will handle -webkit-mask-image prefixing automatically. Now I have a thorough understanding of the codebase. Let me do the gradient math verification and then produce the full plan.
Let me verify one more thing -- the relationship between posterLoaded and video play timing, and whether the film grain and dark overlay should also be inside the reveal container.
Assistant
Perfect! Now I have a comprehensive understanding. Let me create a detailed report:
Video transitions use opacity and pointer-events for smooth switching
8. SEQUENCE: BLANK SCREEN → CONTENT APPEARS
What the user experiences:
0ms: White/blank screen (HTML loads, CSS parsing)
~100-200ms:
Dark mode applied (before paint - prevents flash)
Fonts starting to load from Google Fonts
Auth check begins
~200-400ms:
ReighLoading screen appears (dark background with loading bar)
Fills from 0-100% with gradient animation
~400-500ms (home page):
Video poster image appears as fallback
Video A starts loading
Hero section content fades in (PageFadeIn)
~1-2 seconds:
Video A finishes loading
Video A finishes playing (if on desktop)
Video B starts looping
Authenticated users:
Redirected to /tools/travel-between-images
Grid skeleton appears while shots load
Shot cards render with PageFadeIn when data arrives
Thumbnails load from cache or network with no flash
9. KEY OPTIMIZATION TECHNIQUES
Technique
File
Purpose
Dark mode before paint
main.tsx
Prevent theme flash
Font preconnect
index.html
Prevent font loading delay
Poster images
HomePage.tsx
Show placeholder while video loads
Two-video system
HomePage.tsx
Seamless loop transition
Skeleton stability
useStableSkeletonVisibility.ts
Prevent flicker
Browser cache detection
useThumbnailLoader.ts
Prevent cached image flash
Lazy preloads
useHomePagePreload.ts
Avoid layout shift when scrolling
Debounced loading state
HomePage.tsx
Prevent rapid animations
Query retry strategy
App.tsx
Reliable data fetching on mobile
10. THE "JUMP IN" ISSUE
The blank → video/content transition is managed by:
Poster images - Show immediately, suppress until video loads
Opacity transitions - Video B opacity: 0→1 when switching from Video A
Video ref tracking - Ensures both videos exist before switching
Fallback timeout - If Video B not ready within 3s, force switch anyway
The transition should be smooth, but if there's a perceptible "jump," it's likely due to:
Poster image different size/aspect ratio than video
Video loading delay longer than expected
Browser cache invalidation
All file paths are absolute paths in /Users/user_c042661f/Documents/reigh/.
Design an implementation plan for a painterly/blotchy video reveal animation on the HomePage of this app.
Context
The app is at /Users/user_c042661f/Documents/reigh. The homepage (src/pages/Home/HomePage.tsx) has a full-viewport background video with a poster image. Currently when loading, there's a jarring "jump" when the video/poster appears. The user wants the video to expand from a spot in the center in a blotchy/painterly way.
Current Loading Flow
Page loads, dark background visible
posterLoaded state becomes true when poster image is preloaded via new Image() (line 116-121)
Poster attribute is conditionally applied to video elements: poster={posterLoaded ? "/hero-background-poster.jpg" : undefined}
Video autoplays
The "jump" occurs at step 2-3 when the poster/video suddenly appears full-screen.
Current Video Structure (in HomePage.tsx)
Mobile: single <video> element with className="fixed inset-0 w-full h-full object-cover" at style={{ zIndex: 0 }}
Desktop: two <video> elements (Video A landing, Video B loop) both fixed inset-0 at z-index 0
After videos:
Film grain overlay at z-index 1
Dark overlay (bg-black/50) at z-index 2
Constellation canvas
Hero content at z-index 10
Proposed Approach: Multi-blob CSS mask reveal
Wrap the video elements in a container div and use CSS mask-image with multiple overlapping radial-gradient() blobs that expand from the center of the viewport. Each blob is positioned slightly offset from center and expands at a different rate, creating an organic/blotchy expansion effect.
CSS Implementation
Use @property to register a custom CSS property --blob-r (a number representing the reveal radius in vmax units). Animate it from 0 to 120 via a CSS @keyframes animation. The mask-image uses ~10 radial gradients at slightly different positions and size factors.
css
@property --blob-r {
syntax: '<number>';
initial-value: 0;
inherits: false;
}
.video-reveal {
--blob-r: 0;
-webkit-mask-image:
radial-gradient(circle at 50% 50%, black, transparent calc(var(--blob-r) * 1vmax)),
radial-gradient(circle at 44% 47%, black, transparent calc(var(--blob-r) * 0.78vmax)),
radial-gradient(circle at 56% 53%, black, transparent calc(var(--blob-r) * 0.82vmax)),
radial-gradient(circle at 47% 57%, black, transparent calc(var(--blob-r) * 0.65vmax)),
radial-gradient(circle at 53% 43%, black, transparent calc(var(--blob-r) * 0.72vmax)),
radial-gradient(circle at 42% 51%, black, transparent calc(var(--blob-r) * 0.55vmax)),
radial-gradient(circle at 58% 49%, black, transparent calc(var(--blob-r) * 0.88vmax)),
radial-gradient(circle at 49% 42%, black, transparent calc(var(--blob-r) * 0.6vmax)),
radial-gradient(circle at 51% 58%, black, transparent calc(var(--blob-r) * 0.52vmax)),
radial-gradient(circle at 46% 46%, black, transparent calc(var(--blob-r) * 0.48vmax)),
radial-gradient(circle at 54% 54%, black, transparent calc(var(--blob-r) * 0.92vmax));
mask-image: /* same as above */;
-webkit-mask-composite: source-over;
mask-composite: add;
}
.video-reveal.revealing {
animation: blob-reveal 1.4s cubic-bezier(0.4, 0, 0.15, 1) forwards;
}
@keyframes blob-reveal {
from { --blob-r: 0; }
to { --blob-r: 120; }
}
The blobs cluster around center (within ~8% offset) with size factors from 0.48 to 1.0. With mask-composite: add, their visible regions combine. The center blob leads (factor 1.0), with satellites expanding at slower rates, creating irregular, organic edges.
JS Implementation (HomePage.tsx)
Wrap all video elements in a <div className="fixed inset-0 video-reveal" ref={videoRevealRef} style={{ zIndex: 0 }}>
Change video elements from fixed to absolute positioning (since parent is now the fixed container)
Add new state: revealTriggered - becomes true when posterLoaded OR video fires play event
When revealTriggered becomes true, add revealing class to the wrapper
On animationend, remove the mask (set maskImage: 'none') for clean state
Fallback
For browsers without @property support (very rare in 2026), the animation won't interpolate. Add a simple opacity transition fallback:
src/pages/Home/HomePage.tsx - Wrap videos in container, add reveal trigger logic
Please evaluate this approach and provide a detailed implementation plan with:
Exact code changes needed
Any edge cases or issues I may have missed
Whether the gradient math checks out (will all blobs fully cover viewport at --blob-r: 120?)
Performance considerations (10 gradient mask repaints per frame for 1.4s)
Mobile considerations (iOS Safari mask support)
Now I have a complete picture of the codebase. Let me produce the detailed implementation plan.
Evaluation of the Proposed Approach
The multi-blob CSS mask reveal approach is well-conceived. Here is my detailed analysis covering correctness, edge cases, performance, and the complete implementation plan.
1. Gradient Math Verification: Will all blobs cover the viewport at --blob-r: 120?
The critical question is whether 120vmax is large enough to cover the viewport from the blob positions.
The worst case is a blob at position (42%, 51%) with size factor 0.55. At --blob-r: 120, its effective radius is 120 * 0.55 = 66vmax. The farthest corner from position (42%, 51%) is (100%, 100%), which is at distance sqrt((58%)^2 + (49%)^2) = sqrt(0.3364 + 0.2401) = sqrt(0.5765) = 75.9% of the viewport diagonal. Since 1vmax = 1% of the larger dimension, and the diagonal of a 100vmax x (100vmin) rectangle is at most ~112vmax (at 16:9) or 100vmax (at 1:1), the farthest corner from (42%, 51%) measured in vmax is roughly 76vmax on a square screen or less on a widescreen.
However, the radial-gradient(circle at X Y, black, transparent Rvmax) gradient means the opaque region transitions from black at 0 to transparent at R. The fully opaque part is only at the very center -- the gradient fades linearly. This means at the very edge, the mask would not be fully opaque for individual blobs.
But mask-composite: add combines all blob masks additively, so overlapping semi-transparent regions sum their alpha. The center blob (factor 1.0, 120vmax) alone covers the entire viewport with significant opacity. The issue is the outer ~15% of the screen where the center blob's alpha is fading -- but the satellite blobs fill those gaps.
Verdict: The math is sound. At --blob-r: 120, the center blob alone has a gradient reaching 120vmax, which is larger than the full diagonal of most screens. The visible transition stops well before the full viewport is uncovered, and removing the mask entirely on animationend ensures clean final state. That said, I have a refinement suggestion below.
Refinement: Use black 0, black calc(var(--blob-r) * 0.6vmax), transparent calc(var(--blob-r) * 1vmax) for the center blob instead of black, transparent calc(var(--blob-r) * 1vmax). This creates a solid core region that expands, with only the outer 40% being a soft edge. This prevents the center of the screen from having slightly-less-than-full opacity during mid-animation. Apply similar two-stop patterns (with different core ratios) to the satellite blobs.
2. Performance Considerations
10 radial-gradient masks recomposited per frame for 1.4s: This is the main concern.
CSS mask compositing with gradients happens on the GPU compositor layer. Since @property allows the browser to understand --blob-r is a <number>, the browser can interpolate it efficiently and only needs to recalculate gradient stops each frame.
A fixed positioned div with mask-image will be promoted to its own compositor layer automatically on most browsers.
10 gradients is a moderate number. Each gradient evaluation is O(1) per pixel, but the compositor does this in a shader. In practice, 10 gradients on a full-viewport element is well within GPU capabilities on any device from the last 5 years.
The video elements inside the masked container do require the mask to be applied, but since the video is already a compositor layer, this is efficient.
Recommendation: Add will-change: mask-image, -webkit-mask-image to the .video-reveal class (only while animating) or simply rely on the fixed positioning to trigger layer promotion. Remove will-change after animation ends to free GPU memory.
Mobile impact: On iOS Safari (A12+ chips), GPU mask compositing is fast. The concern would be with very old iPads, but those struggle with video playback regardless. No special mobile optimization needed.
3. iOS Safari / Mobile Mask Support
-webkit-mask-image: Fully supported on iOS Safari 15.4+. Since this app already targets iOS Safari (evident from webkit-playsinline usage and PWA support), this is fine.
-webkit-mask-composite: iOS Safari uses -webkit-mask-composite: source-over (different keyword from the standard mask-composite: add). Autoprefixer in the PostCSS pipeline will NOT automatically translate mask-composite: add to -webkit-mask-composite: source-over because the value keywords differ between standard and webkit. This must be declared explicitly.
@property: Supported in Safari 15.4+, Chrome 85+, Edge 85+, Firefox 128+. As of 2026, the only gap is Firefox ESR users on very old versions, which is negligible for this app's creative-professional audience.
4. Key Edge Cases and Issues
4a. Film grain and dark overlay should NOT be inside the reveal container.
The film grain (z-index 1) and dark overlay (z-index 2) sit above the video but below content. If you put them inside the mask container, they would also be masked and reveal with the blobs -- which would look strange because the dark overlay darkens the video, and if it reveals independently from the video, the un-darkened video would briefly flash before the overlay catches up.
Better approach: Include the film grain and dark overlay inside the reveal container. They should reveal together with the video as a unified "background layer." The user would see the dark-screen, then the darkened-video-with-grain expanding from center. This creates a cohesive reveal. The constellation canvas and content remain outside.
Wait -- re-reading the z-index structure more carefully:
Video elements: z-index 0
Film grain: z-index 1
Dark overlay: z-index 2
ConstellationCanvas (its own z-index, presumably 3-4)
Content: z-index 10
The reveal should encompass video + film grain + dark overlay together. Otherwise during the reveal, the video expands but the dark overlay is already full-screen, meaning you'd see darkened video in the revealed area and fully-dark (black/50) background in the unrevealed area. Since the page background is already dark (from body bg and dark mode forcing), and the dark overlay is bg-black/50, the transition would be from "fully dark" to "darkened video" -- which is actually a subtle, nice reveal.
Actually, let me reconsider. The page background is hsl(150 12% 10%) in dark mode, roughly #171e1b. The bg-black/50 overlay is 50% black. So the "unrevealed" area would show #171e1b body bg (since the video is masked away). The "revealed" area would show video + grain + dark overlay. The transition is from dark green-black to darkened cinematic video. That works well.
But there's a subtlety: the dark overlay and film grain are fixed inset-0 at z-index 1 and 2, completely independent of the video. If only the video is masked, the grain and dark overlay would be visible everywhere immediately, and the video would expand underneath them. This is actually the cleanest approach -- the viewer sees a dark screen, and the video "bleeds in" from center underneath the existing darkening layer. The effect is more subtle and elegant than revealing everything at once.
Revised recommendation: Only wrap the video elements in the mask container. Leave film grain and dark overlay outside. The reveal will show video expanding under the existing dark+grain layer, creating a subtle cinematic emergence.
4b. The posterLoaded trigger race condition.
Currently posterLoaded triggers showing the poster on video elements. The proposed plan triggers the reveal on posterLoaded. But consider: what if the video has already started playing before the poster image preload completes? The poster is only shown before the video plays -- once the video plays, the poster is invisible. So posterLoaded is the wrong trigger if the video plays first.
Better trigger: Use posterLoaded || videoPlaying where videoPlaying is set from the video element's onPlay event. This ensures the reveal starts as soon as there's any visual content to show.
4c. Removing the mask on animationend.
This is correct and important. Setting maskImage: 'none' (or removing the class) prevents any potential sub-pixel rendering artifacts from the gradient edges lingering on screen. Use a ref callback:
4d. Double-render prevention. If React re-renders and revealTriggered is already true, the animation should not restart. Using a CSS class added imperatively (via ref) rather than React state is more robust for this. Alternatively, use animation-fill-mode: forwards and ensure the class is only added once.
4e. Interaction with Video A -> Video B transition. On desktop, when Video A ends and Video B starts, both are inside the mask container. The opacity transition between them (controlled by isLoopVideo state) happens independently from the mask reveal. Since the mask affects the container, not individual videos, this interaction is clean.
Add the following after the last block (after line ~3016), before any closing braces:
css
/* ========================================= */
/* VIDEO REVEAL - Painterly blob expansion */
/* ========================================= */
/* Register custom property for CSS animation interpolation */
@property --blob-r {
syntax: '<number>';
initial-value: 0;
inherits: false;
}
/* Mask container - starts fully hidden */
.video-reveal {
--blob-r: 0;
-webkit-mask-image:
radial-gradient(circle at 50% 50%, black, black calc(var(--blob-r) * 0.6vmax), transparent calc(var(--blob-r) * 1vmax)),
radial-gradient(circle at 44% 47%, black, transparent calc(var(--blob-r) * 0.78vmax)),
radial-gradient(circle at 56% 53%, black, transparent calc(var(--blob-r) * 0.82vmax)),
radial-gradient(circle at 47% 57%, black, transparent calc(var(--blob-r) * 0.65vmax)),
radial-gradient(circle at 53% 43%, black, transparent calc(var(--blob-r) * 0.72vmax)),
radial-gradient(circle at 42% 51%, black, transparent calc(var(--blob-r) * 0.55vmax)),
radial-gradient(circle at 58% 49%, black, transparent calc(var(--blob-r) * 0.88vmax)),
radial-gradient(circle at 49% 42%, black, transparent calc(var(--blob-r) * 0.6vmax)),
radial-gradient(circle at 51% 58%, black, transparent calc(var(--blob-r) * 0.52vmax)),
radial-gradient(circle at 46% 46%, black, transparent calc(var(--blob-r) * 0.48vmax)),
radial-gradient(circle at 54% 54%, black, transparent calc(var(--blob-r) * 0.92vmax));
mask-image:
radial-gradient(circle at 50% 50%, black, black calc(var(--blob-r) * 0.6vmax), transparent calc(var(--blob-r) * 1vmax)),
radial-gradient(circle at 44% 47%, black, transparent calc(var(--blob-r) * 0.78vmax)),
radial-gradient(circle at 56% 53%, black, transparent calc(var(--blob-r) * 0.82vmax)),
radial-gradient(circle at 47% 57%, black, transparent calc(var(--blob-r) * 0.65vmax)),
radial-gradient(circle at 53% 43%, black, transparent calc(var(--blob-r) * 0.72vmax)),
radial-gradient(circle at 42% 51%, black, transparent calc(var(--blob-r) * 0.55vmax)),
radial-gradient(circle at 58% 49%, black, transparent calc(var(--blob-r) * 0.88vmax)),
radial-gradient(circle at 49% 42%, black, transparent calc(var(--blob-r) * 0.6vmax)),
radial-gradient(circle at 51% 58%, black, transparent calc(var(--blob-r) * 0.52vmax)),
radial-gradient(circle at 46% 46%, black, transparent calc(var(--blob-r) * 0.48vmax)),
radial-gradient(circle at 54% 54%, black, transparent calc(var(--blob-r) * 0.92vmax));
-webkit-mask-composite: source-over;
mask-composite: add;
}
.video-reveal.revealing {
animation: blob-reveal 1.4s cubic-bezier(0.4, 0, 0.15, 1) forwards;
}
@keyframes blob-reveal {
from { --blob-r: 0; }
to { --blob-r: 120; }
}
/* Fallback for browsers without @property support */
@supports not (animation-name: blob-reveal) {
.video-reveal {
-webkit-mask-image: none;
mask-image: none;
opacity: 0;
transition: opacity 0.8s ease-out;
}
.video-reveal.revealing {
animation: none;
opacity: 1;
}
}
Notes on the CSS:
The center blob uses a three-stop gradient (black, black 0.6R, transparent R) to maintain a solid core, preventing the very center from being semi-transparent during mid-animation.
-webkit-mask-composite: source-over is the webkit equivalent of mask-composite: add. These must both be declared since the keyword sets differ.
The @supports not fallback tests whether the blob-reveal animation name resolves (it only works if @property is supported, otherwise --blob-r is treated as a string and cannot be interpolated). This fallback degrades to a simple opacity fade.
mask-image and -webkit-mask-image are both declared. Autoprefixer may add -webkit- automatically, but explicit declaration ensures correctness since the behavior of autoprefixer with mask-image can vary.
B. Add reveal trigger effect (after the posterLoaded effect, around line 121):
tsx
// Trigger video reveal when poster loads or video starts playing
useEffect(() => {
if ((posterLoaded || videoReady) && !revealTriggeredRef.current) {
revealTriggeredRef.current = true;
// Use requestAnimationFrame to ensure the element has rendered with the mask
requestAnimationFrame(() => {
videoRevealRef.current?.classList.add('revealing');
});
}
}, [posterLoaded, videoReady]);
C. Add animationend handler (as a useEffect, or inline on the div):
tsx
// Clean up mask after reveal animation completes
useEffect(() => {
const el = videoRevealRef.current;
if (!el) return;
const handleAnimationEnd = (e: AnimationEvent) => {
if (e.animationName === 'blob-reveal') {
el.style.webkitMaskImage = 'none';
el.style.maskImage = 'none';
el.classList.remove('video-reveal', 'revealing');
}
};
el.addEventListener('animationend', handleAnimationEnd);
return () => el.removeEventListener('animationend', handleAnimationEnd);
}, []);
D. Wrap video elements in a container div. Replace lines 448-546:
The structural change wraps the mobile/desktop video branches in a single container:
tsx
{/* Video reveal container - masked blob expansion from center */}
<div
ref={videoRevealRef}
className="fixed inset-0 video-reveal"
style={{ zIndex: 0 }}
>
{isMobile ? (
<video
ref={videoARef}
autoPlay
loop
muted
playsInline
// @ts-expect-error webkit-specific attribute for iOS
webkit-playsinline="true"
preload="auto"
poster={posterLoaded ? "/hero-background-poster.jpg" : undefined}
src="/hero-background-mobile.mp4"
className="absolute inset-0 w-full h-full object-cover"
onLoadedData={() => console.log('[VideoDebug] Mobile video loaded')}
onPlay={() => {
console.log('[VideoDebug] Mobile video playing');
setVideoReady(true);
}}
/>
) : (
<>
<video
ref={videoARef}
autoPlay
muted
playsInline
// @ts-expect-error webkit-specific attribute for iOS
webkit-playsinline="true"
preload="auto"
poster={posterLoaded ? "/hero-background-poster.jpg" : undefined}
src="/hero-background-easeout-smooth-web.mp4"
className="absolute inset-0 w-full h-full object-cover"
style={{
opacity: isLoopVideo ? 0 : 1,
pointerEvents: isLoopVideo ? 'none' : 'auto',
}}
onLoadedData={() => console.log('[VideoDebug] Video A loaded, duration:', videoARef.current?.duration)}
onPlay={() => {
console.log('[VideoDebug] Video A playing, currentTime:', videoARef.current?.currentTime);
setVideoReady(true);
}}
onTimeUpdate={() => {
const v = videoARef.current;
if (v && v.duration - v.currentTime < 5) {
console.log('[VideoDebug] Video A near end, currentTime:', v.currentTime, 'duration:', v.duration);
}
}}
onEnded={() => {
// (existing onEnded handler - unchanged)
}}
/>
<video
ref={videoBRef}
loop
muted
playsInline
// @ts-expect-error webkit-specific attribute for iOS
webkit-playsinline="true"
preload="none"
src="/hero-background-loop.mp4"
className="absolute inset-0 w-full h-full object-cover"
style={{
opacity: isLoopVideo ? 1 : 0,
pointerEvents: isLoopVideo ? 'auto' : 'none',
}}
onLoadedData={() => console.log('[VideoDebug] Video B loaded, duration:', videoBRef.current?.duration)}
onCanPlayThrough={() => console.log('[VideoDebug] Video B canplaythrough')}
onPlay={() => console.log('[VideoDebug] Video B playing, currentTime:', videoBRef.current?.currentTime)}
onSeeked={() => console.log('[VideoDebug] Video B seeked to:', videoBRef.current?.currentTime)}
/>
</>
)}
</div>
Key changes:
Video elements go from fixed to absolute positioning (parent is now the fixed container).
style={{ zIndex: 0 }} moves from individual videos to the container.
onPlay handlers for both mobile video and desktop Video A now call setVideoReady(true).
The debug console.log IIFE on line 447 can be removed or moved inside the container.
E. Film grain and dark overlay remain unchanged (lines 548-552). They stay outside the reveal container at their current z-indices.
6. Interaction with Existing Animation System
The HeroSection animation system is completely independent:
HeroSection uses assetsLoaded (which preloads /favicon-16x16.png) to drive the loading bar and content reveal phases.
The video reveal uses posterLoaded / videoReady to drive the background reveal.
These are orthogonal. The loading bar and content text animate on their own timeline. The background video expands on its own timeline.
In practice, posterLoaded will typically fire before assetsLoaded (poster is a larger image but loaded eagerly, while assets rely on favicon + 2s fallback). This means the background starts revealing while the loading bar is still going -- which is visually appealing. The user sees the dark page, then the cinematic background bleeds in, and then the text content fades in on top.
7. Summary of Concerns and Mitigations
Concern
Mitigation
mask-composite keyword mismatch between standard and webkit
Declare both -webkit-mask-composite: source-over and mask-composite: add
Gradient center semi-transparency at mid-animation
Use three-stop gradient for center blob: black, black 0.6R, transparent R
@property unsupported (Firefox ESR, very old browsers)
@supports not fallback with opacity fade
Mask lingering after animation (sub-pixel artifacts)
Remove mask entirely on animationend
Poster loads after video already playing
Trigger on posterLoaded OR videoReady
React re-render re-triggering animation
Use revealTriggeredRef (ref, not state) as guard
Performance (10-gradient GPU mask)
GPU compositor handles this efficiently; fixed positioning triggers layer promotion
Autoprefixer might not handle mask-image
Explicit -webkit- prefixed declarations in CSS
Critical Files for Implementation
/Users/user_c042661f/Documents/reigh/src/index.css - Add @property, .video-reveal mask class, @keyframes blob-reveal, and @supports fallback (append after line 3016)
/Users/user_c042661f/Documents/reigh/src/pages/Home/HomePage.tsx - Wrap video elements in mask container div, add videoReady state, add reveal trigger effect, add animationend cleanup
/Users/user_c042661f/Documents/reigh/postcss.config.js - Verify autoprefixer handles mask-image correctly (may need no changes, but should be tested)