# Underline Animation

Motionboard shot name: Hand-Drawn Underline

The headline Meet the new Margin sits on paper and an orange hand-drawn underline draws under the word new. The film then moves to a document with a short checklist, where a yellow marker band sweeps behind one item and then a second, before the Margin lockup.

- Position in a launch film: Product reveal
- Slug: underline-animation
- Preview video: https://media.motionboard.app/hand-underline.mp4
- Recipe page: https://motionboard.app/recipes/underline-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 `hand-underline`. 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. Headline words rise 0.3–1.6s (0.12s stagger, 0.95s each); underline draws 1.4–1.9s; second stroke 2.0–2.28s; subline 2.25–3.05s; headline group exits 4.0–4.5s; doc card rises 4.35–5.35s, toolbar pill at 4.75s, checklist rows from 4.7s (0.08s stagger); marker swatch presses 5.1s; band 1 sweeps 5.2–5.8s and band 2 5.95–6.67s; doc exits 7.35–7.8s; lockup starts 7.9s, settles by 8.8s and holds 2.2s to the end |
| Easing | Headline words and lockup letters expo.out; underline power2.in (second stroke power1.in); subline and rows power3.out; marker sweeps power2.inOut; headline exit power3.in and doc exit power2.in; the camera drifts are linear (none) |
| Camera | Flat locked frame with a slow constant push: 1.00→1.03x over 0–4.4s on the headline beat and 1.00→1.035x over 4.4–7.4s on the doc beat; the lockup does not move |
| Subject | Headline Meet the new Margin at 150px, weight 700, letter-spacing -0.04em, on one line. The underline SVG sits under the word new, 110% of the word's width and 0.38em tall, viewBox 320x53 stretched to fit; the filled path is about 13px thick in the middle and pointed at both ends, revealed by a 40px mask stroke with pathLength 1 and dashoffset 1.02→0; a second sliver 0.28s long sits below it. Doc card 1260x760px, radius 26px, with an 84px title, a 28px meta line, a 26px uppercase label and four 90px rows of 44px text with 40px checkboxes (two done and struck through, two open). Marker band 400x60 viewBox, extends 16px left and 18px right of the text, two layers (#ffd500 at 78% and #ffc400 at 28%) with mix-blend-mode multiply and a clip-path polygon whose top edge leads by 12%. Toolbar pill 520x76px with three 30px swatches. Lockup: 150px rounded-square mark with an orange margin rule and a drawn white M, wordmark Margin 140px, tagline 40px |
| Sync | The last headline word lands at about 1.6s while the underline is already drawing (from 1.4s); the subline arrives 0.35s after the underline ends; the swatch press at 5.1s comes 0.1s before band 1 starts; band 2 starts 0.15s after band 1 ends; the wordmark underline draws from 8.3s while the letters are still settling and the tagline follows at 8.35s |
| Style | Paper `#eeede9` with a soft white centre, doc card `#fffefb`, ink `#17171c`, one accent orange `#ff5a2e` for the underline and the mark's rule, marker yellow `#ffd500` as a tool colour; Inter throughout (700 headline, 500 body); grain at 9% multiply and a vignette to 12% at the edges |

## Why it works

The underline is a tapered filled shape revealed by a masked stroke, so both ends come to a point and the edge looks drawn by hand while the reveal is a plain stroke-dashoffset tween. The ease starts slowly and finishes fast (power2.in), the way a pen accelerates across a word, and a short second stroke under the first adds the uneven second pass. The headline is the only thing on the frame and sits at 150px, so the single orange accent has one place to land. The second beat changes the subject to a document. A toolbar pill shows the marker colour being picked, so the band that follows reads as a tool in use. The band sweeps left to right with a slanted front (the top edge leads the bottom by 12%), has torn edges and a multiply blend, so the text stays dark on top and the paper shows through like real ink. The two finished items are grey and struck through, which leaves the two open items as the only places the marker can land. Each sweep takes 0.6s and 0.72s, and a hold of about 0.7s after the second lets the whole line be read.

## Prompt

