Words lighting up
A black field where each word of a centred statement turns from grey to white with scroll, around a slowly turning orange folded card.
Part of the style
Ember Silhouette Wireframe
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/ember-silhouette-wireframe/statement/figma.html?palette=3e7bb8a906fdc182
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/ember-silhouette-wireframe/statement/figma.html?palette=3e7bb8a906fdc182 and pass that whole HTML document to the html_to_figma tool, so the part "Words lighting up" 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 */
:root {
--paper: #0a0806;
--ink: #fff2ea;
--ink-mid: #90837b;
--ink-soft: #837a70;
--ink-faint: #453f39;
--rule: #191613;
--cream: #181512;
--night: #020000;
--smoke: rgba(207, 189, 178, 0.88);
--veil: rgba(115, 107, 97, 0.62);
--on-dark: #ede9e5;
--on-dark-soft: rgba(10, 8, 6, 0.8);
--rule-dark: rgba(10, 8, 6, 0.18);
--ember: #886e5d;
--ember-deep: #685346;
--amber: #7c6352;
}
</style>
<section class="statement">
<div class="statement__inner">
<p class="statement__text">A foyer still lit like a car park. A stage that glares at the front row. A façade that disappears after six. We fix that with drawings, mock-ups and lamps chosen for the room.</p>
<div class="statement__card" aria-hidden="true">
<span class="statement__leaf statement__leaf--a"></span>
<span class="statement__leaf statement__leaf--b"></span>
</div>
</div>
</section>
<style>
.statement {
display: grid;
place-items: center;
min-height: clamp(520px, 50vw, 780px);
padding: var(--section-space) var(--edge);
color: var(--on-dark);
background: var(--night);
}
.statement__inner {
position: relative;
max-width: 620px;
perspective: 700px;
}
.statement__text {
position: relative;
margin: 0;
font-family: var(--font-display);
font-size: var(--display-m);
font-weight: 400;
line-height: 1.06;
letter-spacing: var(--track-tight);
text-align: center;
text-wrap: balance;
}
.statement__word {
color: var(--ink-mid);
transition: color var(--quick) ease;
}
.statement__word.is-lit {
color: var(--on-dark);
}
.statement__card {
position: absolute;
top: 34%;
left: 42%;
width: clamp(56px, 7vw, 92px);
aspect-ratio: 3 / 4;
transform-style: preserve-3d;
animation: statement-turn 9s linear infinite;
pointer-events: none;
}
.statement__leaf {
position: absolute;
inset: 0;
border-radius: 3px;
background: linear-gradient(160deg, var(--ember) 0%, var(--ember) 55%, var(--ember-deep) 100%);
backface-visibility: visible;
}
.statement__leaf--b {
transform-origin: 0 50%;
transform: rotateY(-62deg);
background: linear-gradient(200deg, var(--ember-deep), var(--ember) 70%);
opacity: 0.94;
}
@keyframes statement-turn {
from { transform: rotateX(-14deg) rotateY(0deg) rotateZ(8deg); }
to { transform: rotateX(-14deg) rotateY(360deg) rotateZ(8deg); }
}
@media (prefers-reduced-motion: reduce) {
.statement__card { animation: none; transform: rotateX(-14deg) rotateY(30deg) rotateZ(8deg); }
.statement__word { color: var(--on-dark); }
}
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
document.querySelectorAll('.statement').forEach((root) => {
const text = root.querySelector('.statement__text');
const words = text.textContent.trim().split(/\s+/);
text.textContent = '';
const spans = words.map((word, index) => {
const span = document.createElement('span');
span.className = 'statement__word';
span.textContent = word;
text.append(span, index < words.length - 1 ? ' ' : '');
return span;
});
if (still.matches) return;
let visible = false;
let frame = 0;
const update = () => {
frame = 0;
const box = root.getBoundingClientRect();
const view = window.innerHeight || box.height;
const progress = Math.min(1, Math.max(0, (view * 0.9 - box.top) / (box.height * 0.8)));
const lit = Math.round(progress * spans.length);
spans.forEach((span, index) => span.classList.toggle('is-lit', index < lit));
};
update();
new IntersectionObserver(([entry]) => { visible = entry.isIntersecting; if (visible) update(); }).observe(root);
window.addEventListener('scroll', () => {
if (visible && !frame) frame = requestAnimationFrame(update);
}, { passive: true });
});
})();
</script>