Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-haunt/llms.txt
Use this file to discover all available pages before exploring further.
FogLayer renders a purely decorative, always-on atmospheric effect at the bottom of every page. It positions itself fixed to the viewport so it stays in place as the user scrolls, and it runs two independent CSS-animated fog waves that scroll horizontally in opposite directions. The staggered speeds and slight vertical offsets give the illusion of depth — a closer, faster bank of mist over a slower, more distant layer. Because the component is mounted inside Layout, the fog is always present regardless of which route is active.
Structure
The component itself is minimal — two<div> elements inside a container <div>:
.fog-layer divs are styled differently via the :nth-child(2) selector.
CSS animation
The fog effect is defined inmain.css:
How the drift works
Each.fog-layer is set to width: 200% and contains a repeating SVG wave tiled with background-size: 50% 100%. That means the background image repeats exactly twice across the element’s full width. The fog-drift keyframe slides the element from translate(0) to translate(-50%), which is exactly one full tile width — so at the 100% mark the pattern is in the same position it started, making the loop seamless.
| Layer | Animation duration | Direction | bottom offset | Perceived distance |
|---|---|---|---|---|
First (:nth-child(1)) | 40 s | Forward | 0 | Far / slow |
Second (:nth-child(2)) | 30 s | Reverse | -20px | Near / fast |
SVG fog waves
Each layer uses a different SVG path to vary the wave silhouette and create a more organic look: Layer 1 — gentle long waves,opacity: 0.15:
opacity: 0.10:
ghost colour (#f4f1ea) at a low opacity so the fog reads as a subtle light haze over the dark night background rather than an opaque white wall.
Masking
The.fog-container applies a mask-image gradient that fades from fully opaque at the very bottom to fully transparent at the top edge of the 30 vh container. This means the fog appears to rise naturally from the bottom of the screen and dissolve into the page rather than having a hard upper edge.
The
-webkit-mask-image vendor-prefixed version is included alongside the standard mask-image for full Safari and older Chrome compatibility.Z-index and pointer events
FogLayer sits at z-index: 40 — above page content (z-10) and the bat swarm (z-30), but below the navigation bar (z-50). The container has pointer-events: none set in CSS, so the fog overlay never interferes with clicks, links, or form inputs anywhere on the page.
Customisation
| What to change | Where | How |
|---|---|---|
| Wave shape | SVG d attribute in the background data URI | Edit the Quadratic Bézier control points |
| Scroll speed | animation duration value | Reduce for faster fog, increase for slower |
| Colour | fill="%23f4f1ea" in the URI | Replace the percent-encoded hex (%23 = #) |
| Fog density | opacity attribute in the SVG | Increase toward 1.0 for thicker fog |
| Container height | .fog-container height | Change 30vh to any value |