# Shooting Star Animation

Motionboard shot name: Comet Through Keywords

On blue-black, a bright point with a long trail travels a curved path and lights the words see, hear, understand and create as it passes. It then streaks diagonally across the frame and bursts into the Orbit mark, which settles into the wordmark and tagline.

- Position in a launch film: Ending
- Slug: shooting-star-animation
- Preview video: https://media.motionboard.app/shooting-star.mp4
- Recipe page: https://motionboard.app/recipes/shooting-star-animation/
- License: MIT. Free to use in your own projects, including commercial launch films. https://github.com/krisyangdev/motionboard/blob/main/LICENSE

## How to use this recipe

You are a coding agent. The user wants this shot for their own product. Follow these steps.

1. **Know the product.** If the product is clear from the user's repo or conversation, ask nothing and start. Otherwise ask once for: product name, logo file, brand colors.
2. **Pick the output.** If the user's message says a video or their website, do that. Otherwise ask once which one they want.
   - **Video (HyperFrames).** Create a folder named `shooting-star`. Download every file under "Source files" below with the curl commands, keeping relative paths. Adapt `index.html` (see "What to adapt"). Run `npx --yes hyperframes@0.8.209 check` on the untouched copy first and note its result. Preview with `npx --yes hyperframes@0.8.209 preview`, render an MP4 with `npx --yes hyperframes@0.8.209 render` (into `renders/`, named with a timestamp). The same commands are in `package.json` as `dev`, `check`, `render`; pass flags after `--`, as in `npm run render -- --quality draft`. Rendering needs network access for web fonts and GSAP.
   - **Website motion.** Port the GSAP timeline in `index.html` into the user's site, using their stack (React, Vue, Svelte, plain HTML). Build the same DOM structure, keep the timeline's durations, delays and easings exactly, and start it when the element scrolls into view (IntersectionObserver or ScrollTrigger). Respect `prefers-reduced-motion: reduce`: show the final frame as a static state and skip the movement.
3. **What to adapt.**
   - **Brand layer** (product name, logo, colors, fonts, copy): replace directly with the user's.
   - **UI layer** (the product screens, cards, windows, controls shown in the shot): rebuild the user's real UI as clean DOM, from their codebase (components, design tokens) or from a screenshot used as reference only. Never paste a screenshot into the shot.
   - **Motion** (timing, easing, camera moves, layering, stagger, order of events): keep exactly as in the source. This is what the recipe is.
   - The timeline targets UI elements by id and class, and camera moves land on fixed coordinates. Keep the ids the timeline uses, keep row counts and text lengths close to the source, and when the layout moves, update the target coordinates without changing the times.
4. **Fonts.** HyperFrames fetches Google Fonts such as Inter on its own. Some sources use macOS local fonts (PingFang, Songti via `local()`). Use the user's brand font when it can be bundled; for a system font such as SF Pro, use Inter. Check that text still fits its boxes.
5. **Verify.** Compare the render with the preview video above at the beat times in the Timing row. The beats, timing and camera should match; only brand and UI content differ.

## Spec

| Item | Value |
| --- | --- |
| Timing | Film 11s. Keywords fade in dim 0.25–1.5s (0.7s each, 0.18s apart); the point enters from the left edge at about 0.6s; it passes under see at 1.8s, hear at 3.1s, understand at 4.45s and create at 5.7s; each word lights 0.3s before its pass over 0.4s; the words fade out 6.05–6.7s; the point leaves the frame at the lower left and returns as the streak at 6.4s; burst at 6.9s (0.5s streak); mark resolves 6.92–7.82s; wordmark at 7.4s (0.8s); tagline at 7.85s (0.7s); the satellite settles at 8.8s and the lockup holds to the end (2.2s) |
| Easing | Point speed is a cubic Hermite curve through timed knots (500 px/s on entry, about 650–1,250 px/s at the words, 2,000 px/s at the start of the streak, 4,300 px/s at the burst); word light-up power2.out; word scale pulse power2.out then power2.inOut; burst bloom, ring and mark expo.out; satellite power3.out; words leave power2.in |
| Camera | Locked frame, no push or pan; the only constant motion is a dot lattice drifting 7px per second and twinkling stars |
| Subject | A point with a trail drawn on a 1920x1080 canvas from the last 96 positions of a path computed from timeline time; the path is a centripetal Catmull-Rom curve through 21 control points that loops clockwise under see (500,392), hear (1420,368), understand (1280,880) and create (560,905), swings out of the frame at the lower left and ends in a straight line to the burst point (960,395). Trail span 0.55s on the tour and 0.3s on the streak; the core is 5.5px wide at the head on the tour and 8.5px on the streak, tapering to 0, in a white-to-blue fill with shadowBlur 12; the head dot has radius 11px (14px on the streak) with a soft radial glow of radius 56px (84px). The four words are Inter 600 at 124px with letter-spacing -0.04em, placed at (500,300), (1420,270), (1280,780) and (560,800); a node dot and a pulse ring mark each pass, and a thin guide line shows the path travelled. The burst is a bloom up to 490px, a shock ring up to 810px and 120 seeded particles. The mark is a 40px-radius planet core with a 96x34 ring tilted -24° and a satellite; the wordmark Orbit is Inter 700 at 164px and the tagline is Inter 500 at 38px |
| Sync | A word lights 0.3s before the point passes under it, reaches full white as the point crosses it, and keeps its glow until the words leave together; all four words are lit at the poster frame, 5.96s; the words are gone before the point re-enters; the mark appears 0.02s after the burst starts, inside the bloom, and the burst particles end before the lockup is complete |
| Style | Blue-black `#05070e` with a faint blue radial glow, one accent `#6aa9ff`; unlit words `rgba(150,170,210,0.36)`, lit words white with a blue glow; 170 seeded stars, 64px dot lattice at 55% opacity, grain at 7% opacity and a vignette |

