# Rift

> **Category:** Landing Page
> **Effect:** A hard diagonal tear splits the viewport — monochrome upper-left, saturated gradient field lower-right — with a glowing 2px seam that bends under the pointer
> **Platform:** cmd-code (`qoder`)
> **Model:** `qoder` — Qoder
> **License:** Free / MIT — copy, paste, ship.
> **Self-contained:** yes — one `index.html`, no build step, no external media.

---

## 🎬 Live demo

Open [`public/demos/rift/index.html`](../public/demos/rift/index.html) — generated by the model
above from the prompt below, with no human edits to the markup.

## ✅ Verification

<!-- VERIFICATION:START -->
**Verified:** 20/20 checks passed — ✅ fully passing
**Verified at:** 2026-10-29T05:41:07.280Z
**Demo size:** 8.0 KB (single self-contained file)

### Provenance

| Field | Value |
|---|---|
| Platform | Qoder — `local authored build` |
| Model | `qoder` |
| Prompt sent | — characters (sha256:—) |
| Prompt tokens | 0 |
| Completion tokens | 0 |
| Reasoning tokens | 0 |
| **Total tokens** | **0** |
| API calls | 0 (6 attempts) |
| Latency | 0.0 s |
| Finish reason | `—` |

### Automated checks

| | Check | Observed |
|---|---|---|
| ✅ | demo file exists and is non-trivial | 8232 bytes |
| ✅ | window.__DEMO__.ready became true | 1 frames, effects: diagonal-tear, seam-glow, world-parallax, rift-sparks, film-grain |
| ✅ | animation loop is live (>= 20 frames / 1.2s) | 72 frames in 1.2s |
| ✅ | window.__DEMO__.errors empty | clean |
| ✅ | canvas paints non-blank content | mean 0.09, stdev 3.92, coverage 0.0006 |
| ✅ | canvas spans the viewport width | 1440px of 1440px |
| ✅ | canvas keeps repainting (content changes) | hash 1086681653 -> 1589586418 |
| ✅ | exactly one <h1> with text | "Two worlds,
one tear." |
| ✅ | header/main/footer landmarks present | header,main,footer |
| ✅ | interactive elements have accessible names | 0 unnamed |
| ✅ | document has <title> | Rift — Two Worlds, One Tear |
| ✅ | document declares lang | en |
| ✅ | no horizontal overflow @ 390px | clean |
| ✅ | no horizontal overflow @ 768px | clean |
| ✅ | no horizontal overflow @ 1440px | clean |
| ✅ | desktop is one viewport (no scroll) | doc 900 vs viewport 900 |
| ✅ | no console errors | clean |
| ✅ | no uncaught page errors | clean |
| ✅ | no failed network requests | clean |
| ✅ | reduced-motion: page still renders content | h1=1 textLen=315 pageErrors=0 |

_Cross-check pending._

*Reproduce: `node tools/runner.mjs --jobs data/jobs.json` then `node tools/verify.mjs --only rift`.*
<!-- VERIFICATION:END -->

## 📋 Prompt

