# Process Animation

Motionboard shot name: Step Ring

A large ring has four labels at its quarter points: Draft, Segment, Send and Measure. A dot with a short trail travels from step to step, and at each stop a card pops out: a draft email, an audience filter, a scheduled send, an open rate. After the last card the ring closes in the accent colour, then the Relay lockup.

- Position in a launch film: Transitions
- Slug: process-animation
- Preview video: https://media.motionboard.app/process-ring.mp4
- Recipe page: https://motionboard.app/recipes/process-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 `process-ring`. 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. Ring draws on and labels fade in 0–0.45s; the dot lands on Draft at 0.3s, Segment 2.2s, Send 4.1s, Measure 6.0s; each card pops 0.1s before the dot lands and holds 1.45s from landing; legs 1.75–2.2s, 3.65–4.1s, 5.55–6.0s and 7.45–7.9s (0.45s each); every card collapses over 0.24s, starting 0.25s into the next leg; draft body types in 0.5–1.04s; Segment count 2.4–3.15s; Send button pressed 4.72s; Measure count 6.1–6.9s with bars from 6.2s; ring completes 7.6–8.0s; ring group clears 8.1–8.4s; lockup 8.4–8.8s and held 2.2s to the end |
| Easing | Legs and the ring completion ease in and out with a quad curve (2p² then 1−(2−2p)²/2, GSAP power1.inOut shape); card pop `expo.out` 0.42s with a 0.16s power1.out fade; collapse power2.in; card content power2.out; ring draw-on and the Segment count power2.out; open-rate count and ripples power3.out; bars back.out(1.5); button press power2.out then back.out(3); lockup expo.out |
| Camera | Locked frame, no camera move. The whole ring group scales 1 to 1.03 at 7.9s (0.25s, power2.out), then to 0.96 while fading out over 8.1–8.4s (power2.in) |
| Subject | Ring 640px across, centred at (960, 540), 4px stroke #cdd1dd; the travelled arc is a 6px line in the accent at 40%, and the completed ring is the accent, growing from 6px to 10px. Four 14px nodes at 12, 3, 6 and 9 o'clock (white with a grey outline) fill with the accent and a 5px white centre when the dot lands. The dot is 19px with a 7.5px white core and a 26px accent glow; its trail is 32 segments from 3px to 14px wide, rising from 0 to full opacity; a 4px ripple ring grows from 16px to 70px over 0.7s while fading from 50%. Labels 56px weight 700 with 30px numbers 01–04: Draft above the ring, Segment right of its node at x 1332, Send below, Measure left of its node. Cards are 480px wide, 26px radius, white with a 1px #e3e6ee border and a soft shadow: Draft top right (1330, 70), Segment bottom right (1330, 610), Send bottom left (110, 610), Measure top left (110, 70), each scaling from 0.6 at the corner nearest the ring. Draft: subject 34px, two 26px body lines, a 64px Shop the drop button. Segment: six 26px filter chips and a 76px count from 12,480 down to 8,420. Send: date and time fields and a 70px button that flips to a green Scheduled. Measure: 48.2% at 116px, a +6.1 pts chip and nine 34px bars |
| Sync | The dot landing, the label lighting and the ripple share a frame at 0.3s, 2.2s, 4.1s and 6.0s (the label colour starts 0.05s early); the card pops 0.1s before the landing so it is rising as the dot settles; the Send button flips from Schedule send to Scheduled at 4.76s, on the press; the ring turns solid over 7.6–8.0s while the dot closes the loop at 7.9s, and the four labels turn the accent in order from 7.9s (0.05s apart) |
| Style | Light paper `#eceef1` lifting to `#f7f8fa` at the centre; one accent `#5a4df4`, ink `#14151c`, green `#159a5b` only for the saved, live and scheduled states; Inter weights 500–800 with tabular numbers; a static grain at 5% opacity and a 7% vignette; no camera, no 3D |

## Why it works

The ring gives the film one fixed route, so the viewer always knows where the story is: one dot, four stops, a clockwise order. Each step label sits outside its stop and lights up when the dot lands, and the card that pops out sits in the next clockwise corner, so the four cards fill the four quadrants without touching the ring or each other. A card carries one idea in real content: a draft email, an audience built from filter chips, a scheduled send, an open rate. The dot's short comet trail is the arc between the dot and the position it held 0.12s earlier, so it stretches in the middle of a leg and is gone on arrival, which shows the easing with no extra motion. Every card collapses as the dot leaves, so only one UI is on screen at a time. The recap is the payoff: the ring closes in the accent colour #5a4df4 and all four labels turn the same colour before the lockup.

