# Dashboard Animation

Motionboard shot name: Bento Assemble

Seven dashboard cards drift in a slow orbit around a Loading analytics… label, then fly one after another into a bento grid. Numbers count up, a line chart draws, bars grow and a donut sweeps, and the grid clears for the Plinth lockup.

- Position in a launch film: Features
- Slug: dashboard-animation
- Preview video: https://media.motionboard.app/bento-assemble.mp4
- Recipe page: https://motionboard.app/recipes/dashboard-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 `bento-assemble`. 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. Label fades in 0.15–0.65s; cards fade in 0.04–1.22s, staggered; orbit runs 0–3.7s at 22° per second; label fades out 2.95–3.4s; cards leave the orbit at 3.0s (line chart), 3.12s (active users), 3.24s (retention), 3.36s (signups), 3.48s (regions), 3.6s (events table) and 3.72s (conversion), each flight 1.15s, last landing at 4.87s; line chart number 4.45–5.9s and line 4.5–5.95s; active users 4.6–5.9s; retention 4.75–6.0s; signup bars 4.8–6.06s (0.06s apart, 0.9s each); regions 4.95–6.1s; events table 5.0–6.15s; conversion 5.1–6.2s; Dec · 24.3k tag 5.9–6.2s; fully readable 6.2–7.65s; grid scales to 0.9 and fades 7.65–8.15s; mark 8.15–8.65s, wordmark 8.2–8.7s, tagline 8.27–8.77s; lockup holds still to 11s |
| Easing | Each flight is power3.inOut over the first 86% with a 2.2% overshoot of the travel that settles on a smoothstep; counts, donut sweep, signup bars, region bars and table values use power3.out; line draws and the segmented bar use power2.inOut; map hotspots use back.out(2); label fade in power2.out and out power2.in; grid exit power3.inOut; lockup expo.out; the 1.2% push-in is linear (none); the spinner turns linearly at 330° per second |
| Camera | Locked camera. During the fill the whole grid scales linearly from 1 to 1.012 over 4.9–7.65s. The orbit is an ellipse around (960, 540) with radii 700x330 times a per-card factor of 0.9–1.05, advancing 22° per second, with a 12px vertical bob, a 6px horizontal bob, a tilt of 2–5° swinging 2.2°, and a 2.5% scale breathing |
| Subject | Seven white cards with 24px corners on a 1600x880 grid at (160, 100) with 12px gaps: active users 391x270, line chart 794x578 (two columns, two rows), retention 391x270, signups 391x296, regions 391x598 (two rows), events table 794x290, conversion 391x290. Orbit depth scales: line chart 0.6, events table 0.62, regions 0.65, conversion 0.75, signups 0.78, active users 0.8, retention 0.85; larger scale sits in front. Titles and table text 28px, axis labels 22px, key numbers 92px (24,318 and 4.8%), 96px (+18.4%) and 76px (68%); a 150px donut at 18px stroke; a 12-point line with a soft area fill and a 9px head dot; a dot-matrix map with 4.4px dots on a 6.5px pitch and eight accent hotspots; label Loading analytics… at 44px with a 44px spinner |
| Sync | A card starts to count about 0.3s after it lands (line chart lands 4.15s and counts at 4.45s; conversion lands 4.87s and counts at 5.1s); the number and the chart of one card finish together (line chart 5.9s and 5.95s); the label starts to fade at 2.95s, just before the first flight at 3.0s; the map hotspots start to pulse at 5.9s, after the dashboard is complete, so the hold is not frozen; the grid leaves at 7.65s and the mark enters at 8.15s, after the grid is gone |
| Style | Background `#eceef1` with a static 40px dot grid at 7.5% ink, one accent indigo `#4f46e5` with tints `#cfd2f7` and `#a5a9f0`, ink `#14161a`; cards `#ffffff` with a 1px `#e1e4ea` hairline and a soft blue-grey shadow; Inter with tabular numerals, weights 500–700; a vignette reaching 7% at the edges and no film grain |

## Why it works

The film has two states of the same seven cards, loose and assembled, and the move between them is the whole shot. While the cards orbit a Loading analytics… label, they already show their titles, axes, row names and a dotted last-year line, so the viewer sees a real dashboard taken apart. Each card leaves the orbit by blending its live orbit position, tilt and scale into its grid slot, so nothing stops or jumps at the start of a flight, and the staggered starts (the large line chart first, then one card every 0.12s) make the grid assemble as a sequence the eye can follow. A 2.2% overshoot at the end of each flight gives the cards a landing. The values wait until a card has landed: each card begins to fill about 0.3s after it lands, so the viewer never reads a number on a moving card. Numbers count, lines draw left to right, bars grow, the donut sweeps and the map lights up, all inside 4.45–6.2s, and the finished dashboard holds for 1.45s before it clears. The large line chart spans two columns and two rows and carries the biggest number, so the grid has one anchor. There is one accent colour, indigo #4f46e5, on white cards over light grey.

## Prompt