```text
## A. WHAT IS BEING BUILT

Build one complete, valid `index.html` — a single-viewport cinematic landing page for **Rift**, a creative-coding studio. Document title: "Rift — Two Worlds, One Tear". `<html lang="en">`. ONE file: plain HTML + one `<style>` in `<head>` + one vanilla `<script>` at the end of `<body>`. No build step, framework, bundler or external media (no images, video, audio, CDN scripts). Every pixel from CSS gradients, inline SVG or `<canvas>`.

**Viewport rule:** at `>= 901px` the page is one frame: `html, body { height:100%; overflow:hidden }` and `.page { height:100dvh; overflow:hidden }`. NO SCROLL on desktop. At `<= 900px` the page may scroll. No horizontal overflow at 390, 768, 1440 or 1920.

**Do NOT build:** video, mp4/webm/gif, remote images, base64 blobs, CDN URLs, WebGL, Three.js, GSAP, Lottie, jQuery, Tailwind, React, audio, forms, pricing tables, testimonials, blog, cookie banner, scroll indicator, modals, cursor labels, tooltips, sections beyond header / hero / stats footer, desktop hamburger (burger only `<= 900px`). Google Fonts only externally.

**The single visual idea:** one hard diagonal tear. Upper-left is monochrome — 56px hairline grid, grey washes, a slow technical dial. Lower-right is a saturated magenta / violet / cyan field with a drifting conic sweep. The tear edge is a 2px near-white seam with a cyan bloom, a magenta counter-fringe, four running slivers and canvas sparks. The pointer bends the seam within `-44deg .. -20deg` and parallaxes both worlds oppositely. Over it: a bottom-left hero (chip, two masked headline lines, lead, two buttons) and a stats footer on a hairline.

---

## B. THE BACKDROP — the tear rig

Everything behind the type lives in one fixed `.backdrop` at `inset:0; overflow:hidden; pointer-events:none; z-index:0`.

### B1. The tear geometry

1. `.rift` — `position:absolute; inset:0; overflow:hidden` holds `.rift-frame` — `position:absolute; left:50%; top:50%; width:160vmax; height:160vmax; transform: translate(-50%,-50%) rotate(var(--seam)); will-change:transform`. `--seam` rests at `-32deg` on `:root`; JS drives it inside `[-44deg, -20deg]`. Centred on the viewport, its midline crosses the viewport centre — rotating the frame rotates the tear.
2. Two halves: `.half { position:absolute; left:0; right:0; overflow:hidden }`; `.half--mono { top:0; height: calc(50% + var(--seam-shift)) }`; `.half--chroma { top: calc(50% + var(--seam-shift)); bottom:0 }`. `--seam-shift: 3.5%` pushes the boundary lower-right: mono owns ~54%.
3. Each half holds one `.plate`: `position:absolute; left:50%; top:50%; width:200vmax; height:200vmax; transform: translate(-50%,-50%) rotate(calc(-1 * var(--seam))) translate(var(--px), var(--py)); will-change:transform`. The counter-rotation keeps textures screen-stable; the translate AFTER the rotation makes `--px`/`--py` pure screen-space parallax. Coverage: widest half corner `sqrt(80^2+42.8^2) = 90.7vmax` from centre vs the plate's `100vmax` inscribed radius — covered at every angle. Only five properties change at runtime — `--seam`, `--px-m`, `--py-m`, `--px-c`, `--py-c`; JS touches nothing else.

### B2. `.plate--mono` (upper-left, strictly greyscale — zero chroma)

Layers: 1. `linear-gradient(200deg, #0b0b0e 0%, #141418 42%, #1b1b20 74%, #0c0c10 100%)`; 2–3. `repeating-linear-gradient(0deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 56px)` plus the same at `90deg` (56px hairline grid); 4. `radial-gradient(ellipse 62% 44% at 16% 10%, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.03) 42%, transparent 66%)`; 5. `repeating-linear-gradient(180deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 8px)` (8px scanlines); 6. `radial-gradient(ellipse 90% 70% at 50% 50%, transparent 38%, rgba(0,0,0,0.42) 100%)`. Plus an inline `<svg class="dial" viewBox="0 0 400 400" aria-hidden="true">` at `left:5%; top:16%; width:620px; height:620px; opacity:0.42`: circles `r=60,110,160,210` stroke `rgba(255,255,255,0.10)` `stroke-width="1"`; 24 ticks `<line x1="200" y1="4" x2="200" y2="26">` at `rotate(k*15 200 200)`, k = 0..23, stroke `rgba(255,255,255,0.16)`; crosshair `M200 24 V376` + `M24 200 H376` stroke `rgba(255,255,255,0.06)`. `.dial { animation: dial-turn 96s linear infinite }`.

### B3. `.plate--chroma` (lower-right, saturated field)

1. `linear-gradient(158deg, #4a0f6b 0%, #7a1150 34%, #2b0a5e 66%, #08103a 100%)`; 2. `repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 14px)` — 14px weave; 3. `conic-gradient(from 212deg at 58% 38%, rgba(255,255,255,0.12) 0deg, transparent 44deg, rgba(255,255,255,0.07) 98deg, transparent 152deg, rgba(255,255,255,0.10) 252deg, transparent 360deg)` masked by `radial-gradient(ellipse 70% 60% at 58% 38%, #000 0%, rgba(0,0,0,0.35) 55%, transparent 78%)` (`mask` + `-webkit-mask`); 4. `.chroma-blobs` at `inset:-18%`, four radials, `animation: blob-drift 26s ease-in-out infinite alternate` (`translate3d(-2.5%,1.6%,0) scale(1.06)` ↔ `translate3d(3%,-2%,0) scale(1)`):
   - `radial-gradient(circle at 76% 20%, rgba(255,61,129,0.62) 0%, rgba(255,61,129,0.20) 26%, transparent 58%)`
   - `radial-gradient(circle at 32% 58%, rgba(123,92,255,0.55) 0%, rgba(123,92,255,0.16) 30%, transparent 62%)`
   - `radial-gradient(circle at 66% 86%, rgba(34,211,238,0.46) 0%, rgba(34,211,238,0.12) 32%, transparent 66%)`
   - `radial-gradient(circle at 10% 26%, rgba(255,140,60,0.26) 0%, transparent 44%)`
5. `.chroma-sheen` at `inset:0`, `linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.09) 50%, transparent 62%)`, `animation: sheen 13.5s cubic-bezier(0.4,0,0.2,1) infinite` (`0% translateX(-70%) op 0`; `22% .85`; `78% .85`; `100% translateX(70%) 0`).

### B4. The seam stack (children of `.rift-frame`, all at `top: calc(50% + var(--seam-shift))`)

1. `.seam-far` — `height:240px; margin-top:-120px`; `linear-gradient(180deg, transparent 0%, rgba(111,242,255,0.10) 40%, rgba(214,253,255,0.20) 50%, rgba(255,61,129,0.12) 60%, transparent 100%)`; `filter: blur(28px)`; `opacity:0.9`.
2. `.seam` — `height:2px; margin-top:-1px`; `linear-gradient(90deg, rgba(111,242,255,0) 0%, rgba(180,250,255,0.55) 10%, rgba(230,254,255,0.95) 34%, #ffffff 50%, rgba(230,254,255,0.95) 66%, rgba(180,250,255,0.55) 90%, rgba(111,242,255,0) 100%)`; `box-shadow: 0 0 10px rgba(111,242,255,0.75), 0 0 30px rgba(111,242,255,0.38), 0 0 64px rgba(255,61,129,0.24)`; `animation: seam-breathe 6.4s ease-in-out infinite` (opacity 0.86 ↔ 1).
3. `.seam-fringe--a` (`margin-top:-4px`, `rgba(255,61,129,0.55)`) and `.seam-fringe--b` (`margin-top:3px`, `rgba(111,242,255,0.55)`) — 1px, `mix-blend-mode:screen`, `animation: fringe-slide 9s ease-in-out infinite` (translateY -1px ↔ 1px, opacity 0.35 ↔ 0.6); `.seam-hot` — `height:1px; margin-top:-0.5px; background:#fff; mix-blend-mode:screen; animation: seam-flicker 5.4s linear infinite` (0.92, dropping to 0.35 at 44%, 0.55 at 79%).
4. Four `.shard` — `left:50%; top: calc(50% + var(--seam-shift)); height:2px; width:96px; margin-top:-1px; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 45%, #ffffff 50%, rgba(255,255,255,0.9) 55%, transparent 100%)`; `animation: shard-run 7.2s linear infinite` at `0s, 2.4s, 4.1s, 5.6s`; keyframes `from { transform: translateX(-62vmax); opacity:0 } 8% { opacity:0.9 } 92% { opacity:0.9 } to { transform: translateX(62vmax); opacity:0 }`.

### B5. `canvas#sparks` (z-index 12)

Fixed `inset:0; width:100%; height:100%; pointer-events:none; aria-hidden="true"`. Exactly **46** sparks at `>= 901px`, **30** at `<= 900px`, **20** at `<= 560px`, from a deterministic LCG (seed `20260731`): `s0` along the seam, speed `0.055–0.16` of seam length per second, direction ±1, lateral `-46px .. +46px` decaying to 0, life `2.4s–6.4s`, scale `0.6–1.6`. Geometry, once per frame from cached `w`, `h`, `th = seamCur * PI/180`: `d = (cos th, sin th)`, `n = (-sin th, cos th)`, `L = hypot(w,h) * 1.25`, `p = (w/2, h/2) + d * ((s - 0.5) * L) + n * lateral`. Per-spark time functions are in J4.

**Glow without `shadowBlur`:** the 40x40 sprite is built ONCE in `resizeCanvas` — `createRadialGradient(20,20,0,20,20,20)`, stops `0 rgba(214,253,255,0.95)`, `0.22 rgba(111,242,255,0.55)`, `0.48 rgba(111,242,255,0.14)`, `0.72 transparent`, plus a 2px `#ffffff` core. Per spark: one `drawImage`, `k = 8px * scale`; `globalCompositeOperation = 'lighter'` set ONCE per frame, reset after the loop. **Cost:** 1 `clearRect` + 46 `drawImage`, under 1.2ms at 1440x900. ZERO `ctx.filter`, `ctx.shadowBlur`, gradient creation or `getBoundingClientRect` in the file.

### B6. `.grain` (z-index 30) and the frame budget

`position:fixed; inset:-50%; width:200%; height:200%; pointer-events:none; opacity:0.05`; inline `feTurbulence` data-URI (`type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"`, then `feColorMatrix type="saturate" values="0"`), `background-size:160px 160px`; `animation: grain 0.9s steps(4) infinite` translating among `(0,0) (-2%,1%) (1%,-2%) (-1%,2%)`.

**Resolution trick and budget:**

`dpr = Math.min(window.devicePixelRatio || 1, 2)`; sizes from `innerWidth`/`innerHeight`; `canvas.width = w * dpr`, `canvas.height = h * dpr`, `ctx.setTransform(dpr,0,0,dpr,0,0)`; sprite rebuilt in the same handler. Budget: 1 clearRect, 46 drawImage, 5 custom-property writes, 4 composited transform-only layers, zero layout, zero DOM reads; loop sustains `>= 20` frames per 1.2s at 1440x900 headless. If `document.hidden`, skip the paint, keep the loop alive.

---

## C. THE LAYER STACK (back -> front)

1. `html, body` — `#05050a`, forced twice (Guards).
2. `.backdrop` — z-index 0: `.rift` 0; in `.rift-frame`, `.half--mono` 1, `.half--chroma` 2, `.seam-far` 3, `.seam` 4, `.seam-fringe--a/b` 5, `.seam-hot` 6, `.shard` 7; `canvas#sparks` 12; `.grain` 30.
3. `.scrim` — z-index 20, fixed `inset:0`, `pointer-events:none`, `linear-gradient(180deg, rgba(5,5,10,0.52) 0%, rgba(5,5,10,0.08) 30%, rgba(5,5,10,0.30) 64%, rgba(5,5,10,0.88) 100%)` — contrast over both worlds.
4. `.page` — z-index 40, `position:relative; display:grid; grid-template-rows: auto minmax(0,1fr) auto; min-height:100dvh` (`height:100dvh` in the desktop lock); `main.hero` 50; `header.site-header` / `footer.stats-footer` 60.
5. `.menu` (mobile, open) — fixed `inset:0`, z-index 80.

---

## D. TOKEN TABLE (defaults at 1440x900)

```
--bg:            #05050a
--text:          #f4f7fa
--text-soft:     #cfd8e3
--muted:         #8b95a3
--dim:           #5d6674
--accent:        #6ff2ff
--accent-hot:    #d8feff
--accent-soft:   rgba(111,242,255,0.55)
--accent-line:   rgba(111,242,255,0.30)
--hot:           #ff3d81
--violet:        #7b5cff
--cyan:          #22d3ee
--border:        rgba(255,255,255,0.16)
--border-soft:   rgba(255,255,255,0.09)
--seam:          -32deg
--seam-shift:    3.5%
--display:       "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif
--sans:          "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif
--mono:          "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace
--logo:          16px
--logo-track:    0.30em
--nav:           13.5px
--nav-h:         38px
--btn:           13.5px
--btn-h:         44px
--chip-h:        30px
--eyebrow:       11.5px
--h1:            74px
--lead:          17.5px
--stat-val:      26px
--stat-label:    11.5px
--header-y:      26px
--header-x:      44px
--hero-x:        44px
--hero-bottom:   60px
--footer-y:      22px
--copy-max:      700px
--radius-pill:   999px
--focus-w:       2px
--focus-offset:  3px
--ease-out:      cubic-bezier(0.16,1,0.3,1)
--enter-dur:     0.95s
```

Fonts: Google Fonts ONLY — `Space Grotesk:wght@500;600`, `Inter:wght@400;500;600`, `JetBrains Mono:wght@400;500`; one `<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>` plus one stylesheet link with `display=swap`, fallbacks as above.

---

## E. THE COMPOSITION — exact build order

`auto / minmax(0,1fr) / auto` rows hold `<header class="site-header">`, `<main class="hero">`, `<footer class="stats-footer">`.

**HEADER** — `display:flex; align-items:center; justify-content:space-between; gap:24px; padding: var(--header-y) var(--header-x)`.

- `a.brand` (href `#`, accessible name "Rift home"): inline SVG mark 22x22 — `<rect x="1" y="1" width="20" height="20" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="1"/>`, `<path d="M3 17 L19 5" stroke="#6ff2ff" stroke-width="1.6" stroke-linecap="round"/>`, `<path d="M3 19.5 L17 3.5" stroke="#ff3d81" stroke-width="1" opacity="0.6"/>` (tear + chromatic offset) — then `RIFT`, `var(--display)` at `var(--logo)` weight 600, `letter-spacing: var(--logo-track)`, `color: var(--text)`.
- `nav` with exactly 3 links — `Work`, `Studio`, `Contact` — href `#`, `var(--sans)` at `var(--nav)` weight 500, `color: var(--muted)`, `display:flex; gap:32px; height:var(--nav-h); align-items:center`. Hover `color: var(--text)`, 0.18s ease.
- `a.cta` (href `#`, "Start a project") — the `.btn` base at `padding: 0 20px`, `var(--sans)` at `var(--btn)` weight 600, `color: var(--accent-hot); border: 1px solid var(--accent-line); background: linear-gradient(180deg, rgba(111,242,255,0.16) 0%, rgba(111,242,255,0.05) 100%)`.

**MAIN (hero, bottom-anchored left)** — `display:flex; flex-direction:column; justify-content:flex-end; align-items:flex-start; padding: 0 var(--hero-x) var(--hero-bottom)`. Inner `.hero-copy`: `width:100%; max-width: var(--copy-max); display:flex; flex-direction:column; align-items:flex-start`. Copy hugs the LEFT padding — never centred or right-aligned.

1. `.chip` (a `<p>`, inert): `height: var(--chip-h); padding: 0 14px; inline-flex; align-items:center; border-radius: var(--radius-pill); border: 1px solid var(--border); background: rgba(111,242,255,0.06)`, `var(--mono)` at `var(--eyebrow)`, `letter-spacing:0.18em; color: var(--accent)`. Copy: `CREATIVE CODING STUDIO · EST. 2019`.
2. `h1` — EXACTLY ONE `<h1>`, `var(--display)`, `font-weight:600; font-size: var(--h1); line-height:0.98; letter-spacing:-0.03em; color: var(--text); margin: 20px 0 0`. Masked lines `Two worlds,` and `one tear.`; `<em>tear</em>` at `font-style:normal; color: var(--accent-hot); text-shadow: 0 0 22px rgba(111,242,255,0.45), -2px 0 rgba(255,61,129,0.40), 2px 0 rgba(111,242,255,0.40)`.
3. `.lead` — `var(--sans)` at `var(--lead)`, `line-height:1.55`, `letter-spacing:-0.012em`, `color: var(--text-soft)`, `max-width:560px`, `margin: 22px 0 0`. Copy: `Rift builds real-time installations, generative identity systems and shader-driven interfaces — 41 projects shipped across 9 cities, every one of them holding 120 frames a second.`
4. `.actions` — `display:flex; gap:12px; flex-wrap:wrap; margin-top:30px`; two anchors: `.btn.btn--primary` "Start a project", `.btn.btn--ghost` "Watch the reel", both href `#`.

**FOOTER (three-item stats)** — `display:grid; grid-template-columns: repeat(3, 1fr); padding: var(--footer-y) var(--header-x) 26px; border-top: 1px solid var(--border-soft)`. One `<ul>`, three `<li>`. Each `li`: `display:grid; gap:6px; padding: 0 30px`; `:first-child { padding-left:0 }`; `:last-child { padding-right:0 }`; `li + li { border-left: 1px solid var(--border-soft) }`; `:nth-child(2) { text-align:center }`; `:nth-child(3) { text-align:right }`. Each holds `<strong class="stat-val">` (`var(--mono)` at `var(--stat-val)` weight 500, `letter-spacing:-0.02em`, `color: var(--text)`) and `<span class="stat-label">` (`var(--mono)` at `var(--stat-label)`, `letter-spacing:0.14em`, uppercase, `color: var(--dim)`). Pairs: `41`/`PROJECTS SHIPPED`, `9`/`CITIES`, `120 fps`/`TARGET ON INSTALL`.

---

## F. THE UI LANGUAGE

- **`.btn` base:** `inline-flex; align-items:center; justify-content:center; height: var(--btn-h); padding: 0 22px; border-radius: var(--radius-pill)`, `var(--sans)` at `var(--btn)` weight 600, `letter-spacing:0.01em; text-decoration:none; position:relative; overflow:hidden; transition: transform/background/border-color/color/box-shadow 220ms var(--ease-out)`.
- **`.btn--primary`:** `color:#04121a; border:1px solid rgba(216,254,255,0.65); background: linear-gradient(180deg, #d8feff 0%, #6ff2ff 52%, #23b9d6 100%); box-shadow: 0 14px 44px rgba(111,242,255,0.24), inset 0 1px 0 rgba(255,255,255,0.62)`. Hover: `linear-gradient(180deg, #eaffff 0%, #8bf6ff 48%, #2ec6e3 100%)`, `translateY(-1px)`, `0 18px 54px rgba(111,242,255,0.34)`; active `translateY(0)`.
- **`.btn--ghost`:** `color: var(--text-soft); border:1px solid var(--border); background: rgba(255,255,255,0.035)`. Hover: `color: var(--text); border-color: var(--accent-line); background: rgba(111,242,255,0.08); translateY(-1px)`.
- **Glint** on `.btn`/`.cta`: `::after { content:""; position:absolute; inset:-1px; background: linear-gradient(112deg, transparent 0%, transparent 36%, rgba(230,254,255,0.22) 50%, transparent 64%, transparent 100%); transform: translateX(-140%); transition: transform 680ms var(--ease-out) }`; hover drives `translateX(140%)`.
- **`.cta`** takes the base at `padding: 0 20px` with E's cyan hairline; hover: `border-color: var(--accent-soft); background: linear-gradient(180deg, rgba(111,242,255,0.24) 0%, rgba(111,242,255,0.08) 100%); box-shadow: 0 0 20px rgba(111,242,255,0.22)`.
- **Nav links** plain, no pills or underline, hover `color: var(--text)`. **`.chip`** never reacts.
- **Focus:** every `a` and `button` gets `:focus-visible { outline: var(--focus-w) solid var(--accent); outline-offset: var(--focus-offset); border-radius: var(--radius-pill) }`. Selection: `::selection { background: rgba(111,242,255,0.30); color:#04121a }`. No blue ring, no underline.

---

## G. MOTION — entrance stagger and keyframes

Entrance: `animation-duration: var(--enter-dur); animation-fill-mode: both; animation-timing-function: var(--ease-out); animation-delay: var(--d, 0.08s)`; each element is `.appear` + one modifier + inline `--d`; resting state is final.

```
brand              appear--fade   0.08s
nav link 1         appear--fade   0.16s
nav link 2         appear--fade   0.24s
nav link 3         appear--fade   0.32s
header cta         appear--chip   0.40s
rift frame         appear--open   0.14s   (duration 1.6s)
seam glow          appear--seam   0.52s   (duration 1.3s)
eyebrow chip       appear--pop    0.66s
h1 line 1          appear--mask   0.80s
h1 line 2          appear--mask   0.96s
lead               appear--soft   1.14s
primary button     appear--chip   1.28s
ghost button       appear--chip   1.36s
stat 1             appear--stat   1.46s
stat 2             appear--stat   1.54s
stat 3             appear--stat   1.62s
```

Entrance keyframes (each ends at opacity 1, identity transform):
```
in-fade   from { opacity: 0 }                                            to { opacity: 1 }
in-soft   from { opacity: 0; transform: translateY(14px); filter: blur(4px) } to { opacity: 1; transform: none; filter: blur(0) }
in-mask   from { opacity: 0; transform: translateY(108%) }               to { opacity: 1; transform: none }
in-chip   from { opacity: 0; transform: translateY(10px) scale(0.96) }   to { opacity: 1; transform: none }
in-pop    0% { opacity:0; transform: scale(0.94) }  68% { opacity:1; transform: scale(1.03) }  100% { opacity:1; transform: none }
in-open   from { opacity: 0; transform: translate(-50%,-50%) rotate(-20deg) scale(1.06) } to { opacity: 1; transform: translate(-50%,-50%) rotate(var(--seam)) scale(1) }
in-seam   from { opacity: 0; transform: scaleX(0.2) }                    to { opacity: 1; transform: none }
in-stat   from { opacity: 0; transform: translateY(10px) }               to { opacity: 1; transform: none }
```

`in-open` animates `.rift-frame` only; resting transform stays `translate(-50%,-50%) rotate(var(--seam))`. Continuous:
```
dial-turn       96s   linear infinite      360deg
blob-drift      26s   ease-in-out infinite alternate  (B3.4)
sheen           13.5s cubic-bezier(0.4,0,0.2,1) infinite
seam-breathe    6.4s  ease-in-out infinite  0%,100% { opacity:0.86 }  50% { opacity:1 }
fringe-slide    9s    ease-in-out infinite  0%,100% { translateY(-1px); opacity:0.35 }  50% { translateY(1px); opacity:0.6 }
seam-flicker    5.4s  linear infinite       0%,43% { 0.92 } 44% { 0.35 } 45%,78% { 0.92 } 79% { 0.55 } 80%,100% { 0.92 }
shard-run       7.2s  linear infinite       translateX(-62vmax) → 62vmax, opacity 0 → 0.9 → 0
grain           0.9s  steps(4) infinite     (0,0) (-2%,1%) (1%,-2%) (-1%,2%)
```

Periods never re-sync. H1 masking: `<span class="line"><span class="line-inner appear appear--mask" style="--d:0.80s">…</span></span>`, `.line { display:block; overflow:hidden; padding: 0.06em 0.06em 0.14em }`, `.line-inner { display:inline-block }`.

---

## H. RESPONSIVE TABLE — exact token overrides

```
>= 1600px:
  --h1: 88px  --lead: 19px  --logo: 17px  --nav: 14px  --nav-h: 40px  --btn: 14px
  --btn-h: 46px  --stat-val: 30px  --copy-max: 820px
  --header-y: 30px  --header-x: 56px  --hero-x: 56px  --hero-bottom: 64px

>= 1920px:
  --h1: 102px  --lead: 20px  --stat-val: 34px  --stat-label: 12.5px  --copy-max: 900px
  --header-x: 72px  --hero-x: 72px  --hero-bottom: 72px

1280px – 1599px:  --h1: 68px  --copy-max: 660px

901px – 1279px:
  --h1: 56px  --lead: 16px  --nav: 12.5px  --btn: 12.5px  --stat-val: 23px  --seam-shift: 2.6%
  --header-x: 30px  --hero-x: 30px  --hero-bottom: 44px  --copy-max: 580px

>= 901px AND max-height 850px:
  --h1: 52px  --lead: 16px  --stat-val: 22px  --chip-h: 28px  --btn-h: 40px
  --header-y: 18px  --hero-bottom: 38px  (h1 margin-top 14px, lead 16px, actions 22px)

>= 901px AND max-height 720px:
  --h1: 42px  --lead: 15px  --eyebrow: 11px  --stat-val: 20px  --stat-label: 10.5px
  --chip-h: 26px  --btn-h: 36px  --header-y: 14px  --hero-bottom: 26px
  (footer padding 14px top, 18px bottom; .dial 460px)

>= 901px (desktop lock, all heights):
  html, body { height:100%; overflow:hidden }  .page { height:100dvh; overflow:hidden }

<= 900px:
  no viewport lock; vertical scroll; nav + CTA move into a burger menu:
  - header keeps .brand + <button class="burger" aria-label="Open navigation" aria-expanded="false">, three 18x1.5px bars, gap 5px
  - .menu { position:fixed; inset:0; z-index:80; background: rgba(5,5,10,0.94); backdrop-filter: blur(14px); display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding: 0 32px; gap: 26px; transform: translateY(-100%); transition: transform 0.45s var(--ease-out) }
  - .menu.open { transform: none }; holds the 3 nav links at 22px + .cta; Escape, link click, resize past 900px close
  --seam: -38deg  --seam-shift: 0%  --h1: 44px  --lead: 16px  --stat-val: 22px  (sparks: 30)
  --header-x: 24px  --hero-x: 24px  --hero-bottom: 40px  --copy-max: 100%

<= 560px:
  --seam: -44deg  --h1: 34px  --lead: 15px  --eyebrow: 10.5px  --stat-val: 19px
  --stat-label: 10.5px  --header-x: 20px  --hero-x: 20px  --hero-bottom: 32px
  stats footer stacks: grid-template-columns: 1fr; li { padding: 12px 0; text-align: left !important }
  li + li { border-left: 0; border-top: 1px solid var(--border-soft) }
  .actions { width: 100% }  .btn { flex: 1 1 100% }  .dial { display: none }   (sparks: 20)
```

---

## I. FAILURE GUARDS — never blank, never broken

1. **Dark-first:** the FIRST CSS rule is `html, body { background:#05050a !important; color:#f4f7fa }`; `<body>` carries `style="background:#05050a;color:#f4f7fa"`; a later rule restates `background: var(--bg, #05050a)`.
2. **Resting opacity is 1:** every `.appear` element's un-animated computed style is final (opacity 1, no transform, no filter); keyframes own the FROM states; `fill-mode: both` holds them only during the delay. If animation fails or JS never runs, the page renders complete and the tear shows at `--seam: -32deg` from CSS.
3. **Two-rAF entrance fallback:** after two nested `requestAnimationFrame` callbacks, for each `.appear` call `el.getAnimations({ subtree:false })`; if none reports "running"/"finished", add `.is-in` to ALL `.appear`. Without `getAnimations`, sweep unconditionally. `.is-in { animation:none !important; opacity:1 !important; transform:none !important; filter:none !important; clip-path:none !important }` — except `.rift-frame.is-in`, which keeps `transform: translate(-50%,-50%) rotate(var(--seam))`.
4. **Canvas fallback:** if `canvas.getContext("2d")` is null, add `.no-canvas` to `<html>`, push `"canvas-unavailable"` into `errors`, hide `#sparks`; the seam stays rendered.
5. **Reduced motion:** inside `@media (prefers-reduced-motion: reduce)`: `*, *::before, *::after { transition:none !important; animation:none !important }`; `.appear` forced to `opacity:1 !important; transform:none !important; filter:none !important`; `.rift-frame` frozen at `translate(-50%,-50%) rotate(-32deg)`; `.chroma-blobs`, `.chroma-sheen`, `.dial` at rest; `.grain`/`.shard` `display:none`; seam opacity 1. Sparks paint ONE frame at `t = 0` (46 sprites at `s0`) then stop; `ready` still true, `frames` stops at 1. No pointer listener; nothing moves.
6. **Contrast floor:** h1 and stat values `#f4f7fa` on `#05050a`; lead `#cfd8e3` over the scrim; labels `#5d6674` at 11.5px uppercase, ≥ 4.5:1; no text below opacity 0.86.
7. **Zero console output:** no `console` calls, no thrown exceptions; every canvas and DOM call guarded.

---

## J. THE EXACT JS (one IIFE at end of body)

1. **Telemetry first:** `window.__DEMO__ = { name: 'rift', ready: false, frames: 0, effects: [], errors: [] };`, push `'diagonal-tear'`, `'seam-glow'`, `'world-parallax'`, `'rift-sparks'`, `'film-grain'` into `effects`, then `addEventListener('error', e => window.__DEMO__.errors.push(String(e.message || e)))`.
2. **State:** cache `root`, `canvas`, `ctx` (null -> Guard 4), `w = innerWidth`, `h = innerHeight`; `seamCur = seamTgt = -32`; `pxm, pym, pxc, pyc` and targets at 0; `lastMove = -1e9`; `buildSprite()` builds the B5 sprite in a closure.
3. **Sparks:** the LCG (seed 20260731) fills `{ s0, speed, dir, lat0, life, scale, phase }`; count `w <= 560 ? 20 : (w <= 900 ? 30 : 46)`, rebuilt on resize. `drawSparks(t)` clears, sets `globalCompositeOperation = 'lighter'`, then per spark `s = (s0 + dir * speed * t / 6) % 1`, `lifeK = ((t + phase) % life) / life`, `lateral = lat0 * (1 - lifeK)`, `alpha = sin(lifeK * PI)`, one `drawImage`, then `'source-over'`.
4. **Pointer:** `addEventListener('pointermove', onMove, { passive:true })` sets `nx = (e.clientX / w) * 2 - 1`, `ny = (e.clientY / h) * 2 - 1`, `seamTgt = clamp(-32 + nx * 6.5 - ny * 2.5, -44, -20)`, `pxmTgt = nx * -18`, `pymTgt = ny * -14`, `pxcTgt = nx * 26`, `pycTgt = ny * 20`, `lastMove = now`. Past `2600ms` idle, `seamTgt = -32 + sin(now * 0.00016) * 2.2` and all four targets ease to 0.
5. **Loop:** one `requestAnimationFrame` tick — increment `frames` by exactly 1; lerp the five values by `0.09`; write `--seam`, `--px-m`, `--py-m`, `--px-c`, `--py-c` on `root` ONLY when a value moved over `0.02` (2-decimal strings); call `drawSparks(seconds)`; set `ready = true` after the first paint. While `document.hidden`, skip paint and var writes, keep the loop alive.
6. **Resize:** one boolean `resizeQueued` + `requestAnimationFrame`, no timers; `resizeCanvas()` implements the B6 budget and rebuilds the spark array. No `getBoundingClientRect` in the file.
7. **Entrance fallback:** two nested rAFs, the `getAnimations` check, the `.is-in` sweep (Guard 3).
8. **Mobile menu (`<= 900px`):** burger click toggles `.menu.open` and `aria-expanded`; Escape, link click, resize past 900px close it.
9. **Reduced motion:** read `matchMedia('(prefers-reduced-motion: reduce)')` once; if it matches, skip the pointer listener, draw `drawSparks(0)` once, set `ready`, count that frame, stop.

No other JS. No libraries. No timers. No console calls.

---

TECHNICAL CONTRACT (non-negotiable):

1. Deliver ONE single file: a complete, valid `index.html`. No build step, no bundler,
   no framework, no package install. It must open correctly by double-clicking the file
   and also over http://.
2. Vanilla only. No React, no Tailwind CDN, no GSAP, no Three.js, no jQuery, no Lottie.
   Plain HTML + CSS + modern JavaScript in <style> and <script> tags.
3. NO external media. No .mp4, no .webm, no .gif, no remote images, no base64 blobs of
   photos. Every visual must be generated procedurally with CSS gradients, SVG, or
   <canvas>. This keeps the page free to host and impossible to break with a dead link.
4. Google Fonts is the ONLY permitted network request, and it must be declared with a
   <link rel="preconnect"> plus a system-font fallback stack so the page still looks
   intentional offline. If you prefer, skip it and use a pure system stack.
5. Responsive and correct at 390x844 (phone), 768x1024 (tablet) and 1440x900 (desktop).
   No horizontal scrollbar at any of those widths. Nothing may overflow its container.
6. Accessibility: exactly one <h1>; real <header>/<main>/<footer>/<nav> landmarks; every
   interactive element is a <button> or <a> with an accessible name; visible :focus-visible
   ring; body text contrast ratio >= 4.5:1 against its background.
7. Motion safety: wrap all continuous motion in
   `@media (prefers-reduced-motion: reduce)` rules that reduce it to a static or
   near-static state. The page must remain fully readable and usable with motion off.
8. Performance: no layout thrash. Cache DOM reads, batch writes inside a single
   requestAnimationFrame loop, use transform/opacity for animation, and never allocate
   inside the hot loop. Target 60fps on a 2019 laptop. Total file under 90 KB.
9. Runtime telemetry hook (used by the automated verifier — implement it exactly):
   at the top of your script define
     window.__DEMO__ = { name: '<slug>', ready: false, frames: 0, effects: [], errors: [] };
   then set `ready = true` after the first paint of your main effect, increment
   `frames` once per animation frame inside your rAF loop, and push the name of each
   implemented effect into `effects`. Add a `window.addEventListener('error', ...)`
   handler that pushes messages into `errors`. Do not rename these fields.
10. Zero console output in the happy path. No console.log left behind. No uncaught
    exceptions, no failed network requests.

RESPONSE FORMAT:
Return ONLY the raw HTML inside a single ```html fenced code block. No explanation, no
preamble, no commentary before or after the fence. The file must be complete and
immediately runnable — never truncate, never write "// rest of code here".
```

---

*LandingPagePrompts Prompt Library — free, verified, model-attributed.*