## Why it works

A single bright point is the easiest thing for the eye to follow, so the path decides the reading order: see, hear, understand, create, in a clockwise loop. The point passes about 90px below each word's centre and never crosses the letters, so they stay readable while the word lights up, and a word that has been lit stays lit, which turns four separate words into one list by the time the point leaves. The trail length follows the speed of the point, so it is short and calm on the tour and long on the streak without any extra animation. The streak starts from a hairpin outside the frame, so the point never jumps between positions, and it ends exactly at the burst point where the mark resolves, so the logo reads as the place the light was heading. The burst is a soft bloom and a thin ring with a few particles, kept low enough that the mark and the wordmark stay legible. The whole film is on blue-black with one accent, #6aa9ff.

## Prompt

> Build an 11-second, 1920x1080, 30 fps product film called Comet Through Keywords for a fictional product, Orbit (a multimodal AI model). Use one HTML file with one paused GSAP 3.14.2 timeline, Inter for all text, and one canvas 2D layer redrawn from timeline time in an onUpdate (no requestAnimationFrame, no Date, no Math.random; use a seeded mulberry32 for stars, embers and burst particles). The frame is blue-black #05070e with a faint blue radial glow, a 64px dot lattice at 55% opacity that drifts 7px per second, 170 twinkling stars, grain at 7% opacity and a vignette. The only accent is blue #6aa9ff.
>
> Place four keywords in Inter 600, 124px, letter-spacing -0.04em, colour rgba(150,170,210,0.36): see at (500,300), hear at (1420,270), understand at (1280,780), create at (560,800). They fade in at 0.25s, 0.7s each, 0.18s apart. Define a path as a centripetal Catmull-Rom curve through control points: start (-180,640), (140,540), under see (500,392), (960,480), under hear (1420,368), (1780,470), (1810,690), (1700,850), under understand (1280,880), (930,960), under create (560,905), then a hairpin out of the frame (250,960), (-40,1020), (-230,1110), (-320,1220), (-270,1320), (-110,1300) and a straight line to the burst point (960,395). Sample the path into arc length and drive the point with a cubic Hermite speed curve through timed knots: 0.4s start at 500 px/s, 1.8s under see, 3.1s under hear, 4.45s under understand, 5.7s under create (tangents from neighbouring segment speeds), 6.4s at the start of the straight line at 2,000 px/s, 6.9s at the burst point at 4,300 px/s.
>
> Draw the trail from the last 96 positions of the point at times t minus 0.55s down to t (0.3s on the streak), as quads that taper from 5.5px at the head to 0 (8.5px on the streak), opaque white fading to blue (92,142,255), with shadowBlur 12 for the narrow glow; never use additive blending. The head is a white dot of radius 11px (14px on the streak) over a radial glow of radius 56px (84px) at low alpha. Add a thin guide line of the path travelled so far (22% opacity), a node dot and a 0.9s pulse ring at each pass point, and 90 small embers shed along the path.
>
> Each word lights 0.3s before the point passes under it: tween colour to white and text-shadow to a 40px blue glow over 0.4s (power2.out), with a scale pulse to 1.07 and back. At 6.05s the words fade out together over 0.5s with a small lift. The point leaves the frame at the lower left, returns at about 6.5s as a long diagonal streak up to the centre, and bursts at 6.9s: a soft radial bloom up to 490px that decays over 0.9s, a thin shock ring up to 810px and 120 seeded particles with short tails. The mark resolves out of the burst from 6.92s: a 40px-radius planet core with a 96x34 ring tilted -24° (the back half behind the core, the front half over it) and a small satellite that orbits once and settles by 8.8s; scale 0.5 to 1 and blur 18px to 0 over 0.9s with expo.out. Then the wordmark Orbit (Inter 700, 164px) at 7.4s and the tagline Every input. One model. (Inter 500, 38px) at 7.85s, each rising with expo.out. Nothing overlaps the words, and the lockup holds still to 11s.