> Build an 11-second, 1920x1080, 30 fps light product film called Hand-Drawn Underline for a fictional product, Margin (a notes and docs app). Background paper #eeede9 with a soft white glow in the centre, one accent orange #ff5a2e, ink #17171c, a marker yellow #ffd500 used only as a tool colour, font Inter. Add grain at 9% opacity with multiply blend and a vignette that reaches 12% at the edges. Use one paused GSAP timeline; keep every hidden start state as opacity 0 in CSS and tween to explicit end values. Beat 1: a one-line headline, Meet the new Margin, at 150px, weight 700, letter-spacing -0.04em, centred. Its words rise from 48px below with a 14px blur to sharp over 0.95s expo.out with a 0.12s stagger from 0.3s. Under the word new, place an SVG 110% of the word's width and 0.38em tall (viewBox 320x53, preserveAspectRatio none). Draw the underline as a tapered filled path, about 13px thick in the middle and pointed at both ends, with a slightly uneven centre line, and reveal it with a mask whose 40px stroke has pathLength 1 and stroke-dasharray 1 1: tween stroke-dashoffset from 1.02 to 0 over 0.5s with power2.in from 1.4s, so it starts slowly and finishes fast. Add a shorter second sliver below it, drawn 2.0–2.28s with power1.in. At 2.25s the subline Notes, docs and tasks in one quiet place. rises in over 0.8s (44px, weight 500, grey #5d5d66). Push the whole beat from 1.00 to 1.03x over 4.4s with no easing. From 4.0s the headline group lifts 70px, blurs 10px and fades over 0.5s power3.in. Beat 2: from 4.35s a document card (1260x760px, radius 26px, #fffefb, soft large shadow) rises from 130px below at 0.95 scale over 1.0s expo.out. Inside: a header strip with a breadcrumb Projects / Launch week and three avatars, an 84px title Launch week, a 28px meta line, a 26px uppercase label Checklist, and four 90px rows with 44px text and 40px checkboxes: Write the release notes and Update the pricing page (done, grey, struck through), Record the 30-second demo and Send the update to beta testers (open). Rows enter from 4.7s with a 0.08s stagger. A dark toolbar pill (520x76px) with three 30px swatches and the label Highlight appears above the card at 4.75s. The yellow swatch presses at 5.1s (scale 1.2 and back). Behind each open row's text put a marker band: a 400x60 SVG stretched to the text width plus 16px left and 18px right, two torn-edge layers (#ffd500 at 78% and #ffc400 at 28%), mix-blend-mode multiply, hidden by clip-path polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%). Sweep it to polygon(0% 0%, 112% 0%, 100% 100%, 0% 100%) so the front edge is slanted: band 1 at 5.2s for 0.6s and band 2 at 5.95s for 0.72s, both power2.inOut. Drift the beat from 1.00 to 1.035x over 4.4–7.4s. The card and pill exit upward 7.35–7.8s with power2.in. Lockup from 7.9s: a 150px mark (ink rounded square, orange vertical rule drawn 8.0s, white M drawn 8.1s), the wordmark Margin at 140px weight 700 rising letter by letter (0.6s expo.out, 0.05s stagger from 7.95s), the hand underline drawing under it from 8.3s over 0.4s, and the tagline Notes with room to think. at 40px fading in at 8.35s. Everything is settled by 8.8s and holds still to 11s.

## Often confused with