> Build an 11-second, 1920x1080, 30 fps light product film called Bento Assemble for a fictional product, Plinth (a product analytics tool). Background #eceef1 with a static 40px dot grid at 7.5% ink, one accent #4f46e5, font Inter with tabular numerals, a faint vignette and no film grain. Make seven white dashboard cards (24px radius, 1px #e1e4ea hairline, soft shadow), each with real content, and put all state in one render(t) function driven by one linear proxy tween from 0 to 11s, with no CSS animations and no randomness. Cards: Active users 391x270 (24,318 at 92px, +12.4% vs May, a three-segment bar); Weekly active users 794x578 (+18.4% at 96px, a smooth 12-month line with a soft area fill, a dotted grey last-year line, axis labels and a dark Dec · 24.3k tag); Retention 391x270 (68% at 76px beside a 150px donut); Signups by day 391x296 (seven bars, Thursday 1,284 in accent); Sessions by region 391x598 (a dot-matrix world map with eight accent hotspots and four bars: North America 41%, Europe 27%, Asia Pacific 21%, Latin America 11%); Top events 794x290 (three rows with a count, a usage bar and a change); Conversion rate 391x290 (4.8% at 92px, +0.6 pts, a sparkline). Titles and table text 28px, axis labels 22px. Until 3s the cards orbit a centred label, a 44px spinner and Loading analytics… at 44px: each card sits on an ellipse around (960, 540) with radii 700x330 times its own factor (0.9–1.05), advancing 22° per second, with a 12px vertical and 6px horizontal bob, a small tilt and a depth scale of 0.6–0.85 with bigger scales in front. In the orbit the cards show titles, axes, row names and zero values only. Cards fade in staggered from 0.04s over 0.7s, the label fades in 0.15–0.65s and out 2.95–3.4s. From 3.0s the cards snap into a 1600x880 bento grid at (160, 100) with 12px gaps; the line chart spans two columns and two rows, the regions card two rows, the events table two columns. Start flights at 3.0s (line chart), then every 0.12s: active users, retention, signups, regions, events table, conversion. Each flight lasts 1.15s: blend position, tilt and scale from the live orbit state to the slot, with power3.inOut over the first 86% of the flight, an overshoot of 2.2% of the travel and a smoothstep settle. About 0.3s after each card lands it fills, from 4.45s on: numbers count up with power3.out, lines draw left to right with power2.inOut and a head dot, signup bars grow 0.06s apart, the donut sweeps to 68%, map hotspots pop in with back.out(2) and pulse after 5.9s, table bars fill. Everything is complete by 6.2s and holds 1.45s while the grid pushes in linearly from scale 1 to 1.012 over 4.9–7.65s. At 7.65s scale the grid to 0.9 and fade it out over 0.5s with power3.inOut. Then bring in the lockup with expo.out from 8.15s: a 150px indigo mark (a small white block on a wide white base), Plinth at 164px and Know what moved. at 48px with moved. in the accent, settled by 8.8s and still until 11s.

## Often confused with

