# Keystroke Visualizer

Motionboard shot name: Keycap Chips

Keycap chips pop in at the bottom left as each shortcut runs. ⌘ K opens a command bar, two ↓ presses move the highlight down two rows, and ↵ runs Start Timer with a toast, then the Strata lockup.

- Position in a launch film: Features
- Slug: keystroke-visualizer
- Preview video: https://media.motionboard.app/keycap-chips.mp4
- Recipe page: https://motionboard.app/recipes/keystroke-visualizer/
- 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 `keycap-chips`. 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. ⌘ and K pop in at 0.35 and 0.42s, label Open Strata at 0.65s; ⌘ pressed 0.85s, K pressed 1.0s while the window opens 1.0–1.6s, keys release 1.2s; rows stagger in from 1.1s, highlight appears on row 1 at 1.35s; combo clears 2.4–2.65s; ↓ ↓ pop in at 2.75 and 2.83s, label Move down at 3.0s; first ↓ pressed 3.3s (highlight to row 2 over 0.24s), second ↓ pressed 4.1s (highlight to Start Timer); combo clears 5.0–5.25s; ↵ pops in at 5.4s, label Run at 5.62s; ↵ pressed 6.0s, row flashes and the toast rises 6.05–6.45s; window closes 7.1–7.45s; toast leaves 7.5–7.75s; lockup 7.85–8.65s and holds still to the end |
| Easing | Chip pop is two 0.16s tweens, power2.out up to scale 1.08 then power2.inOut back to 1; press 0.07s power2.out, release 0.2s power2.out; highlight move 0.24s power3.out; window open, row stagger, labels, toast in and lockup use expo.out; chip, label, window and toast exits use power2.in; the push-in is linear (none) |
| Camera | Locked camera with no cuts. The whole scene scales from 1 to 1.025 linearly over 0–7.7s as a slow push-in; the lockup sits outside that wrapper and stays still |
| Subject | Keycaps 120x120px with 28px corners, a gradient face from #484853 to #27272f, an inset top plate and an 8px base shadow; glyphs are 58px SVG icons (⌘, ↓, ↵) and K at 68px weight 600; chips sit at top 890px, left 80px and 220px; label 36px weight 500 with a 12px accent dot, starting 28px after the last chip (368px for two chips, 228px for one). Window 1300x700px with 30px corners, scaled 1.08 to about 1404x756px, spanning about y 79–835px; 104px search field with a 38px placeholder; six rows 84px high with a 52px icon tile, 34px title and 26px subtitle (Search Files, Clipboard History, Start Timer, Toggle Dark Mode, Open Calendar, New Message); highlight bar 1276x84px. Toast 780x112px with a 68px icon and 44px text at (570, 747). Lockup mark 176px, Strata at 184px weight 700, tagline at 46px |
| Sync | Every key press and its interface change start on the same frame: K down and window open at 1.0s, each ↓ and the highlight move at 3.3s and 4.1s (tile and title colors cross-fade over 0.2s), ↵ at 6.0s with the row flash and the toast 0.05s later; ⌘ stays down 0.85–1.2s while K is pressed; a combo clears 0.1–0.15s before the next one pops in |
| Style | Background `#09090b` with a violet glow at the top centre, a 48px dot grid at 7% white and a vignette reaching 50% at the edges; one accent violet `#8a7bff`; Inter throughout; dark glass window with a 1px light ring, keycaps with a top highlight and a dark base; caret in the search field toggles every 0.5s |

## Why it works

Each chip is a keycap with a real press: the cap travels 4px down while its base shadow shrinks from 8px to 4px and an accent overlay brightens it, so the viewer reads a physical key even at 120px. The press and the interface change start on the same frame, so the keys explain the screen: K goes down at 1.0s as the window opens, each ↓ moves the highlight at 3.3s and 4.1s, and ↵ at 6.0s flashes the row and raises the toast. One combo shows at a time, never more than two chips, and each set clears about 0.1–0.15s before the next one pops in, so the corner always shows the key being pressed now. Each label (Open Strata, Move down, Run) starts about 0.25s after its chip pops and sits 28px after the last chip, so chips and words read as one caption. The window stays centred and still while the chips live at the bottom left, so the eye can follow the highlight and the keys together. The result of ↵ arrives as a toast over the window footer, where the viewer is already looking. There is one accent color, violet #8a7bff.