## Prompt

> Build an 11-second, 1920x1080, 30 fps light product film called Step Ring for a fictional product, Relay (an email campaign tool). Background paper #eceef1 with a soft radial lift to #f7f8fa at the centre, ink #14151c, one accent #5a4df4, green #159a5b only for saved, live and scheduled states, font Inter. Draw a canvas 2D ring 640px across centred at (960, 540) with a 4px #cdd1dd stroke. Four white 14px nodes with a grey outline sit at 12, 3, 6 and 9 o'clock, each with a 56px weight-700 label next to it and a 30px number: 01 Draft above the ring, 02 Segment right of its node, 03 Send below, 04 Measure left of its node. Labels start grey #a7acbb and turn ink when the dot lands. Redraw the canvas from the timeline time every frame: the dot angle follows a quad ease-in-out over each 90 degree leg, the trail is 32 segments of the arc between the dot and its angle 0.12s earlier (3px to 14px wide, opacity rising 0 to 1), the travelled arc is a 6px accent line at 40% and the dot is a 19px accent disc with a 7.5px white core and a 26px glow. At each landing a 4px accent ripple grows from 16px to 70px over 0.7s while fading from 50% and the node fills with the accent and a 5px white centre. Timeline: the ring draws on and the labels fade up 0–0.45s; the dot lands on step 1 at 0.3s, step 2 at 2.2s, step 3 at 4.1s and step 4 at 6.0s; each leg takes 0.45s (1.75–2.2, 3.65–4.1, 5.55–6.0, 7.45–7.9 back to the top). Each step has a 480px-wide white card, 26px radius, 1px #e3e6ee border and a soft shadow, placed in the next clockwise corner so none touches the ring: step 1 top right at (1330, 70), step 2 bottom right (1330, 610), step 3 bottom left (110, 610), step 4 top left (110, 70). A card pops 0.1s before the dot lands (scale 0.6 to 1 over 0.42s with expo.out from the corner nearest the ring, opacity 0.16s), its rows rise 12px with a 0.045s stagger, and it collapses to scale 0.6 over 0.24s (power2.in) 0.25s into the next leg. Card 1 is a draft email: header with Saved chip, To Spring list · 12.4k, subject Spring drop is live at 34px, two body lines at 26px that type in with a clip from 0.5s, a 64px Shop the drop button. Card 2 is an audience: six 26px filter chips (Opened 30d, US only, Bought 2+ times, Mobile, Not unsubscribed, + Add) and a 76px count that falls from 12,480 to 8,420 over 2.4–3.15s. Card 3 is a schedule: Tue, Apr 14 and 9:00 AM fields and a 70px Schedule send button pressed at 4.72s (scale 0.95 then back.out) that flips to a green Scheduled. Card 4 is results: 48.2% at 116px counting up over 6.1–6.9s, a +6.1 pts chip and nine 34px bars growing from 6.2s. Recap: from 7.6 to 8.0s the whole ring turns solid accent and grows from 6px to 10px, every node fills, the four labels turn accent in order from 7.9s (0.05s apart) and the ring group scales to 1.03. Clear the group over 8.1–8.4s (scale 0.96 and fade), then the lockup rises 22px over 0.4s with expo.out from 8.4s: a 150px ring mark that draws its stroke with a dot at the top, the word Relay at 148px weight 700 and the tagline Email campaigns, start to finish. at 46px. Hold it still until 11s (2.2s). Add a static 5% grain and a 7% vignette. Use no CSS transforms on elements GSAP animates and no random values; one paused GSAP timeline drives everything.

## Often confused with

