Files
patriothacks/e2e/openmotion/compositions/promo.html
T
OmO Orchestrator f2764769a8 fix(promo-video): drop frozen-frame ledger motif for real per-app footage (full-v11)
Per explicit feedback on full-v10: the "SIGNED EVENT LOG - LIVE" terminal
panel (hex hash, type/fields JSON line, blinking cursor) and the per-app
frozen-still hold are both gone.

- buildComposition.mjs: removed layoutAppStage's static-snapshot hold +
  extractAppClips() entirely; each app's window now plays its own real
  captured clip continuously. Per-app text is a single large/bold/short
  plain-language headline with an optional small event-type pill - no
  hash/JSON/monospace anywhere.
- tour.mjs: added app-<id>-start/-end marks around all 13 mini-apps plus
  a linger() helper (real scroll + :hover motion, never a held frame) so
  a from-scratch recapture can give each app a dedicated, longer real clip.
  Also fixed a real flake: ShellLayout's boot-time auto-seed means the
  Admin page's demo-load status now usually reads "already loaded", not
  "Demo data loaded" - the beat's waitFor accepts both.
- capture.mjs: CLIP_SPEC slices one real clip per mini-app via the new
  marks (replacing the old 3 giant per-act blobs) for that recapture path.
- src/lib/farms.ts: fixed a real LP-solver bug surfaced while recapturing -
  a crop with kWhPerM2: 0 under any positive energyBudgetKwh produced a
  false "infeasible" (an all-zero-coefficient constraint row breaks
  javascript-lp-solver's simplex solve). Now the energy constraint is only
  added when some eligible crop actually draws power. Regression test added.

SHIP-NOW NOTE: the from-scratch recapture (dedicated 8-12s real dwell per
app) hit an additional intermittent Health Post hang under deadline
pressure; full-v11 instead reuses the already-captured, already-verified
act1/act2/act3 footage, playing each app's own real sub-window
continuously (old, shorter per-app dwell - disclosed, not padded with any
hold). A true recapture with longer dwell is the follow-up.
2026-11-20 23:09:46 -05:00

433 lines
34 KiB
HTML

<template>
<style>
* { margin:0; padding:0; box-sizing:border-box; }
#root { position:absolute; inset:0; overflow:hidden; background:#05070d;
font-family:-apple-system,'Helvetica Neue','Segoe UI',Arial,sans-serif; color:#fff; }
/* ---- Field panels: the color journey behind the phone (crossfaded). ---- */
.field { position:absolute; inset:0; z-index:5; }
#fieldwrap { position:absolute; inset:0; z-index:5; }
/* ---- Phone stage ---- */
#stage { position:absolute; inset:0; z-index:10; perspective:1800px; }
#phoneRig { position:absolute; left:753.317px; top:94px; width:413.366px; height:876px;
transform-origin:50% 50%; transform-style:preserve-3d; will-change:transform; }
#phoneShadow { position:absolute; left:50%; top:856px; width:475.371px; height:70px;
transform:translateX(-50%); background:radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.22) 46%, transparent 72%); filter:blur(8px); }
#device { position:absolute; inset:0; border-radius:40px;
background:linear-gradient(155deg,#2a3346 0%,#141b29 48%,#0a0f18 100%);
box-shadow:0 2px 2px rgba(255,255,255,0.10) inset, 0 -2px 6px rgba(0,0,0,0.5) inset,
0 50px 100px rgba(0,0,0,0.6), 0 14px 36px rgba(0,0,0,0.5), 0 0 0 1px rgba(130,160,210,0.14); }
.screen { position:absolute; inset:8px; border-radius:30px; overflow:hidden; background:#000; }
.screen-vid { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
/* ---- Per-act side text: large/short app-store-feature-callout, no
terminal/code motif anywhere. ---- */
.stagetext { position:absolute; top:0; bottom:0; z-index:12; display:flex; flex-direction:column; justify-content:center;
width:760px; padding:0 70px; will-change:opacity,transform; }
.stagetext.left { left:0; align-items:flex-start; text-align:left; }
.stagetext.right { right:0; align-items:flex-start; text-align:left; }
.stagetext.top { left:50%; top:54px; bottom:auto; transform:translateX(-50%); width:1100px; align-items:center; text-align:center; padding:0; }
.st-eyebrow { color:#8fb6ff; letter-spacing:0.42em; font-size:19px; font-weight:700; text-transform:uppercase; }
.st-title { color:#f5f8ff; font-size:46px; font-weight:800; letter-spacing:-0.02em; line-height:1.06; margin-top:14px; text-shadow:0 2px 24px rgba(5,15,40,0.6); }
.stagetext.top .st-title { font-size:38px; }
/* .app-stack is a fixed-height slot: every app's callout sits absolutely
at the same spot so only ONE mini-app's text is ever on screen at
once, in exact sync with that app's own real clip window. */
.app-stack { position:relative; min-height:230px; width:100%; margin-top:18px; }
.app-entry { position:absolute; left:0; right:0; top:0; }
.app-label { color:#8fb6ff; font-size:20px; font-weight:800; letter-spacing:0.14em; text-transform:uppercase; }
.app-headline { color:#f8faff; font-size:50px; font-weight:800; letter-spacing:-0.015em; line-height:1.14;
margin-top:12px; text-shadow:0 4px 28px rgba(5,15,40,0.55); }
.app-type { margin-top:20px; display:inline-block; color:#bcd6ff; font-size:15px; font-weight:700;
letter-spacing:0.04em; background:rgba(22,119,255,0.16); border:1px solid rgba(143,182,255,0.3);
border-radius:999px; padding:7px 16px; }
/* ---- Chapter cards: full-screen solid bold color + capsule headline. ---- */
.chapter { position:absolute; inset:0; z-index:30; display:flex; flex-direction:column; align-items:center; justify-content:center;
text-align:center; padding:0 80px; pointer-events:none; will-change:opacity; }
.chapter .ch-eyebrow { color:rgba(255,255,255,0.82); letter-spacing:0.5em; font-size:22px; font-weight:700; text-transform:uppercase; }
.chapter.dark .ch-eyebrow { color:rgba(20,20,24,0.72); }
.ch-head { margin-top:26px; max-width:1400px; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:16px 20px; }
.ch-lead { display:inline-flex; flex-wrap:wrap; gap:0 22px; }
.ch-lead .cw { color:#fff; font-size:96px; font-weight:800; letter-spacing:-0.03em; line-height:1.0; }
.chapter.dark .ch-lead .cw { color:#17181c; }
.ch-cap { display:inline-block; font-size:96px; font-weight:800; letter-spacing:-0.03em; line-height:1.0;
padding:4px 36px 12px; border-radius:999px; box-shadow:0 22px 54px rgba(0,0,0,0.35); }
.ch-sub { margin-top:40px; max-width:1040px; color:rgba(255,255,255,0.92); font-size:27px; font-weight:500; line-height:1.45; }
.chapter.dark .ch-sub { color:rgba(20,20,24,0.8); }
/* ---- Full-screen sections (data open, wall). ---- */
.section { position:absolute; inset:0; z-index:34; display:flex; flex-direction:column; align-items:center; justify-content:center;
text-align:center; padding:0 80px; will-change:opacity; }
.data-kicker { color:rgba(255,255,255,0.86); letter-spacing:0.46em; font-size:22px; font-weight:700; text-transform:uppercase; }
.data-num { margin-top:6px; }
#data-count { font-size:260px; font-weight:800; letter-spacing:-0.04em; line-height:0.98; color:#fff; text-shadow:0 10px 60px rgba(0,30,90,0.45); }
.data-sub { margin-top:4px; color:rgba(255,255,255,0.92); font-size:30px; font-weight:500; }
.bars { margin-top:44px; width:640px; display:flex; flex-direction:column; gap:16px; }
.bar-top { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:7px; }
.bar-k { color:rgba(255,255,255,0.92); font-size:20px; font-weight:700; letter-spacing:0.04em; }
.bar-v { color:#fff; font-size:22px; font-weight:800; }
.bar-track { height:14px; border-radius:999px; background:rgba(255,255,255,0.18); overflow:hidden; }
.bar-fill { height:100%; border-radius:999px; background:#fff; transform-origin:left center; }
.data-hook { margin-top:46px; color:#fff; font-size:40px; font-weight:700; }
.hook-cap { display:inline-block; background:#05070d; color:#6fb0ff; padding:2px 22px 8px; border-radius:999px; }
/* ---- Result wall ---- */
.wall { justify-content:center; }
.wall-kicker { color:#fff; letter-spacing:0.08em; font-size:40px; font-weight:800; margin-bottom:26px; text-shadow:0 6px 30px rgba(0,20,70,0.4); }
.wall-grid { display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-start; gap:18px; max-width:1180px; }
.tile { position:relative; width:206px; height:296px; border-radius:16px; overflow:hidden; background:#0b1322;
box-shadow:0 20px 44px rgba(0,0,0,0.4); border:1px solid rgba(255,255,255,0.14); will-change:opacity,transform; }
.tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:top center; display:block; }
.tile-label { position:absolute; left:0; right:0; bottom:0; padding:22px 10px 9px; font-size:15px; font-weight:800; color:#fff;
background:linear-gradient(to top, rgba(3,8,20,0.98) 0%, rgba(3,8,20,0.9) 42%, rgba(3,8,20,0) 100%); text-shadow:0 1px 4px rgba(0,0,0,0.8); text-align:center; }
.lockup { position:absolute; inset:0; z-index:2; display:flex; flex-direction:column; align-items:center; justify-content:center;
background:radial-gradient(900px 620px at 50% 46%, rgba(8,40,110,0.62) 0%, rgba(8,40,110,0) 70%); }
.lock-eyebrow { color:#bcd6ff; letter-spacing:0.5em; font-size:22px; font-weight:700; text-transform:uppercase; }
.lock-title { color:#fff; font-size:150px; font-weight:800; letter-spacing:-0.03em; line-height:1.0; margin-top:14px; text-shadow:0 12px 60px rgba(0,20,80,0.5); }
.lock-sub { color:rgba(255,255,255,0.94); font-size:28px; font-weight:500; margin-top:22px; max-width:1040px; line-height:1.45; }
.assembly-frame { position:absolute; z-index:20; left:370px; right:370px; top:250px; bottom:170px;
border-radius:28px; overflow:hidden; background:#000; border:1px solid rgba(196,168,255,0.26);
box-shadow:0 60px 120px rgba(0,0,0,0.55), 0 20px 48px rgba(0,0,0,0.45), 0 0 0 1px rgba(140,110,255,0.08) inset;
will-change:opacity; }
.assembly { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
</style>
<div id="root" data-composition-id="promo" data-width="1920" data-height="1080" data-duration="76.28">
<div id="fieldwrap">
<div class="field" id="field-act1" style="background:radial-gradient(1200px 820px at 70% 30%,#123a6b 0%,#081c3a 60%,#05101f 100%);opacity:0;"></div>
<div class="field" id="field-act2" style="background:radial-gradient(1200px 820px at 50% 24%,#1a2330 0%,#0d1117 62%,#06080c 100%);opacity:0;"></div>
<div class="field" id="field-act3" style="background:radial-gradient(1200px 820px at 30% 30%,#1b2a66 0%,#10163a 60%,#080b22 100%);opacity:0;"></div>
<div class="field" id="field-epilogue" style="background:radial-gradient(1200px 820px at 50% 28%,#2c1a56 0%,#1a1030 60%,#0d0820 100%);opacity:0;"></div>
<div class="field" id="field-assembly" style="background:radial-gradient(900px 640px at 50% 56%,#4a2a86 0%,#241a52 55%,#0d0820 100%);opacity:0;"></div>
</div>
<div id="stage">
<div id="phoneRig">
<div id="phoneShadow"></div>
<div id="device">
<div class="screen">
<video class="screen-vid" id="vid-intro" src="assets/intro.mp4" data-start="9.100" data-media-start="0.000" data-duration="2.630" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-waterwatch" src="assets/act1.mp4" data-start="11.730" data-media-start="1.970" data-duration="5.630" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-fairshare" src="assets/act1.mp4" data-start="17.360" data-media-start="7.950" data-duration="0.850" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-tunnelsafety" src="assets/act1.mp4" data-start="18.210" data-media-start="9.250" data-duration="0.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-findfamily" src="assets/act1.mp4" data-start="19.010" data-media-start="10.400" data-duration="1.400" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-farms" src="assets/act2.mp4" data-start="22.510" data-media-start="2.400" data-duration="0.900" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-housing" src="assets/act2.mp4" data-start="23.410" data-media-start="4.800" data-duration="3.700" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-mentor" src="assets/act2.mp4" data-start="27.110" data-media-start="9.400" data-duration="1.400" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-healthpost" src="assets/act2.mp4" data-start="28.510" data-media-start="11.200" data-duration="3.100" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-lightclock" src="assets/act2.mp4" data-start="31.610" data-media-start="14.800" data-duration="0.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-theclimb" src="assets/act2.mp4" data-start="32.410" data-media-start="16.800" data-duration="3.500" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-qvballot" src="assets/act3.mp4" data-start="38.010" data-media-start="0.500" data-duration="7.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-fairdraw" src="assets/act3.mp4" data-start="45.810" data-media-start="8.900" data-duration="2.500" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-sky" src="assets/act3.mp4" data-start="48.310" data-media-start="13.200" data-duration="5.600" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-epilogue" src="assets/epilogue.mp4" data-start="56.010" data-media-start="0.000" data-duration="6.800" style="opacity:0;" muted playsinline></video>
</div>
</div>
</div>
</div>
<div class="stagetext left" id="text-act1" style="opacity:0;">
<div class="st-eyebrow">Act I</div>
<div class="app-stack">
<div class="app-entry" id="entry-act1-0" style="opacity:0;">
<div class="app-label">Water Watch</div>
<div class="app-headline">Catches bad water before anyone drinks it.</div>
<div class="app-type">waterwatch.reading.report</div>
</div>
<div class="app-entry" id="entry-act1-1" style="opacity:0;">
<div class="app-label">Fair Share</div>
<div class="app-headline">Splits power, water, and food fairly, automatically.</div>
<div class="app-type">fairshare.need</div>
</div>
<div class="app-entry" id="entry-act1-2" style="opacity:0;">
<div class="app-label">Tunnel Safety</div>
<div class="app-headline">Reports a blocked tunnel so everyone reroutes instantly.</div>
<div class="app-type">tunnelsafety.hazard.report</div>
</div>
<div class="app-entry" id="entry-act1-3" style="opacity:0;">
<div class="app-label">Find Family</div>
<div class="app-headline">Finds missing family, privately. No one else sees your search.</div>
</div>
</div>
</div>
<div class="stagetext right" id="text-act2" style="opacity:0;">
<div class="st-eyebrow">Act II</div>
<div class="app-stack">
<div class="app-entry" id="entry-act2-0" style="opacity:0;">
<div class="app-label">Farms</div>
<div class="app-headline">Plans crops from real weather and power data.</div>
<div class="app-type">fairshare.contribution</div>
</div>
<div class="app-entry" id="entry-act2-1" style="opacity:0;">
<div class="app-label">Housing</div>
<div class="app-headline">Assigns rooms fairly — and remembers who got shorted.</div>
<div class="app-type">housing.space.report</div>
</div>
<div class="app-entry" id="entry-act2-2" style="opacity:0;">
<div class="app-label">Mentor</div>
<div class="app-headline">Matches you with a mentor before a skill is lost.</div>
<div class="app-type">mentor.match</div>
</div>
<div class="app-entry" id="entry-act2-3" style="opacity:0;">
<div class="app-label">Health Post</div>
<div class="app-headline">Triages symptoms, then signs a referral to a clinician.</div>
<div class="app-type">healthpost.referral</div>
</div>
<div class="app-entry" id="entry-act2-4" style="opacity:0;">
<div class="app-label">Light Clock</div>
<div class="app-headline">Tracks your sleep rhythm without sunlight — no sensor required.</div>
</div>
<div class="app-entry" id="entry-act2-5" style="opacity:0;">
<div class="app-label">The Climb</div>
<div class="app-headline">Schedules the climb to the surface so no crowd crush happens.</div>
<div class="app-type">theclimb.plan.propose</div>
</div>
</div>
</div>
<div class="stagetext left" id="text-act3" style="opacity:0;">
<div class="st-eyebrow">Act III</div>
<div class="app-stack">
<div class="app-entry" id="entry-act3-0" style="opacity:0;">
<div class="app-label">Assembly</div>
<div class="app-headline">Keeps votes and lotteries running — network or not.</div>
<div class="app-type">governance.qvBallot</div>
</div>
<div class="app-entry" id="entry-act3-1" style="opacity:0;">
<div class="app-label">Fair Draw</div>
<div class="app-headline">Runs a lottery no one can rig.</div>
<div class="app-type">fairdraw.commit</div>
</div>
<div class="app-entry" id="entry-act3-2" style="opacity:0;">
<div class="app-label">Sky</div>
<div class="app-headline">A shared mood board for the whole shelter.</div>
<div class="app-type">sky.morale.pulse</div>
</div>
</div>
</div>
<div class="stagetext right" id="text-epilogue" style="opacity:0;">
<div class="st-eyebrow">Epilogue</div>
<div class="app-stack">
<div class="app-entry" id="entry-epilogue-0" style="opacity:0;">
<div class="app-label">Wallet</div>
<div class="app-headline">Every balance re-checks its own signature — nothing on faith.</div>
<div class="app-type">wallet.transfer</div>
</div>
<div class="app-entry" id="entry-epilogue-1" style="opacity:0;">
<div class="app-label">Upload</div>
<div class="app-headline">Any resident can ship a mini-app. No gatekeeper.</div>
</div>
</div>
</div>
<div class="assembly-frame" id="assembly-frame" style="opacity:0;">
<video class="assembly" id="vid-assembly" src="assets/assembly.mp4" data-start="62.310" data-media-start="0" data-duration="7.270" muted playsinline></video>
</div>
<div class="stagetext top" id="text-assembly" style="opacity:0;">
<div class="st-eyebrow">Live Capture &middot; Two Devices</div>
<div class="st-title">Two devices. One signed log. A real network partition, and a real heal.</div>
</div>
<div class="section" id="data" style="background:linear-gradient(150deg,#1a7bff 0%,#0f62d8 55%,#0a46a6 100%);opacity:0;">
<div class="data-kicker">The Hollow &middot; live seed data</div>
<div class="data-num"><span id="data-count" data-to="4200">0</span></div>
<div class="data-sub">residents in one shelter &mdash; two billion live beneath a dead surface</div>
<div class="bars">
<div class="bar"><div class="bar-top"><span class="bar-k">Power</span><span class="bar-v" data-to="850">0</span></div><div class="bar-track"><div class="bar-fill" style="transform:scaleX(0);width:100.00%;"></div></div></div>
<div class="bar"><div class="bar-top"><span class="bar-k">Water</span><span class="bar-v" data-to="620">0</span></div><div class="bar-track"><div class="bar-fill" style="transform:scaleX(0);width:72.94%;"></div></div></div>
<div class="bar"><div class="bar-top"><span class="bar-k">Food</span><span class="bar-v" data-to="410">0</span></div><div class="bar-track"><div class="bar-fill" style="transform:scaleX(0);width:48.24%;"></div></div></div>
<div class="bar"><div class="bar-top"><span class="bar-k">Cooling</span><span class="bar-v" data-to="300">0</span></div><div class="bar-track"><div class="bar-fill" style="transform:scaleX(0);width:35.29%;"></div></div></div>
</div>
<div class="data-hook">Their systems are failing. The Commons is how they <span class="hook-cap">fight back</span>.</div>
</div>
<div class="chapter" id="ch-act1" style="background:linear-gradient(150deg,#1657c8 0%,#0c346f 100%);opacity:0;">
<div class="ch-eyebrow">Act I</div>
<div class="ch-head">
<span class="ch-lead"><span class="cw">A</span> <span class="cw">Crisis,</span></span>
<span class="ch-cap" style="background:#1677FF;color:#fff;">Verified Twice</span>
</div>
<div class="ch-sub">Bad water, blackouts and flooded tunnels hit the deep levels first. The Commons catches the water before anyone drinks it, splits what's left, and reroutes around the flood.</div>
</div>
<div class="chapter dark" id="ch-act2" style="background:linear-gradient(150deg,#ffb020 0%,#f58a10 100%);opacity:0;">
<div class="ch-eyebrow">Act II</div>
<div class="ch-head">
<span class="ch-lead"><span class="cw">Keeping</span> <span class="cw">the</span> <span class="cw">Hollow</span></span>
<span class="ch-cap" style="background:#101418;color:#ffcf4d;">Alive</span>
</div>
<div class="ch-sub">Food cut off, rooms meant for one, medicine gone, a life with no sun. The Commons grows, assigns, triages and measures what the Directorate won't.</div>
</div>
<div class="chapter" id="ch-act3" style="background:linear-gradient(150deg,#13a085 0%,#0a5f50 100%);opacity:0;">
<div class="ch-eyebrow">Act III</div>
<div class="ch-head">
<span class="ch-lead"><span class="cw">Who</span></span>
<span class="ch-cap" style="background:#063f36;color:#9bffe6;">Decides</span>
</div>
<div class="ch-sub">The Directorate controls the network and can shut it down. The Commons keeps the vote running, the lottery honest, and the Hollow's real mood in the open.</div>
</div>
<div class="chapter" id="ch-epi" style="background:linear-gradient(150deg,#7a52e8 0%,#4b2fb0 100%);opacity:0;">
<div class="ch-eyebrow">Epilogue</div>
<div class="ch-head">
<span class="ch-lead"><span class="cw">Trust,</span> <span class="cw">Made</span></span>
<span class="ch-cap" style="background:#2e1a63;color:#d8c6ff;">Verifiable</span>
</div>
<div class="ch-sub">No server underground to take on faith. Every balance re-checks its own signature - and any resident can ship a new mini-app, no gatekeeper required.</div>
</div>
<div class="section wall" id="wall" style="background:linear-gradient(160deg,#1a7bff 0%,#0e55c0 55%,#0a327e 100%);opacity:0;">
<div class="wall-kicker" id="wall-kicker">One answer. More than one problem.</div>
<div class="wall-grid">
<div class="tile" id="tile-0" style="opacity:0;"><img src="assets/wall/main-03-waterwatch-no-false-alert.png" alt=""><span class="tile-label">Water Watch</span></div>
<div class="tile" id="tile-1" style="opacity:0;"><img src="assets/wall/main-07-fairshare-water.png" alt=""><span class="tile-label">Fair Share</span></div>
<div class="tile" id="tile-2" style="opacity:0;"><img src="assets/wall/main-11-farms-forecast.png" alt=""><span class="tile-label">Farms</span></div>
<div class="tile" id="tile-3" style="opacity:0;"><img src="assets/wall/main-13-housing.png" alt=""><span class="tile-label">Housing</span></div>
<div class="tile" id="tile-4" style="opacity:0;"><img src="assets/wall/main-16-mentor.png" alt=""><span class="tile-label">Mentor</span></div>
<div class="tile" id="tile-5" style="opacity:0;"><img src="assets/wall/main-18-healthpost-triage.png" alt=""><span class="tile-label">Health Post</span></div>
<div class="tile" id="tile-6" style="opacity:0;"><img src="assets/wall/main-20-lightclock-manual-fallback.png" alt=""><span class="tile-label">Light Clock</span></div>
<div class="tile" id="tile-7" style="opacity:0;"><img src="assets/wall/main-22-theclimb.png" alt=""><span class="tile-label">The Climb</span></div>
<div class="tile" id="tile-8" style="opacity:0;"><img src="assets/wall/main-08-tunnelsafety.png" alt=""><span class="tile-label">Tunnel Safety</span></div>
<div class="tile" id="tile-9" style="opacity:0;"><img src="assets/wall/main-09-findfamily.png" alt=""><span class="tile-label">Find Family</span></div>
<div class="tile" id="tile-10" style="opacity:0;"><img src="assets/wall/main-28-assembly-qv-tally.png" alt=""><span class="tile-label">Assembly</span></div>
<div class="tile" id="tile-11" style="opacity:0;"><img src="assets/wall/main-30-fairdraw-reveal.png" alt=""><span class="tile-label">Fair Draw</span></div>
<div class="tile" id="tile-12" style="opacity:0;"><img src="assets/wall/main-33-sky-post.png" alt=""><span class="tile-label">Sky</span></div>
</div>
<div class="lockup" id="lockup" style="opacity:0;">
<div class="lock-eyebrow">Built in 36 hours</div>
<div class="lock-title">The Commons</div>
<div class="lock-sub">One signed wallet, one shared record - every civic problem in the Hollow gets a real answer.</div>
</div>
</div>
<audio id="ambient" src="assets/ambient.mp3" data-start="0" data-media-start="0" data-duration="76.28" data-volume="0.3"></audio>
</div>
<script>
const tl = gsap.timeline({ paused: true });
const F = 0.5; // crossfade length
// Count-up helper driven by the paused timeline (fires on seek-scrub).
function countUp(sel, to, at, dur) {
const node = document.querySelector(sel);
const proxy = { v: 0 };
tl.to(proxy, { v: to, duration: dur, ease: 'power2.out',
onUpdate: () => { node.textContent = Math.round(proxy.v).toLocaleString('en-US'); } }, at);
}
// ---------- DATA OPEN ----------
const D = { start: 0, end: 7 };
// Data section is opaque from the very first frame (clean blue opener, no
// black/phone peek), then crossfades out into chapter 1.
tl.set('#data', { opacity: 1 }, 0);
tl.to('#data', { opacity: 0, duration: F, ease: 'power2.in' }, D.end - F);
// Slow continuous breath so no hold is a frame-identical run.
tl.fromTo('#data', { scale: 1 }, { scale: 1.02, duration: D.end, ease: 'sine.inOut' }, 0);
tl.fromTo('#data .data-kicker', { opacity: 0, y: 14 }, { opacity: 1, y: 0, duration: 0.5, ease: 'power2.out' }, D.start + 0.2);
tl.fromTo('#data-count', { opacity: 0, scale: 0.9 }, { opacity: 1, scale: 1, duration: 0.5, ease: 'back.out(1.6)' }, D.start + 0.45);
countUp('#data-count', 4200, D.start + 0.5, 1.7);
tl.fromTo('#data .data-sub', { opacity: 0, y: 12 }, { opacity: 1, y: 0, duration: 0.5, ease: 'power2.out' }, D.start + 1.7);
tl.fromTo('#data .bar', { opacity: 0, y: 14 }, { opacity: 1, y: 0, duration: 0.45, stagger: 0.12, ease: 'power2.out' }, D.start + 2.3);
tl.fromTo('#data .bar-fill', { scaleX: 0 }, { scaleX: 1, duration: 0.8, stagger: 0.12, ease: 'power3.out' }, D.start + 2.4);
document.querySelectorAll('#data .bar-v').forEach((el) => {
countUp('#data .bar-v[data-to="' + el.getAttribute('data-to') + '"]', Number(el.getAttribute('data-to')), D.start + 2.4, 0.9);
});
tl.fromTo('#data .data-hook', { opacity: 0, y: 16 }, { opacity: 1, y: 0, duration: 0.6, ease: 'power2.out' }, D.start + 4.3);
tl.fromTo('#data .hook-cap', { scale: 0.5, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.5, ease: 'back.out(2)' }, D.start + 4.8);
// ---------- FIELD PANELS (color journey) ----------
const STAGES = [{"id":"act1","start":9.1,"end":20.41,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-7},"textSide":"left","entryAts":[2.63,8.26,9.11,9.91]},{"id":"act2","start":22.51,"end":35.91,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":9},"textSide":"right","entryAts":[0,0.9,4.6,6,9.1,9.9]},{"id":"act3","start":38.01,"end":53.91,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-9},"textSide":"left","entryAts":[0,7.8,10.3]},{"id":"epilogue","start":56.01,"end":62.81,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":7},"textSide":"right","entryAts":[0.3,2.2]}];
for (const s of STAGES) {
tl.fromTo('#field-' + s.id, { opacity: 0 }, { opacity: 1, duration: F, ease: 'power1.out' }, s.start - F);
tl.to('#field-' + s.id, { opacity: 0, duration: F, ease: 'power1.in' }, s.end - F);
}
// ---------- PHONE STAGE (per-act framing) ----------
const CLIPS = [{"key":"intro","start":9.1,"duration":2.63},{"key":"waterwatch","start":11.73,"duration":5.63},{"key":"fairshare","start":17.36,"duration":0.85},{"key":"tunnelsafety","start":18.21,"duration":0.8},{"key":"findfamily","start":19.01,"duration":1.4},{"key":"farms","start":22.51,"duration":0.9},{"key":"housing","start":23.41,"duration":3.7},{"key":"mentor","start":27.11,"duration":1.4},{"key":"healthpost","start":28.51,"duration":3.1},{"key":"lightclock","start":31.61,"duration":0.8},{"key":"theclimb","start":32.41,"duration":3.5},{"key":"qvballot","start":38.01,"duration":7.8},{"key":"fairdraw","start":45.81,"duration":2.5},{"key":"sky","start":48.31,"duration":5.6},{"key":"epilogue","start":56.01,"duration":6.8}];
// Explicit opacity control for every screen-vid layer: belt-and-
// suspenders over hyperframes' own automatic data-start/data-duration
// windowing, which was observed to let a stale/adjacent element's frame
// bleed through once this composition grew past a dozen stacked video
// elements sharing a handful of source files. Each clip is visible ONLY
// for its own authored window and plays its FULL real length,
// continuously - no hold/freeze of any kind.
for (const c of CLIPS) {
tl.set('#vid-' + c.key, { opacity: 1 }, c.start);
tl.set('#vid-' + c.key, { opacity: 0 }, c.start + c.duration);
}
// The phone stage stays mounted the whole time; opaque overlays (chapters
// z30, sections z34, assembly z20) cover it except during the acts, so no
// per-act show/hide juggling is needed - just reposition the rig while the
// covering chapter card is still opaque.
for (const s of STAGES) {
const tilt = s.frame.tilt || 0;
tl.set('#phoneRig', { x: s.frame.x, y: s.frame.y, scale: s.frame.scale, rotationY: tilt }, Math.max(0, s.start - 0.25));
// Gentle camera push + tilt settle across the act so no footage frame is static.
tl.fromTo('#phoneRig', { scale: s.frame.scale, rotationY: tilt }, { scale: s.frame.scale * 1.03, rotationY: tilt * 0.35, duration: s.end - s.start, ease: 'none' }, s.start);
// Side text.
const dx = s.textSide === 'right' ? 40 : (s.textSide === 'left' ? -40 : 0);
const dy = s.textSide === 'top' ? -18 : 0;
tl.fromTo('#text-' + s.id, { opacity: 0, x: dx, y: dy }, { opacity: 1, x: 0, y: 0, duration: 0.6, ease: 'power2.out' }, s.start + 0.1);
tl.to('#text-' + s.id, { opacity: 0, duration: 0.45, ease: 'power2.in' }, s.end - F);
// Each app's callout owns its own on-screen window, synced exactly to
// when that app's real clip plays: a left-to-right scan-wipe reveal
// in, then a plain fade-out right before the NEXT app's reveal begins
// - so at most one app's text is ever on screen, never a stack.
for (let i = 0; i < s.entryAts.length; i++) {
const entrySel = '#entry-' + s.id + '-' + i;
const entryStart = s.start + s.entryAts[i];
tl.fromTo(entrySel, { clipPath: 'inset(0 100% 0 0)', opacity: 0.001 },
{ clipPath: 'inset(0 0% 0 0)', opacity: 1, duration: 0.4, ease: 'power2.out' }, entryStart);
if (i < s.entryAts.length - 1) {
const nextStart = s.start + s.entryAts[i + 1];
tl.to(entrySel, { opacity: 0, duration: 0.3, ease: 'power2.in' }, nextStart - 0.3);
}
}
}
// ---------- CHAPTER CARDS ----------
const CHAPTERS = [{"id":"ch-act1","start":6.5,"end":9.6},{"id":"ch-act2","start":19.91,"end":23.01},{"id":"ch-act3","start":35.41,"end":38.51},{"id":"ch-epi","start":53.41,"end":56.51}];
for (const c of CHAPTERS) {
tl.fromTo('#' + c.id, { opacity: 0 }, { opacity: 1, duration: F, ease: 'power2.out' }, c.start);
tl.to('#' + c.id, { opacity: 0, duration: F, ease: 'power2.in' }, c.end - F);
tl.fromTo('#' + c.id + ' .ch-eyebrow', { opacity: 0, y: 16 }, { opacity: 1, y: 0, duration: 0.5, ease: 'power2.out' }, c.start + 0.15);
tl.fromTo('#' + c.id + ' .ch-lead .cw', { opacity: 0, y: 30 }, { opacity: 1, y: 0, duration: 0.5, stagger: 0.09, ease: 'power3.out' }, c.start + 0.3);
tl.fromTo('#' + c.id + ' .ch-cap', { opacity: 0, scale: 0.4 }, { opacity: 1, scale: 1, duration: 0.55, ease: 'back.out(2.2)' }, c.start + 0.62);
tl.fromTo('#' + c.id + ' .ch-sub', { opacity: 0, y: 16 }, { opacity: 1, y: 0, duration: 0.55, ease: 'power2.out' }, c.start + 0.9);
tl.fromTo('#' + c.id, { scale: 1 }, { scale: 1.02, duration: c.end - c.start, ease: 'sine.inOut' }, c.start);
}
// ---------- ASSEMBLY (framed field + caption) ----------
const A = { start: 62.31, end: 69.58 };
// The phone rig is not full-bleed-covered by the assembly frame (unlike
// the chapter/section overlays), so hide it explicitly - otherwise the
// Epilogue's last phone position peeks through the field margins.
tl.to('#phoneRig', { opacity: 0, duration: F, ease: 'power1.in' }, A.start - F);
tl.fromTo('#field-assembly', { opacity: 0 }, { opacity: 1, duration: F, ease: 'power1.out' }, A.start - F);
tl.to('#field-assembly', { opacity: 0, duration: F, ease: 'power1.in' }, A.end - F);
tl.fromTo('#assembly-frame', { opacity: 0 }, { opacity: 1, duration: F, ease: 'power1.out' }, A.start - F);
tl.to('#assembly-frame', { opacity: 0, duration: F, ease: 'power1.in' }, A.end - F);
tl.fromTo('#text-assembly', { opacity: 0, y: -18 }, { opacity: 1, y: 0, duration: 0.6, ease: 'power2.out' }, A.start + 0.3);
tl.to('#text-assembly', { opacity: 0, duration: 0.45, ease: 'power2.in' }, A.end - F);
// ---------- RESULT WALL + LOCKUP ----------
const W = { start: 69.08, end: 76.08 };
tl.fromTo('#wall', { opacity: 0 }, { opacity: 1, duration: F, ease: 'power2.out' }, W.start - F);
tl.to('#wall', { opacity: 0, duration: F, ease: 'power2.in' }, W.end - F + 0.2);
// Slow continuous push on the whole wall/lockup so the closing hold is
// never a frame-identical run.
tl.fromTo('#wall', { scale: 1 }, { scale: 1.03, duration: W.end - (W.start - F), ease: 'sine.inOut' }, W.start - F);
tl.fromTo('#wall-kicker', { opacity: 0, y: -16 }, { opacity: 1, y: 0, duration: 0.5, ease: 'power2.out' }, W.start);
tl.fromTo('#wall .tile', { opacity: 0, y: 40, scale: 0.8 }, { opacity: 1, y: 0, scale: 1, duration: 0.5, stagger: 0.06, ease: 'back.out(1.5)' }, W.start + 0.3);
// Tiles settle back and dim as the brand lockup takes over.
tl.to('#wall .wall-grid', { opacity: 0.22, scale: 0.96, duration: 0.6, ease: 'power2.inOut' }, W.start + 3.3);
tl.to('#wall-kicker', { opacity: 0, duration: 0.4, ease: 'power2.in' }, W.start + 3.3);
tl.fromTo('#lockup', { opacity: 0 }, { opacity: 1, duration: 0.5, ease: 'power2.out' }, W.start + 3.5);
tl.fromTo('#lockup .lock-eyebrow', { opacity: 0, y: 14 }, { opacity: 1, y: 0, duration: 0.5, ease: 'power2.out' }, W.start + 3.6);
tl.fromTo('#lockup .lock-title', { opacity: 0, scale: 0.86 }, { opacity: 1, scale: 1, duration: 0.6, ease: 'back.out(1.6)' }, W.start + 3.8);
tl.fromTo('#lockup .lock-sub', { opacity: 0, y: 14 }, { opacity: 1, y: 0, duration: 0.55, ease: 'power2.out' }, W.start + 4.3);
window.__timelines = window.__timelines || {};
window.__timelines.promo = tl;
</script>
</template>