## Prompt

> Build an 11-second, 1920x1080, 30 fps dark film called Keycap Chips for a fictional product, Strata (a command bar for the Mac). Background #09090b with a violet radial glow rgba(92,72,210,0.24) at the top centre, a 48px dot grid at 7% white masked toward the edges, a vignette reaching 50% black at the edges, one accent color #8a7bff, font Inter. One GSAP timeline, no CSS animations. Put the scene in a wrapper that scales 1 to 1.025 linearly over 0–7.7s. Hide every element in CSS (opacity 0) and tween to explicit end values.
>
> Window: a 1300x700px panel at left 310, top 110, 30px corners, a dark gradient from #222229 to #14141b, a 1px white ring at 10% and a violet glow, scaled 1.08 (about 1404x756px). Inside: a 104px search field (search icon, placeholder Type a command… at 38px, a caret toggling every 0.5s from 1.5s), then six rows 84px high, each with a 52px icon tile, a 34px title and a 26px grey subtitle: Search Files, Clipboard History, Start Timer, Toggle Dark Mode, Open Calendar, New Message. A 1276x84px highlight bar (accent at 17% with a 1.5px ring) sits behind the selected row; the selected tile fills with the accent and its title turns white. A footer shows Run Enter and Actions Tab at 20–23px.
>
> Keycap chips: 120x120px, 28px corners, face gradient #484853 to #27272f, an inset top plate, an 8px dark base shadow, glyph 58px (SVG ⌘ and arrows) or K at 68px. Place them at top 890px, left 80px and 220px. A label at 36px weight 500 with a 12px accent dot starts 28px after the last chip (368px after two chips, 228px after one). A chip pops with opacity 1 and scale 0 to 1.08 over 0.16s power2.out, then 1.08 to 1 over 0.16s power2.inOut, with the second chip of a combo 0.07s later. A press moves the cap down 4px in 0.07s (base shadow 8px to 4px) and fades an accent overlay in; release takes 0.2s. Chips leave in 0.25s power2.in (scale 0.85, y +10px).
>
> Timeline: ⌘ and K pop at 0.35 and 0.42s, label Open Strata at 0.65s. ⌘ pressed 0.85s, K pressed 1.0s, and on that frame the window opens (scale 1.0368 to 1.08, y 14 to 0, expo.out, 0.6s). Rows stagger in from 1.1s, 0.05s apart; keys release 1.2s; the highlight fades onto row 1 at 1.35s; the combo clears 2.4s. ↓ and ↓ pop at 2.75 and 2.83s, label Move down at 3.0s. First press 3.3s moves the highlight down 84px in 0.24s power3.out (tile and title colors cross-fade 0.2s); second press 4.1s moves it to Start Timer; combo clears 5.0s. ↵ pops at 5.4s, label Run at 5.62s. At 6.0s ↵ is pressed, the highlight flashes (rgba(160,148,255,0.6), 0.06s in, 0.5s out), the footer fades and a 780x112px toast (68px accent icon, Timer started · 25:00 at 44px) rises in at 6.05s at left 570, top 747, expo.out 0.4s. The window closes 7.1–7.45s (scale 1.0476), the toast leaves at 7.5s. Lockup: a 176px violet mark with three stacked white bars, Strata at 184px weight 700, the tagline Every command, two keys away. at 46px in #9d9dae, entering at 7.85, 7.95 and 8.15s with expo.out; settled by 8.65s and still to 11s.

## Often confused with

