HTML/CSS Motion-Graphics Overlays ("Paper.design for Video")
Instead of ugly default video-editor text stickers or hallucinated AI text baked into video frames, design pixel-crisp HTML/CSS/SVG overlays on a 1080×1920 transparent canvas rendered over the finished reel.
Step 1: Define the Brand Design Contract (frame.md)
Lock every overlay in a reel to one visual design system:
# Frame Design Contract
- **Primary / Accent / Surface / Ink / Highlight:** Validated hex colors (e.g. `#111111`, `#2563EB`, `#FFFFFF`, `#0F172A`, `#FACC15`)
- **Typography:** Display font + clean sans body font (tabular numerals for stats/prices)
- **Corner Radius:** e.g. `16px` cards, `999px` pills
- **Visual Rules:** Max 2 overlays visible simultaneously; high contrast (>= 4.5:1); never cover speaker eyes/mouth.
Step 2: Pick from the 16 Proven Motion Block Patterns
| Category | Block IDs | Best Moment in Reel |
|---|---|---|
| Hook | editorial-hook-title, kinetic-word-burst | 0.0–2.8s opening thumb-stop title |
| Proof | stat-counter-card, product-proof-frame, notification-toast, social-comment-sticker | 3–12s receipts, revenue/time metrics, Stripe/iOS pings, buyer comments |
| Callout | pill-step-badge, checklist-reveal, quote-pull-card, lower-third-speaker | Step numbers (Step 1 of 3), checklists, speaker credibility |
| Comparison | us-vs-them-card, before-after-split-badge, price-anchor-tag | Old Way vs New Way, price anchor ($2,500 agency → $39/mo) |
| Chrome & CTA | url-browser-bar, progress-timeline-bar, cta-end-card | Website demos, retention progress bar, final 2.5s CTA card |
Step 3: Face-Safe Geometry (1080×1920 Vertical Canvas)
Always keep overlays clear of both platform UI chrome and the speaker's face:
- Top safe margin:
y >= 160px(clear of TikTok/Reels top search & status bars) - Right safe margin:
x <= 920px(clear of like/comment/share icon column) - Bottom safe margin:
y <= 1520px(clear of caption description & audio bar) - Face exclusion band: Given normalized speaker eye/face center
faceY(0.15to0.65, default0.38=730px), keep cards outside[faceY - 0.14, faceY + 0.16](roughly460px–1040px). Place hooks in the top band (180–440px) and proof cards/captions in the lower-mid band (1080–1460px).
Step 4: Strict Security & Rendering Rules
When outputting standalone HTML/CSS for headless Chromium PNG/WebM rendering:
- Embed
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:;"> - Zero
<script>tags, zerojavascript:URLs, zero external@importor remoteurl(http...)fetches, zeroon*=inline handlers. - Escape all dynamic text; use pure CSS animations (
pop-in,slide-up,fade) and inline SVG icons.
Output Format
Return:
frame.mdtoken block- Ordered JSON array of
MotionBlockSpecitems (blockId,startSec,endSec,placement,animation,props) - Optional standalone CSP-safe HTML/CSS snippet for any custom preview card.