- [Word-by-Word Text Highlight](https://motionboard.app/r/word-by-word-text-highlight.md): Word-by-Word Highlight changes the colour of each word in a still line from gray to white; here a stroke is drawn under one word and a marker band sweeps behind list items.
- [Line Drawing Logo Animation](https://motionboard.app/r/line-drawing-logo-animation.md): Plotter-Drawn Logo draws a whole logo with a pen under a macro camera; here the drawing is one short underline and a marker band on a flat page.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/hand-underline/hyperframes.json (318 B)
- https://motionboard.app/source/hand-underline/index.html (17.8 KB)
- https://motionboard.app/source/hand-underline/package.json (303 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "hand-underline/hyperframes.json" "https://motionboard.app/source/hand-underline/hyperframes.json"
curl -fsSL --create-dirs -o "hand-underline/index.html" "https://motionboard.app/source/hand-underline/index.html"
curl -fsSL --create-dirs -o "hand-underline/package.json" "https://motionboard.app/source/hand-underline/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 {
        --paper: #eeede9;
        --card: #fffefb;
        --ink: #17171c;
        --mute: #8a8a93;
        --rule: #e3e1da;
        --accent: #ff5a2e;
        --marker: rgba(255, 213, 0, 0.78);
        --font-ui: "Inter", sans-serif;
      }
      * { margin: 0; padding: 0; box-sizing: border-box; }
      html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--paper); }
      #root {
        position: relative; width: 1920px; height: 1080px; overflow: hidden;
        background: var(--paper); color: var(--ink); font-family: var(--font-ui);
        -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
      }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      svg { display: block; overflow: visible; }

      /* ---------- paper, grain, vignette ---------- */
      #paper {
        background:
          radial-gradient(ellipse 80% 70% at 50% 45%, rgba(255,255,255,0.55), rgba(255,255,255,0) 70%),
          var(--paper);
      }
      #grain {
        opacity: 0.09; mix-blend-mode: multiply; pointer-events: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='360'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
      }
      #vig {
        pointer-events: none;
        background: radial-gradient(ellipse 75% 75% at 50% 50%, rgba(0,0,0,0) 62%, rgba(40,36,28,0.12) 100%);
      }

      /* ---------- beat 1: headline ---------- */
      #b1drift { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      #b1inner { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      #head {
        position: absolute; left: 0; top: 380px; width: 1920px; height: 170px;
        display: flex; justify-content: center; align-items: center; gap: 0.26em;
        font-size: 150px; line-height: 1.1; font-weight: 700; letter-spacing: -0.04em;
        white-space: nowrap;
      }
      .hw { display: inline-block; position: relative; opacity: 0; filter: blur(14px); }
      #ulsvg { position: absolute; left: -5%; top: 0.84em; width: 110%; height: 0.38em; }
      #sub {
        position: absolute; left: 0; top: 628px; width: 1920px; text-align: center;
        font-size: 44px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: #5d5d66;
        opacity: 0;
      }

      /* ---------- beat 2: doc ---------- */
      #b2drift { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
      #pill {
        position: absolute; left: 700px; top: 66px; width: 520px; height: 76px;
        display: flex; align-items: center; justify-content: center; gap: 18px;
        background: #17171c; border-radius: 38px; color: #fff;
        box-shadow: 0 18px 40px rgba(30,24,10,0.22);
        opacity: 0;
        font-size: 28px; font-weight: 600; letter-spacing: -0.01em;
      }
      .sw { width: 30px; height: 30px; border-radius: 50%; flex: none; }
      #sw1 { background: #ffd500; box-shadow: 0 0 0 3px #17171c, 0 0 0 5px #fff; }
      #sw2 { background: #ff8fa3; }
      #sw3 { background: #6ee7a8; }
      #pill .lbl { margin-left: 10px; }
      #doc {
        position: absolute; left: 330px; top: 176px; width: 1260px; height: 760px;
        background: var(--card); border-radius: 26px;
        box-shadow: 0 2px 0 rgba(255,255,255,0.9) inset, 0 40px 90px rgba(60,48,20,0.18), 0 6px 18px rgba(60,48,20,0.08);
        overflow: hidden;
        opacity: 0;
      }
      #dochead {
        position: absolute; left: 0; top: 0; width: 1260px; height: 78px;
        border-bottom: 1px solid var(--rule);
        display: flex; align-items: center; justify-content: space-between; padding: 0 44px;
        font-size: 26px; font-weight: 500; color: var(--mute);
      }
      #dochead b { color: var(--ink); font-weight: 600; }
      #crumb { display: flex; align-items: center; gap: 14px; }
      #crumb .mini { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); position: relative; }
      #crumb .mini::after { content: ""; position: absolute; left: 8px; top: 6px; width: 3px; height: 18px; background: var(--accent); border-radius: 2px; }
      #avs { display: flex; }
      .av {
        width: 38px; height: 38px; border-radius: 50%; margin-left: -8px; border: 3px solid var(--card);
        font-size: 15px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center;
      }
      #title { position: absolute; left: 80px; top: 116px; font-size: 84px; line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; }
      #meta { position: absolute; left: 80px; top: 224px; font-size: 28px; font-weight: 500; color: var(--mute); letter-spacing: -0.01em; }
      #label {
        position: absolute; left: 80px; top: 312px; font-size: 26px; font-weight: 600; color: var(--mute);
        letter-spacing: 0.12em; text-transform: uppercase;
      }
      #rows { position: absolute; left: 80px; top: 372px; width: 1100px; }
      .row { display: flex; align-items: center; gap: 28px; height: 90px; border-top: 1px solid var(--rule); opacity: 0; }
      .row:first-child { border-top: none; }
      .box {
        width: 40px; height: 40px; border-radius: 11px; flex: none; border: 3px solid #c9c7bf; background: #fff;
        display: flex; align-items: center; justify-content: center;
      }
      .box.on { background: var(--ink); border-color: var(--ink); }
      .box svg { width: 24px; height: 24px; }
      .hl { position: relative; display: inline-block; font-size: 44px; line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
      .row.done .hl { color: #a2a19a; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: #c3c1b8; }
      .tx { position: relative; z-index: 1; }
      .band {
        position: absolute; left: -16px; right: -18px; top: 4px; bottom: 0px; z-index: 0;
        mix-blend-mode: multiply;
        clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
      }
      .band svg { width: 100%; height: 100%; overflow: visible; }

      /* ---------- lockup ---------- */
      #lock {
        position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
      }
      #lockrow {
        position: absolute; left: 0; top: 380px; width: 1920px; height: 170px;
        display: flex; align-items: center; justify-content: center; gap: 36px;
      }
      #mkbox { width: 150px; height: 150px; flex: none; opacity: 0; }
      #mkbox svg { width: 150px; height: 150px; }
      #wm {
        position: relative; font-size: 140px; line-height: 1; font-weight: 700; letter-spacing: -0.045em; white-space: nowrap;
        display: flex;
      }
      .wl { display: inline-block; opacity: 0; }
      #ulsvg2 { position: absolute; left: -2%; top: 1.0em; width: 104%; height: 0.34em; }
      #tag {
        position: absolute; left: 0; top: 650px; width: 1920px; text-align: center;
        font-size: 40px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: #5d5d66;
        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="paper" class="clip full" data-start="0" data-duration="11" data-track-index="0" data-layout-ignore></div>

      <!-- beat 1 -->
      <div id="b1" class="clip full" data-start="0" data-duration="4.6" data-track-index="1" data-layout-allow-overlap>
        <div id="b1drift">
          <div id="b1inner">
            <div id="head">
              <span class="hw">Meet</span>
              <span class="hw">the</span>
              <span class="hw" id="newword">new
                <svg id="ulsvg" viewBox="0 0 320 53" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
                  <defs>
                    <mask id="m1" maskUnits="userSpaceOnUse" x="-40" y="-20" width="400" height="100">
                      <path id="mk1" d="M -20 27 C 60 22 130 29 200 24 S 290 17 340 14" fill="none" stroke="#fff" stroke-width="40" pathLength="1" stroke-dasharray="1 1" stroke-dashoffset="1.02" />
                    </mask>
                    <mask id="m2" maskUnits="userSpaceOnUse" x="-40" y="-20" width="400" height="100">
                      <path id="mk2" d="M 50 44 C 130 41 200 41 300 35" fill="none" stroke="#fff" stroke-width="30" pathLength="1" stroke-dasharray="1 1" stroke-dashoffset="1.02" />
                    </mask>
                  </defs>
                  <path mask="url(#m1)" fill="#ff5a2e" d="M 3 28 C 40 21 90 25 150 22 C 200 19 262 15 316 12 C 302 21 240 30 172 34 C 110 38 50 37 3 28 Z" />
                  <path mask="url(#m2)" fill="#ff5a2e" d="M 74 43 C 134 40 204 40 268 35 C 240 43 170 48 74 47 Z" />
                </svg>
              </span>
              <span class="hw">Margin</span>
            </div>
            <div id="sub">Notes, docs and tasks in one quiet place.</div>
          </div>
        </div>
      </div>

      <!-- beat 2 -->
      <div id="b2" class="clip full" data-start="4.3" data-duration="3.7" data-track-index="2" data-layout-allow-overlap>
        <div id="b2drift">
          <div id="pill">
            <span class="sw" id="sw1"></span><span class="sw" id="sw2"></span><span class="sw" id="sw3"></span>
            <span class="lbl">Highlight</span>
          </div>
          <div id="doc">
            <div id="dochead">
              <div id="crumb"><span class="mini"></span><span>Projects</span><span>/</span><b>Launch week</b></div>
              <div id="avs">
                <span class="av" style="background:#6b7cff">DW</span>
                <span class="av" style="background:#e8825d">SK</span>
                <span class="av" style="background:#3aa78a">JM</span>
              </div>
            </div>
            <div id="title">Launch week</div>
            <div id="meta">Due Friday, Dec 6 &nbsp;·&nbsp; 4 tasks &nbsp;·&nbsp; 2 done</div>
            <div id="label">Checklist</div>
            <div id="rows">
              <div class="row done" id="r1">
                <span class="box on"><svg viewBox="0 0 24 24"><path d="M5 12.5 L10 17 L19 7" fill="none" stroke="#fff" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
                <span class="hl"><span class="tx">Write the release notes</span></span>
              </div>
              <div class="row done" id="r2">
                <span class="box on"><svg viewBox="0 0 24 24"><path d="M5 12.5 L10 17 L19 7" fill="none" stroke="#fff" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
                <span class="hl"><span class="tx">Update the pricing page</span></span>
              </div>
              <div class="row" id="r3">
                <span class="box"></span>
                <span class="hl"><i class="band" id="band1"><svg viewBox="0 0 400 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="#ffd500" fill-opacity="0.78" d="M 3 9 L 16 4 L 44 9 L 96 5 L 168 9 L 238 4 L 306 8 L 362 5 L 392 9 L 398 15 L 394 27 L 399 39 L 395 51 L 384 56 L 330 52 L 252 57 L 170 53 L 92 58 L 32 53 L 7 56 L 1 46 L 5 34 L 0 22 Z"/><path fill="#ffc400" fill-opacity="0.28" d="M 10 14 L 80 11 L 200 15 L 330 11 L 392 14 L 390 40 L 300 44 L 180 41 L 60 45 L 6 41 Z"/></svg></i><span class="tx">Record the 30-second demo</span></span>
              </div>
              <div class="row" id="r4">
                <span class="box"></span>
                <span class="hl"><i class="band" id="band2"><svg viewBox="0 0 400 60" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="#ffd500" fill-opacity="0.78" d="M 2 7 L 20 5 L 70 9 L 140 4 L 220 8 L 290 4 L 350 9 L 394 5 L 399 12 L 395 24 L 399 37 L 394 49 L 398 55 L 340 53 L 260 57 L 180 52 L 100 57 L 40 53 L 4 57 L 0 44 L 4 31 L 1 18 Z"/><path fill="#ffc400" fill-opacity="0.28" d="M 8 12 L 110 9 L 240 13 L 392 10 L 390 42 L 280 46 L 150 42 L 40 46 L 5 42 Z"/></svg></i><span class="tx">Send the update to beta testers</span></span>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- lockup -->
      <div id="lockc" class="clip full" data-start="7.8" data-duration="3.2" data-track-index="3" data-layout-allow-overlap>
        <div id="lock">
          <div id="lockrow">
            <div id="mkbox">
              <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
                <rect x="0" y="0" width="100" height="100" rx="27" fill="#17171c" />
                <path id="mline" d="M 27 17 L 27 83" fill="none" stroke="#ff5a2e" stroke-width="5" stroke-linecap="round" pathLength="1" stroke-dasharray="1 1" stroke-dashoffset="1.02" />
                <path id="mm" d="M 41 70 L 41 31 L 58 53 L 75 31 L 75 70" fill="none" stroke="#fff" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round" pathLength="1" stroke-dasharray="1 1" stroke-dashoffset="1.02" />
              </svg>
            </div>
            <div id="wm">
              <span class="wl">M</span><span class="wl">a</span><span class="wl">r</span><span class="wl">g</span><span class="wl">i</span><span class="wl">n</span>
              <svg id="ulsvg2" viewBox="0 0 320 53" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
                <defs>
                  <mask id="m3" maskUnits="userSpaceOnUse" x="-40" y="-20" width="400" height="100">
                    <path id="mk3" d="M -20 27 C 60 22 130 29 200 24 S 290 17 340 14" fill="none" stroke="#fff" stroke-width="40" pathLength="1" stroke-dasharray="1 1" stroke-dashoffset="1.02" />
                  </mask>
                </defs>
                <path mask="url(#m3)" fill="#ff5a2e" d="M 3 28 C 40 21 90 25 150 22 C 200 19 262 15 316 12 C 302 21 240 30 172 34 C 110 38 50 37 3 28 Z" />
              </svg>
            </div>
          </div>
          <div id="tag">Notes with room to think.</div>
        </div>
      </div>

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

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

      /* ================= baselines (one set per element) ================= */
      tl.set(".hw", { y: 48 }, 0);
      tl.set("#sub", { y: 26 }, 0);
      tl.set("#doc", { y: 130, scale: 0.95, transformOrigin: "50% 50%" }, 0);
      tl.set("#pill", { y: 18 }, 0);
      tl.set(".row", { y: 22 }, 0);
      tl.set("#mkbox", { scale: 0.7, transformOrigin: "50% 50%" }, 0);
      tl.set(".wl", { y: 60 }, 0);
      tl.set("#tag", { y: 18 }, 0);
      tl.set("#b1drift", { scale: 1, transformOrigin: "960px 540px" }, 0);
      tl.set("#b1inner", { y: 0, opacity: 1, filter: "blur(0px)" }, 0);

      tl.set("#b2drift", { scale: 1, transformOrigin: "960px 540px" }, 0);
      tl.set("#sw1", { scale: 1, transformOrigin: "50% 50%" }, 0);


      /* ================= beat 1: headline + hand underline ================= */
      tl.to(".hw", { y: 0, opacity: 1, filter: "blur(0px)", duration: 0.95, ease: "expo.out", stagger: 0.12 }, 0.3);
      // slow constant drift across the beat
      tl.to("#b1drift", { scale: 1.03, duration: 4.4, ease: "none" }, 0);

      // the underline: eased start, quick finish; tapered fill revealed by a masked stroke
      tl.to("#mk1", { attr: { "stroke-dashoffset": 0 }, duration: 0.5, ease: "power2.in" }, 1.4);
      tl.to("#mk2", { attr: { "stroke-dashoffset": 0 }, duration: 0.28, ease: "power1.in" }, 2.0);

      tl.to("#sub", { y: 0, opacity: 1, duration: 0.8, ease: "power3.out" }, 2.25);

      // exit
      tl.to("#b1inner", { y: -70, opacity: 0, filter: "blur(10px)", duration: 0.5, ease: "power3.in" }, 4.0);

      /* ================= beat 2: doc + marker ================= */
      tl.to("#doc", { y: 0, opacity: 1, scale: 1, duration: 1.0, ease: "expo.out" }, 4.35);
      tl.to("#pill", { y: 0, opacity: 1, duration: 0.55, ease: "expo.out" }, 4.75);
      tl.to(".row", { y: 0, opacity: 1, duration: 0.6, ease: "power3.out", stagger: 0.08 }, 4.7);
      tl.to("#b2drift", { scale: 1.035, duration: 3.0, ease: "none" }, 4.4);

      // marker presses, then sweeps
      tl.to("#sw1", { scale: 1.2, duration: 0.12, ease: "power2.out" }, 5.1);
      tl.to("#sw1", { scale: 1, duration: 0.25, ease: "power2.inOut" }, 5.22);
      tl.to("#band1", { clipPath: "polygon(0% 0%, 112% 0%, 100% 100%, 0% 100%)", duration: 0.6, ease: "power2.inOut" }, 5.2);
      tl.to("#band2", { clipPath: "polygon(0% 0%, 112% 0%, 100% 100%, 0% 100%)", duration: 0.72, ease: "power2.inOut" }, 5.95);

      // exit
      tl.to("#doc", { y: -40, opacity: 0, scale: 0.97, duration: 0.45, ease: "power2.in" }, 7.35);
      tl.to("#pill", { y: -20, opacity: 0, duration: 0.35, ease: "power2.in" }, 7.35);

      /* ================= lockup ================= */
      tl.to("#mkbox", { scale: 1, opacity: 1, duration: 0.8, ease: "expo.out" }, 7.9);
      tl.to("#mline", { attr: { "stroke-dashoffset": 0 }, duration: 0.35, ease: "power2.out" }, 8.0);
      tl.to("#mm", { attr: { "stroke-dashoffset": 0 }, duration: 0.5, ease: "power2.inOut" }, 8.1);
      tl.to(".wl", { y: 0, opacity: 1, duration: 0.6, ease: "expo.out", stagger: 0.05 }, 7.95);
      tl.to("#mk3", { attr: { "stroke-dashoffset": 0 }, duration: 0.4, ease: "power2.in" }, 8.3);
      tl.to("#tag", { y: 0, opacity: 1, duration: 0.45, ease: "power3.out" }, 8.35);

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