- [Typing Animation (Typewriter Effect)](https://motionboard.app/r/typing-animation.md): Typing Animation types a line of text into a field one character at a time; Keystroke Visualizer shows the shortcut itself as keycap chips that press down on the same frame as the interface change.
- [Zoom-to-Cursor Effect](https://motionboard.app/r/zoom-to-cursor.md): Zoom to Cursor pushes the camera to a pointer working through one app; here the camera stays locked, there is no cursor, and the keys in the corner are the guide to what the window does.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/keycap-chips/hyperframes.json (318 B)
- https://motionboard.app/source/keycap-chips/index.html (20.1 KB)
- https://motionboard.app/source/keycap-chips/package.json (301 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "keycap-chips/hyperframes.json" "https://motionboard.app/source/keycap-chips/hyperframes.json"
curl -fsSL --create-dirs -o "keycap-chips/index.html" "https://motionboard.app/source/keycap-chips/index.html"
curl -fsSL --create-dirs -o "keycap-chips/package.json" "https://motionboard.app/source/keycap-chips/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 {
        --bg: #09090b;
        --ink: #f4f4f8;
        --sub: #787886;
        --acc: #8a7bff;
        --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: #09090b; }
      #root {
        position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #09090b;
        font-family: var(--font-ui); color: var(--ink); -webkit-font-smoothing: antialiased;
      }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      .a { position: absolute; }
      svg { display: block; }

      /* ---------- backdrop ---------- */
      #wall {
        background:
          radial-gradient(ellipse 52% 58% at 50% 36%, rgba(92, 72, 210, 0.24) 0%, rgba(92, 72, 210, 0) 70%),
          radial-gradient(ellipse 42% 46% at 6% 102%, rgba(46, 170, 178, 0.12) 0%, rgba(46, 170, 178, 0) 70%),
          radial-gradient(ellipse 40% 42% at 98% 2%, rgba(150, 120, 255, 0.12) 0%, rgba(150, 120, 255, 0) 70%),
          #09090b;
      }
      #dots {
        background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1.5px, rgba(255, 255, 255, 0) 2.2px);
        background-size: 48px 48px; background-position: 24px 24px;
        -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 0%, rgba(0, 0, 0, 0.15) 100%);
        mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 0%, rgba(0, 0, 0, 0.15) 100%);
      }
      #vig { pointer-events: none; background: radial-gradient(ellipse at 50% 48%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.5) 100%); }

      /* ---------- launcher window ---------- */
      #win {
        position: absolute; left: 310px; top: 110px; width: 1300px; height: 700px; border-radius: 30px; opacity: 0;
        background: linear-gradient(180deg, rgba(34, 34, 43, 0.97) 0%, rgba(20, 20, 27, 0.98) 100%);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.55), 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 140px rgba(100, 80, 230, 0.2);
      }
      #win::before {
        content: ""; position: absolute; left: 0; top: 0; right: 0; height: 100%; border-radius: 30px; pointer-events: none;
        box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.12);
      }
      #hdr { position: absolute; left: 0; top: 0; width: 1300px; height: 104px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
      #hdr .sIc { position: absolute; left: 40px; top: 32px; color: #8a8a99; }
      #car { position: absolute; left: 104px; top: 30px; width: 3px; height: 44px; border-radius: 2px; background: var(--acc); opacity: 0; }
      #ph { position: absolute; left: 116px; top: 0; line-height: 104px; font-size: 38px; font-weight: 400; color: #6c6c7b; letter-spacing: -0.01em; }
      #esc { position: absolute; right: 36px; top: 30px; height: 44px; padding: 0 16px; border-radius: 12px; font-size: 22px; line-height: 44px; font-weight: 500; color: #8a8a99; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
      #list { position: absolute; left: 0; top: 105px; width: 1300px; height: 528px; }
      #hi {
        position: absolute; left: 12px; top: 12px; width: 1276px; height: 84px; border-radius: 20px; opacity: 0;
        background: rgba(138, 123, 255, 0.17); box-shadow: inset 0 0 0 1.5px rgba(138, 123, 255, 0.42);
      }
      #flash { position: absolute; inset: 0; border-radius: 20px; background: rgba(160, 148, 255, 0.6); opacity: 0; }
      .row { position: absolute; left: 12px; width: 1276px; height: 84px; padding: 0 24px 0 20px; display: flex; align-items: center; opacity: 0; }
      .tile { position: relative; width: 52px; height: 52px; flex: none; border-radius: 15px; background: rgba(255, 255, 255, 0.075); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); margin-right: 24px; }
      .tile .hot { position: absolute; inset: 0; border-radius: 15px; background: linear-gradient(180deg, #a094ff, #7566f2); opacity: 0; }
      .tile svg { position: absolute; left: 12px; top: 12px; color: #e6e6ee; }
      .tt { font-size: 34px; font-weight: 500; letter-spacing: -0.015em; color: #c4c4ce; white-space: nowrap; }
      .ss { font-size: 26px; font-weight: 400; color: var(--sub); margin-left: 20px; white-space: nowrap; }
      .hn { margin-left: auto; font-size: 22px; font-weight: 500; color: #70707e; padding: 5px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
      #foot { position: absolute; left: 0; top: 636px; width: 1300px; height: 64px; border-top: 1px solid rgba(255, 255, 255, 0.07); display: flex; align-items: center; padding: 0 36px; font-size: 23px; font-weight: 500; color: #7c7c8a; }
      #foot .fm { width: 28px; height: 28px; margin-right: 12px; }
      #foot .r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
      #foot kbd { font-family: var(--font-ui); font-size: 20px; font-weight: 500; color: #a0a0ae; padding: 3px 11px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
      #foot .gap { width: 14px; }

      /* ---------- keycap chips ---------- */
      .chip { position: absolute; top: 890px; width: 120px; height: 120px; opacity: 0; }
      .cap { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 28px; }
      .face {
        position: absolute; inset: 0; border-radius: 28px;
        background: linear-gradient(180deg, #484853 0%, #30303a 55%, #27272f 100%);
        box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.24), inset 0 -5px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
      }
      .top {
        position: absolute; left: 13px; right: 13px; top: 11px; bottom: 19px; border-radius: 20px;
        background: linear-gradient(180deg, #373742 0%, #2c2c35 100%);
        box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.18);
      }
      .hot { position: absolute; inset: 0; border-radius: 28px; background: linear-gradient(180deg, #b0a5ff 0%, #8070f5 60%, #6d5df0 100%); opacity: 0; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -5px 0 rgba(0, 0, 0, 0.18); }
      .glyph { position: absolute; left: 0; top: 0; width: 120px; height: 101px; display: flex; align-items: center; justify-content: center; color: #e2e2ec; font-size: 68px; font-weight: 600; letter-spacing: -0.02em; }
      .glyph svg { width: 58px; height: 58px; }
      #c1, #d1, #e1 { left: 80px; }
      #c2, #d2 { left: 220px; }
      .lab { position: absolute; left: 368px; top: 890px; height: 120px; line-height: 120px; font-size: 36px; font-weight: 500; letter-spacing: -0.015em; color: #f1f1f6; white-space: nowrap; opacity: 0; }
      .lab i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); margin-right: 18px; vertical-align: 4px; }

      /* ---------- toast ---------- */
      #toast {
        position: absolute; left: 570px; top: 747px; width: 780px; height: 112px; border-radius: 34px; opacity: 0;
        display: flex; align-items: center; gap: 26px; padding: 0 40px 0 22px; white-space: nowrap;
        background: rgba(30, 30, 39, 0.98); color: #fff; font-size: 44px; font-weight: 600; letter-spacing: -0.015em;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(100, 80, 230, 0.2), inset 0 1.5px 0 rgba(255, 255, 255, 0.1);
      }
      #toast .ti { width: 68px; height: 68px; border-radius: 20px; flex: none; background: linear-gradient(180deg, #a094ff, #7566f2); display: flex; align-items: center; justify-content: center; color: #fff; }
      #toast .tm { color: #b9b2ff; font-variant-numeric: tabular-nums; }

      /* ---------- lockup ---------- */
      #glow { opacity: 0; background: radial-gradient(ellipse 40% 36% at 50% 42%, rgba(110, 90, 240, 0.2) 0%, rgba(110, 90, 240, 0) 72%); }
      #lrow { position: absolute; left: 0; top: 360px; width: 1920px; height: 200px; display: flex; align-items: center; justify-content: center; gap: 40px; }
      #mark { opacity: 0; }
      #wm { opacity: 0; font-size: 184px; line-height: 200px; font-weight: 700; letter-spacing: -0.05em; color: var(--ink); padding-bottom: 12px; }
      #wsub { position: absolute; left: 0; top: 590px; width: 1920px; text-align: center; font-size: 46px; line-height: 60px; font-weight: 500; letter-spacing: -0.015em; color: #9d9dae; 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="wall" class="clip full" data-start="0" data-duration="11" data-track-index="0" data-layout-ignore></div>
      <div id="dots" class="clip full" data-start="0" data-duration="11" data-track-index="1" data-layout-ignore></div>

      <div id="scene" class="clip full" data-start="0" data-duration="11" data-track-index="2">
        <div id="drift" class="full" data-layout-allow-overlap>
          <div id="win" data-layout-allow-overlap>
            <div id="hdr">
              <div class="sIc">
                <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
              </div>
              <div id="car"></div>
              <div id="ph">Type a command…</div>
              <div id="esc">esc</div>
            </div>
            <div id="list">
              <div id="hi"><div id="flash"></div></div>
            </div>
            <div id="foot">
              <svg class="fm" viewBox="0 0 100 100"><rect width="100" height="100" rx="24" fill="#8a7bff"/><rect x="22" y="26" width="56" height="12" rx="6" fill="#fff"/><rect x="32" y="44" width="46" height="12" rx="6" fill="#fff" opacity="0.72"/><rect x="42" y="62" width="36" height="12" rx="6" fill="#fff" opacity="0.46"/></svg>
              <span>Strata</span>
              <div class="r"><span>Run</span><kbd>Enter</kbd><span class="gap"></span><span>Actions</span><kbd>Tab</kbd></div>
            </div>
          </div>

          <div id="c1" class="chip" data-layout-allow-overlap><div class="cap"><div class="face"></div><div class="top"></div><div class="hot"></div><div class="glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"/></svg></div></div></div>
          <div id="c2" class="chip" data-layout-allow-overlap><div class="cap"><div class="face"></div><div class="top"></div><div class="hot"></div><div class="glyph">K</div></div></div>
          <div id="d1" class="chip" data-layout-allow-overlap><div class="cap"><div class="face"></div><div class="top"></div><div class="hot"></div><div class="glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14"/><path d="m19 12-7 7-7-7"/></svg></div></div></div>
          <div id="d2" class="chip" data-layout-allow-overlap><div class="cap"><div class="face"></div><div class="top"></div><div class="hot"></div><div class="glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14"/><path d="m19 12-7 7-7-7"/></svg></div></div></div>
          <div id="e1" class="chip" data-layout-allow-overlap><div class="cap"><div class="face"></div><div class="top"></div><div class="hot"></div><div class="glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 10 4 15 9 20"/><path d="M20 4v7a4 4 0 0 1-4 4H4"/></svg></div></div></div>

          <div id="lab1" class="lab"><i></i>Open Strata</div>
          <div id="lab2" class="lab"><i></i>Move down</div>
          <div id="lab3" class="lab" style="left:228px"><i></i>Run</div>

          <div id="toast" data-layout-allow-overlap>
            <div class="ti"><svg width="38" height="38" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2h4"/><path d="M12 14l3-3"/><circle cx="12" cy="14" r="8"/></svg></div>
            <span>Timer started · <span class="tm">25:00</span></span>
          </div>
        </div>
      </div>

      <div id="vig" class="clip full" data-start="0" data-duration="11" data-track-index="3" data-layout-ignore></div>

      <div id="end" class="clip full" data-start="0" data-duration="11" data-track-index="4">
        <div id="glow" class="full" data-layout-ignore></div>
        <div id="lrow" data-layout-allow-overlap>
          <div id="mark">
            <svg width="176" height="176" viewBox="0 0 100 100">
              <defs>
                <linearGradient id="mg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#a094ff"/><stop offset="1" stop-color="#6d5df0"/></linearGradient>
              </defs>
              <rect width="100" height="100" rx="24" fill="url(#mg)"/>
              <rect x="22" y="26" width="56" height="12" rx="6" fill="#fff"/>
              <rect x="32" y="44" width="46" height="12" rx="6" fill="#fff" opacity="0.72"/>
              <rect x="42" y="62" width="36" height="12" rx="6" fill="#fff" opacity="0.46"/>
            </svg>
          </div>
          <div id="wm">Strata</div>
        </div>
        <div id="wsub">Every command, two keys away.</div>
      </div>
    </div>

    <script>
      const EXPO = "expo.out";
      const REST = "0 8px 0 rgba(6,6,9,1), 0 20px 36px rgba(0,0,0,0.55)";
      const PRESS = "0 4px 0 rgba(6,6,9,1), 0 8px 18px rgba(0,0,0,0.5)";

      /* ---------- command rows ---------- */
      const ICON = {
        search: '<circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/>',
        clip: '<rect x="8" y="2" width="8" height="4" rx="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>',
        timer: '<path d="M10 2h4"/><path d="M12 14l3-3"/><circle cx="12" cy="14" r="8"/>',
        moon: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>',
        cal: '<rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4"/><path d="M8 2v4"/><path d="M3 10h18"/>',
        send: '<path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/>'
      };
      const ROWS = [
        ["search", "Search Files", "Find any file or folder", "Files"],
        ["clip", "Clipboard History", "Last 200 copied items", "Clipboard"],
        ["timer", "Start Timer", "Focus session, 25 min", "Timer"],
        ["moon", "Toggle Dark Mode", "Switch system appearance", "System"],
        ["cal", "Open Calendar", "Today, 4 events", "Calendar"],
        ["send", "New Message", "Compose to a contact", "Messages"]
      ];
      const list = document.getElementById("list");
      ROWS.forEach((r, i) => {
        const d = document.createElement("div");
        d.className = "row"; d.id = "r" + i; d.style.top = 12 + i * 84 + "px";
        d.innerHTML =
          '<div class="tile"><div class="hot" id="th' + i + '"></div><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round">' + ICON[r[0]] + "</svg></div>" +
          '<span class="tt" id="tt' + i + '">' + r[1] + '</span><span class="ss">' + r[2] + '</span><span class="hn">' + r[3] + "</span>";
        list.appendChild(d);
      });

      /* ---------- baselines ---------- */
      gsap.set("#drift", { transformOrigin: "50% 50%", scale: 1 });
      gsap.set("#win", { transformOrigin: "50% 55%", scale: 1.0368, y: 14 });
      gsap.set(".row", { y: 12 });
      gsap.set("#hi", { y: 0 });
      gsap.set(".chip", { scale: 0, y: 0, transformOrigin: "50% 50%" });
      gsap.set(".cap", { y: 0, boxShadow: REST });
      gsap.set(".lab", { y: 10 });
      gsap.set("#toast", { y: 14 });
      gsap.set("#mark", { scale: 0.8, transformOrigin: "50% 50%" });
      gsap.set("#wm", { x: -24 });
      gsap.set("#wsub", { y: 12 });

      const tl = gsap.timeline({ paused: true });

      /* helpers */
      function pop(id, t) {
        tl.to(id, { opacity: 1, scale: 1.08, duration: 0.16, ease: "power2.out" }, t);
        tl.to(id, { scale: 1, duration: 0.16, ease: "power2.inOut" }, t + 0.16);
      }
      function out(ids, t) {
        tl.to(ids, { opacity: 0, scale: 0.85, y: 10, duration: 0.25, ease: "power2.in" }, t);
      }
      function down(id, t) {
        tl.to(id + " .cap", { y: 4, boxShadow: PRESS, duration: 0.07, ease: "power2.out" }, t);
        tl.to(id + " .hot", { opacity: 1, duration: 0.07, ease: "power2.out" }, t);
      }
      function up(id, t) {
        tl.to(id + " .cap", { y: 0, boxShadow: REST, duration: 0.2, ease: "power2.out" }, t);
        tl.to(id + " .hot", { opacity: 0, duration: 0.3, ease: "power2.out" }, t);
      }
      function showLab(id, t) { tl.to(id, { opacity: 1, y: 0, duration: 0.4, ease: EXPO }, t); }
      function hideLab(id, t) { tl.to(id, { opacity: 0, y: -6, duration: 0.25, ease: "power2.in" }, t); }
      function sel(i, on, t, d) {
        tl.to("#th" + i, { opacity: on ? 1 : 0, duration: d, ease: "power2.out" }, t);
        tl.to("#tt" + i, { color: on ? "#ffffff" : "#c4c4ce", duration: d, ease: "power2.out" }, t);
      }

      /* 1. backdrop settles, slow drift on the whole scene (0 - 7.7) */
      tl.to("#drift", { scale: 1.025, duration: 7.7, ease: "none" }, 0);

      /* 2. combo one: Cmd + K opens the window (0.35 - 2.65) */
      pop("#c1", 0.35);
      pop("#c2", 0.42);
      showLab("#lab1", 0.65);
      down("#c1", 0.85);
      down("#c2", 1.0);
      tl.to("#win", { opacity: 1, scale: 1.08, y: 0, duration: 0.6, ease: EXPO }, 1.0);
      tl.to(".row", { opacity: 1, y: 0, duration: 0.45, ease: EXPO, stagger: 0.05 }, 1.1);
      up("#c1", 1.2);
      up("#c2", 1.2);
      tl.to("#hi", { opacity: 1, duration: 0.3, ease: "power2.out" }, 1.35);
      sel(0, true, 1.35, 0.3);
      hideLab("#lab1", 2.4);
      out(["#c1", "#c2"], 2.4);

      /* caret blinks in the search field (deterministic toggles) */
      for (let k = 0, t = 1.5; t < 7.0; k++, t += 0.5) {
        tl.set("#car", { opacity: k % 2 === 0 ? 1 : 0 }, t);
      }

      /* 3. combo two: down, down moves the highlight (2.75 - 5.25) */
      pop("#d1", 2.75);
      pop("#d2", 2.83);
      showLab("#lab2", 3.0);
      down("#d1", 3.3);
      up("#d1", 3.46);
      tl.to("#hi", { y: 84, duration: 0.24, ease: "power3.out" }, 3.3);
      sel(0, false, 3.3, 0.2);
      sel(1, true, 3.3, 0.2);
      down("#d2", 4.1);
      up("#d2", 4.26);
      tl.to("#hi", { y: 168, duration: 0.24, ease: "power3.out" }, 4.1);
      sel(1, false, 4.1, 0.2);
      sel(2, true, 4.1, 0.2);
      hideLab("#lab2", 5.0);
      out(["#d1", "#d2"], 5.0);

      /* 4. combo three: Enter runs the row (5.4 - 7.35) */
      pop("#e1", 5.4);
      showLab("#lab3", 5.62);
      down("#e1", 6.0);
      up("#e1", 6.18);
      tl.to("#flash", { opacity: 1, duration: 0.06, ease: "power2.out" }, 6.0);
      tl.to("#flash", { opacity: 0, duration: 0.5, ease: "power2.out" }, 6.07);
      tl.to("#toast", { opacity: 1, y: 0, duration: 0.4, ease: EXPO }, 6.05);
      tl.to("#foot", { opacity: 0, duration: 0.2, ease: "power2.out" }, 6.0);
      tl.to("#win", { opacity: 0, scale: 1.0476, y: 8, duration: 0.35, ease: "power2.in" }, 7.1);
      hideLab("#lab3", 7.2);
      out("#e1", 7.2);
      tl.to("#toast", { opacity: 0, y: 8, duration: 0.25, ease: "power2.in" }, 7.5);

      /* 5. lockup (7.85 - 8.65), then holds still to the end */
      tl.to("#glow", { opacity: 1, duration: 0.8, ease: "power2.out" }, 7.85);
      tl.to("#mark", { opacity: 1, scale: 1, duration: 0.6, ease: EXPO }, 7.85);
      tl.to("#wm", { opacity: 1, x: 0, duration: 0.6, ease: EXPO }, 7.95);
      tl.to("#wsub", { opacity: 1, y: 0, duration: 0.5, ease: EXPO }, 8.15);

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