- [Focus Hop](https://motionboard.app/r/focus-hop.md): Focus Hop moves a highlight block cell by cell over one grid with the cursor; here a dot travels a fixed ring between four labelled steps and a different card opens at each one.
- [Match Cut Transition](https://motionboard.app/r/match-cut-transition.md): Match Cut Transition swaps one object for another at the same anchor so the gaze stays put; here the dot moves around the frame and each step brings its own card in a new corner.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/process-ring/hyperframes.json (318 B)
- https://motionboard.app/source/process-ring/index.html (21.1 KB)
- https://motionboard.app/source/process-ring/package.json (301 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "process-ring/hyperframes.json" "https://motionboard.app/source/process-ring/hyperframes.json"
curl -fsSL --create-dirs -o "process-ring/index.html" "https://motionboard.app/source/process-ring/index.html"
curl -fsSL --create-dirs -o "process-ring/package.json" "https://motionboard.app/source/process-ring/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 {
        --ink: #14151c;
        --sub: #4a4d5c;
        --mut: #8b90a1;
        --dim: #a7acbb;
        --line: #e3e6ee;
        --acc: #5a4df4;
        --acc-d: #3f33d6;
        --acc-bg: #ecebff;
        --green: #159a5b;
        --green-bg: #e2f6ec;
        --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: #eceef1; }
      #root {
        position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #eceef1;
        font-family: var(--font-ui); color: var(--ink); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
      }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      svg { display: block; flex: none; }

      #bg { z-index: 0; background: radial-gradient(ellipse 70% 75% at 50% 46%, #f7f8fa 0%, #eceef1 62%, #e2e5ea 100%); }
      #fx { z-index: 6; pointer-events: none; }
      #vig { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: radial-gradient(ellipse at center, rgba(20, 24, 40, 0) 60%, rgba(20, 24, 40, 0.07) 100%); }
      #grain { position: absolute; left: 0; top: 0; }

      #ringwrap { z-index: 2; transform-origin: 960px 540px; }
      #cv { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; display: block; }

      /* step labels */
      .lab { position: absolute; width: 400px; height: 72px; display: flex; align-items: center; gap: 16px; opacity: 0; white-space: nowrap; }
      .lab .n { font-size: 30px; font-weight: 700; letter-spacing: 0.02em; color: #c3c7d3; }
      .lab .w { font-size: 56px; font-weight: 700; letter-spacing: -0.03em; color: var(--dim); }
      #l0 { left: 760px; top: 118px; justify-content: center; }
      #l1 { left: 1332px; top: 504px; justify-content: flex-start; }
      #l2 { left: 760px; top: 888px; justify-content: center; }
      #l3 { left: 188px; top: 504px; justify-content: flex-end; }

      /* cards */
      .card {
        position: absolute; width: 480px; border-radius: 26px; background: #ffffff; border: 1px solid var(--line);
        box-shadow: 0 34px 70px -12px rgba(40, 44, 80, 0.2), 0 4px 14px rgba(40, 44, 80, 0.08); opacity: 0; overflow: hidden;
      }
      #c0 { left: 1330px; top: 70px; transform-origin: 0% 100%; }
      #c1 { left: 1330px; top: 610px; transform-origin: 0% 0%; }
      #c2 { left: 110px; top: 610px; transform-origin: 100% 0%; }
      #c3 { left: 110px; top: 70px; transform-origin: 100% 100%; }
      .st { opacity: 0; }
      .hd { display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 24px; border-bottom: 1px solid var(--line); }
      .hd .ht { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; }
      .hd .r { margin-left: auto; }
      .mut { color: var(--mut); font-size: 26px; font-weight: 500; }
      .chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 26px; font-weight: 600; background: var(--green-bg); color: var(--green); white-space: nowrap; }
      .mk { width: 38px; height: 38px; border-radius: 50%; background: var(--acc); display: flex; align-items: center; justify-content: center; }
      .mk i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; }

      /* draft */
      .row { display: flex; gap: 14px; padding: 18px 28px 0; font-size: 26px; line-height: 34px; white-space: nowrap; }
      .row .mut { font-size: 26px; }
      .row b { font-weight: 600; }
      .subj { margin: 14px 28px 0; font-size: 34px; line-height: 44px; font-weight: 800; letter-spacing: -0.025em; white-space: nowrap; }
      .body { margin: 12px 28px 0; }
      .ln { font-size: 26px; line-height: 36px; color: var(--sub); white-space: nowrap; }
      .cta { margin: 20px 28px 28px; height: 64px; border-radius: 16px; background: var(--acc); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: -0.01em; }

      /* segment */
      .chips { padding: 20px 24px 0; }
      .cr { display: flex; gap: 10px; margin-bottom: 10px; }
      .cp { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 17px; border-radius: 25px; background: var(--acc-bg); color: var(--acc-d); font-size: 26px; font-weight: 600; white-space: nowrap; }
      .cp i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
      .cp.add { background: #fff; border: 2px dashed #cdd1dd; color: var(--mut); }
      .foot { display: flex; align-items: baseline; gap: 14px; margin: 8px 28px 0; padding: 14px 0 22px; border-top: 1px solid var(--line); }
      #cnt { font-size: 76px; line-height: 84px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }

      /* send */
      .fld { display: flex; align-items: center; gap: 14px; height: 62px; margin: 14px 24px 0; padding: 0 18px; border: 2px solid #dfe2ea; border-radius: 16px; font-size: 30px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
      .fld .mut { margin-left: auto; font-size: 26px; font-weight: 500; letter-spacing: 0; }
      #sbtn { position: relative; height: 70px; margin: 22px 24px 26px; }
      #sbtn .face { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
      #f1 { background: var(--acc); }
      #f2 { background: var(--green); opacity: 0; }

      /* measure */
      #op { font-size: 116px; line-height: 124px; font-weight: 800; letter-spacing: -0.05em; padding: 10px 28px 0; }
      .sub { display: flex; align-items: center; gap: 14px; padding: 0 28px; margin-top: 2px; }
      .sub .mut { font-size: 28px; }
      .bars { display: flex; align-items: flex-end; gap: 12px; height: 92px; margin: 22px 28px 28px; }
      .bar { width: 34px; border-radius: 8px 8px 4px 4px; background: #d9d6fd; }
      .bar.hi { background: var(--acc); }

      /* lockup */
      #lock { z-index: 4; }
      #lk { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; }
      #lkrow { display: flex; align-items: center; gap: 30px; }
      #wm { font-size: 148px; line-height: 150px; font-weight: 700; letter-spacing: -0.045em; color: var(--ink); }
      #tag { margin-top: 26px; font-size: 46px; font-weight: 500; letter-spacing: -0.015em; color: var(--sub); }
      #mkc { stroke-dasharray: 339.3; stroke-dashoffset: 339.3; }
      #mkd { opacity: 0; }
    </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-ignore></div>

      <div id="ringwrap" class="clip full" data-start="0" data-duration="11" data-track-index="1" data-layout-ignore>
        <canvas id="cv" width="1920" height="1080"></canvas>

        <div id="l0" class="lab" data-layout-allow-overlap><span class="n">01</span><span class="w">Draft</span></div>
        <div id="l1" class="lab" data-layout-allow-overlap><span class="n">02</span><span class="w">Segment</span></div>
        <div id="l2" class="lab" data-layout-allow-overlap><span class="n">03</span><span class="w">Send</span></div>
        <div id="l3" class="lab" data-layout-allow-overlap><span class="w">Measure</span><span class="n">04</span></div>

        <!-- 01 Draft -->
        <div id="c0" class="card" data-layout-allow-overlap>
          <div class="hd"><div class="mk"><i></i></div><span class="ht">New campaign</span><span class="chip r">Saved</span></div>
          <div class="row st"><span class="mut">To</span><b>Spring list · 12.4k</b></div>
          <div class="subj st">Spring drop is live</div>
          <div class="body"><div class="ln">Hi Maya, early access to</div><div class="ln">the spring drop ends Friday.</div></div>
          <div class="cta st">Shop the drop</div>
        </div>

        <!-- 02 Segment -->
        <div id="c1" class="card" data-layout-allow-overlap>
          <div class="hd"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#5a4df4" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h18l-7 8v6l-4 2v-8z"/></svg><span class="ht">Audience</span><span class="mut r">3 filters</span></div>
          <div class="chips">
            <div class="cr"><span class="cp st"><i></i>Opened 30d</span><span class="cp st"><i></i>US only</span></div>
            <div class="cr"><span class="cp st"><i></i>Bought 2+ times</span><span class="cp st"><i></i>Mobile</span></div>
            <div class="cr"><span class="cp st"><i></i>Not unsubscribed</span><span class="cp add st">+ Add</span></div>
          </div>
          <div class="foot st"><span id="cnt">12,480</span><span class="mut">contacts</span></div>
        </div>

        <!-- 03 Send -->
        <div id="c2" class="card" data-layout-allow-overlap>
          <div class="hd"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#5a4df4" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M22 2 11 13"/><path d="M22 2 15 22l-4-9-9-4z"/></svg><span class="ht">Schedule</span><span class="mut r">8,420 contacts</span></div>
          <div class="fld st"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#8b90a1" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>Tue, Apr 14</div>
          <div class="fld st"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#8b90a1" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>9:00 AM<span class="mut">local time</span></div>
          <div id="sbtn" class="st">
            <div id="f1" class="face">Schedule send</div>
            <div id="f2" class="face"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>Scheduled</div>
          </div>
        </div>

        <!-- 04 Measure -->
        <div id="c3" class="card" data-layout-allow-overlap>
          <div class="hd"><svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="#5a4df4" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20V10M10 20V4M16 20v-7M22 20H2"/></svg><span class="ht">Results</span><span class="chip r">Live</span></div>
          <div id="op" class="st">0.0%</div>
          <div class="sub st"><span class="mut">opened</span><span class="chip"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#159a5b" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20V5M5 11l7-7 7 7"/></svg>+6.1 pts</span></div>
          <div class="bars">
            <div class="bar" style="height:38px"></div><div class="bar" style="height:50px"></div><div class="bar" style="height:44px"></div>
            <div class="bar" style="height:58px"></div><div class="bar" style="height:54px"></div><div class="bar" style="height:68px"></div>
            <div class="bar" style="height:62px"></div><div class="bar" style="height:76px"></div><div class="bar hi" style="height:90px"></div>
          </div>
        </div>
      </div>

      <div id="lock" class="clip full" data-start="0" data-duration="11" data-track-index="2" data-layout-ignore>
        <div id="lk">
          <div id="lkrow">
            <svg width="150" height="150" viewBox="0 0 150 150">
              <g transform="rotate(-90 75 75)"><circle id="mkc" cx="75" cy="75" r="54" fill="none" stroke="#5a4df4" stroke-width="12" stroke-linecap="round" /></g>
              <circle id="mkd" cx="75" cy="21" r="17" fill="#5a4df4" stroke="#eceef1" stroke-width="5" />
            </svg>
            <div id="wm">Relay</div>
          </div>
          <div id="tag">Email campaigns, start to finish.</div>
        </div>
      </div>

      <div id="fx" class="clip full" data-start="0" data-duration="11" data-track-index="3" data-layout-ignore>
        <div id="vig"></div>
        <svg id="grain" width="1920" height="1080" viewBox="0 0 1920 1080" style="opacity:0.05">
          <filter id="nz" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="7" stitchTiles="stitch" /><feColorMatrix type="saturate" values="0" /></filter>
          <rect width="1920" height="1080" filter="url(#nz)" />
        </svg>
      </div>
    </div>

    <script>
      const ACC = "#5a4df4";
      const INK = "#14151c";
      const CX = 960, CY = 540, R = 320, TAU = Math.PI * 2, Q = Math.PI / 2;

      // step arrivals (dot lands on the node), hold on each card, travel per leg
      const A = [0.3, 2.2, 4.1, 6.0];
      const HOLD = 1.45, LEG = 0.45;
      const LS = A.map((a) => a + HOLD);       // leg starts: 1.75, 3.65, 5.55, 7.45
      const LE = LS.map((s) => s + LEG);       // leg ends:   2.2, 4.1, 6.0, 7.9
      const RIPPLES = [A[0], A[1], A[2], A[3], LE[3]];
      const DONE0 = 7.6, DONE1 = 8.0;

      const clamp = (x) => Math.max(0, Math.min(1, x));
      const eIO = (p) => (p < 0.5 ? 2 * p * p : 1 - Math.pow(-2 * p + 2, 2) / 2);
      const eOut = (p) => 1 - Math.pow(1 - p, 3);
      const e3Out = (p) => 1 - Math.pow(1 - p, 4);

      function angAt(t) {
        let a = 0;
        for (let i = 0; i < 4; i++) {
          if (t >= LE[i]) a = (i + 1) * Q;
          else {
            a = t > LS[i] ? i * Q + Q * eIO((t - LS[i]) / LEG) : i * Q;
            break;
          }
        }
        return a;
      }
      const pt = (a, r) => [CX + (r || R) * Math.sin(a), CY - (r || R) * Math.cos(a)];

      const cv = document.getElementById("cv");
      const ctx = cv.getContext("2d");
      const elCnt = document.getElementById("cnt");
      const elOp = document.getElementById("op");
      let lastCnt = "", lastOp = "";

      // card timings (also used by the counters)
      const P = A.map((a) => a - 0.1);

      function render(t) {
        ctx.clearRect(0, 0, 1920, 1080);
        const intro = eOut(clamp(t / 0.45));
        const ang = angAt(t);
        const tail = angAt(t - 0.12);
        const D = eIO(clamp((t - DONE0) / (DONE1 - DONE0)));

        // base ring, drawn on from 12 o'clock
        ctx.lineCap = "round";
        ctx.lineWidth = 4;
        ctx.strokeStyle = "#cdd1dd";
        ctx.beginPath();
        ctx.arc(CX, CY, R, -Q, -Q + TAU * intro);
        ctx.stroke();

        // travelled part of the ring
        if (tail > 0.001) {
          ctx.lineWidth = 6;
          ctx.strokeStyle = "rgba(90,77,244,0.4)";
          ctx.beginPath();
          ctx.arc(CX, CY, R, -Q, -Q + tail);
          ctx.stroke();
        }
        // completed ring in the accent colour
        if (D > 0) {
          ctx.lineWidth = 6 + 4 * D;
          ctx.strokeStyle = "rgba(90,77,244," + D.toFixed(3) + ")";
          ctx.beginPath();
          ctx.arc(CX, CY, R, 0, TAU);
          ctx.stroke();
        }

        // step nodes
        for (let i = 0; i < 4; i++) {
          const p = pt(i * Q);
          ctx.globalAlpha = intro;
          ctx.lineWidth = 4;
          ctx.fillStyle = "#ffffff";
          ctx.strokeStyle = "#cdd1dd";
          ctx.beginPath();
          ctx.arc(p[0], p[1], 14, 0, TAU);
          ctx.fill();
          ctx.stroke();
          const L = Math.max(clamp((t - A[i]) / 0.2), D);
          if (L > 0) {
            ctx.fillStyle = ACC;
            ctx.beginPath();
            ctx.arc(p[0], p[1], 14 * L + 1.5, 0, TAU);
            ctx.fill();
            ctx.fillStyle = "#ffffff";
            ctx.beginPath();
            ctx.arc(p[0], p[1], 5 * L, 0, TAU);
            ctx.fill();
          }
          ctx.globalAlpha = 1;
        }

        // arrival ripples
        for (const ta of RIPPLES) {
          const d = (t - ta) / 0.7;
          if (d > 0 && d < 1) {
            const idx = ta === LE[3] ? 0 : A.indexOf(ta);
            const p = pt(idx * Q);
            ctx.lineWidth = 4;
            ctx.strokeStyle = "rgba(90,77,244," + (0.5 * (1 - d)).toFixed(3) + ")";
            ctx.beginPath();
            ctx.arc(p[0], p[1], 16 + 54 * e3Out(d), 0, TAU);
            ctx.stroke();
          }
        }

        // comet trail
        const span = ang - tail;
        if (span > 0.002) {
          const N = 32;
          for (let j = 0; j < N; j++) {
            const a0 = tail + (span * j) / N;
            const a1 = tail + (span * (j + 1)) / N;
            const f = (j + 1) / N;
            ctx.lineWidth = 3 + 11 * f;
            ctx.strokeStyle = "rgba(90,77,244," + Math.pow(f, 1.4).toFixed(3) + ")";
            ctx.beginPath();
            ctx.arc(CX, CY, R, -Q + a0 - 0.004, -Q + a1);
            ctx.stroke();
          }
        }

        // the dot
        const da = clamp((t - 0.08) / 0.25);
        if (da > 0) {
          const p = pt(ang);
          ctx.globalAlpha = da;
          ctx.shadowColor = "rgba(90,77,244,0.75)";
          ctx.shadowBlur = 26;
          ctx.fillStyle = ACC;
          ctx.beginPath();
          ctx.arc(p[0], p[1], 19, 0, TAU);
          ctx.fill();
          ctx.shadowBlur = 0;
          ctx.fillStyle = "#ffffff";
          ctx.beginPath();
          ctx.arc(p[0], p[1], 7.5, 0, TAU);
          ctx.fill();
          ctx.globalAlpha = 1;
        }

        // counters
        const c = Math.round(12480 - (12480 - 8420) * eOut(clamp((t - (P[1] + 0.3)) / 0.75)));
        const cs = c.toLocaleString("en-US");
        if (cs !== lastCnt) { elCnt.textContent = cs; lastCnt = cs; }
        const o = (48.2 * e3Out(clamp((t - (P[3] + 0.2)) / 0.8))).toFixed(1) + "%";
        if (o !== lastOp) { elOp.textContent = o; lastOp = o; }
      }

      // ---------- baselines (hidden states live in CSS; offsets set once here) ----------
      gsap.set(".lab", { y: 14 });
      gsap.set(".card", { scale: 0.6 });
      gsap.set(".st", { y: 12 });
      gsap.set("#c0 .ln", { clipPath: "inset(0% 100% 0% 0%)" });
      gsap.set("#c3 .bar", { scaleY: 0, transformOrigin: "50% 100%" });
      gsap.set("#lk", { y: 22 });
      render(0);

      const tl = gsap.timeline({ paused: true });
      tl.to({ v: 0 }, { v: 1, duration: 11, ease: "none", onUpdate: () => render(tl.time()) }, 0);
      window.addEventListener("hf-seek", (e) => render(e.detail.time));

      // ---------- labels in ----------
      tl.to(".lab", { opacity: 1, y: 0, duration: 0.4, ease: "power2.out", stagger: 0.07 }, 0.02);

      // ---------- label lighting on arrival ----------
      for (let i = 0; i < 4; i++) {
        tl.to("#l" + i + " .w", { color: INK, duration: 0.25, ease: "power2.out" }, A[i] - 0.05);
        tl.to("#l" + i + " .n", { color: ACC, duration: 0.25, ease: "power2.out" }, A[i] - 0.05);
      }

      // ---------- cards ----------
      for (let i = 0; i < 4; i++) {
        const c = "#c" + i;
        tl.to(c, { opacity: 1, duration: 0.16, ease: "power1.out" }, P[i]);
        tl.to(c, { scale: 1, duration: 0.42, ease: "expo.out" }, P[i]);
        tl.to(c + " .st", { opacity: 1, y: 0, duration: 0.24, ease: "power2.out", stagger: 0.045 }, P[i] + 0.1);
        // the card stays readable into the first part of the leg, then collapses as the dot moves on
        tl.to(c, { opacity: 0, scale: 0.6, duration: 0.24, ease: "power2.in" }, LS[i] + 0.25);
      }
      // draft: body lines type in
      tl.to("#c0 .ln", { clipPath: "inset(0% 0% 0% 0%)", duration: 0.32, ease: "power1.inOut", stagger: 0.22 }, P[0] + 0.3);
      // measure: sparkline bars
      tl.to("#c3 .bar", { scaleY: 1, duration: 0.4, ease: "back.out(1.5)", stagger: 0.04 }, P[3] + 0.3);
      // send: press the button, face flips to scheduled
      const tPress = P[2] + 0.72;
      tl.to("#sbtn", { scale: 0.95, duration: 0.08, ease: "power2.out" }, tPress);
      tl.to("#sbtn", { scale: 1, duration: 0.3, ease: "back.out(3)" }, tPress + 0.08);
      tl.to("#f1", { opacity: 0, duration: 0.1, ease: "none" }, tPress + 0.04);
      tl.to("#f2", { opacity: 1, duration: 0.1, ease: "none" }, tPress + 0.04);

      // ---------- recap: ring completes, all four labels lit in the accent ----------
      for (let i = 0; i < 4; i++) {
        tl.to("#l" + i + " .w", { color: ACC, duration: 0.25, ease: "power2.out" }, LE[3] + i * 0.05);
      }
      tl.to("#ringwrap", { scale: 1.03, duration: 0.25, ease: "power2.out" }, LE[3]);
      tl.to("#ringwrap", { opacity: 0, scale: 0.96, duration: 0.3, ease: "power2.in" }, 8.1);

      // ---------- lockup ----------
      tl.to("#lk", { opacity: 1, y: 0, duration: 0.4, ease: "expo.out" }, 8.4);
      tl.to("#mkc", { strokeDashoffset: 0, duration: 0.4, ease: "power2.out" }, 8.4);
      tl.to("#mkd", { opacity: 1, duration: 0.1, ease: "none" }, 8.7);

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