- [Skeleton Loading Animation](https://motionboard.app/r/skeleton-loading-animation.md): Skeleton Loading Animation keeps one dashboard in place and swaps its values for grey blocks and back after a refresh; Dashboard Animation assembles the dashboard from separate cards that fly in from an orbit.
- [Count Up Animation](https://motionboard.app/r/count-up-animation.md): Count Up Animation puts the focus on a few large numbers rolling to a target; in Dashboard Animation the numbers are one part of seven cards that also move into a grid and draw charts.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/bento-assemble/hyperframes.json (318 B)
- https://motionboard.app/source/bento-assemble/index.html (27.1 KB)
- https://motionboard.app/source/bento-assemble/package.json (303 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "bento-assemble/hyperframes.json" "https://motionboard.app/source/bento-assemble/hyperframes.json"
curl -fsSL --create-dirs -o "bento-assemble/index.html" "https://motionboard.app/source/bento-assemble/index.html"
curl -fsSL --create-dirs -o "bento-assemble/package.json" "https://motionboard.app/source/bento-assemble/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 {
        --page: #eceef1;
        --card: #ffffff;
        --ink: #14161a;
        --mute: #4d5565;
        --faint: #8a92a1;
        --line: #e1e4ea;
        --accent: #4f46e5;
        --tint: #cfd2f7;
        --track: #eceef2;
      }
      * { margin: 0; padding: 0; box-sizing: border-box; }
      html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--page); }
      #root {
        position: relative; width: 1920px; height: 1080px; overflow: hidden; background: var(--page);
        font-family: "Inter", system-ui, sans-serif; color: var(--ink);
        -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
      }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      #bg { background-image: radial-gradient(circle, rgba(20, 24, 40, 0.075) 1.6px, transparent 1.9px); background-size: 40px 40px; background-position: 20px 20px; }
      #dash { transform-origin: 960px 540px; }

      /* ---------------- cards ---------------- */
      .card { position: absolute; left: 0; top: 0; background: var(--card); border-radius: 24px; opacity: 0; transform-origin: 50% 50%; box-shadow: inset 0 0 0 1px var(--line), 0 2px 4px rgba(26, 34, 70, 0.04), 0 24px 46px -26px rgba(26, 34, 70, 0.32); overflow: hidden; }
      .card div, .card span, .card b { white-space: nowrap; }
      .card .abs { position: absolute; left: 0; top: 0; display: block; }
      .ct { position: absolute; left: 32px; top: 26px; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.02em; color: var(--mute); }
      .ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
      .dots { position: absolute; right: 26px; top: 30px; width: 26px; height: 26px; color: #b4bac6; }
      .big { position: absolute; font-weight: 700; letter-spacing: -0.045em; line-height: 1.08; color: var(--ink); }
      .dl { position: absolute; left: 32px; height: 34px; display: flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 500; color: var(--faint); }
      .dl b { font-weight: 700; color: var(--accent); }
      .dl .ic { color: var(--accent); stroke-width: 2.6; }
      .cap { position: absolute; font-size: 28px; line-height: 34px; font-weight: 500; color: var(--faint); }
      .lg { position: absolute; right: 32px; top: 30px; display: flex; gap: 26px; font-size: 24px; line-height: 30px; font-weight: 500; color: var(--mute); }
      .lg span { display: flex; align-items: center; gap: 9px; }
      .lg i { width: 14px; height: 14px; border-radius: 5px; display: block; }
      svg text { font-family: "Inter", system-ui, sans-serif; }
      .ax { font-size: 22px; font-weight: 500; fill: var(--faint); }

      #aBar { position: absolute; left: 32px; top: 238px; width: 0; height: 12px; border-radius: 6px; overflow: hidden; display: flex; }
      #aBar i { display: block; flex: none; height: 12px; margin-right: 4px; border-radius: 6px; }

      .er { position: absolute; left: 32px; width: 327px; height: 52px; }
      .er .nm { position: absolute; left: 0; top: 0; font-size: 28px; line-height: 34px; font-weight: 500; color: #2c313c; }
      .er .pc { position: absolute; right: 0; top: 0; font-size: 28px; line-height: 34px; font-weight: 700; color: var(--ink); }
      .er .tk { position: absolute; left: 0; top: 42px; width: 327px; height: 8px; border-radius: 4px; background: var(--track); }
      .er .fl { position: absolute; left: 0; top: 42px; width: 0; height: 8px; border-radius: 4px; }

      .tr { position: absolute; left: 0; width: 794px; height: 60px; border-top: 1px solid var(--line); }
      .tr .en { position: absolute; left: 32px; top: 0; font-size: 28px; line-height: 60px; font-weight: 500; color: #2c313c; }
      .tr .eu { position: absolute; left: 280px; width: 140px; top: 0; text-align: right; font-size: 28px; line-height: 60px; font-weight: 700; color: var(--ink); }
      .tr .tk { position: absolute; left: 456px; top: 25px; width: 194px; height: 10px; border-radius: 5px; background: var(--track); }
      .tr .fl { position: absolute; left: 456px; top: 25px; width: 0; height: 10px; border-radius: 5px; background: var(--accent); }
      .tr .ec { position: absolute; left: 650px; width: 112px; top: 0; text-align: right; font-size: 28px; line-height: 60px; font-weight: 600; }

      /* ---------------- loading label ---------------- */
      #loadwrap { display: flex; align-items: center; justify-content: center; z-index: 100; pointer-events: none; }
      #load { display: flex; align-items: center; gap: 20px; opacity: 0; font-size: 44px; line-height: 56px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); white-space: nowrap; }
      #spin { width: 44px; height: 44px; display: block; }

      /* ---------------- ending ---------------- */
      #lock { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
      #lrow { display: flex; align-items: center; gap: 36px; }
      #lmk { width: 150px; height: 150px; display: block; opacity: 0; transform-origin: 50% 50%; }
      #lwm { font-size: 164px; line-height: 172px; font-weight: 700; letter-spacing: -0.05em; color: var(--ink); opacity: 0; }
      #ltg { margin-top: 30px; font-size: 48px; line-height: 60px; font-weight: 500; letter-spacing: -0.015em; color: var(--mute); opacity: 0; }
      #ltg b { font-weight: 700; color: var(--accent); }
      #vig { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; pointer-events: none; background: radial-gradient(ellipse 1400px 900px at 50% 50%, rgba(30, 40, 70, 0) 58%, rgba(30, 40, 70, 0.07) 100%); }
    </style>
  </head>
  <body>
    <svg width="0" height="0" style="position: absolute" aria-hidden="true">
      <defs>
        <symbol id="i-up" viewBox="0 0 24 24"><path d="M7 17 17 7M8 7h9v9" /></symbol>
        <symbol id="i-more" viewBox="0 0 24 24"><circle cx="5" cy="12" r="1.5" fill="currentColor" stroke="none" /><circle cx="12" cy="12" r="1.5" fill="currentColor" stroke="none" /><circle cx="19" cy="12" r="1.5" fill="currentColor" stroke="none" /></symbol>
        <symbol id="i-mark" viewBox="0 0 64 64">
          <rect width="64" height="64" rx="17" fill="#4f46e5" />
          <rect x="22" y="13" width="20" height="17" rx="5" fill="#ffffff" />
          <rect x="11" y="35" width="42" height="16" rx="5" fill="#ffffff" />
        </symbol>
      </defs>
    </svg>

    <div id="root" data-composition-id="main" data-start="0" data-duration="11" data-width="1920" data-height="1080">
      <div id="stage" class="clip full" data-start="0" data-duration="11" data-track-index="0" data-layout-allow-overlap>
        <div id="bg" class="full" data-layout-allow-overlap data-layout-ignore></div>
        <div id="dash" class="full" data-layout-allow-overlap data-layout-ignore></div>

        <div id="loadwrap" class="full" data-layout-allow-overlap data-layout-ignore>
          <div id="load">
            <svg id="spin" viewBox="0 0 48 48">
              <circle cx="24" cy="24" r="18" fill="none" stroke="#d3d7e0" stroke-width="6" />
              <circle cx="24" cy="24" r="18" fill="none" stroke="#4f46e5" stroke-width="6" stroke-linecap="round" stroke-dasharray="34 200" />
            </svg>
            <span>Loading analytics&hellip;</span>
          </div>
        </div>

        <div id="lock" data-layout-allow-overlap data-layout-ignore>
          <div id="lrow"><svg id="lmk" viewBox="0 0 64 64"><use href="#i-mark" /></svg><div id="lwm">Plinth</div></div>
          <div id="ltg">Know what <b>moved.</b></div>
        </div>
        <div id="vig"></div>
      </div>
    </div>

    <script>
      const $ = (s) => document.querySelector(s);
      const clamp = (v) => Math.min(1, Math.max(0, v));
      const EZ = (n) => gsap.parseEase(n);
      const P2IO = EZ("power2.inOut"), P3O = EZ("power3.out"), P3IO = EZ("power3.inOut"), BACK = EZ("back.out(2)");
      const seg = (t, a, b, ez) => { const u = clamp((t - a) / (b - a)); return ez ? ez(u) : u; };
      const fmt = (n) => Math.round(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
      const hex = (c) => [1, 3, 5].map((i) => parseInt(c.slice(i, i + 2), 16));
      const mix = (a, b, u) => { const A = hex(a), B = hex(b); return "rgb(" + A.map((v, i) => Math.round(v + (B[i] - v) * u)).join(",") + ")"; };
      const AC = "#4f46e5", TINT = "#cfd2f7";

      function smooth(pts) {
        let d = "M" + pts[0][0].toFixed(1) + " " + pts[0][1].toFixed(1);
        for (let i = 0; i < pts.length - 1; i++) {
          const p0 = pts[i - 1] || pts[i], p1 = pts[i], p2 = pts[i + 1], p3 = pts[i + 2] || p2;
          const c1 = [p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6];
          const c2 = [p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6];
          d += " C" + c1[0].toFixed(1) + " " + c1[1].toFixed(1) + "," + c2[0].toFixed(1) + " " + c2[1].toFixed(1) + "," + p2[0].toFixed(1) + " " + p2[1].toFixed(1);
        }
        return d;
      }

      /* ---------------- bento slots (page coordinates, grid 1600x880 at 160,100, 12px gaps) ---------------- */
      const SLOT = {
        A: { x: 160, y: 100, w: 391, h: 270 },
        B: { x: 563, y: 100, w: 794, h: 578 },
        C: { x: 1369, y: 100, w: 391, h: 270 },
        D: { x: 160, y: 382, w: 391, h: 296 },
        E: { x: 1369, y: 382, w: 391, h: 598 },
        F: { x: 160, y: 690, w: 794, h: 290 },
        G: { x: 966, y: 690, w: 391, h: 290 },
      };
      /* orbit: th = start angle (deg), k = radius factor, s = depth scale, r = tilt, fly = snap start, ent = fade-in start */
      const CFG = [
        { id: "A", th: 266, k: 1.0, s: 0.8, r: -4, ph: 0.4, fly: 3.12, ent: 0.12 },
        { id: "B", th: 215, k: 0.92, s: 0.6, r: 3, ph: 1.9, fly: 3.0, ent: 0.04 },
        { id: "C", th: 317, k: 1.05, s: 0.85, r: 5, ph: 3.1, fly: 3.24, ent: 0.2 },
        { id: "D", th: 161, k: 1.0, s: 0.78, r: 2, ph: 4.4, fly: 3.36, ent: 0.28 },
        { id: "E", th: 8, k: 0.98, s: 0.65, r: -3, ph: 5.2, fly: 3.48, ent: 0.36 },
        { id: "F", th: 110, k: 0.9, s: 0.62, r: -5, ph: 0.9, fly: 3.6, ent: 0.44 },
        { id: "G", th: 59, k: 1.0, s: 0.75, r: 4, ph: 2.6, fly: 3.72, ent: 0.52 },
      ];
      const RX = 700, RY = 330, FD = 1.15;
      const dash = $("#dash");
      const EL = {};
      function card(id, html) {
        const d = document.createElement("div");
        d.className = "card";
        d.style.width = SLOT[id].w + "px";
        d.style.height = SLOT[id].h + "px";
        d.innerHTML = html;
        dash.appendChild(d);
        EL[id] = d;
        return d;
      }
      const MORE = '<svg class="ic dots"><use href="#i-more" /></svg>';
      const UP = '<svg class="ic"><use href="#i-up" /></svg>';

      /* ---------------- A: active users ---------------- */
      card("A",
        '<div class="ct">Active users</div>' + MORE +
        '<div class="big" id="aN" style="left:32px;top:62px;font-size:92px">0</div>' +
        '<div class="dl" style="top:176px">' + UP + '<b id="aD">+0.0%</b><span>vs May</span></div>' +
        '<div id="aBar"><i style="width:200px;background:#4f46e5"></i><i style="width:77px;background:#a5a9f0"></i><i style="width:42px;background:#d3d7e0;margin-right:0"></i></div>');

      /* ---------------- B: weekly active users, line chart ---------------- */
      const BX = (i) => 110 + i * 58, BY = (v) => 500 - ((v - 10) / 17) * 300;
      const TY = [14.2, 15.1, 14.8, 16.4, 17.9, 17.2, 19.6, 20.8, 20.1, 22.4, 23.1, 24.3];
      const LY = [12.4, 12.9, 13.6, 13.2, 14.5, 15.1, 15.8, 16.4, 17.2, 17.9, 18.6, 19.8];
      const MON = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
      const dT = smooth(TY.map((v, i) => [BX(i), BY(v)]));
      const dL = smooth(LY.map((v, i) => [BX(i), BY(v)]));
      let sv = '<svg class="abs" width="794" height="578" viewBox="0 0 794 578">' +
        '<defs><linearGradient id="gB" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4f46e5" stop-opacity="0.2" /><stop offset="1" stop-color="#4f46e5" stop-opacity="0" /></linearGradient>' +
        '<clipPath id="kB"><rect id="kBr" x="0" y="0" width="0" height="578" /></clipPath></defs>';
      [10, 15, 20, 25].forEach((v) => {
        const y = BY(v).toFixed(1);
        sv += '<line x1="96" x2="762" y1="' + y + '" y2="' + y + '" stroke="' + (v === 10 ? "#d6dae2" : "#eceef2") + '" stroke-width="2" />';
        sv += '<text class="ax" x="80" y="' + (BY(v) + 7).toFixed(1) + '" text-anchor="end">' + v + "k</text>";
      });
      MON.forEach((m, i) => {
        if (i % 2 === 0) sv += '<text class="ax" x="' + BX(i) + '" y="538" text-anchor="middle">' + m + "</text>";
      });
      sv += '<path d="' + dL + '" fill="none" stroke="#b9bfcb" stroke-width="4" stroke-linecap="round" stroke-dasharray="0.1 10" />';
      sv += '<path id="bA" d="' + dT + " L" + BX(11) + " 500 L" + BX(0) + ' 500 Z" fill="url(#gB)" clip-path="url(#kB)" />';
      sv += '<path id="bL" d="' + dT + '" fill="none" stroke="#4f46e5" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" opacity="0" />';
      sv += '<circle id="bH" r="9" fill="#4f46e5" stroke="#ffffff" stroke-width="4" opacity="0" />';
      sv += '<g id="bT" opacity="0"><rect x="590" y="170" width="172" height="46" rx="12" fill="#14161a" /><text x="676" y="202" text-anchor="middle" fill="#ffffff" font-size="26" font-weight="600">Dec · 24.3k</text></g>';
      sv += "</svg>";
      card("B",
        '<div class="ct">Weekly active users</div>' +
        '<div class="lg"><span><i style="background:#4f46e5"></i>This year</span><span><i style="background:#b9bfcb"></i>Last year</span></div>' +
        '<div class="big" id="bN" style="left:32px;top:62px;font-size:96px">+0.0%</div>' +
        '<div class="cap" style="left:376px;top:122px">vs last year</div>' + sv);

      /* ---------------- C: retention donut ---------------- */
      const CIRC = 2 * Math.PI * 60;
      card("C",
        '<div class="ct">Retention</div>' + MORE +
        '<div class="big" id="cN" style="left:32px;top:96px;font-size:76px">0%</div>' +
        '<div class="cap" style="left:32px;top:188px">Day 30</div>' +
        '<svg class="abs" style="left:213px;top:84px" width="150" height="150" viewBox="0 0 150 150">' +
        '<circle cx="75" cy="75" r="60" fill="none" stroke="#e9ebf1" stroke-width="18" />' +
        '<circle id="cA" cx="75" cy="75" r="60" fill="none" stroke="#4f46e5" stroke-width="18" stroke-linecap="round" transform="rotate(-90 75 75)" stroke-dasharray="' + CIRC.toFixed(2) + " " + CIRC.toFixed(2) + '" stroke-dashoffset="' + CIRC.toFixed(2) + '" opacity="0" /></svg>');

      /* ---------------- D: signups by day ---------------- */
      const DV = [820, 960, 1104, 1284, 1142, 610, 540];
      const DH = DV.map((v) => (v / 1284) * 130);
      const DL = ["M", "T", "W", "T", "F", "S", "S"];
      let dsv = '<svg class="abs" width="391" height="296" viewBox="0 0 391 296">';
      DV.forEach((v, i) => {
        const x = 32 + i * 49.17;
        dsv += '<rect id="dB' + i + '" x="' + x.toFixed(1) + '" y="236" width="32" height="8" rx="7" fill="' + TINT + '" />';
        dsv += '<text class="ax" x="' + (x + 16).toFixed(1) + '" y="274" text-anchor="middle">' + DL[i] + "</text>";
      });
      dsv += '<text id="dP" x="' + (32 + 3 * 49.17 + 16).toFixed(1) + '" y="100" text-anchor="middle" font-size="26" font-weight="700" fill="#4f46e5" opacity="0">1,284</text></svg>';
      card("D", '<div class="ct">Signups by day</div>' + MORE + dsv);

      /* ---------------- E: sessions by region (dot map) ---------------- */
      const POLY = [
        [[6, 10], [14, 6], [26, 5], [34, 9], [33, 15], [28, 19], [25, 25], [21, 24], [17, 18], [10, 16]],
        [[36, 3], [43, 3], [41, 9], [37, 8]],
        [[24, 28], [31, 27], [36, 31], [34, 40], [30, 48], [27, 48], [25, 38]],
        [[44, 10], [52, 8], [58, 10], [56, 16], [48, 18], [43, 15]],
        [[45, 20], [54, 19], [58, 25], [55, 34], [51, 42], [47, 38], [44, 28]],
        [[58, 8], [70, 5], [86, 7], [92, 13], [86, 20], [78, 26], [70, 24], [64, 20], [58, 16]],
        [[80, 36], [90, 35], [93, 41], [86, 45], [80, 42]],
      ];
      function inPoly(x, y, P) {
        let c = false;
        for (let i = 0, j = P.length - 1; i < P.length; j = i++) {
          const xi = P[i][0], yi = P[i][1], xj = P[j][0], yj = P[j][1];
          if (yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) c = !c;
        }
        return c;
      }
      const MS = 3.27;
      let md = "";
      for (let gy = 1, row = 0; gy < 52; gy += 2, row++) {
        for (let gx = 1 + (row % 2); gx < 100; gx += 2) {
          if (POLY.some((P) => inPoly(gx, gy, P))) md += "M" + (gx * MS).toFixed(1) + " " + (gy * MS).toFixed(1) + "h0";
        }
      }
      const HOT = [[22, 13], [27, 12], [51, 13], [50, 28], [30, 35], [72, 14], [82, 13], [86, 40]];
      let msv = '<svg class="abs" style="left:32px;top:76px" width="327" height="170" viewBox="0 0 327 170">';
      msv += '<path d="' + md + '" fill="none" stroke="#cdd2dc" stroke-width="4.4" stroke-linecap="round" />';
      HOT.forEach((h, i) => {
        const cx = (h[0] * MS).toFixed(1), cy = (h[1] * MS).toFixed(1);
        msv += '<circle id="mR' + i + '" cx="' + cx + '" cy="' + cy + '" r="0" fill="none" stroke="#4f46e5" stroke-width="2" opacity="0" />';
        msv += '<circle id="mH' + i + '" cx="' + cx + '" cy="' + cy + '" r="0" fill="#4f46e5" fill-opacity="0.2" />';
        msv += '<circle id="mC' + i + '" cx="' + cx + '" cy="' + cy + '" r="0" fill="#4f46e5" stroke="#ffffff" stroke-width="2" />';
      });
      msv += "</svg>";
      const REG = [
        { n: "North America", p: 41, c: "#4f46e5" },
        { n: "Europe", p: 27, c: "#6f68ec" },
        { n: "Asia Pacific", p: 21, c: "#8f8af1" },
        { n: "Latin America", p: 11, c: "#aeabf5" },
      ];
      let erows = "";
      REG.forEach((r, i) => {
        erows += '<div class="er" style="top:' + (280 + i * 76) + 'px"><div class="nm">' + r.n + '</div><div class="pc" id="eP' + i + '">0%</div><div class="tk"></div><div class="fl" id="eF' + i + '" style="background:' + r.c + '"></div></div>';
      });
      card("E", '<div class="ct">Sessions by region</div>' + MORE + msv + erows);

      /* ---------------- F: top events table ---------------- */
      const TROWS = [
        { n: "Project created", u: 6210, w: 0.92, c: 8.2 },
        { n: "Invite accepted", u: 4874, w: 0.72, c: 5.7 },
        { n: "Report shared", u: 3396, w: 0.5, c: -2.4 },
      ];
      let trs = "";
      TROWS.forEach((r, i) => {
        trs += '<div class="tr" style="top:' + (78 + i * 60) + 'px"><div class="en">' + r.n + '</div><div class="eu" id="tU' + i + '">0</div><div class="tk"></div><div class="fl" id="tF' + i + '"></div><div class="ec" id="tC' + i + '" style="color:' + (r.c > 0 ? "#4f46e5" : "#8a92a1") + '">+0.0%</div></div>';
      });
      card("F", '<div class="ct">Top events</div>' + trs);

      /* ---------------- G: conversion rate ---------------- */
      const SPV = [0.12, 0.2, 0.17, 0.3, 0.26, 0.4, 0.37, 0.5, 0.46, 0.6, 0.68, 0.64, 0.8, 0.92];
      const spPts = SPV.map((v, i) => [4 + (i * 319) / 13, 46 - v * 40]);
      const dS = smooth(spPts);
      card("G",
        '<div class="ct">Conversion rate</div>' + MORE +
        '<div class="big" id="gN" style="left:32px;top:62px;font-size:92px">0.0%</div>' +
        '<div class="dl" style="top:172px">' + UP + '<b id="gD">+0.0 pts</b><span>vs May</span></div>' +
        '<svg class="abs" style="left:32px;top:222px" width="327" height="52" viewBox="0 0 327 52">' +
        '<defs><linearGradient id="gG" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4f46e5" stop-opacity="0.2" /><stop offset="1" stop-color="#4f46e5" stop-opacity="0" /></linearGradient>' +
        '<clipPath id="kG"><rect id="kGr" x="0" y="0" width="0" height="52" /></clipPath></defs>' +
        '<line x1="4" x2="323" y1="48" y2="48" stroke="#e1e4ea" stroke-width="2" stroke-dasharray="2 8" stroke-linecap="round" />' +
        '<path id="gA" d="' + dS + " L323 48 L4 48 Z" + '" fill="url(#gG)" clip-path="url(#kG)" />' +
        '<path id="gL" d="' + dS + '" fill="none" stroke="#4f46e5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" opacity="0" />' +
        '<circle id="gH" r="6" fill="#4f46e5" stroke="#ffffff" stroke-width="3" opacity="0" /></svg>');

      /* ---------------- refs ---------------- */
      const g = (id) => document.getElementById(id);
      function mkLine(path, area, clip, head) {
        const p = g(path), len = p.getTotalLength();
        p.setAttribute("stroke-dasharray", (len + 2).toFixed(1) + " " + (len + 2).toFixed(1));
        return { p, len, a: g(area), k: g(clip), h: g(head) };
      }
      const LB = mkLine("bL", "bA", "kBr", "bH");
      const LG = mkLine("gL", "gA", "kGr", "gH");
      function drawLine(l, u) {
        if (u <= 0.001) {
          l.p.setAttribute("opacity", 0);
          l.h.setAttribute("opacity", 0);
          l.k.setAttribute("width", 0);
          return;
        }
        l.p.setAttribute("opacity", 1);
        l.p.setAttribute("stroke-dashoffset", (l.len * (1 - u)).toFixed(2));
        const pt = l.p.getPointAtLength(u * l.len);
        l.k.setAttribute("width", pt.x.toFixed(1));
        l.h.setAttribute("cx", pt.x.toFixed(1));
        l.h.setAttribute("cy", pt.y.toFixed(1));
        l.h.setAttribute("opacity", 1);
      }

      /* ---------------- orbit and snap ---------------- */
      function orbit(c, t) {
        const th = ((c.th + 22 * t) * Math.PI) / 180;
        return {
          x: 960 + RX * c.k * Math.cos(th) + 6 * Math.sin(1.1 * t + c.ph * 2),
          y: 540 + RY * c.k * Math.sin(th) + 12 * Math.sin(1.7 * t + c.ph),
          r: c.r + 2.2 * Math.sin(1.3 * t + c.ph),
          s: c.s * (1 + 0.025 * Math.sin(1.5 * t + c.ph)),
        };
      }
      function flight(u) {
        if (u <= 0) return 0;
        if (u >= 1) return 1;
        const a = 0.86, OV = 0.022;
        if (u < a) return P3IO(u / a) * (1 + OV);
        const v = (u - a) / (1 - a);
        return 1 + OV - OV * (v * v * (3 - 2 * v));
      }
      function place(c, t) {
        const o = orbit(c, t), sl = SLOT[c.id], el = EL[c.id];
        const p = flight((t - c.fly) / FD);
        const ent = seg(t, c.ent, c.ent + 0.7, P3O);
        const tx = sl.x + sl.w / 2, ty = sl.y + sl.h / 2;
        const x = o.x * (1 - p) + tx * p, y = o.y * (1 - p) + ty * p;
        const r = o.r * (1 - p);
        const s = (o.s * (1 - p) + p) * (0.9 + 0.1 * ent);
        el.style.opacity = ent.toFixed(3);
        el.style.zIndex = 10 + Math.round((c.s + (1 - c.s) * Math.min(1, p)) * 100);
        el.style.transform = "translate(" + (x - sl.w / 2).toFixed(2) + "px," + (y - sl.h / 2).toFixed(2) + "px) rotate(" + r.toFixed(2) + "deg) scale(" + s.toFixed(4) + ")";
      }

      /* ---------------- values, charts and counts (all from timeline time) ---------------- */
      const rA = { n: g("aN"), d: g("aD"), bar: g("aBar") };
      const rB = { n: g("bN"), tag: g("bT"), k: g("kBr") };
      const rC = { n: g("cN"), arc: g("cA") };
      const rD = DV.map((v, i) => g("dB" + i));
      const rDP = g("dP");
      const rE = HOT.map((h, i) => ({ r: g("mR" + i), h: g("mH" + i), c: g("mC" + i) }));
      const rEP = REG.map((r, i) => ({ p: g("eP" + i), f: g("eF" + i) }));
      const rF = TROWS.map((r, i) => ({ u: g("tU" + i), f: g("tF" + i), c: g("tC" + i) }));
      const rG = { n: g("gN"), d: g("gD") };
      const spin = $("#spin");

      function content(t) {
        let p = seg(t, 4.6, 5.9, P3O);
        rA.n.textContent = fmt(24318 * p);
        rA.d.textContent = "+" + (12.4 * p).toFixed(1) + "%";
        rA.bar.style.width = (327 * seg(t, 4.7, 5.9, P2IO)).toFixed(1) + "px";

        p = seg(t, 4.45, 5.9, P3O);
        rB.n.textContent = "+" + (18.4 * p).toFixed(1) + "%";
        drawLine(LB, seg(t, 4.5, 5.95, P2IO));
        rB.tag.setAttribute("opacity", seg(t, 5.9, 6.2).toFixed(3));

        p = seg(t, 4.75, 6.0, P3O);
        rC.n.textContent = Math.round(68 * p) + "%";
        rC.arc.setAttribute("opacity", p > 0.001 ? 1 : 0);
        rC.arc.setAttribute("stroke-dashoffset", (CIRC * (1 - 0.68 * p)).toFixed(2));

        DH.forEach((h, i) => {
          const q = seg(t, 4.8 + i * 0.06, 5.7 + i * 0.06, P3O);
          const hh = 8 + (h - 8) * q;
          rD[i].setAttribute("y", (244 - hh).toFixed(2));
          rD[i].setAttribute("height", hh.toFixed(2));
          if (i === 3) rD[i].setAttribute("fill", mix(TINT, AC, seg(t, 5.0, 5.8)));
        });
        rDP.setAttribute("opacity", seg(t, 5.55, 5.9).toFixed(3));

        rE.forEach((e, i) => {
          const q = seg(t, 4.95 + i * 0.07, 5.5 + i * 0.07, BACK);
          e.c.setAttribute("r", (5 * q).toFixed(2));
          e.h.setAttribute("r", (13 * q).toFixed(2));
          const gain = seg(t, 5.9, 6.3);
          const f = (((t * 0.7 + i * 0.37) % 1) + 1) % 1;
          e.r.setAttribute("r", (6 + 18 * f).toFixed(2));
          e.r.setAttribute("opacity", (0.45 * (1 - f) * gain).toFixed(3));
        });
        REG.forEach((r, i) => {
          const q = seg(t, 5.0 + i * 0.1, 5.8 + i * 0.1, P3O);
          rEP[i].p.textContent = Math.round(r.p * q) + "%";
          rEP[i].f.style.width = (r.p * 3.27 * q).toFixed(1) + "px";
        });

        TROWS.forEach((r, i) => {
          const s0 = 5.0 + i * 0.1;
          const q = seg(t, s0, s0 + 0.95, P3O);
          rF[i].u.textContent = fmt(r.u * q);
          rF[i].f.style.width = (194 * r.w * q).toFixed(1) + "px";
          rF[i].c.textContent = (r.c > 0 ? "+" : "−") + Math.abs(r.c * q).toFixed(1) + "%";
        });

        p = seg(t, 5.1, 6.2, P3O);
        rG.n.textContent = (4.8 * p).toFixed(1) + "%";
        rG.d.textContent = "+" + (0.6 * p).toFixed(1) + " pts";
        drawLine(LG, seg(t, 5.1, 6.2, P2IO));
      }

      function render(t) {
        spin.style.transform = "rotate(" + (t * 330).toFixed(1) + "deg)";
        CFG.forEach((c) => place(c, t));
        content(t);
      }
      render(0);

      /* ---------------- timeline ---------------- */
      const tl = gsap.timeline({ paused: true });
      tl.to("#load", { opacity: 1, duration: 0.5, ease: "power2.out" }, 0.15);
      tl.to("#load", { opacity: 0, y: -14, duration: 0.45, ease: "power2.in" }, 2.95);

      /* slow push-in while the values fill */
      tl.to("#dash", { scale: 1.012, duration: 2.75, ease: "none" }, 4.9);
      /* dashboard scales down and clears */
      tl.to("#dash", { scale: 0.9, opacity: 0, duration: 0.5, ease: "power3.inOut" }, 7.65);

      /* lockup */
      tl.fromTo("#lmk", { opacity: 0, scale: 0.8 }, { opacity: 1, scale: 1, duration: 0.5, ease: "expo.out" }, 8.15);
      tl.fromTo("#lwm", { opacity: 0, y: 26 }, { opacity: 1, y: 0, duration: 0.5, ease: "expo.out" }, 8.2);
      tl.fromTo("#ltg", { opacity: 0, y: 18 }, { opacity: 1, y: 0, duration: 0.5, ease: "expo.out" }, 8.27);

      /* driver: orbit, snap, counts, charts */
      tl.to({ v: 0 }, { v: 1, duration: 11, ease: "none", onUpdate: () => render(tl.time()) }, 0);

      tl.set({}, {}, 11);

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