## Often confused with

- [Lens Flare Effect](https://motionboard.app/r/lens-flare-effect.md): Lens Flare Effect sweeps one thin streak across a product with ghost rings opposite the source; here a point with a trail travels a curved path past four keywords and the streak ends in a logo.
- [Converging Logo Reveal](https://motionboard.app/r/converge-logo-reveal.md): Converging Logo Reveal gathers many elements into the mark; here a single point of light carries the eye past four words and the burst at the end becomes the mark.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/shooting-star/hyperframes.json (353 B)
- https://motionboard.app/source/shooting-star/index.html (21.8 KB)
- https://motionboard.app/source/shooting-star/package.json (302 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "shooting-star/hyperframes.json" "https://motionboard.app/source/shooting-star/hyperframes.json"
curl -fsSL --create-dirs -o "shooting-star/index.html" "https://motionboard.app/source/shooting-star/index.html"
curl -fsSL --create-dirs -o "shooting-star/package.json" "https://motionboard.app/source/shooting-star/package.json"
```

## index.html

```html
<!doctype html>
<html lang="en" data-resolution="landscape">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
    <style>
      :root {
        --base: #05070e;
        --ink: #f3f6fc;
        --accent: #6aa9ff;
        --font-ui: "Inter", -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
      }
      * { margin: 0; padding: 0; box-sizing: border-box; }
      html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--base); }
      #root {
        position: relative; width: 1920px; height: 1080px; overflow: hidden; background: var(--base);
        font-family: var(--font-ui); color: var(--ink); -webkit-font-smoothing: antialiased;
      }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      svg { display: block; flex: none; }

      /* ---------- backdrop ---------- */
      #bg {
        z-index: 0;
        background:
          radial-gradient(ellipse 900px 640px at 50% 46%, rgba(30, 52, 118, 0.30) 0%, rgba(12, 20, 48, 0.12) 58%, rgba(0, 0, 0, 0) 80%),
          radial-gradient(ellipse 1700px 900px at 50% 50%, rgba(14, 22, 50, 0.45) 0%, rgba(0, 0, 0, 0) 100%),
          #05070e;
      }
      #lattice {
        position: absolute; left: -100px; top: -100px; width: 2120px; height: 1280px;
        background-image: radial-gradient(circle at center, rgba(96, 140, 255, 0.34) 0 1.5px, rgba(96, 140, 255, 0) 2.3px);
        background-size: 64px 64px; background-position: 0px 0px;
        -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 15%, rgba(0, 0, 0, 0) 100%);
        mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 15%, rgba(0, 0, 0, 0) 100%);
        opacity: 0.55;
      }

      /* ---------- keywords ---------- */
      #words { z-index: 1; }
      .word {
        position: absolute; width: 0; height: 0; display: flex; align-items: center; justify-content: center;
        opacity: 0;
      }
      .word span {
        display: block; white-space: nowrap; font-weight: 600; font-size: 124px; line-height: 140px; letter-spacing: -0.04em;
        color: rgba(150, 170, 210, 0.36);
        text-shadow: rgba(110, 170, 255, 0) 0px 0px 0px, rgba(255, 255, 255, 0) 0px 0px 0px;
      }
      #w1 { left: 500px; top: 300px; }
      #w2 { left: 1420px; top: 270px; }
      #w3 { left: 1280px; top: 780px; }
      #w4 { left: 560px; top: 800px; }

      /* ---------- lockup ---------- */
      #lock { z-index: 2; }
      #mkwrap { position: absolute; left: 780px; top: 275px; width: 360px; height: 240px; opacity: 0; }
      #mk { filter: drop-shadow(0 0 22px rgba(106, 169, 255, 0.45)); }
      #wm {
        position: absolute; left: 0; top: 505px; width: 1920px; text-align: center; font-size: 164px; line-height: 172px;
        font-weight: 700; letter-spacing: -0.045em; color: #f6f8fd; opacity: 0;
      }
      #tag {
        position: absolute; left: 0; top: 718px; width: 1920px; text-align: center; font-size: 38px; line-height: 46px;
        font-weight: 500; letter-spacing: 0.01em; color: #92a8d0; opacity: 0;
      }

      /* ---------- light and finish ---------- */
      #fx { z-index: 3; pointer-events: none; }
      #fx canvas { display: block; width: 1920px; height: 1080px; }
      #grain {
        z-index: 4; pointer-events: none; opacity: 0.07; background-size: 256px 256px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
      }
      #vig { z-index: 5; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 54%, rgba(0,0,0,0.62) 100%); }
    </style>
  </head>
  <body>
    <div id="root" data-composition-id="main" data-start="0" data-duration="11" data-width="1920" data-height="1080">
      <div id="bg" class="clip full" data-start="0" data-duration="11" data-track-index="0" data-layout-allow-overlap><div id="lattice"></div></div>

      <div id="words" class="clip full" data-start="0" data-duration="7" data-track-index="1" data-layout-allow-overlap>
        <div id="w1" class="word"><span>see</span></div>
        <div id="w2" class="word"><span>hear</span></div>
        <div id="w3" class="word"><span>understand</span></div>
        <div id="w4" class="word"><span>create</span></div>
      </div>

      <div id="lock" class="clip full" data-start="0" data-duration="11" data-track-index="2" data-layout-allow-overlap>
        <div id="mkwrap">
          <svg id="mk" width="360" height="240" viewBox="-120 -80 240 160" fill="none">
            <defs>
              <radialGradient id="core" cx="0.36" cy="0.32" r="0.8">
                <stop offset="0" stop-color="#ffffff" />
                <stop offset="0.45" stop-color="#cfe2ff" />
                <stop offset="1" stop-color="#5b97ff" />
              </radialGradient>
              <linearGradient id="ringg" x1="0" y1="0" x2="1" y2="0">
                <stop offset="0" stop-color="#8fb9ff" />
                <stop offset="0.5" stop-color="#ffffff" />
                <stop offset="1" stop-color="#6aa4ff" />
              </linearGradient>
            </defs>
            <g transform="rotate(-24)">
              <path d="M -96 0 A 96 34 0 0 1 96 0" stroke="url(#ringg)" stroke-width="7" stroke-opacity="0.5" stroke-linecap="round" />
              <circle id="satB" cx="0" cy="0" r="9" fill="#ffffff" opacity="0" />
              <circle cx="0" cy="0" r="40" fill="url(#core)" />
              <path d="M -96 0 A 96 34 0 0 0 96 0" stroke="url(#ringg)" stroke-width="7" stroke-linecap="round" />
              <circle id="satF" cx="0" cy="0" r="9" fill="#ffffff" opacity="0" />
            </g>
          </svg>
        </div>
        <div id="wm">Orbit</div>
        <div id="tag">Every input. One model.</div>
      </div>

      <div id="fx" class="clip full" data-start="0" data-duration="11" data-track-index="3" data-layout-allow-overlap><canvas id="cv" width="1920" height="1080"></canvas></div>
      <div id="grain" class="clip full" data-start="0" data-duration="11" data-track-index="4"></div>
      <div id="vig" class="clip full" data-start="0" data-duration="11" data-track-index="5"></div>
    </div>

    <script>
      const DUR = 11;
      const W = 1920, H = 1080;

      /* ---------- helpers ---------- */
      const clamp = (x, a, b) => Math.min(b, Math.max(a, x));
      const sm = (a, b, x) => { const u = clamp((x - a) / (b - a), 0, 1); return u * u * (3 - 2 * u); };
      const lerp = (a, b, u) => a + (b - a) * u;
      const expoOut = (k) => (k >= 1 ? 1 : 1 - Math.pow(2, -10 * k));
      const mulberry32 = (a) => () => {
        a |= 0; a = (a + 0x6d2b79f5) | 0;
        let t = Math.imul(a ^ (a >>> 15), 1 | a);
        t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
        return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
      };

      const cv = document.getElementById("cv");
      const ctx = cv.getContext("2d");
      const lattice = document.getElementById("lattice");
      const satB = document.getElementById("satB");
      const satF = document.getElementById("satF");

      /* ---------- path: centripetal Catmull-Rom through control points ---------- */
      const BP = { x: 960, y: 395 };            // burst point = centre of the mark
      const SL = [-110, 1300];                  // start of the final straight streak (off frame)
      const CP = [
        [-180, 640], [140, 540],
        [500, 392],                              // 2  under "see"
        [960, 480],
        [1420, 368],                             // 4  under "hear"
        [1780, 470], [1810, 690], [1700, 850],
        [1280, 880],                             // 8  under "understand"
        [930, 960],
        [560, 905],                              // 10 under "create"
        [250, 960], [-40, 1020], [-230, 1110], [-320, 1220], [-270, 1320], // hairpin out of frame
        SL
      ];
      for (let i = 1; i <= 4; i++) CP.push([lerp(SL[0], BP.x, i / 4), lerp(SL[1], BP.y, i / 4)]);
      const IDX_SEE = 2, IDX_HEAR = 4, IDX_UND = 8, IDX_CRE = 10, IDX_S = 16, IDX_END = CP.length - 1;

      function crPoint(p0, p1, p2, p3, t) {
        const d = (a, b) => Math.pow(Math.hypot(b[0] - a[0], b[1] - a[1]), 0.5) || 1e-4;
        const t0 = 0, t1 = t0 + d(p0, p1), t2 = t1 + d(p1, p2), t3 = t2 + d(p2, p3);
        const tt = t1 + (t2 - t1) * t;
        const mix = (A, B, ta, tb) => {
          const u = (tt - ta) / (tb - ta);
          return [A[0] * (1 - u) + B[0] * u, A[1] * (1 - u) + B[1] * u];
        };
        const A1 = mix(p0, p1, t0, t1), A2 = mix(p1, p2, t1, t2), A3 = mix(p2, p3, t2, t3);
        const B1 = mix(A1, A2, t0, t2), B2 = mix(A2, A3, t1, t3);
        return mix(B1, B2, t1, t2);
      }

      const PX = [], PY = [], PS = [], CPS = [];
      (function buildPath() {
        const ghostA = [2 * CP[0][0] - CP[1][0], 2 * CP[0][1] - CP[1][1]];
        const n = CP.length;
        const ghostB = [2 * CP[n - 1][0] - CP[n - 2][0], 2 * CP[n - 1][1] - CP[n - 2][1]];
        const ext = [ghostA, ...CP, ghostB];
        const SEG = 48;
        let acc = 0;
        for (let i = 0; i < n - 1; i++) {
          const p0 = ext[i], p1 = ext[i + 1], p2 = ext[i + 2], p3 = ext[i + 3];
          for (let k = 0; k < SEG; k++) {
            const q = crPoint(p0, p1, p2, p3, k / SEG);
            if (PX.length) acc += Math.hypot(q[0] - PX[PX.length - 1], q[1] - PY[PY.length - 1]);
            PX.push(q[0]); PY.push(q[1]); PS.push(acc);
          }
        }
        for (let i = 0; i < n - 1; i++) CPS[i] = PS[i * SEG];
        acc += Math.hypot(CP[n - 1][0] - PX[PX.length - 1], CP[n - 1][1] - PY[PY.length - 1]);
        PX.push(CP[n - 1][0]); PY.push(CP[n - 1][1]); PS.push(acc);
        CPS[n - 1] = acc;
      })();
      const PATH_LEN = PS[PS.length - 1];
      const SEGN = 48;

      function posAt(s) {
        s = clamp(s, 0, PATH_LEN);
        let lo = 0, hi = PS.length - 1;
        while (hi - lo > 1) { const m = (lo + hi) >> 1; if (PS[m] <= s) lo = m; else hi = m; }
        const span = PS[hi] - PS[lo] || 1;
        const u = (s - PS[lo]) / span;
        return [lerp(PX[lo], PX[hi], u), lerp(PY[lo], PY[hi], u)];
      }

      /* ---------- speed profile: cubic Hermite through timed knots ---------- */
      const TW = { see: 1.8, hear: 3.1, und: 4.45, cre: 5.7 };
      const TS = 6.4;      // reaches the start of the straight streak
      const TB = 6.9;      // burst
      const KN = [
        { t: 0.4, s: CPS[0], v: 500 },
        { t: TW.see, s: CPS[IDX_SEE] },
        { t: TW.hear, s: CPS[IDX_HEAR] },
        { t: TW.und, s: CPS[IDX_UND] },
        { t: TW.cre, s: CPS[IDX_CRE] },
        { t: TS, s: CPS[IDX_S], v: 2000 },
        { t: TB, s: CPS[IDX_END], v: 4300 }
      ];
      (function tangents() {
        for (let i = 1; i < KN.length - 2; i++) {
          const mL = (KN[i].s - KN[i - 1].s) / (KN[i].t - KN[i - 1].t);
          const mR = (KN[i + 1].s - KN[i].s) / (KN[i + 1].t - KN[i].t);
          KN[i].v = Math.min((mL + mR) / 2, 3 * mL, 3 * mR);
        }
      })();
      function sOf(t) {
        const n = KN.length;
        if (t <= KN[0].t) return KN[0].s;
        if (t >= KN[n - 1].t) return KN[n - 1].s;
        let i = 0;
        while (t > KN[i + 1].t) i++;
        const a = KN[i], b = KN[i + 1], h = b.t - a.t, u = (t - a.t) / h;
        const u2 = u * u, u3 = u2 * u;
        return (2 * u3 - 3 * u2 + 1) * a.s + (u3 - 2 * u2 + u) * h * a.v + (-2 * u3 + 3 * u2) * b.s + (u3 - u2) * h * b.v;
      }

      /* ---------- seeded scatter ---------- */
      const rs = mulberry32(2025);
      const STARS = [];
      for (let i = 0; i < 170; i++) {
        STARS.push({ x: rs() * W, y: rs() * H, r: 0.5 + rs() * 1.0, a: 0.16 + rs() * 0.4, f: 0.5 + rs() * 1.6, p: rs() * 6.28 });
      }
      const SPARKS = [];
      for (let i = 0; i < 90; i++) {
        const ts = i < 45 ? 0.9 + rs() * (TS - 0.9) : TS - 0.35 + rs() * (TB - TS + 0.3);
        const p = posAt(sOf(ts));
        SPARKS.push({
          ts, x: p[0] + (rs() - 0.5) * 10, y: p[1] + (rs() - 0.5) * 10,
          vx: (rs() - 0.5) * 80, vy: (rs() - 0.5) * 80, life: 0.55 + rs() * 0.65, r: 0.9 + rs() * 1.7, w: rs()
        });
      }
      const BURST = [];
      for (let i = 0; i < 120; i++) {
        BURST.push({ a: rs() * Math.PI * 2, v: 260 + Math.pow(rs(), 1.6) * 1200, life: 0.6 + rs() * 0.9, r: 1.2 + rs() * 2.6, w: rs() });
      }

      /* ---------- nodes (pass points) ---------- */
      const NODES = [
        { i: IDX_SEE, t: TW.see }, { i: IDX_HEAR, t: TW.hear }, { i: IDX_UND, t: TW.und }, { i: IDX_CRE, t: TW.cre }
      ].map((n) => ({ x: CP[n.i][0], y: CP[n.i][1], t: n.t }));

      /* ---------- render from timeline time ---------- */
      const BLUE = [92, 142, 255], WHITE = [255, 255, 255];
      const mixc = (a, b, u) => [Math.round(lerp(a[0], b[0], u)), Math.round(lerp(a[1], b[1], u)), Math.round(lerp(a[2], b[2], u))];
      const rgba = (c, a) => "rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + clamp(a, 0, 1).toFixed(3) + ")";

      function drawStars(t) {
        for (const s of STARS) {
          const a = s.a * (0.65 + 0.35 * Math.sin(t * s.f + s.p));
          ctx.fillStyle = "rgba(190,208,255," + a.toFixed(3) + ")";
          ctx.beginPath(); ctx.arc(s.x, s.y, s.r, 0, 6.2832); ctx.fill();
        }
      }

      function drawGuide(t) {
        const a = 0.22 * (1 - sm(6.0, 6.5, t));
        if (a <= 0.002) return;
        const sh = sOf(t);
        const lastIdx = IDX_CRE * SEGN;
        ctx.strokeStyle = rgba([95, 145, 255], a);
        ctx.lineWidth = 1.6; ctx.lineJoin = "round";
        ctx.beginPath();
        let started = false;
        for (let k = 0; k <= lastIdx; k += 2) {
          if (PS[k] > sh) break;
          if (!started) { ctx.moveTo(PX[k], PY[k]); started = true; } else ctx.lineTo(PX[k], PY[k]);
        }
        ctx.stroke();
      }

      function drawNodes(t) {
        const fade = 1 - sm(6.0, 6.5, t);
        for (const n of NODES) {
          const age = t - n.t;
          if (age > -0.05) {
            const a = sm(n.t - 0.05, n.t + 0.3, t) * 0.95 * fade;
            if (a > 0.003) {
              ctx.fillStyle = rgba([160, 202, 255], a * 0.28);
              ctx.beginPath(); ctx.arc(n.x, n.y, 15, 0, 6.2832); ctx.fill();
              ctx.fillStyle = rgba([196, 222, 255], a);
              ctx.beginPath(); ctx.arc(n.x, n.y, 5, 0, 6.2832); ctx.fill();
            }
          }
          if (age > 0 && age < 0.9) {
            const k = age / 0.9;
            ctx.strokeStyle = rgba([150, 196, 255], 0.55 * (1 - k) * (1 - k));
            ctx.lineWidth = 2.2 * (1 - k) + 0.6;
            ctx.beginPath(); ctx.arc(n.x, n.y, 16 + 130 * expoOut(k), 0, 6.2832); ctx.stroke();
          }
        }
      }

      function drawSparks(t) {
        for (const s of SPARKS) {
          const age = t - s.ts;
          if (age < 0 || age > s.life) continue;
          const k = age / s.life;
          const x = s.x + s.vx * age, y = s.y + s.vy * age + 14 * age * age;
          const a = Math.pow(1 - k, 1.5) * 0.85;
          ctx.fillStyle = rgba(mixc(WHITE, BLUE, s.w * 0.7), a);
          ctx.beginPath(); ctx.arc(x, y, s.r * (1 - 0.4 * k), 0, 6.2832); ctx.fill();
        }
      }

      function drawComet(t) {
        const fade = 1 - sm(TB, TB + 0.28, t);
        if (fade <= 0.002) return;
        const streak = sm(5.9, 6.6, t);
        const TT = lerp(0.55, 0.3, streak);
        const wMax = lerp(5.5, 8.5, streak);
        const N = 96;
        const px = new Array(N + 1), py = new Array(N + 1);
        for (let k = 0; k <= N; k++) {
          const p = posAt(sOf(t - TT * (k / N)));
          px[k] = p[0]; py[k] = p[1];
        }
        const nx = new Array(N + 1), ny = new Array(N + 1);
        for (let k = 0; k <= N; k++) {
          const a = Math.max(k - 1, 0), b = Math.min(k + 1, N);
          let dx = px[a] - px[b], dy = py[a] - py[b];
          const l = Math.hypot(dx, dy);
          if (l < 1e-6) { nx[k] = 0; ny[k] = 0; } else { nx[k] = -dy / l; ny[k] = dx / l; }
        }
        ctx.shadowColor = "rgba(96,150,255,0.9)";
        ctx.shadowBlur = 12;
        for (let k = 0; k < N; k++) {
          if (Math.hypot(px[k] - px[k + 1], py[k] - py[k + 1]) < 0.05) continue;
          const u = (k + 0.5) / N;
          const w0 = wMax * Math.pow(1 - k / N, 0.75) * 0.5;
          const w1 = wMax * Math.pow(1 - (k + 1) / N, 0.75) * 0.5;
          const al = Math.pow(1 - u, 0.8) * fade;
          ctx.fillStyle = rgba(mixc(WHITE, BLUE, Math.pow(u, 0.6)), al);
          ctx.beginPath();
          ctx.moveTo(px[k] + nx[k] * w0, py[k] + ny[k] * w0);
          ctx.lineTo(px[k + 1] + nx[k + 1] * w1, py[k + 1] + ny[k + 1] * w1);
          ctx.lineTo(px[k + 1] - nx[k + 1] * w1, py[k + 1] - ny[k + 1] * w1);
          ctx.lineTo(px[k] - nx[k] * w0, py[k] - ny[k] * w0);
          ctx.closePath(); ctx.fill();
        }
        ctx.shadowBlur = 0; ctx.shadowColor = "rgba(0,0,0,0)";
        // head
        const flare = sm(TB - 0.18, TB, t);
        const R = lerp(56, 84, Math.max(streak, flare));
        const g = ctx.createRadialGradient(px[0], py[0], 0, px[0], py[0], R);
        g.addColorStop(0, rgba([170, 205, 255], 0.5 * fade));
        g.addColorStop(0.35, rgba([110, 160, 255], 0.16 * fade));
        g.addColorStop(1, rgba([80, 130, 255], 0));
        ctx.fillStyle = g;
        ctx.beginPath(); ctx.arc(px[0], py[0], R, 0, 6.2832); ctx.fill();
        ctx.fillStyle = rgba(WHITE, fade);
        ctx.beginPath(); ctx.arc(px[0], py[0], lerp(11, 14, Math.max(streak, flare)), 0, 6.2832); ctx.fill();
      }

      function drawBurst(t) {
        const u = t - TB;
        if (u < 0 || u > 1.6) return;
        // soft bloom
        if (u < 0.9) {
          const k = u / 0.9;
          const R = 70 + 420 * expoOut(k);
          const a = 0.62 * Math.pow(1 - k, 1.8) * sm(0, 0.04, u);
          const g = ctx.createRadialGradient(BP.x, BP.y, 0, BP.x, BP.y, R);
          g.addColorStop(0, rgba([236, 244, 255], a));
          g.addColorStop(0.3, rgba([140, 186, 255], a * 0.5));
          g.addColorStop(1, rgba([60, 110, 255], 0));
          ctx.fillStyle = g;
          ctx.beginPath(); ctx.arc(BP.x, BP.y, R, 0, 6.2832); ctx.fill();
        }
        // shock ring
        if (u < 1.3) {
          const k = u / 1.3;
          ctx.strokeStyle = rgba([150, 196, 255], 0.55 * Math.pow(1 - k, 1.6));
          ctx.lineWidth = 3.2 * (1 - k) + 0.8;
          ctx.beginPath(); ctx.arc(BP.x, BP.y, 30 + 780 * expoOut(k), 0, 6.2832); ctx.stroke();
        }
        // particles
        ctx.lineCap = "round";
        for (const b of BURST) {
          if (u > b.life) continue;
          const k = u / b.life;
          const d = b.v * (1 - Math.exp(-3.4 * u)) / 3.4;
          const sp = b.v * Math.exp(-3.4 * u);
          const dx = Math.cos(b.a), dy = Math.sin(b.a);
          const x = BP.x + dx * d, y = BP.y + dy * d;
          const tail = clamp(sp * 0.035, 0, 46);
          ctx.strokeStyle = rgba(mixc(WHITE, BLUE, b.w * 0.8), Math.pow(1 - k, 1.4) * 0.9);
          ctx.lineWidth = b.r * (1 - 0.5 * k);
          ctx.beginPath(); ctx.moveTo(x - dx * tail, y - dy * tail); ctx.lineTo(x, y); ctx.stroke();
        }
      }

      function updateSatellite(t) {
        const t0 = TB + 0.2, t1 = TB + 1.9;
        const p = clamp((t - t0) / (t1 - t0), 0, 1);
        const e = 1 - Math.pow(1 - p, 3);
        const th = 0.5 - 7.2 * (1 - e);
        const x = 96 * Math.cos(th), y = 34 * Math.sin(th);
        const vis = sm(t0 - 0.05, t0 + 0.2, t);
        const front = Math.sin(th) >= 0;
        satF.setAttribute("cx", x.toFixed(2)); satF.setAttribute("cy", y.toFixed(2));
        satB.setAttribute("cx", x.toFixed(2)); satB.setAttribute("cy", y.toFixed(2));
        satF.setAttribute("opacity", front ? vis.toFixed(3) : "0");
        satB.setAttribute("opacity", front ? "0" : vis.toFixed(3));
      }

      function render(t) {
        ctx.clearRect(0, 0, W, H);
        ctx.lineCap = "butt";
        lattice.style.backgroundPosition = (-t * 7).toFixed(2) + "px 0px";
        drawStars(t);
        drawGuide(t);
        drawNodes(t);
        drawSparks(t);
        drawComet(t);
        drawBurst(t);
        updateSatellite(t);
      }

      /* ---------- timeline ---------- */
      const tl = gsap.timeline({ paused: true });
      tl.to({ v: 0 }, { v: 1, duration: DUR, ease: "none", onUpdate: () => render(tl.time()) }, 0);

      // keywords fade in dim, then light up as the point passes each one
      tl.to(".word", { opacity: 1, duration: 0.7, ease: "power2.out", stagger: 0.18 }, 0.25);
      const LIT_SHADOW = "rgba(110,170,255,0.7) 0px 0px 40px, rgba(255,255,255,0.3) 0px 0px 10px";
      [["#w1 span", TW.see], ["#w2 span", TW.hear], ["#w3 span", TW.und], ["#w4 span", TW.cre]].forEach(([sel, tw]) => {
        tl.to(sel, { color: "rgba(255,255,255,1)", textShadow: LIT_SHADOW, duration: 0.4, ease: "power2.out" }, tw - 0.3);
        tl.to(sel, { scale: 1.07, duration: 0.2, ease: "power2.out" }, tw - 0.15);
        tl.to(sel, { scale: 1, duration: 0.6, ease: "power2.inOut" }, tw + 0.05);
      });
      tl.to(".word span", { opacity: 0, y: -26, duration: 0.5, ease: "power2.in", stagger: 0.05 }, 6.05);

      // mark resolves out of the burst, then wordmark and tagline
      tl.set("#mkwrap", { scale: 0.5, filter: "blur(18px)", transformOrigin: "50% 50%" }, 0);
      tl.set("#wm", { y: 30, filter: "blur(14px)" }, 0);
      tl.set("#tag", { y: 20, filter: "blur(8px)" }, 0);
      tl.to("#mkwrap", { opacity: 1, scale: 1, filter: "blur(0px)", duration: 0.9, ease: "expo.out" }, TB + 0.02);
      tl.to("#wm", { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.8, ease: "expo.out" }, TB + 0.5);
      tl.to("#tag", { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.7, ease: "expo.out" }, TB + 0.95);

      tl.set({}, {}, DUR);
      window.__timelines = window.__timelines || {};
      window.__timelines["main"] = tl;
      render(0);
    </script>
  </body>
</html>
```
