Statement with picture trail
One 24 px statement on black; the pointer becomes a white dot and drops a trail of portrait pictures that grow in and blur away.
Part of the style
Bracketed Black Index
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/bracketed-black-index/hero/figma.html?type=bare-serif-rack
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/bracketed-black-index/hero/figma.html?type=bare-serif-rack and pass that whole HTML document to the html_to_figma tool, so the part "Statement with picture trail" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Tinos:ital,wght@0,400;0,700;1,400;1,700&display=swap");
:root {
--font-body: "Tinos", "Times New Roman", Times, serif;
--font-label: "Fragment Mono", ui-monospace, monospace;
}
</style>
<section class="hero" aria-label="Introduction">
<p class="hero__statement">Ostra finds the pictures everyone else stopped looking for. We research, clear and scan archive images for publishers, film crews and museums, working from a small reading room above a print shop.</p>
<p class="hero__hint">[move to look]</p>
<div class="hero__trail" aria-hidden="true">
<img class="hero__shot" src="assets/clouds.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/window.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/snow-tree.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/stage.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/silver-morning.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/chandelier.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/nocturne.jpg" alt="" width="150" height="187" loading="eager">
<img class="hero__shot" src="assets/landscape.jpg" alt="" width="150" height="187" loading="eager">
</div>
<span class="hero__dot" aria-hidden="true"></span>
</section>
<style>
.hero {
position: relative;
overflow: hidden;
min-height: clamp(460px, 50vw, 640px);
padding: clamp(96px, 10vw, 150px) var(--edge) var(--space-xl);
background: var(--paper);
color: var(--ink);
}
.hero__statement {
position: relative;
z-index: 2;
max-width: 30em;
margin: 0;
font-size: var(--text-l);
font-weight: var(--weight);
line-height: var(--leading-tight);
letter-spacing: var(--track-l);
opacity: 0;
translate: 0 12px;
transition: opacity var(--reveal) var(--ease) 300ms, translate var(--reveal) var(--ease) 300ms;
}
.hero.is-ready .hero__statement { opacity: 1; translate: 0 0; }
.hero__hint {
position: absolute;
z-index: 2;
left: var(--edge);
bottom: var(--space-m);
margin: 0;
color: var(--ink-soft);
font-family: var(--font-label);
font-size: var(--text-label);
line-height: 1;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.hero__trail {
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
}
.hero__shot {
position: absolute;
top: 0;
left: 0;
width: var(--trail-w);
height: var(--trail-h);
max-width: none;
object-fit: cover;
opacity: 0;
will-change: transform, opacity, filter;
}
.hero__dot {
position: absolute;
top: 0;
left: 0;
z-index: 3;
width: var(--dot);
height: var(--dot);
margin: calc(var(--dot) / -2) 0 0 calc(var(--dot) / -2);
border-radius: 50%;
background: var(--ink);
opacity: 0;
pointer-events: none;
transition: opacity var(--quick) linear;
}
.hero.is-live .hero__dot { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
.hero { cursor: none; }
}
@media (max-width: 47.99rem) {
.hero__statement { font-size: var(--text-xl); }
.hero { --trail-w: 110px; --trail-h: 137px; }
}
@media (prefers-reduced-motion: reduce) {
.hero__statement { opacity: 1; translate: none; transition: none; }
.hero { cursor: auto; }
.hero__hint { display: none; }
.hero__shot.is-still { opacity: 1; }
}
</style>
<script>
(() => {
const STEP = 80; // px of travel between two dropped pictures
const GROW = 600; // ms to grow in
const LIFE = 900; // ms a picture rests before leaving
const LEAVE = 500; // ms to shrink and blur away
const IDLE = 1400; // ms without pointer before the ghost path takes over
const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
for (const root of document.querySelectorAll('.hero')) {
const shots = [...root.querySelectorAll('.hero__shot')];
const dot = root.querySelector('.hero__dot');
requestAnimationFrame(() => root.classList.add('is-ready'));
if (!shots.length) continue;
if (still) {
const spots = [[0.58, 0.2], [0.7, 0.36], [0.82, 0.22]];
spots.forEach(([x, y], i) => {
const s = shots[i];
s.classList.add('is-still');
s.style.transform = `translate(${root.clientWidth * x}px, ${root.clientHeight * y}px)`;
});
continue;
}
let next = 0, last = null, lastMove = -Infinity, visible = false, frame = 0, t = 0, then = 0;
const drop = (x, y) => {
const s = shots[next];
next = (next + 1) % shots.length;
const w = s.offsetWidth, h = s.offsetHeight;
const at = `translate(${x - w / 2}px, ${y - h / 2}px)`;
s.getAnimations().forEach((a) => a.cancel());
s.style.zIndex = String(Date.now() % 100000);
s.animate([
{ transform: `${at} scale(0.5)`, opacity: 0, filter: 'blur(0px)' },
{ transform: `${at} scale(1)`, opacity: 1, filter: 'blur(0px)', offset: 0.35 },
{ transform: `${at} scale(1)`, opacity: 1, filter: 'blur(0px)', offset: (GROW + LIFE) / (GROW + LIFE + LEAVE) },
{ transform: `${at} scale(0.6)`, opacity: 0, filter: 'blur(10px)' }
], { duration: GROW + LIFE + LEAVE, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', fill: 'forwards' });
};
const track = (x, y) => {
dot.style.transform = `translate(${x}px, ${y}px)`;
if (!last) { last = { x, y }; drop(x, y); return; }
const dx = x - last.x, dy = y - last.y;
if (Math.hypot(dx, dy) >= STEP) { last = { x, y }; drop(x, y); }
};
root.addEventListener('pointermove', (e) => {
const r = root.getBoundingClientRect();
lastMove = performance.now();
root.classList.add('is-live');
track(e.clientX - r.left, e.clientY - r.top);
});
root.addEventListener('pointerleave', () => { root.classList.remove('is-live'); last = null; });
// The ghost path: a slow figure-of-eight that keeps the trail alive when nobody points.
const ghost = (now) => {
frame = 0;
if (!visible) return;
const dt = then ? Math.min(now - then, 100) : 16;
then = now;
if (now - lastMove > IDLE) {
t += dt * 0.0008; // radians per ms of the ghost path
root.classList.add('is-live');
const w = root.clientWidth, h = root.clientHeight;
const x = w * (0.62 + 0.3 * Math.sin(t * 1.1));
const y = h * (0.52 + 0.3 * Math.sin(t * 2.2));
track(x, y);
}
frame = requestAnimationFrame(ghost);
};
// Seed: walk the last stretch of the ghost path at once, so a still of the part already shows a trail.
let seeded = false;
const seed = () => {
if (seeded || !root.clientWidth) return;
seeded = true;
const w = root.clientWidth, h = root.clientHeight;
for (let s = -1.6; s <= 0; s += 0.012) {
track(w * (0.62 + 0.3 * Math.sin(s * 1.1)), h * (0.52 + 0.3 * Math.sin(s * 2.2)));
}
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
if (visible) seed();
if (visible && !frame) { then = 0; frame = requestAnimationFrame(ghost); }
}).observe(root);
}
})();
</script>