Violet Difference
A black grotesk wordmark as wide as the page, one saturated violet in flat blocks, light serif capitals centred on white, and black and white pictures with a violet band subtracted from their foot. Suits importers, small labels, galleries and makers' lists that want to look severe and loud with three colours.
Parts
Masthead
The wordmark drawn to the exact width of the page on white, then a violet band with one centred statement in small serif capitals and six region names in two columns of large ones. Region names turn white in hand and stack into one column on phones.
Code
React For Figma<header class="masthead">
<a class="masthead__wordmark" href="#" aria-label="Keldstone, home">
<svg class="masthead__type" viewBox="6.9 0 602.4 73.1" preserveAspectRatio="none" aria-hidden="true" focusable="false">
<text x="0" y="71.4" textLength="614.35" lengthAdjust="spacingAndGlyphs">KELDSTONE</text>
</svg>
</a>
<div class="masthead__band">
<p class="masthead__statement">Every quarry we carry is worked by fewer than twelve people, cut by wire and wedge, and run by someone who can name each bed in the face.</p>
<ul class="masthead__regions" aria-label="Where the stone comes from">
<li><a class="masthead__region" href="#">Alentejo</a></li>
<li><a class="masthead__region" href="#">Brittany</a></li>
<li><a class="masthead__region" href="#">Connemara</a></li>
<li><a class="masthead__region" href="#">Galicia</a></li>
<li><a class="masthead__region" href="#">Pembrokeshire</a></li>
<li><a class="masthead__region" href="#">Trás-os-Montes</a></li>
</ul>
</div>
</header>
<style>
.masthead {
background: var(--paper);
}
/* The wordmark is drawn at 100px in a box exactly as big as its ink, then pulled to the full width of the page. */
.masthead__wordmark {
display: block;
padding: var(--gutter);
color: var(--ink);
}
.masthead__type {
display: block;
width: 100%;
aspect-ratio: 602.4 / 73.1;
fill: currentColor;
font: 800 100px var(--font-mark);
}
.masthead__wordmark:focus-visible {
outline: var(--flag) solid var(--violet);
outline-offset: calc(-1 * var(--flag));
}
.masthead__band {
padding: var(--space-l) var(--gutter);
background: var(--violet);
font-family: var(--font-caps);
line-height: var(--leading-caps);
text-align: center;
text-transform: uppercase;
}
.masthead__statement {
max-width: 71rem;
margin: 0 auto var(--space-l);
font-size: var(--caps-s);
text-wrap: balance;
}
.masthead__regions {
display: grid;
grid-template-rows: repeat(3, auto);
grid-auto-flow: column;
grid-auto-columns: 1fr;
margin: 0;
padding: 0;
list-style: none;
font-size: var(--caps-xl);
}
.masthead__region {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: var(--ink);
text-decoration: none;
transition: color var(--time) var(--ease);
}
.masthead__region:hover,
.masthead__region:focus-visible {
color: var(--paper);
outline: none;
}
@media (max-width: 48rem) {
.masthead__regions {
display: block;
}
.masthead__region {
padding: var(--space-s) 0;
}
}
@media (prefers-reduced-motion: reduce) {
.masthead__region {
transition-duration: 0s;
}
}
</style>
Plate
A full-width black and white landscape painted on a canvas by the part's own script (terrain from the air, haze, a hill cut into stone benches, grain), with the violet band laid over its foot in difference blending. 16:9 on wide screens, a 3:4 crop with a taller band on phones.
Code
React For Figma<figure class="plate">
<span class="plate__frame">
<canvas class="plate__picture" width="1440" height="810" role="img" aria-label="Black and white view from the air: a wooded hill cut into pale stone benches, two sheds and a chimney on top, hazy ranges behind"
data-scene='{"seed":7,"blocks":[[0.16,1.42,0.05,0.03,0.035,0],[0.235,1.44,0.014,0.014,0.085,1],[0.3,1.47,0.06,0.03,0.03,0]]}'></canvas>
<span class="plate__band" aria-hidden="true"></span>
</span>
</figure>
<style>
.plate {
margin: 0;
}
.plate__frame {
position: relative;
display: block;
overflow: hidden;
background: var(--plate);
isolation: isolate;
}
.plate__picture {
display: block;
width: 100%;
aspect-ratio: 16 / 9;
object-fit: cover;
object-position: 66% 50%;
opacity: 0;
transition: opacity var(--time-slow) var(--ease);
}
.plate__picture.is-painted {
opacity: 1;
}
/* The band is the page's violet laid over the picture and subtracted from it: dark ground stays violet, pale stone turns green. */
.plate__band {
position: absolute;
inset: auto 0 0;
height: var(--band);
background: var(--violet);
mix-blend-mode: difference;
pointer-events: none;
}
@media (max-width: 48rem) {
.plate__picture {
aspect-ratio: 3 / 4;
}
.plate__band {
height: calc(2 * var(--band));
}
}
@media (prefers-reduced-motion: reduce) {
.plate__picture {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
/* Paints one grey landscape into a canvas: ground seen from the air, drawn column by column from near to far,
with haze, a hill or pit cut into stone benches, and film grain. The same block sits in every part that shows a picture. */
function paintPlate(canvas, scene) {
const W = canvas.width, H = canvas.height;
const context = canvas.getContext("2d");
const image = context.createImageData(W, H);
const s = { seed: 1, eye: 0.62, horizon: 0.3, haze: 0.25, site: [0.25, 1.5, 0.42], dig: 1, cut: 0.5, sea: -1, sun: -1, blocks: [], ...scene };
let state = Math.imul(s.seed, 2654435761) >>> 0;
const random = () => (state = (Math.imul(state ^ (state >>> 15), 2246822507) + 0x9e3779b9) >>> 0) / 4294967296;
const lattice = new Uint8Array(512);
for (let i = 0; i < 256; i++) lattice[i] = i;
for (let i = 255; i > 0; i--) { const j = (random() * (i + 1)) | 0, kept = lattice[i]; lattice[i] = lattice[j]; lattice[j] = kept; }
lattice.copyWithin(256, 0, 256);
const noise = (x, y) => {
const xi = Math.floor(x), yi = Math.floor(y);
let fx = x - xi, fy = y - yi;
fx *= fx * (3 - 2 * fx); fy *= fy * (3 - 2 * fy);
const a = lattice[xi & 255], b = lattice[(xi + 1) & 255], lo = yi & 255, hi = (yi + 1) & 255;
const n00 = lattice[a + lo], n01 = lattice[a + hi], n10 = lattice[b + lo], n11 = lattice[b + hi];
return (n00 + (n10 - n00) * fx + (n01 - n00) * fy + (n00 - n10 - n01 + n11) * fx * fy) / 255;
};
const layered = (x, y, finest) => {
let sum = 0, gain = 0.5, scale = 1;
for (let i = 0; i < 9 && 1 / scale > finest; i++) { sum += gain * noise(x * scale + i * 17.3, y * scale - i * 9.1); gain *= 0.5; scale *= 2.03; }
return sum;
};
const ramp = (lo, hi, v) => { const t = Math.min(1, Math.max(0, (v - lo) / (hi - lo))); return t * t * (3 - 2 * t); };
/* Height and surface tone of the ground at one point. `cell` is the size of one sample there, so far ground gets less detail. */
const spot = { height: 0, tone: 0, flat: 0 };
const ground = (x, y, cell) => {
const dx = x - s.site[0], dy = y - s.site[1];
const mound = Math.exp(-(dx * dx + dy * dy) / (s.site[2] * s.site[2]));
const range = ramp(3, 8.5, y);
let height = layered(x * 1.1, y * 1.1, cell * 2.2) * 0.36 + s.dig * mound * 0.26 - 0.12 + range * s.eye * (0.35 + 1.5 * noise(x * 0.55 + 3, y * 0.3));
const farmed = ramp(0.5, 0.62, noise(x * 1.7 + 40, y * 1.7 + 11)) * (1 - ramp(0.2, 0.5, mound)) * (1 - ramp(0, 0.3, range));
height = height * (1 - 0.72 * farmed) + 0.03 * farmed;
if (cell < 0.03) height += (1 - farmed) * 0.014 * noise(x * 60, y * 60);
let tone = 0.1 + 0.14 * noise(x * 3.1, y * 3.1) + (cell < 0.012 ? 0.2 * (noise(x * 150, y * 150) - 0.5) : 0);
if (farmed > 0.02) {
const turn = Math.floor(noise(x * 2.3 + 7, y * 2.3) * 5) * 1.3;
const furrow = cell < 0.006 ? 0.14 * Math.sin((x * Math.cos(turn) + y * Math.sin(turn)) * 190) : 0;
tone += (0.4 + 0.22 * noise(x * 2.3 + 7, y * 2.3 + 60) + furrow - tone) * ramp(0.02, 0.5, farmed);
}
const track = Math.abs(noise(x * 0.9 + 80, y * 0.9 + 5) - 0.5);
if (track < 0.006 + cell * 0.4) tone += (0.7 - tone) * 0.8 * (1 - ramp(1.8, 3.2, y));
const worked = ramp(1 - s.cut, 1.12 - s.cut, mound + 0.25 * noise(x * 4, y * 4));
if (worked > 0) {
const bench = 0.03, level = height / bench, tread = Math.floor(level) + ramp(0.72, 1, level - Math.floor(level));
height += (tread * bench - height) * worked;
tone += (0.78 + 0.2 * noise(x * 30, y * 6) - tone) * worked;
}
spot.flat = 0;
if (height < s.sea) { height = s.sea; tone = 0.6 + 0.2 * noise(x * 9, y * 40); spot.flat = 1; }
for (const [left, front, wide, deep, tall, pale] of s.blocks) {
const u = (x - left) / wide, v = (y - front) / deep;
if (u > 0 && u < 1 && v > 0 && v < 1) { height += tall; tone = pale || v < 0.45 ? 1 : 0.25; spot.flat = 1; }
}
spot.height = height; spot.tone = tone;
};
const focal = H * 1.25, horizon = H * s.horizon, spread = 1.15 * W / H * 0.5625, depths = 460, reach = 9;
const nearest = Math.max(0.1, (s.eye - 0.4) * focal / (H - horizon));
const depth = Float32Array.from({ length: depths }, (_, k) => nearest * Math.pow(reach / nearest, k / (depths - 1)));
const heights = new Float32Array(depths * W), tones = new Float32Array(depths * W), flats = new Uint8Array(depths * W);
for (let k = 0; k < depths; k++) {
const cell = depth[k] * spread / W;
for (let c = 0; c < W; c++) {
ground((c / W - 0.5) * depth[k] * spread, depth[k], cell);
heights[k * W + c] = spot.height; tones[k * W + c] = spot.tone; flats[k * W + c] = spot.flat;
}
}
const grey = new Float32Array(W * H), mist = 0.86;
for (let c = 0; c < W; c++) {
let floor = H, below = -1;
for (let k = 1; k < depths - 1 && floor > 0; k++) {
const i = k * W + c;
const row = Math.max(0, Math.floor(horizon + (s.eye - heights[i]) * focal / depth[k]));
if (row >= floor) continue;
const slopeAcross = (heights[i + (c < W - 1)] - heights[i - (c > 0)]) / (2 * depth[k] * spread / W);
const slopeAway = (heights[i + W] - heights[i - W]) / (depth[k + 1] - depth[k - 1]);
const facing = (0.5 + s.sun * 0.8 * slopeAcross - 0.55 * slopeAway) / Math.sqrt(1 + slopeAcross * slopeAcross + slopeAway * slopeAway);
const lit = tones[i] * (flats[i] ? 1 : 0.3 + 1.25 * Math.max(0, facing));
const value = lit + (mist - 0.07 - lit) * (1 - Math.exp(-Math.pow(depth[k] * s.haze, 1.25)));
for (let r = floor - 1; r >= row; r--) grey[r * W + c] = below < 0 ? value : below + (value - below) * (floor - r) / (floor - row);
floor = row; below = value;
}
for (let r = 0; r < floor; r++) {
const up = Math.max(0, 1 - r / (horizon + H * 0.14));
const cloud = layered(c / W * 2.6 * spread + 9, up * 7 + s.seed, 0.01) - 0.5;
grey[r * W + c] = mist - 0.3 * up + 0.36 * cloud * ramp(0.03, 0.45, up);
}
}
for (let i = 0; i < W * H; i++) {
const corner = Math.hypot((i % W) / W - 0.5, ((i / W) | 0) / H - 0.5);
let v = Math.min(1, Math.max(0, grey[i] * 1.12 - 0.05));
v = (0.75 * v * v * (3 - 2 * v) + 0.25 * v) * (1 - 0.5 * corner * corner * corner) + (random() - 0.5) * 0.075;
image.data[i * 4] = image.data[i * 4 + 1] = image.data[i * 4 + 2] = 255 * v;
image.data[i * 4 + 3] = 255;
}
context.putImageData(image, 0, 0);
canvas.classList.add("is-painted");
}
/* Pictures are painted one per task, so a page full of them never blocks for long. */
function paintInTurn(canvases) {
const waiting = [...canvases];
const next = () => {
const canvas = waiting.shift();
if (!canvas) return;
paintPlate(canvas, JSON.parse(canvas.dataset.scene || "{}"));
setTimeout(next, 0);
};
next();
}
document.querySelectorAll(".plate").forEach((root) => paintInTurn(root.querySelectorAll(".plate__picture")));
})();
</script>
Two-part bar
A bar of two equal cells, violet for the active one and grey for the other, that sticks to the top for the rest of the page. Under it a centred serif title and statement; choosing the other cell cross-fades to its own title.
Code
React For Figma<section class="tabs">
<div class="tabs__bar" role="tablist" aria-label="Sections">
<button class="tabs__cell is-active" type="button" role="tab" aria-selected="true">Quarries</button>
<button class="tabs__cell" type="button" role="tab" aria-selected="false">Stockists</button>
</div>
<div class="tabs__panels">
<div class="tabs__panel is-active" role="tabpanel">
<h2 class="tabs__title">Stone with a home address</h2>
<p class="tabs__statement">A short list of family quarries, each still cutting the hill its own village was built from.</p>
</div>
<div class="tabs__panel" role="tabpanel" aria-hidden="true">
<h2 class="tabs__title">See it before you spec it</h2>
<p class="tabs__statement">Yards and showrooms that keep our slabs on the floor, where you can walk round them, not in a catalogue.</p>
</div>
</div>
</section>
<style>
/* With more of the page below it, the root makes no box, so the bar stays stuck all the way down instead of leaving with this section. */
.tabs:has(~ :not(style, script)) {
display: contents;
}
.tabs__bar {
position: sticky;
top: 0;
z-index: 10;
display: grid;
grid-template-columns: 1fr 1fr;
}
.tabs__cell {
min-height: var(--bar);
padding: 0 var(--gutter);
border: 0;
border-radius: 0;
background: var(--idle);
color: var(--ink);
font-family: var(--font-caps);
font-size: var(--caps-m);
line-height: 1;
text-transform: uppercase;
cursor: pointer;
}
/* Violet marks the active cell until the pointer enters the bar; then it follows the pointer. The swap is instant. */
.tabs__bar:not(:hover) .tabs__cell.is-active,
.tabs__cell:hover,
.tabs__cell:focus-visible {
background: var(--violet);
}
.tabs__cell:focus-visible {
outline: var(--rule) solid var(--ink);
outline-offset: calc(-4 * var(--rule));
}
@media (hover: none) {
.tabs__cell.is-active {
background: var(--violet);
}
.tabs__cell:not(.is-active):hover {
background: var(--idle);
}
}
.tabs__panels {
display: grid;
padding: var(--space-xl) var(--gutter);
background: var(--paper);
font-family: var(--font-caps);
line-height: var(--leading-caps);
text-align: center;
text-transform: uppercase;
}
.tabs__panel {
grid-area: 1 / 1;
align-self: center;
opacity: 0;
visibility: hidden;
transition: opacity var(--time) var(--ease), visibility 0s var(--time);
}
.tabs__panel.is-active {
opacity: 1;
visibility: visible;
transition-delay: 0s;
}
.tabs__title {
margin: 0 0 var(--space-m);
font-size: var(--caps-xxl);
font-weight: 400;
line-height: 1;
text-wrap: balance;
}
.tabs__statement {
max-width: 53rem;
margin: 0 auto;
font-size: var(--caps-s);
line-height: 1.3;
text-wrap: balance;
}
@media (prefers-reduced-motion: reduce) {
.tabs__panel {
transition-duration: 0s;
transition-delay: 0s;
}
}
</style>
<script>
(() => {
document.querySelectorAll(".tabs").forEach((root) => {
const cells = [...root.querySelectorAll(".tabs__cell")];
const panels = [...root.querySelectorAll(".tabs__panel")];
const show = (chosen) => {
cells.forEach((cell, index) => {
cell.classList.toggle("is-active", index === chosen);
cell.setAttribute("aria-selected", String(index === chosen));
});
panels.forEach((panel, index) => {
panel.classList.toggle("is-active", index === chosen);
panel.toggleAttribute("aria-hidden", index !== chosen);
});
};
cells.forEach((cell, index) => cell.addEventListener("click", () => show(index)));
});
})();
</script>
Card rail
A ruled rail of cards, each a name, one line and a painted picture. A card in hand gets a violet strip on top and the violet band rises over the foot of its picture. Arrow columns appear at the ends and slide the rail by one card; on phones the rail becomes a stack with the picture first.
Code
React For Figma<section class="roster" aria-label="Quarries">
<div class="roster__rail">
<a class="roster__card" href="#">
<span class="roster__name">Carrig Mór</span>
<span class="roster__line">Green marble, one bench at a time</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="A hill cut into pale benches above ploughed fields" data-scene='{"seed":3,"eye":0.5,"horizon":0.36,"site":[-0.15,1.2,0.4],"cut":0.6}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
<a class="roster__card" href="#">
<span class="roster__name">Pedreira do Corvo</span>
<span class="roster__line">The black schist of the north</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="An open pit of curved benches seen from its rim" data-scene='{"seed":11,"eye":0.8,"horizon":0.18,"site":[0.1,1.3,0.5],"dig":-1,"cut":0.75}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
<a class="roster__card" href="#">
<span class="roster__name">Kergonan</span>
<span class="roster__line">Sea-washed granite, two tides a day</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="A worked headland above a pale sea" data-scene='{"seed":19,"eye":0.45,"horizon":0.42,"site":[0.3,1.8,0.5],"cut":0.4,"sea":0.02,"haze":0.4}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
<a class="roster__card" href="#">
<span class="roster__name">Scarth How</span>
<span class="roster__line">Slate split by hand since 1911</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="A deep pit with many narrow benches" data-scene='{"seed":31,"eye":0.7,"horizon":0.1,"site":[-0.1,1.5,0.6],"dig":-1.4,"cut":0.85,"haze":0.2}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
<a class="roster__card" href="#">
<span class="roster__name">Monte da Rola</span>
<span class="roster__line">Pink marble from a single pit</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="A small pale cutting on a distant wooded ridge" data-scene='{"seed":5,"eye":0.42,"horizon":0.5,"site":[0.2,2.2,0.5],"cut":0.3,"haze":0.3}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
<a class="roster__card" href="#">
<span class="roster__name">Penrallt</span>
<span class="roster__line">The blue pennant revival</span>
<span class="roster__frame">
<canvas class="roster__picture" width="640" height="480" role="img" aria-label="A stepped stone hill close up, lit from the right" data-scene='{"seed":23,"eye":0.55,"horizon":0.3,"site":[0,0.9,0.3],"cut":0.9,"sun":1}'></canvas>
<span class="roster__band" aria-hidden="true"></span>
</span>
</a>
</div>
<button class="roster__step roster__step--back" type="button" aria-label="Earlier quarries">
<svg class="roster__arrow" viewBox="0 0 12 20" aria-hidden="true" focusable="false"><path d="M10 2 2 10l8 8"/></svg>
</button>
<button class="roster__step roster__step--on" type="button" aria-label="More quarries">
<svg class="roster__arrow" viewBox="0 0 12 20" aria-hidden="true" focusable="false"><path d="m2 2 8 8-8 8"/></svg>
</button>
</section>
<style>
.roster {
position: relative;
border-block: var(--rule) solid var(--ink);
background: var(--paper);
}
.roster__rail {
display: flex;
overflow-x: auto;
overscroll-behavior-x: contain;
scroll-snap-type: x proximity;
scrollbar-width: none;
}
.roster__rail::-webkit-scrollbar {
display: none;
}
/* Three and a bit cards across, so the cut-off one says there is more. */
.roster__card {
position: relative;
flex: 0 0 calc(100% / 3.25);
display: flex;
flex-direction: column;
padding: var(--space-l) var(--inset) var(--inset);
border-right: var(--rule) solid var(--ink);
color: var(--ink);
font-family: var(--font-caps);
line-height: var(--leading-caps);
text-align: center;
text-decoration: none;
text-transform: uppercase;
scroll-snap-align: start;
}
.roster__card::before {
content: "";
position: absolute;
inset: 0 0 auto;
height: var(--flag);
background: var(--violet);
opacity: 0;
transition: opacity var(--time) var(--ease);
}
.roster__name {
font-size: var(--caps-l);
line-height: 1.05;
text-wrap: balance;
}
.roster__line {
margin: var(--space-s) 0 var(--space-l);
font-size: var(--caps-xs);
text-wrap: balance;
}
.roster__frame {
position: relative;
display: block;
margin-top: auto;
overflow: hidden;
background: var(--plate);
isolation: isolate;
}
.roster__picture {
display: block;
width: 100%;
aspect-ratio: 4 / 3;
opacity: 0;
transition: opacity var(--time-slow) var(--ease);
}
.roster__picture.is-painted {
opacity: 1;
}
/* At rest only a hairline of the violet band shows at the foot of the picture. In hand, it rises and is subtracted from the picture. */
.roster__band {
position: absolute;
inset: auto 0 0;
height: 20%;
background: var(--violet);
mix-blend-mode: difference;
transform: translateY(calc(100% - var(--rule)));
transition: transform var(--time-slow) var(--ease);
}
.roster__card:hover::before,
.roster__card:focus-visible::before {
opacity: 1;
}
.roster__card:hover .roster__band,
.roster__card:focus-visible .roster__band {
transform: translateY(0);
}
.roster__card:focus-visible {
outline: none;
}
.roster__step {
position: absolute;
top: 0;
bottom: 0;
display: grid;
place-items: center;
width: var(--tap);
padding: 0;
border: 0 solid var(--ink);
border-radius: 0;
background: var(--paper);
color: var(--ink);
cursor: pointer;
opacity: 0;
transition: opacity var(--time) var(--ease), visibility 0s var(--time);
}
.roster__step--back {
left: 0;
border-right-width: var(--rule);
}
.roster__step--on {
right: 0;
border-left-width: var(--rule);
}
.roster__arrow {
width: 0.75rem;
fill: none;
stroke: currentColor;
stroke-width: 2;
}
.roster:hover .roster__step,
.roster:focus-within .roster__step {
opacity: 1;
}
.roster__step:hover,
.roster__step:focus-visible {
background: var(--violet);
outline: none;
}
.roster .roster__step.is-spent {
opacity: 0;
visibility: hidden;
}
@media (hover: none) {
.roster__step {
opacity: 1;
}
}
@media (max-width: 64rem) {
.roster__card {
flex-basis: calc(100% / 2.25);
}
}
/* On a phone the rail becomes a plain stack: picture first, then the name. */
@media (max-width: 40rem) {
.roster__rail {
display: block;
overflow: visible;
}
.roster__card {
padding: var(--inset) var(--gutter) var(--space-l);
border-right: 0;
}
.roster__card + .roster__card {
border-top: var(--rule) solid var(--ink);
}
.roster__frame {
order: -1;
margin: 0 0 var(--space-l);
}
.roster__line {
margin-bottom: 0;
}
.roster__step {
display: none;
}
}
@media (prefers-reduced-motion: reduce) {
.roster__card::before,
.roster__picture,
.roster__band,
.roster__step {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
/* Paints one grey landscape into a canvas: ground seen from the air, drawn column by column from near to far,
with haze, a hill or pit cut into stone benches, and film grain. The same block sits in every part that shows a picture. */
function paintPlate(canvas, scene) {
const W = canvas.width, H = canvas.height;
const context = canvas.getContext("2d");
const image = context.createImageData(W, H);
const s = { seed: 1, eye: 0.62, horizon: 0.3, haze: 0.25, site: [0.25, 1.5, 0.42], dig: 1, cut: 0.5, sea: -1, sun: -1, blocks: [], ...scene };
let state = Math.imul(s.seed, 2654435761) >>> 0;
const random = () => (state = (Math.imul(state ^ (state >>> 15), 2246822507) + 0x9e3779b9) >>> 0) / 4294967296;
const lattice = new Uint8Array(512);
for (let i = 0; i < 256; i++) lattice[i] = i;
for (let i = 255; i > 0; i--) { const j = (random() * (i + 1)) | 0, kept = lattice[i]; lattice[i] = lattice[j]; lattice[j] = kept; }
lattice.copyWithin(256, 0, 256);
const noise = (x, y) => {
const xi = Math.floor(x), yi = Math.floor(y);
let fx = x - xi, fy = y - yi;
fx *= fx * (3 - 2 * fx); fy *= fy * (3 - 2 * fy);
const a = lattice[xi & 255], b = lattice[(xi + 1) & 255], lo = yi & 255, hi = (yi + 1) & 255;
const n00 = lattice[a + lo], n01 = lattice[a + hi], n10 = lattice[b + lo], n11 = lattice[b + hi];
return (n00 + (n10 - n00) * fx + (n01 - n00) * fy + (n00 - n10 - n01 + n11) * fx * fy) / 255;
};
const layered = (x, y, finest) => {
let sum = 0, gain = 0.5, scale = 1;
for (let i = 0; i < 9 && 1 / scale > finest; i++) { sum += gain * noise(x * scale + i * 17.3, y * scale - i * 9.1); gain *= 0.5; scale *= 2.03; }
return sum;
};
const ramp = (lo, hi, v) => { const t = Math.min(1, Math.max(0, (v - lo) / (hi - lo))); return t * t * (3 - 2 * t); };
/* Height and surface tone of the ground at one point. `cell` is the size of one sample there, so far ground gets less detail. */
const spot = { height: 0, tone: 0, flat: 0 };
const ground = (x, y, cell) => {
const dx = x - s.site[0], dy = y - s.site[1];
const mound = Math.exp(-(dx * dx + dy * dy) / (s.site[2] * s.site[2]));
const range = ramp(3, 8.5, y);
let height = layered(x * 1.1, y * 1.1, cell * 2.2) * 0.36 + s.dig * mound * 0.26 - 0.12 + range * s.eye * (0.35 + 1.5 * noise(x * 0.55 + 3, y * 0.3));
const farmed = ramp(0.5, 0.62, noise(x * 1.7 + 40, y * 1.7 + 11)) * (1 - ramp(0.2, 0.5, mound)) * (1 - ramp(0, 0.3, range));
height = height * (1 - 0.72 * farmed) + 0.03 * farmed;
if (cell < 0.03) height += (1 - farmed) * 0.014 * noise(x * 60, y * 60);
let tone = 0.1 + 0.14 * noise(x * 3.1, y * 3.1) + (cell < 0.012 ? 0.2 * (noise(x * 150, y * 150) - 0.5) : 0);
if (farmed > 0.02) {
const turn = Math.floor(noise(x * 2.3 + 7, y * 2.3) * 5) * 1.3;
const furrow = cell < 0.006 ? 0.14 * Math.sin((x * Math.cos(turn) + y * Math.sin(turn)) * 190) : 0;
tone += (0.4 + 0.22 * noise(x * 2.3 + 7, y * 2.3 + 60) + furrow - tone) * ramp(0.02, 0.5, farmed);
}
const track = Math.abs(noise(x * 0.9 + 80, y * 0.9 + 5) - 0.5);
if (track < 0.006 + cell * 0.4) tone += (0.7 - tone) * 0.8 * (1 - ramp(1.8, 3.2, y));
const worked = ramp(1 - s.cut, 1.12 - s.cut, mound + 0.25 * noise(x * 4, y * 4));
if (worked > 0) {
const bench = 0.03, level = height / bench, tread = Math.floor(level) + ramp(0.72, 1, level - Math.floor(level));
height += (tread * bench - height) * worked;
tone += (0.78 + 0.2 * noise(x * 30, y * 6) - tone) * worked;
}
spot.flat = 0;
if (height < s.sea) { height = s.sea; tone = 0.6 + 0.2 * noise(x * 9, y * 40); spot.flat = 1; }
for (const [left, front, wide, deep, tall, pale] of s.blocks) {
const u = (x - left) / wide, v = (y - front) / deep;
if (u > 0 && u < 1 && v > 0 && v < 1) { height += tall; tone = pale || v < 0.45 ? 1 : 0.25; spot.flat = 1; }
}
spot.height = height; spot.tone = tone;
};
const focal = H * 1.25, horizon = H * s.horizon, spread = 1.15 * W / H * 0.5625, depths = 460, reach = 9;
const nearest = Math.max(0.1, (s.eye - 0.4) * focal / (H - horizon));
const depth = Float32Array.from({ length: depths }, (_, k) => nearest * Math.pow(reach / nearest, k / (depths - 1)));
const heights = new Float32Array(depths * W), tones = new Float32Array(depths * W), flats = new Uint8Array(depths * W);
for (let k = 0; k < depths; k++) {
const cell = depth[k] * spread / W;
for (let c = 0; c < W; c++) {
ground((c / W - 0.5) * depth[k] * spread, depth[k], cell);
heights[k * W + c] = spot.height; tones[k * W + c] = spot.tone; flats[k * W + c] = spot.flat;
}
}
const grey = new Float32Array(W * H), mist = 0.86;
for (let c = 0; c < W; c++) {
let floor = H, below = -1;
for (let k = 1; k < depths - 1 && floor > 0; k++) {
const i = k * W + c;
const row = Math.max(0, Math.floor(horizon + (s.eye - heights[i]) * focal / depth[k]));
if (row >= floor) continue;
const slopeAcross = (heights[i + (c < W - 1)] - heights[i - (c > 0)]) / (2 * depth[k] * spread / W);
const slopeAway = (heights[i + W] - heights[i - W]) / (depth[k + 1] - depth[k - 1]);
const facing = (0.5 + s.sun * 0.8 * slopeAcross - 0.55 * slopeAway) / Math.sqrt(1 + slopeAcross * slopeAcross + slopeAway * slopeAway);
const lit = tones[i] * (flats[i] ? 1 : 0.3 + 1.25 * Math.max(0, facing));
const value = lit + (mist - 0.07 - lit) * (1 - Math.exp(-Math.pow(depth[k] * s.haze, 1.25)));
for (let r = floor - 1; r >= row; r--) grey[r * W + c] = below < 0 ? value : below + (value - below) * (floor - r) / (floor - row);
floor = row; below = value;
}
for (let r = 0; r < floor; r++) {
const up = Math.max(0, 1 - r / (horizon + H * 0.14));
const cloud = layered(c / W * 2.6 * spread + 9, up * 7 + s.seed, 0.01) - 0.5;
grey[r * W + c] = mist - 0.3 * up + 0.36 * cloud * ramp(0.03, 0.45, up);
}
}
for (let i = 0; i < W * H; i++) {
const corner = Math.hypot((i % W) / W - 0.5, ((i / W) | 0) / H - 0.5);
let v = Math.min(1, Math.max(0, grey[i] * 1.12 - 0.05));
v = (0.75 * v * v * (3 - 2 * v) + 0.25 * v) * (1 - 0.5 * corner * corner * corner) + (random() - 0.5) * 0.075;
image.data[i * 4] = image.data[i * 4 + 1] = image.data[i * 4 + 2] = 255 * v;
image.data[i * 4 + 3] = 255;
}
context.putImageData(image, 0, 0);
canvas.classList.add("is-painted");
}
/* Pictures are painted one per task, so a page full of them never blocks for long. */
function paintInTurn(canvases) {
const waiting = [...canvases];
const next = () => {
const canvas = waiting.shift();
if (!canvas) return;
paintPlate(canvas, JSON.parse(canvas.dataset.scene || "{}"));
setTimeout(next, 0);
};
next();
}
document.querySelectorAll(".roster").forEach((root) => {
const rail = root.querySelector(".roster__rail");
const back = root.querySelector(".roster__step--back");
const on = root.querySelector(".roster__step--on");
const calm = matchMedia("(prefers-reduced-motion: reduce)");
const slide = (direction) => {
const card = rail.querySelector(".roster__card");
rail.scrollBy({ left: direction * card.offsetWidth, behavior: calm.matches ? "auto" : "smooth" });
};
const markEnds = () => {
back.classList.toggle("is-spent", rail.scrollLeft < 2);
on.classList.toggle("is-spent", rail.scrollLeft > rail.scrollWidth - rail.clientWidth - 2);
};
back.addEventListener("click", () => slide(-1));
on.addEventListener("click", () => slide(1));
rail.addEventListener("scroll", markEnds, { passive: true });
new ResizeObserver(markEnds).observe(rail);
paintInTurn(root.querySelectorAll(".roster__picture"));
});
})();
</script>
Stockist list
A page split in half: a painted picture with its violet band stays put on the left while a ruled list scrolls on the right, with countries as large serif headings and firms with a contact, phone and email under each. Stacks on phones.
Code
React For Figma<section class="stockists" aria-label="Stockists">
<figure class="stockists__view">
<span class="stockists__frame">
<canvas class="stockists__picture" width="960" height="640" role="img" aria-label="Black and white view from the air over a wide stone pit, woods and fields around it, ranges in haze"
data-scene='{"seed":43,"eye":0.74,"horizon":0.2,"site":[0.12,1.7,0.55],"dig":-1.1,"cut":0.72,"haze":0.22,"blocks":[[-0.42,1.3,0.05,0.03,0.03,0],[-0.35,1.33,0.012,0.012,0.07,1]]}'></canvas>
<span class="stockists__band" aria-hidden="true"></span>
</span>
</figure>
<div class="stockists__list">
<section class="stockists__region">
<h3 class="stockists__place">Belgium</h3>
<div class="stockists__firm">
<p class="stockists__name">Steenhuis Verbeke</p>
<p class="stockists__contact">
<span>Ilse Verbeke</span>
<a class="stockists__reach" href="#">T: 055 501 042</a>
<a class="stockists__reach" href="#">ilse@steenhuis.example</a>
</p>
</div>
</section>
<section class="stockists__region">
<h3 class="stockists__place">Denmark</h3>
<div class="stockists__firm">
<p class="stockists__name">Brøndum Sten</p>
<p class="stockists__contact">
<span>Mads Brøndum</span>
<a class="stockists__reach" href="#">T: 86 55 01 17</a>
<a class="stockists__reach" href="#">mads@brondumsten.example</a>
</p>
</div>
</section>
<section class="stockists__region">
<h3 class="stockists__place">Germany</h3>
<div class="stockists__firm">
<p class="stockists__name">Lindner & Töchter</p>
<p class="stockists__contact">
<span>Hanne Lindner</span>
<a class="stockists__reach" href="#">T: 0341 555 0164</a>
<a class="stockists__reach" href="#">werkhof@lindner-toechter.example</a>
</p>
</div>
<div class="stockists__firm">
<p class="stockists__name">Hafenstein</p>
<p class="stockists__contact">
<span>Jonas Abel</span>
<a class="stockists__reach" href="#">T: 040 555 0138</a>
<a class="stockists__reach" href="#">jonas@hafenstein.example</a>
</p>
</div>
</section>
<section class="stockists__region">
<h3 class="stockists__place">Japan</h3>
<div class="stockists__firm">
<p class="stockists__name">Ishimoto Yard</p>
<p class="stockists__contact">
<span>Aya Ishimoto</span>
<a class="stockists__reach" href="#">T: 075 555 0109</a>
<a class="stockists__reach" href="#">aya@ishimoto-yard.example</a>
</p>
</div>
</section>
<section class="stockists__region">
<h3 class="stockists__place">Netherlands</h3>
<div class="stockists__firm">
<p class="stockists__name">De Zaagloods</p>
<p class="stockists__contact">
<span>Pim Hoekstra</span>
<a class="stockists__reach" href="#">T: 010 555 0173</a>
<a class="stockists__reach" href="#">pim@zaagloods.example</a>
</p>
</div>
</section>
<section class="stockists__region">
<h3 class="stockists__place">United Kingdom</h3>
<div class="stockists__firm">
<p class="stockists__name">Marrow & Flint</p>
<p class="stockists__contact">
<span>Dele Marrow</span>
<a class="stockists__reach" href="#">T: 0117 496 0152</a>
<a class="stockists__reach" href="#">dele@marrowflint.example</a>
</p>
</div>
</section>
</div>
</section>
<style>
.stockists {
display: grid;
grid-template-columns: 1fr 1fr;
align-items: start;
border-top: var(--rule) solid var(--ink);
background: var(--paper);
font-family: var(--font-caps);
line-height: var(--leading-caps);
}
/* The picture stays put while the list scrolls past it. */
.stockists__view {
position: sticky;
top: 0;
margin: 0;
}
.stockists__frame {
position: relative;
display: block;
overflow: hidden;
background: var(--plate);
isolation: isolate;
}
.stockists__picture {
display: block;
width: 100%;
aspect-ratio: 3 / 2;
object-fit: cover;
opacity: 0;
transition: opacity var(--time-slow) var(--ease);
}
.stockists__picture.is-painted {
opacity: 1;
}
.stockists__band {
position: absolute;
inset: auto 0 0;
height: calc(var(--band) / 2);
background: var(--violet);
mix-blend-mode: difference;
pointer-events: none;
}
.stockists__list {
border-left: var(--rule) solid var(--ink);
}
.stockists__region:first-child .stockists__place {
padding-top: var(--space-xl);
}
.stockists__place {
margin: 0;
padding: var(--space-s) var(--gutter) 0;
border-bottom: var(--rule) solid var(--ink);
font-size: var(--caps-xl);
font-weight: 400;
text-transform: uppercase;
}
.stockists__firm {
padding: var(--space-m) var(--gutter) var(--space-l);
border-bottom: var(--rule) solid var(--ink);
}
.stockists__name {
margin: 0;
font-size: var(--caps-m);
text-transform: uppercase;
}
.stockists__contact {
display: grid;
grid-template-columns: 1fr 1fr 2fr;
align-items: center;
column-gap: var(--gutter);
margin: 0;
font-size: var(--text-note);
}
.stockists__reach {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: var(--ink);
text-decoration: underline transparent;
text-underline-offset: 0.2em;
overflow-wrap: anywhere;
transition: text-decoration-color var(--time) var(--ease);
}
.stockists__reach:hover,
.stockists__reach:focus-visible {
text-decoration-color: currentColor;
}
.stockists__reach:focus-visible {
outline: var(--rule) solid var(--ink);
outline-offset: 2px;
}
@media (max-width: 64rem) {
.stockists__contact {
grid-template-columns: 1fr 1fr;
}
.stockists__reach:last-child {
grid-column: 1 / -1;
}
}
@media (max-width: 48rem) {
.stockists {
grid-template-columns: 1fr;
}
.stockists__view {
position: static;
}
.stockists__band {
height: var(--band);
}
.stockists__list {
border-left: 0;
}
.stockists__region:first-child .stockists__place {
padding-top: var(--space-l);
}
}
@media (prefers-reduced-motion: reduce) {
.stockists__picture,
.stockists__reach {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
/* Paints one grey landscape into a canvas: ground seen from the air, drawn column by column from near to far,
with haze, a hill or pit cut into stone benches, and film grain. The same block sits in every part that shows a picture. */
function paintPlate(canvas, scene) {
const W = canvas.width, H = canvas.height;
const context = canvas.getContext("2d");
const image = context.createImageData(W, H);
const s = { seed: 1, eye: 0.62, horizon: 0.3, haze: 0.25, site: [0.25, 1.5, 0.42], dig: 1, cut: 0.5, sea: -1, sun: -1, blocks: [], ...scene };
let state = Math.imul(s.seed, 2654435761) >>> 0;
const random = () => (state = (Math.imul(state ^ (state >>> 15), 2246822507) + 0x9e3779b9) >>> 0) / 4294967296;
const lattice = new Uint8Array(512);
for (let i = 0; i < 256; i++) lattice[i] = i;
for (let i = 255; i > 0; i--) { const j = (random() * (i + 1)) | 0, kept = lattice[i]; lattice[i] = lattice[j]; lattice[j] = kept; }
lattice.copyWithin(256, 0, 256);
const noise = (x, y) => {
const xi = Math.floor(x), yi = Math.floor(y);
let fx = x - xi, fy = y - yi;
fx *= fx * (3 - 2 * fx); fy *= fy * (3 - 2 * fy);
const a = lattice[xi & 255], b = lattice[(xi + 1) & 255], lo = yi & 255, hi = (yi + 1) & 255;
const n00 = lattice[a + lo], n01 = lattice[a + hi], n10 = lattice[b + lo], n11 = lattice[b + hi];
return (n00 + (n10 - n00) * fx + (n01 - n00) * fy + (n00 - n10 - n01 + n11) * fx * fy) / 255;
};
const layered = (x, y, finest) => {
let sum = 0, gain = 0.5, scale = 1;
for (let i = 0; i < 9 && 1 / scale > finest; i++) { sum += gain * noise(x * scale + i * 17.3, y * scale - i * 9.1); gain *= 0.5; scale *= 2.03; }
return sum;
};
const ramp = (lo, hi, v) => { const t = Math.min(1, Math.max(0, (v - lo) / (hi - lo))); return t * t * (3 - 2 * t); };
/* Height and surface tone of the ground at one point. `cell` is the size of one sample there, so far ground gets less detail. */
const spot = { height: 0, tone: 0, flat: 0 };
const ground = (x, y, cell) => {
const dx = x - s.site[0], dy = y - s.site[1];
const mound = Math.exp(-(dx * dx + dy * dy) / (s.site[2] * s.site[2]));
const range = ramp(3, 8.5, y);
let height = layered(x * 1.1, y * 1.1, cell * 2.2) * 0.36 + s.dig * mound * 0.26 - 0.12 + range * s.eye * (0.35 + 1.5 * noise(x * 0.55 + 3, y * 0.3));
const farmed = ramp(0.5, 0.62, noise(x * 1.7 + 40, y * 1.7 + 11)) * (1 - ramp(0.2, 0.5, mound)) * (1 - ramp(0, 0.3, range));
height = height * (1 - 0.72 * farmed) + 0.03 * farmed;
if (cell < 0.03) height += (1 - farmed) * 0.014 * noise(x * 60, y * 60);
let tone = 0.1 + 0.14 * noise(x * 3.1, y * 3.1) + (cell < 0.012 ? 0.2 * (noise(x * 150, y * 150) - 0.5) : 0);
if (farmed > 0.02) {
const turn = Math.floor(noise(x * 2.3 + 7, y * 2.3) * 5) * 1.3;
const furrow = cell < 0.006 ? 0.14 * Math.sin((x * Math.cos(turn) + y * Math.sin(turn)) * 190) : 0;
tone += (0.4 + 0.22 * noise(x * 2.3 + 7, y * 2.3 + 60) + furrow - tone) * ramp(0.02, 0.5, farmed);
}
const track = Math.abs(noise(x * 0.9 + 80, y * 0.9 + 5) - 0.5);
if (track < 0.006 + cell * 0.4) tone += (0.7 - tone) * 0.8 * (1 - ramp(1.8, 3.2, y));
const worked = ramp(1 - s.cut, 1.12 - s.cut, mound + 0.25 * noise(x * 4, y * 4));
if (worked > 0) {
const bench = 0.03, level = height / bench, tread = Math.floor(level) + ramp(0.72, 1, level - Math.floor(level));
height += (tread * bench - height) * worked;
tone += (0.78 + 0.2 * noise(x * 30, y * 6) - tone) * worked;
}
spot.flat = 0;
if (height < s.sea) { height = s.sea; tone = 0.6 + 0.2 * noise(x * 9, y * 40); spot.flat = 1; }
for (const [left, front, wide, deep, tall, pale] of s.blocks) {
const u = (x - left) / wide, v = (y - front) / deep;
if (u > 0 && u < 1 && v > 0 && v < 1) { height += tall; tone = pale || v < 0.45 ? 1 : 0.25; spot.flat = 1; }
}
spot.height = height; spot.tone = tone;
};
const focal = H * 1.25, horizon = H * s.horizon, spread = 1.15 * W / H * 0.5625, depths = 460, reach = 9;
const nearest = Math.max(0.1, (s.eye - 0.4) * focal / (H - horizon));
const depth = Float32Array.from({ length: depths }, (_, k) => nearest * Math.pow(reach / nearest, k / (depths - 1)));
const heights = new Float32Array(depths * W), tones = new Float32Array(depths * W), flats = new Uint8Array(depths * W);
for (let k = 0; k < depths; k++) {
const cell = depth[k] * spread / W;
for (let c = 0; c < W; c++) {
ground((c / W - 0.5) * depth[k] * spread, depth[k], cell);
heights[k * W + c] = spot.height; tones[k * W + c] = spot.tone; flats[k * W + c] = spot.flat;
}
}
const grey = new Float32Array(W * H), mist = 0.86;
for (let c = 0; c < W; c++) {
let floor = H, below = -1;
for (let k = 1; k < depths - 1 && floor > 0; k++) {
const i = k * W + c;
const row = Math.max(0, Math.floor(horizon + (s.eye - heights[i]) * focal / depth[k]));
if (row >= floor) continue;
const slopeAcross = (heights[i + (c < W - 1)] - heights[i - (c > 0)]) / (2 * depth[k] * spread / W);
const slopeAway = (heights[i + W] - heights[i - W]) / (depth[k + 1] - depth[k - 1]);
const facing = (0.5 + s.sun * 0.8 * slopeAcross - 0.55 * slopeAway) / Math.sqrt(1 + slopeAcross * slopeAcross + slopeAway * slopeAway);
const lit = tones[i] * (flats[i] ? 1 : 0.3 + 1.25 * Math.max(0, facing));
const value = lit + (mist - 0.07 - lit) * (1 - Math.exp(-Math.pow(depth[k] * s.haze, 1.25)));
for (let r = floor - 1; r >= row; r--) grey[r * W + c] = below < 0 ? value : below + (value - below) * (floor - r) / (floor - row);
floor = row; below = value;
}
for (let r = 0; r < floor; r++) {
const up = Math.max(0, 1 - r / (horizon + H * 0.14));
const cloud = layered(c / W * 2.6 * spread + 9, up * 7 + s.seed, 0.01) - 0.5;
grey[r * W + c] = mist - 0.3 * up + 0.36 * cloud * ramp(0.03, 0.45, up);
}
}
for (let i = 0; i < W * H; i++) {
const corner = Math.hypot((i % W) / W - 0.5, ((i / W) | 0) / H - 0.5);
let v = Math.min(1, Math.max(0, grey[i] * 1.12 - 0.05));
v = (0.75 * v * v * (3 - 2 * v) + 0.25 * v) * (1 - 0.5 * corner * corner * corner) + (random() - 0.5) * 0.075;
image.data[i * 4] = image.data[i * 4 + 1] = image.data[i * 4 + 2] = 255 * v;
image.data[i * 4 + 3] = 255;
}
context.putImageData(image, 0, 0);
canvas.classList.add("is-painted");
}
/* Pictures are painted one per task, so a page full of them never blocks for long. */
function paintInTurn(canvases) {
const waiting = [...canvases];
const next = () => {
const canvas = waiting.shift();
if (!canvas) return;
paintPlate(canvas, JSON.parse(canvas.dataset.scene || "{}"));
setTimeout(next, 0);
};
next();
}
document.querySelectorAll(".stockists").forEach((root) => paintInTurn(root.querySelectorAll(".stockists__picture")));
})();
</script>
Profile
A detail page: title bar with a close cross, a strip naming the entry between its two neighbours with a violet flag on the current one, then a sticky picture that cross-fades through three views beside a violet and a grey block, facts in serif, a large grotesk story and a ruled table on a pale tray.
Code
React For Figma<article class="profile">
<header class="profile__head">
<p class="profile__title">Stone with a home address</p>
<a class="profile__close" href="#" aria-label="Back to all quarries">
<svg class="profile__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m2 2 20 20M22 2 2 22"/></svg>
</a>
</header>
<nav class="profile__strip" aria-label="Quarries">
<a class="profile__step" href="#" aria-label="Previous quarry">
<svg class="profile__icon" viewBox="0 0 12 20" aria-hidden="true" focusable="false"><path d="M10 2 2 10l8 8"/></svg>
</a>
<a class="profile__cell" href="#">
<span class="profile__cell-name">Pedreira do Corvo</span>
<span class="profile__cell-line">The black schist of the north</span>
</a>
<a class="profile__cell is-current" href="#" aria-current="page">
<span class="profile__cell-name">Scarth How</span>
<span class="profile__cell-line">Slate split by hand since 1911</span>
</a>
<a class="profile__cell" href="#">
<span class="profile__cell-name">Monte da Rola</span>
<span class="profile__cell-line">Pink marble from a single pit</span>
</a>
<a class="profile__step" href="#" aria-label="Next quarry">
<svg class="profile__icon" viewBox="0 0 12 20" aria-hidden="true" focusable="false"><path d="m2 2 8 8-8 8"/></svg>
</a>
</nav>
<div class="profile__body">
<figure class="profile__view">
<canvas class="profile__picture is-shown" width="800" height="800" role="img" aria-label="A deep slate pit with many narrow benches, seen from the rim"
data-scene='{"seed":31,"eye":0.7,"horizon":0.14,"site":[-0.05,1.45,0.6],"dig":-1.4,"cut":0.85,"haze":0.2}'></canvas>
<canvas class="profile__picture" width="800" height="800" role="img" aria-label="The same fell from across the valley, the cutting a pale notch in dark woods"
data-scene='{"seed":32,"eye":0.44,"horizon":0.46,"site":[0.12,1.9,0.45],"cut":0.42,"haze":0.3}'></canvas>
<canvas class="profile__picture" width="800" height="800" role="img" aria-label="Stacked benches close up, lit from the right"
data-scene='{"seed":33,"eye":0.5,"horizon":0.3,"site":[0,0.85,0.34],"cut":0.9,"sun":1}'></canvas>
<span class="profile__band" aria-hidden="true"></span>
<button class="profile__next" type="button" aria-label="Next picture">
<svg class="profile__icon" viewBox="0 0 12 20" aria-hidden="true" focusable="false"><path d="m2 2 8 8-8 8"/></svg>
</button>
</figure>
<div class="profile__text">
<span class="profile__block" aria-hidden="true"></span>
<span class="profile__block profile__block--idle" aria-hidden="true"></span>
<div class="profile__columns">
<dl class="profile__facts">
<dt>Location:</dt>
<dd>Scarth Fell, Cumbria</dd>
<dt>Crew:</dt>
<dd>Seven, two of them rivers</dd>
<dd class="profile__map-row">
<a class="profile__map" href="#">
<svg class="profile__pin" viewBox="0 0 8 24" aria-hidden="true" focusable="false"><circle cx="4" cy="4" r="4"/><path d="M3.25 6h1.5v18h-1.5z"/></svg>
View map
</a>
</dd>
</dl>
<div class="profile__story">
<p>Nell Tarn runs the last hand-riven slate face on Scarth Fell, a pit her great-grandfather opened with a borrowed crowbar. Nothing here is blasted. The crew free each block with wire and wedges, lower it on a rope-worked incline and split it on the bank the same week, while the stone still carries its quarry sap.</p>
<p>The beds dip steeply and change colour every few metres, from a wet-pavement grey to an olive green with rust veins. Nell sells them as she finds them and will not sort for uniformity, which is exactly why we wanted her on the list.</p>
</div>
</div>
<div class="profile__tray">
<h3 class="profile__tray-title">Stones</h3>
<table class="profile__table">
<tbody>
<tr><th scope="row">Scarth Grey</th><td>Slate, riven</td><td>Top bed</td></tr>
<tr><th scope="row">Scarth Olive</th><td>Slate, riven</td><td>Middle bed</td></tr>
<tr><th scope="row">Tarn Rust</th><td>Slate, honed</td><td>Middle bed</td></tr>
<tr><th scope="row">Incline Black</th><td>Slate, sawn</td><td>Floor of the pit</td></tr>
<tr><th scope="row">Bank Seconds</th><td>Walling stone</td><td>Mixed</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</article>
<style>
.profile {
background: var(--paper);
}
.profile__icon {
display: block;
height: 1.25rem;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
}
.profile__head {
position: relative;
display: grid;
place-items: center;
min-height: calc(var(--bar) + 0.5rem);
padding: var(--space-s) calc(var(--tap) + var(--gutter));
border-bottom: var(--rule) solid var(--ink);
}
.profile__title {
margin: 0;
font-family: var(--font-caps);
font-size: var(--caps-head);
line-height: 1;
text-align: center;
text-transform: uppercase;
}
.profile__close {
position: absolute;
top: 50%;
right: calc(var(--gutter) / 2);
display: grid;
place-items: center;
width: var(--tap);
height: var(--tap);
color: var(--ink);
translate: 0 -50%;
transition: rotate var(--time) var(--ease);
}
.profile__close:hover,
.profile__close:focus-visible {
rotate: 90deg;
outline: none;
}
/* The strip names the quarry in hand between its two neighbours; a violet flag sits on the one in hand. */
.profile__strip {
display: grid;
grid-template-columns: var(--tap) repeat(3, minmax(0, 1fr)) var(--tap);
font-family: var(--font-caps);
line-height: var(--leading-caps);
text-align: center;
text-transform: uppercase;
}
.profile__step,
.profile__cell {
position: relative;
display: grid;
place-content: center;
min-height: 5.625rem;
padding: var(--space-m) var(--space-s) var(--space-s);
border-right: var(--rule) solid var(--ink);
color: var(--ink);
text-decoration: none;
}
.profile__step {
padding: 0;
}
.profile__step:last-child {
border-right: 0;
}
.profile__step:hover,
.profile__step:focus-visible {
background: var(--violet);
outline: none;
}
.profile__cell::before {
content: "";
position: absolute;
inset: 0 0 auto;
height: calc(var(--flag) / 2);
background: var(--violet);
opacity: 0;
transition: opacity var(--time) var(--ease);
}
.profile__cell.is-current::before,
.profile__cell:hover::before,
.profile__cell:focus-visible::before {
opacity: 1;
}
.profile__cell:focus-visible {
outline: none;
}
.profile__cell-name {
font-size: var(--caps-l);
line-height: 1.05;
}
.profile__cell-line {
margin-top: 0.25rem;
font-size: var(--caps-xs);
}
.profile__body {
display: grid;
grid-template-columns: 1fr 1fr;
align-items: start;
}
/* The picture stays put while the text beside it scrolls. Pictures are stacked and cross-fade. */
.profile__view {
position: sticky;
top: 0;
display: grid;
margin: 0;
overflow: hidden;
background: var(--plate);
isolation: isolate;
}
.profile__picture {
grid-area: 1 / 1;
display: block;
width: 100%;
aspect-ratio: 1;
object-fit: cover;
opacity: 0;
transition: opacity var(--time-slow) var(--ease);
}
.profile__picture.is-painted.is-shown {
opacity: 1;
}
.profile__band {
position: absolute;
inset: auto 0 0;
height: calc(var(--band) / 2);
background: var(--violet);
mix-blend-mode: difference;
pointer-events: none;
}
.profile__next {
position: absolute;
top: 50%;
right: 0;
display: grid;
place-items: center;
width: calc(var(--tap) + var(--space-s));
height: calc(var(--tap) + var(--space-s));
padding: 0;
border: 0;
border-radius: 0;
background: none;
color: var(--paper);
translate: 0 -50%;
cursor: pointer;
transition: translate var(--time) var(--ease);
}
.profile__next .profile__icon {
height: 1.75rem;
stroke-width: 1.75;
}
.profile__next:hover,
.profile__next:focus-visible {
translate: 0.25rem -50%;
outline: none;
}
.profile__next:focus-visible {
background: var(--violet);
color: var(--ink);
}
/* Two empty colour blocks, each as tall as the two-part bar. The violet one sticks; the grey one scrolls away under it. */
.profile__block {
position: sticky;
top: 0;
z-index: 1;
display: block;
height: var(--bar);
background: var(--violet);
}
.profile__block--idle {
position: static;
background: var(--idle);
}
.profile__columns {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
gap: var(--gutter);
padding: var(--space-m) var(--gutter) var(--space-xl);
}
.profile__facts {
margin: 0;
font-family: var(--font-caps);
font-size: var(--text-note);
line-height: 1.15;
}
.profile__facts dt {
font-weight: 600;
}
.profile__facts dd {
margin: 0 0 var(--space-s);
}
.profile__map {
display: inline-flex;
align-items: center;
gap: var(--space-s);
min-height: var(--tap);
color: var(--ink);
text-decoration: underline transparent;
text-underline-offset: 0.2em;
transition: text-decoration-color var(--time) var(--ease);
}
.profile__map:hover,
.profile__map:focus-visible {
text-decoration-color: currentColor;
}
.profile__map:focus-visible {
outline: var(--rule) solid var(--ink);
outline-offset: 2px;
}
.profile__pin {
height: 1.5rem;
fill: currentColor;
}
.profile__story {
font-size: var(--text-lead);
line-height: 1.07;
letter-spacing: -0.01em;
}
.profile__story p {
margin: 0 0 var(--space-m);
text-indent: var(--indent);
}
.profile__tray {
padding: var(--space-m) 0 var(--space-l);
background: var(--tray);
}
.profile__tray-title {
margin: 0 0 var(--space-l);
padding: 0 var(--gutter);
font-size: var(--text-lead);
font-weight: 400;
letter-spacing: -0.01em;
}
.profile__table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-fine);
text-align: left;
}
.profile__table th,
.profile__table td {
width: 33.33%;
padding: var(--space-m) var(--gutter) var(--space-s);
border-bottom: var(--rule) solid var(--ink);
font-weight: 400;
vertical-align: bottom;
}
@media (max-width: 64rem) {
.profile__columns {
grid-template-columns: 1fr;
}
.profile__facts {
display: grid;
grid-template-columns: auto 1fr;
gap: 0 var(--space-s);
}
.profile__map-row {
grid-column: 1 / -1;
}
}
@media (max-width: 48rem) {
.profile__strip {
grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap);
}
.profile__cell:not(.is-current) {
display: none;
}
.profile__body {
grid-template-columns: 1fr;
}
.profile__view {
position: relative;
}
.profile__picture {
aspect-ratio: 4 / 3;
}
.profile__band {
height: var(--band);
}
.profile__block {
position: static;
}
}
@media (prefers-reduced-motion: reduce) {
.profile__close,
.profile__cell::before,
.profile__picture,
.profile__next,
.profile__map {
transition-duration: 0s;
}
}
</style>
<script>
(() => {
/* Paints one grey landscape into a canvas: ground seen from the air, drawn column by column from near to far,
with haze, a hill or pit cut into stone benches, and film grain. The same block sits in every part that shows a picture. */
function paintPlate(canvas, scene) {
const W = canvas.width, H = canvas.height;
const context = canvas.getContext("2d");
const image = context.createImageData(W, H);
const s = { seed: 1, eye: 0.62, horizon: 0.3, haze: 0.25, site: [0.25, 1.5, 0.42], dig: 1, cut: 0.5, sea: -1, sun: -1, blocks: [], ...scene };
let state = Math.imul(s.seed, 2654435761) >>> 0;
const random = () => (state = (Math.imul(state ^ (state >>> 15), 2246822507) + 0x9e3779b9) >>> 0) / 4294967296;
const lattice = new Uint8Array(512);
for (let i = 0; i < 256; i++) lattice[i] = i;
for (let i = 255; i > 0; i--) { const j = (random() * (i + 1)) | 0, kept = lattice[i]; lattice[i] = lattice[j]; lattice[j] = kept; }
lattice.copyWithin(256, 0, 256);
const noise = (x, y) => {
const xi = Math.floor(x), yi = Math.floor(y);
let fx = x - xi, fy = y - yi;
fx *= fx * (3 - 2 * fx); fy *= fy * (3 - 2 * fy);
const a = lattice[xi & 255], b = lattice[(xi + 1) & 255], lo = yi & 255, hi = (yi + 1) & 255;
const n00 = lattice[a + lo], n01 = lattice[a + hi], n10 = lattice[b + lo], n11 = lattice[b + hi];
return (n00 + (n10 - n00) * fx + (n01 - n00) * fy + (n00 - n10 - n01 + n11) * fx * fy) / 255;
};
const layered = (x, y, finest) => {
let sum = 0, gain = 0.5, scale = 1;
for (let i = 0; i < 9 && 1 / scale > finest; i++) { sum += gain * noise(x * scale + i * 17.3, y * scale - i * 9.1); gain *= 0.5; scale *= 2.03; }
return sum;
};
const ramp = (lo, hi, v) => { const t = Math.min(1, Math.max(0, (v - lo) / (hi - lo))); return t * t * (3 - 2 * t); };
/* Height and surface tone of the ground at one point. `cell` is the size of one sample there, so far ground gets less detail. */
const spot = { height: 0, tone: 0, flat: 0 };
const ground = (x, y, cell) => {
const dx = x - s.site[0], dy = y - s.site[1];
const mound = Math.exp(-(dx * dx + dy * dy) / (s.site[2] * s.site[2]));
const range = ramp(3, 8.5, y);
let height = layered(x * 1.1, y * 1.1, cell * 2.2) * 0.36 + s.dig * mound * 0.26 - 0.12 + range * s.eye * (0.35 + 1.5 * noise(x * 0.55 + 3, y * 0.3));
const farmed = ramp(0.5, 0.62, noise(x * 1.7 + 40, y * 1.7 + 11)) * (1 - ramp(0.2, 0.5, mound)) * (1 - ramp(0, 0.3, range));
height = height * (1 - 0.72 * farmed) + 0.03 * farmed;
if (cell < 0.03) height += (1 - farmed) * 0.014 * noise(x * 60, y * 60);
let tone = 0.1 + 0.14 * noise(x * 3.1, y * 3.1) + (cell < 0.012 ? 0.2 * (noise(x * 150, y * 150) - 0.5) : 0);
if (farmed > 0.02) {
const turn = Math.floor(noise(x * 2.3 + 7, y * 2.3) * 5) * 1.3;
const furrow = cell < 0.006 ? 0.14 * Math.sin((x * Math.cos(turn) + y * Math.sin(turn)) * 190) : 0;
tone += (0.4 + 0.22 * noise(x * 2.3 + 7, y * 2.3 + 60) + furrow - tone) * ramp(0.02, 0.5, farmed);
}
const track = Math.abs(noise(x * 0.9 + 80, y * 0.9 + 5) - 0.5);
if (track < 0.006 + cell * 0.4) tone += (0.7 - tone) * 0.8 * (1 - ramp(1.8, 3.2, y));
const worked = ramp(1 - s.cut, 1.12 - s.cut, mound + 0.25 * noise(x * 4, y * 4));
if (worked > 0) {
const bench = 0.03, level = height / bench, tread = Math.floor(level) + ramp(0.72, 1, level - Math.floor(level));
height += (tread * bench - height) * worked;
tone += (0.78 + 0.2 * noise(x * 30, y * 6) - tone) * worked;
}
spot.flat = 0;
if (height < s.sea) { height = s.sea; tone = 0.6 + 0.2 * noise(x * 9, y * 40); spot.flat = 1; }
for (const [left, front, wide, deep, tall, pale] of s.blocks) {
const u = (x - left) / wide, v = (y - front) / deep;
if (u > 0 && u < 1 && v > 0 && v < 1) { height += tall; tone = pale || v < 0.45 ? 1 : 0.25; spot.flat = 1; }
}
spot.height = height; spot.tone = tone;
};
const focal = H * 1.25, horizon = H * s.horizon, spread = 1.15 * W / H * 0.5625, depths = 460, reach = 9;
const nearest = Math.max(0.1, (s.eye - 0.4) * focal / (H - horizon));
const depth = Float32Array.from({ length: depths }, (_, k) => nearest * Math.pow(reach / nearest, k / (depths - 1)));
const heights = new Float32Array(depths * W), tones = new Float32Array(depths * W), flats = new Uint8Array(depths * W);
for (let k = 0; k < depths; k++) {
const cell = depth[k] * spread / W;
for (let c = 0; c < W; c++) {
ground((c / W - 0.5) * depth[k] * spread, depth[k], cell);
heights[k * W + c] = spot.height; tones[k * W + c] = spot.tone; flats[k * W + c] = spot.flat;
}
}
const grey = new Float32Array(W * H), mist = 0.86;
for (let c = 0; c < W; c++) {
let floor = H, below = -1;
for (let k = 1; k < depths - 1 && floor > 0; k++) {
const i = k * W + c;
const row = Math.max(0, Math.floor(horizon + (s.eye - heights[i]) * focal / depth[k]));
if (row >= floor) continue;
const slopeAcross = (heights[i + (c < W - 1)] - heights[i - (c > 0)]) / (2 * depth[k] * spread / W);
const slopeAway = (heights[i + W] - heights[i - W]) / (depth[k + 1] - depth[k - 1]);
const facing = (0.5 + s.sun * 0.8 * slopeAcross - 0.55 * slopeAway) / Math.sqrt(1 + slopeAcross * slopeAcross + slopeAway * slopeAway);
const lit = tones[i] * (flats[i] ? 1 : 0.3 + 1.25 * Math.max(0, facing));
const value = lit + (mist - 0.07 - lit) * (1 - Math.exp(-Math.pow(depth[k] * s.haze, 1.25)));
for (let r = floor - 1; r >= row; r--) grey[r * W + c] = below < 0 ? value : below + (value - below) * (floor - r) / (floor - row);
floor = row; below = value;
}
for (let r = 0; r < floor; r++) {
const up = Math.max(0, 1 - r / (horizon + H * 0.14));
const cloud = layered(c / W * 2.6 * spread + 9, up * 7 + s.seed, 0.01) - 0.5;
grey[r * W + c] = mist - 0.3 * up + 0.36 * cloud * ramp(0.03, 0.45, up);
}
}
for (let i = 0; i < W * H; i++) {
const corner = Math.hypot((i % W) / W - 0.5, ((i / W) | 0) / H - 0.5);
let v = Math.min(1, Math.max(0, grey[i] * 1.12 - 0.05));
v = (0.75 * v * v * (3 - 2 * v) + 0.25 * v) * (1 - 0.5 * corner * corner * corner) + (random() - 0.5) * 0.075;
image.data[i * 4] = image.data[i * 4 + 1] = image.data[i * 4 + 2] = 255 * v;
image.data[i * 4 + 3] = 255;
}
context.putImageData(image, 0, 0);
canvas.classList.add("is-painted");
}
/* Pictures are painted one per task, so a page full of them never blocks for long. */
function paintInTurn(canvases) {
const waiting = [...canvases];
const next = () => {
const canvas = waiting.shift();
if (!canvas) return;
paintPlate(canvas, JSON.parse(canvas.dataset.scene || "{}"));
setTimeout(next, 0);
};
next();
}
document.querySelectorAll(".profile").forEach((root) => {
const pictures = [...root.querySelectorAll(".profile__picture")];
let shown = 0;
root.querySelector(".profile__next").addEventListener("click", () => {
pictures[shown].classList.remove("is-shown");
shown = (shown + 1) % pictures.length;
pictures[shown].classList.add("is-shown");
});
paintInTurn(pictures);
});
})();
</script>
Footer
A small black mark stepped like a quarry face with the name set to its width, one line of fine print and two small grotesk links, all sitting on the bottom edge of a tall white space.
Code
React For Figma<footer class="footer">
<a class="footer__home" href="#" aria-label="Keldstone, home">
<svg class="footer__mark" viewBox="0 0 112 92" aria-hidden="true" focusable="false">
<path d="M0 72V0h25v18h29v18h29v18h29v18z"/>
<text x="-1.2" y="91.7" textLength="114.2" lengthAdjust="spacingAndGlyphs">KELDSTONE</text>
</svg>
</a>
<p class="footer__note">Trade and studio orders only. Slabs leave the quarry on Thursdays.</p>
<nav class="footer__links" aria-label="Footer">
<a class="footer__link" href="#">About us</a>
<a class="footer__link" href="#">Contact</a>
</nav>
</footer>
<style>
.footer {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: end;
gap: var(--space-l);
padding: var(--space-xl) var(--gutter) var(--gutter);
background: var(--paper);
font-size: var(--text-fine);
line-height: 1;
}
/* The mark is one black block stepped like a quarry face, with the name set to its width underneath. */
.footer__home {
display: block;
width: 7rem;
color: var(--ink);
}
.footer__mark {
display: block;
width: 100%;
fill: currentColor;
font: 800 19px var(--font-mark);
}
.footer__home:hover,
.footer__home:focus-visible {
color: var(--violet);
outline: none;
}
.footer__note {
margin: 0;
padding-bottom: 0.1rem;
text-wrap: balance;
}
.footer__links {
display: flex;
gap: var(--space-m);
margin-bottom: calc((1em - var(--tap)) / 2);
}
.footer__link {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: var(--ink);
text-decoration: underline transparent;
text-underline-offset: 0.25em;
transition: text-decoration-color var(--time) var(--ease);
}
.footer__link:hover,
.footer__link:focus-visible {
text-decoration-color: currentColor;
}
.footer__link:focus-visible {
outline: var(--rule) solid var(--ink);
outline-offset: 2px;
}
@media (max-width: 40rem) {
.footer {
grid-template-columns: 1fr auto;
}
.footer__note {
grid-column: 1 / -1;
grid-row: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.footer__link {
transition-duration: 0s;
}
}
</style>
Style
- --paper #ffffff
- --ink #000000
- --violet #aa00f0
- --idle #c4c4c4
- --tray #efefef
- --plate #8a8a8a
Type
- Hanken Grotesk 800, pulled about 10% wider to fill the page for wordmark, and the small name under the footer mark, stands in for the site's own heavy, wide grotesk logotype
- Newsreader 400, nearly always in capitals for statements, region names, titles, card names, the two-part bar, facts and contact lines, stands in for a licensed sharp, light serif used in capitals for almost every word on the site
- Hanken Grotesk 400 for running copy, tables, footer links, stands in for a licensed neutral grotesk used large for paragraphs and small for tables
Motion
- A card in hand gets a violet strip along its top over 0.3s, and the violet band at the foot of its picture rises from a hairline to a fifth of the picture over 0.5s on cubic-bezier(0.4, 0, 0.2, 1).
- Arrow columns fade in at both ends of the card rail over 0.3s when the pointer enters it; a click slides the rail by one card and the arrow at a spent end goes away.
- In the two-part bar violet marks the active cell until the pointer enters the bar, then follows the pointer with no transition; the panels under it cross-fade over 0.3s.
- The two-part bar sticks to the top for the rest of the page; in the split layouts the picture stays put while the list or text beside it scrolls, and one violet block sticks while the grey one under it scrolls away.
- Pictures fade in over 0.5s once painted, and the profile's pictures cross-fade over 0.5s when its arrow is pressed.
- Small links only gain an underline over 0.3s; region names turn white; the close cross turns a quarter. Under reduced motion every transition is instant and the rail jumps instead of sliding.
Rules
- Three flat colours and no more: white, black and one saturated violet. Grey appears only as the idle half of the two-part bar and as a pale tray behind a table.
- The wordmark is the only heavy thing on the page. It runs from gutter to gutter and nothing else is set in that weight.
- Everything that names something is a light serif in capitals, centred, weight 400, no tracking, line height 1.2 or tighter.
- Colour arrives as full-width blocks with square corners that touch each other. No radii, shadows, gradients or icons beyond thin arrows and a cross.
- Pictures are black and white only. Colour touches a picture in one way: the page's violet laid over its foot with difference blending, so dark ground stays violet and pale stone turns green.
- Rules are 1px black hairlines. Cards and list rows are separated by rules, never by gaps or tints.
- The page splits in half again and again: the two cells of the bar, two columns of regions, picture beside list, picture beside text.
- Titles get a lot of white above and below (up to 8.5rem); colour blocks and pictures get none between them.
- Running copy is the plain grotesk set large with tight leading and an indented first line; facts and contact lines are the serif in mixed case at 1rem.
base.css
@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;800&family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap");
:root {
--paper: #ffffff; /* page, cards, the strip behind the wordmark */
--ink: #000000; /* all text, the wordmark, hairline rules */
--violet: #aa00f0; /* the one colour: statement band, active cell, flags, the band laid over pictures */
--idle: #c4c4c4; /* the cell that is not active, the grey block under the violet one */
--tray: #efefef; /* panel behind a table */
--plate: #8a8a8a; /* a picture before it is painted */
--font-mark: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; /* heavy grotesk, wordmark only */
--font-caps: "Newsreader", "Iowan Old Style", "Times New Roman", serif; /* light serif, almost always in capitals */
--font-text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; /* plain grotesk for running copy, tables, footer */
--caps-xs: clamp(0.75rem, 0.64rem + 0.4vw, 0.96rem); /* line under a card name */
--caps-s: clamp(1.0625rem, 0.93rem + 0.5vw, 1.4rem); /* statements */
--caps-m: clamp(1.1875rem, 1rem + 0.75vw, 1.625rem); /* cells of the two-part bar, firm names */
--caps-l: clamp(1.5rem, 1.25rem + 1.1vw, 2.05rem); /* card names */
--caps-head: clamp(1.25rem, 0.9rem + 1.7vw, 2.5rem); /* title bar of a detail page */
--caps-xl: clamp(1.75rem, 1.1rem + 2.3vw, 3rem); /* region names, list headings */
--caps-xxl: clamp(2.5rem, 1.4rem + 4.3vw, 4.8rem); /* page titles */
--text-fine: 0.875rem; /* footer links, table cells */
--text-note: 1rem; /* contact lines, facts */
--text-lead: clamp(1.125rem, 0.92rem + 0.85vw, 1.625rem); /* grotesk paragraphs */
--leading-caps: 1.2; /* every serif line */
--gutter: clamp(1rem, 1.4vw, 1.25rem); /* side padding of the page */
--inset: clamp(1rem, 2.2vw, 2rem); /* padding inside a card */
--space-s: 0.5rem; /* between a name and its line */
--space-m: 1.25rem; /* between lines of one block */
--space-l: clamp(2rem, 3.4vw, 3.25rem); /* between blocks of one section */
--space-xl: clamp(4rem, 9vw, 8.5rem); /* white room above and below a title */
--indent: clamp(1.5rem, 2.8vw, 2.5rem); /* first line of a grotesk paragraph */
--bar: 4rem; /* height of the two-part bar and of each colour block that echoes it */
--band: 15vw; /* height of the violet band laid over the foot of a wide picture */
--flag: 0.75rem; /* violet strip on top of the card in hand */
--tap: 2.75rem; /* smallest height of anything tappable */
--rule: 1px; /* every rule */
--ease: cubic-bezier(0.4, 0, 0.2, 1); /* every transition */
--time: 0.3s; /* colour swaps, fades */
--time-slow: 0.5s; /* the band rising over a picture, the rail sliding */
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--paper);
color: var(--ink);
font-family: var(--font-text);
font-size: var(--text-note);
line-height: 1.3;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
For your agent
Use the kitbash MCP server at https://kitbash.me/mcp. Call get_pack("violet-difference"), then get_component for the parts you need, and build my site in that style: keep its tokens and rules, replace the placeholder copy with mine.
How to connect