kitbash Connect agent

Toon Orbit

Playful · 7 parts · 3d · webgl · toon shading

A purple field with drawn-looking 3D rocks and crystals floating in it: flat three-tone shading, thin dark outlines, one lime accent, a soft grotesk headline that glows. Suits a product launch, a campaign page or any brand that wants to feel like a friendly space cartoon instead of a dashboard.

Get pack Remix

Whole page

Parts

Floating navigation

Transparent bar that lies over the section below it: wordmark in two weights on the left, text links and a white button on the right. After scrolling it gets a dark glass backing. On phones it collapses to the mark and a white square menu button that opens a sheet.

Code React For Figma
<header class="nav">
  <div class="nav__bar">
    <a class="nav__brand" href="#" aria-label="Driftstone Monthly, home">
      <svg class="nav__mark" viewBox="0 0 28 28" aria-hidden="true">
        <path d="M14 2.5 24 8v12l-10 5.5L4 20V8z"/>
        <path d="M4 8l10 5.5L24 8M14 13.5v12"/>
      </svg>
      <span class="nav__name">driftstone</span>
      <span class="nav__edition">Monthly</span>
    </a>

    <nav class="nav__links" aria-label="Main">
      <a class="nav__link" href="#">This month's box</a>
      <a class="nav__link" href="#">Field notes</a>
      <a class="nav__button" href="#">Join the club</a>
    </nav>

    <button class="nav__toggle" type="button" aria-expanded="false" aria-label="Menu">
      <span class="nav__toggle-lines" aria-hidden="true"></span>
    </button>
  </div>

  <nav class="nav__sheet" aria-label="Menu" hidden>
    <a class="nav__sheet-link" href="#">This month's box</a>
    <a class="nav__sheet-link" href="#">Field notes</a>
    <a class="nav__sheet-link" href="#">How it works</a>
    <a class="nav__button nav__button--wide" href="#">Join the club</a>
  </nav>
</header>

<style>
  /* The bar floats over whatever comes next: it takes no room in the page flow. */
  .nav {
    --nav-height: calc(var(--tap) + var(--space-4) * 2);
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--nav-height);
    margin-bottom: calc(-1 * var(--nav-height));
  }

  .nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    position: relative;
    height: 100%;
    padding: 0 var(--space-4);
  }

  /* Once the page has moved, a shadow falls from the top edge so the links stay readable. No panel. */
  .nav__bar::before {
    content: "";
    position: absolute;
    inset: 0 0 -40%;
    z-index: -1;
    background: linear-gradient(var(--field-deep), transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--time-reveal) var(--ease-cubic);
  }

  .nav--scrolled .nav__bar::before { opacity: 0.9; }

  .nav__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: var(--tap);
    min-height: var(--tap);
    font-size: var(--text-brand);
    text-decoration: none;
    letter-spacing: var(--tracking-display);
  }

  .nav__mark {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linejoin: round;
    transition: transform var(--time-settle) var(--ease-expo);
  }

  .nav__brand:hover .nav__mark { transform: rotate(120deg); }
  .nav__name { font-weight: 600; }
  .nav__edition { font-weight: 400; opacity: 0.86; }

  .nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .nav__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 var(--space-3);
    font-size: var(--text-small);
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) no-repeat var(--space-3) calc(50% + 0.8em) / 0 1px;
    transition: background-size var(--time-move) var(--ease-expo);
  }

  .nav__link:hover,
  .nav__link:focus-visible { background-size: calc(100% - var(--space-3) * 2) 1px; }

  .nav__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    padding: 0 var(--space-3);
    border-radius: var(--radius-s);
    background: var(--paper);
    color: var(--plum-ink);
    font-size: var(--text-small);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--time-quick) var(--ease-cubic), color var(--time-quick) var(--ease-cubic);
  }

  .nav__button:hover,
  .nav__button:focus-visible { background: var(--void); color: var(--lilac); }
  .nav__button--wide { width: 100%; margin-top: var(--space-2); }

  .nav__toggle {
    display: none;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    border: 0;
    border-radius: var(--radius-l);
    background: var(--paper);
    color: var(--void);
    cursor: pointer;
  }

  /* Three lines of falling length, like a paragraph. They fold into one line when the sheet is open. */
  .nav__toggle-lines,
  .nav__toggle-lines::before,
  .nav__toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: var(--radius-bar);
    background: currentColor;
    transform-origin: left;
    transition: transform var(--time-move) var(--ease-expo);
  }

  .nav__toggle-lines { position: relative; }
  .nav__toggle-lines::before,
  .nav__toggle-lines::after { content: ""; position: absolute; left: 0; }
  .nav__toggle-lines::before { top: -6px; }
  .nav__toggle-lines::after { top: 6px; transform: scaleX(0.6); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-lines::before { transform: translateY(6px); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-lines::after { transform: translateY(-6px); }

  .nav__sheet {
    position: absolute;
    top: calc(100% - var(--space-2));
    left: var(--space-3);
    right: var(--space-3);
    display: grid;
    padding: var(--space-3);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-l);
    background: var(--void);
    transform-origin: top right;
    animation: nav-sheet-open var(--time-move) var(--ease-expo);
  }

  .nav__sheet[hidden] { display: none; }

  .nav__sheet-link {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    border-bottom: 1px solid var(--hairline);
    font-size: var(--text-lead);
    font-weight: 500;
    text-decoration: none;
    letter-spacing: var(--tracking-display);
  }

  @keyframes nav-sheet-open {
    from { opacity: 0; transform: translateY(calc(-1 * var(--space-2))) scale(0.96); }
  }

  @media (max-width: 720px) {
    .nav__links, .nav__name, .nav__edition { display: none; }
    .nav__toggle { display: grid; }
    .nav__mark { width: 34px; height: 34px; }
  }

  @media (min-width: 721px) {
    .nav__sheet { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .nav__bar::before, .nav__mark, .nav__link, .nav__toggle-lines, .nav__toggle-lines::before, .nav__toggle-lines::after { transition: none; }
    .nav__sheet { animation: none; }
  }
</style>

<script>
(() => {
  const SCROLLED_AFTER_PIXELS = 24;

  function setUpNav(root) {
    const toggle = root.querySelector('.nav__toggle');
    const sheet = root.querySelector('.nav__sheet');

    const setSheetOpen = (open) => {
      toggle.setAttribute('aria-expanded', String(open));
      sheet.hidden = !open;
    };
    const markScrolled = () => root.classList.toggle('nav--scrolled', window.scrollY > SCROLLED_AFTER_PIXELS);

    toggle.addEventListener('click', () => setSheetOpen(sheet.hidden));
    sheet.addEventListener('click', (event) => { if (event.target.closest('a')) setSheetOpen(false); });
    root.addEventListener('keydown', (event) => { if (event.key === 'Escape') setSheetOpen(false); });
    window.addEventListener('scroll', markScrolled, { passive: true });
    markScrolled();
  }

  document.querySelectorAll('.nav').forEach(setUpNav);
})();
</script>

3D hero scene

Full-screen three.js scene of procedurally built rocks, crystals and a planet horizon, toon shaded in three flat tones with pixel-constant outlines. Objects drift and turn, follow the mouse with depth parallax and sink on scroll. The headline arrives word by word over the scene, with the pill button under it. Colours come from the tokens. Pauses when off screen, renders one still frame under reduced motion, and keeps an SVG drawing of the scene when WebGL or the library is unavailable.

Code React For Figma
<section class="hero">
  <div class="hero__sky" aria-hidden="true">
    <svg class="hero__still" viewBox="0 0 1440 900" preserveAspectRatio="xMidYMid slice">
      <defs>
        <symbol id="hero-rock" viewBox="0 0 160 150">
          <polygon class="hero__face-a" points="30,26 70,8 118,14 104,52 52,60"/>
          <polygon class="hero__face-b" points="8,70 30,26 52,60 44,104 14,108"/>
          <polygon class="hero__face-b" points="52,60 104,52 112,104 44,104"/>
          <polygon class="hero__face-c" points="118,14 150,44 154,92 112,104 104,52"/>
          <polygon class="hero__face-c" points="14,108 44,104 40,138"/>
          <polygon class="hero__face-c" points="44,104 112,104 130,126 92,144 40,138"/>
          <polygon class="hero__face-c" points="112,104 154,92 130,126"/>
          <polygon class="hero__rim" points="8,70 30,26 70,8 118,14 150,44 154,92 130,126 92,144 40,138 14,108"/>
        </symbol>
        <symbol id="hero-crystal" viewBox="0 0 100 200">
          <polygon class="hero__face-a" points="50,2 15,45 45,55"/>
          <polygon class="hero__face-b" points="50,2 45,55 85,40"/>
          <polygon class="hero__face-a" points="15,45 45,55 45,160 15,150"/>
          <polygon class="hero__face-b" points="45,55 85,40 85,145 45,160"/>
          <polygon class="hero__face-b" points="15,150 45,160 50,198"/>
          <polygon class="hero__face-c" points="45,160 85,145 50,198"/>
          <polygon class="hero__rim" points="50,2 85,40 85,145 50,198 15,150 15,45"/>
        </symbol>
        <symbol id="hero-gem" viewBox="0 0 120 120">
          <polygon class="hero__face-a" points="60,30 88.5,50.7 77.6,84.3 42.4,84.3 31.5,50.7"/>
          <polygon class="hero__face-a" points="31.5,50.7 6.7,42.7 27.1,14.7 60,4 60,30"/>
          <polygon class="hero__face-b" points="60,30 60,4 92.9,14.7 113.3,42.7 88.5,50.7"/>
          <polygon class="hero__face-b" points="42.4,84.3 27.1,105.3 6.7,77.3 6.7,42.7 31.5,50.7"/>
          <polygon class="hero__face-c" points="88.5,50.7 113.3,42.7 113.3,77.3 92.9,105.3 77.6,84.3"/>
          <polygon class="hero__face-c" points="77.6,84.3 92.9,105.3 60,116 27.1,105.3 42.4,84.3"/>
          <polygon class="hero__rim" points="60,4 92.9,14.7 113.3,42.7 113.3,77.3 92.9,105.3 60,116 27.1,105.3 6.7,77.3 6.7,42.7 27.1,14.7"/>
        </symbol>
      </defs>
      <g class="hero__paint-stone">
        <circle class="hero__face-c hero__rim-stroke" cx="250" cy="1640" r="1010"/>
        <path class="hero__face-b" d="M-60 760 Q 240 600 620 800 L 700 900 L -60 900 Z"/>
      </g>
      <use href="#hero-rock" class="hero__paint-orchid" x="690" y="130" width="420" height="394"/>
      <use href="#hero-rock" class="hero__paint-rock" x="800" y="-60" width="230" height="216" transform="rotate(18 915 48)"/>
      <use href="#hero-rock" class="hero__paint-rock" x="1250" y="-70" width="300" height="281" transform="rotate(-24 1400 70)"/>
      <use href="#hero-rock" class="hero__paint-rock" x="1090" y="560" width="250" height="234" transform="rotate(40 1215 677)"/>
      <use href="#hero-rock" class="hero__paint-rock" x="330" y="690" width="270" height="253" transform="rotate(-12 465 816)"/>
      <use href="#hero-rock" class="hero__paint-stone" x="-40" y="250" width="200" height="188" transform="rotate(30 60 344)"/>
      <use href="#hero-rock" class="hero__paint-stone" x="500" y="150" width="130" height="122" transform="rotate(-20 565 211)"/>
      <use href="#hero-rock" class="hero__paint-stone" x="1340" y="390" width="60" height="56"/>
      <use href="#hero-crystal" class="hero__paint-pink" x="410" y="210" width="40" height="80" transform="rotate(24 430 250)"/>
      <use href="#hero-crystal" class="hero__paint-orchid" x="380" y="520" width="38" height="76" transform="rotate(-62 399 558)"/>
      <use href="#hero-crystal" class="hero__paint-pink" x="1330" y="530" width="40" height="92" transform="rotate(8 1350 576)"/>
      <use href="#hero-crystal" class="hero__paint-lime" x="1090" y="170" width="38" height="70" transform="rotate(24 1109 205)"/>
      <use href="#hero-gem" class="hero__paint-lime" x="60" y="740" width="150" height="150"/>
    </svg>
    <canvas class="hero__canvas"></canvas>
  </div>

  <div class="hero__copy">
    <h1 class="hero__title">Rare Rocks. Deep Time. Delivered Monthly.</h1>
    <a class="hero__cta" href="#">
      <span class="hero__cta-label">Claim Your First Stone</span>
      <span class="hero__cta-tile" aria-hidden="true">
        <svg class="hero__cta-arrow" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
        <svg class="hero__cta-arrow hero__cta-arrow--next" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
      </span>
    </a>
  </div>
</section>

<style>
  .hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: max(100svh, 620px);
    padding: calc(var(--space-7) + var(--space-4)) var(--space-4) var(--space-7);
    overflow: hidden;
    isolation: isolate;
  }

  .hero__sky {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(ellipse 46% 52% at 62% 40%, var(--field-glow), transparent 72%),
      radial-gradient(ellipse 70% 80% at -8% 38%, var(--field-deep), transparent 62%),
      radial-gradient(ellipse 90% 46% at 50% 112%, var(--field-deep), transparent 74%),
      var(--field);
  }

  /* The scene dissolves into the field at the bottom, so the next section starts clean. */
  .hero__sky::after {
    content: "";
    position: absolute;
    inset: 93% 0 0;
    background: linear-gradient(transparent, var(--field));
  }

  .hero__still,
  .hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity var(--time-settle) var(--ease-cubic);
  }

  /* The drawn still is what you get without WebGL. While the live scene is on its way it stays out of sight. */
  .hero__canvas { opacity: 0; }
  .hero--live .hero__canvas { opacity: 1; }
  .hero--loading .hero__still { opacity: 0; transition: none; }
  .hero--live .hero__still { opacity: 0; }

  .hero__paint-rock { --hero-a: var(--rock); --hero-b: var(--rock-shade); --hero-c: var(--rock-deep); }
  .hero__paint-stone { --hero-a: var(--stone); --hero-b: var(--stone-shade); --hero-c: var(--stone-deep); }
  .hero__paint-orchid { --hero-a: var(--orchid); --hero-b: var(--orchid-shade); --hero-c: var(--orchid-deep); }
  .hero__paint-pink { --hero-a: var(--pink); --hero-b: var(--pink-shade); --hero-c: var(--pink-deep); }
  .hero__paint-lime { --hero-a: var(--lime); --hero-b: var(--lime-shade); --hero-c: var(--lime-deep); }

  .hero__face-a { fill: var(--hero-a); }
  .hero__face-b { fill: var(--hero-b); }
  .hero__face-c { fill: var(--hero-c); }
  .hero__face-a, .hero__face-b, .hero__face-c { stroke: var(--hero-c); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .hero__rim { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .hero__rim-stroke { stroke: var(--line); stroke-width: 2; }

  .hero__copy {
    display: grid;
    justify-items: center;
    gap: var(--space-5);
    max-width: var(--page);
    text-align: center;
  }

  .hero__title {
    margin: 0;
    max-width: 15em;
    font-size: var(--text-display);
    font-weight: 500;
    line-height: var(--leading-display);
    letter-spacing: var(--tracking-display);
    text-wrap: balance;
    text-shadow: 0 0 0.5em var(--glow);
  }

  .hero__word {
    display: inline-block;
    transition:
      opacity var(--time-settle) var(--ease-cubic),
      filter var(--time-settle) var(--ease-cubic),
      transform var(--time-settle) var(--ease-expo);
    transition-delay: calc(var(--hero-order) * var(--stagger-word) + var(--time-quick));
  }

  .hero--armed .hero__word {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(0.25em);
  }

  .hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    min-height: calc(var(--tap) + var(--space-3));
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    border-radius: var(--radius-l);
    background: var(--void);
    font-weight: 500;
    text-decoration: none;
    transition:
      background-color var(--time-quick) var(--ease-cubic),
      opacity var(--time-reveal) var(--ease-cubic) calc(var(--time-reveal) * 1.5),
      transform var(--time-settle) var(--ease-expo) calc(var(--time-reveal) * 1.5);
  }

  .hero--armed .hero__cta {
    opacity: 0;
    transform: translateY(var(--space-3));
  }

  /* The tint is a band of light that keeps passing through the label. */
  .hero__cta-label {
    --hero-label-ink: var(--lilac);
    background: linear-gradient(100deg, var(--hero-label-ink) 0 38%, var(--orchid-shade) 50%, var(--hero-label-ink) 62% 100%) 0 0 / 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hero-shimmer var(--time-shimmer) linear infinite;
  }

  .hero__cta-tile {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--paper);
    color: var(--void);
    transition: background-color var(--time-quick) var(--ease-cubic), color var(--time-quick) var(--ease-cubic);
  }

  .hero__cta-arrow {
    grid-area: 1 / 1;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--time-move) var(--ease-expo);
  }

  .hero__cta-arrow--next { transform: translateX(calc(-1 * var(--tap))); }

  .hero__cta:hover,
  .hero__cta:focus-visible { background: var(--paper); }
  .hero__cta:hover .hero__cta-label,
  .hero__cta:focus-visible .hero__cta-label { --hero-label-ink: var(--void); }
  .hero__cta:hover .hero__cta-tile,
  .hero__cta:focus-visible .hero__cta-tile { background: var(--void); color: var(--paper); }
  .hero__cta:hover .hero__cta-arrow,
  .hero__cta:focus-visible .hero__cta-arrow { transform: translateX(var(--tap)); }
  .hero__cta:hover .hero__cta-arrow--next,
  .hero__cta:focus-visible .hero__cta-arrow--next { transform: none; }

  @keyframes hero-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -50% 0; }
  }

  @media (max-width: 720px) {
    .hero { align-items: end; padding-bottom: calc(var(--space-7) + var(--space-5)); }
    .hero__sky {
      background:
        radial-gradient(ellipse 80% 40% at 50% 30%, var(--field-glow), transparent 72%),
        radial-gradient(ellipse 110% 40% at 50% 110%, var(--field-deep), transparent 74%),
        var(--field);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero__word, .hero__cta, .hero__cta-arrow, .hero__still, .hero__canvas { transition: none; }
    .hero__cta-label { animation: none; }
  }
</style>

<script>
(() => {
  const THREE_URL = 'https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.min.js';
  const CAMERA_DISTANCE = 10;
  const FIELD_OF_VIEW = 35;
  const MAX_PIXEL_RATIO = 2;
  const OUTLINE_PIXELS = 1.6;
  const ARRIVE_SECONDS = 1.6;
  const ARRIVE_STAGGER_SECONDS = 0.07;
  const POINTER_REACH = { x: 0.7, y: 0.45 };
  const POINTER_EASE = 0.045;
  const SCROLL_LIFT = 2.2;
  const TALL_ASPECT = 0.8;

  // Light sits up, left and in front of the camera, like a drawing lit from the top left corner.
  const LIGHT_DIRECTION = [-0.55, 0.72, 0.42];

  const PAINTS = {
    rock: ['--rock', '--rock-shade', '--rock-deep'],
    stone: ['--stone', '--stone-shade', '--stone-deep'],
    orchid: ['--orchid', '--orchid-shade', '--orchid-deep'],
    pink: ['--pink', '--pink-shade', '--pink-deep'],
    lime: ['--lime', '--lime-shade', '--lime-deep'],
    horizon: ['--stone', '--stone-shade', '--stone-deep'],
  };

  // at / tall: place in the frame, -1 is the left or bottom edge, 1 the right or top edge (tall is for portrait).
  // depth: distance towards the camera. size: share of the frame's short side. haze: how far it sinks into the field.
  const CAST = [
    { shape: 'boulder', paint: 'orchid', seed: 11, at: [0.3, 0.3], tall: [0.05, 0.42], depth: 0, size: 0.46, tallSize: 0.56, spin: 0.05, haze: 0 },
    { shape: 'rock', paint: 'rock', seed: 3, at: [0.27, 0.92], tall: [0.75, 0.93], depth: 1.2, size: 0.2, spin: 0.07, haze: 0 },
    { shape: 'rock', paint: 'rock', seed: 8, at: [0.97, 0.9], tall: [-0.9, 0.72], depth: 2.2, size: 0.27, spin: 0.04, haze: 0 },
    { shape: 'rock', paint: 'rock', seed: 21, at: [0.7, -0.5], tall: [0.9, -0.42], depth: 0.6, size: 0.22, spin: 0.05, haze: 0.06 },
    { shape: 'rock', paint: 'rock', seed: 14, at: [-0.4, -0.74], tall: [-0.55, -0.86], depth: 2.6, size: 0.24, spin: 0.03, haze: 0 },
    { shape: 'rock', paint: 'stone', seed: 5, at: [-0.95, 0.22], tall: [-1, 0.12], depth: 1.4, size: 0.2, spin: 0.05, haze: 0.1 },
    { shape: 'rock', paint: 'stone', seed: 17, at: [-0.24, 0.56], tall: [-0.6, 0.84], depth: -1.5, size: 0.14, spin: 0.08, haze: 0.22 },
    { shape: 'pebble', paint: 'stone', seed: 2, at: [-0.72, 0.74], tall: [0.2, 0.9], depth: -2, size: 0.045, spin: 0.2, haze: 0.3 },
    { shape: 'pebble', paint: 'stone', seed: 9, at: [0.9, 0.06], tall: [0.84, 0.16], depth: -0.5, size: 0.06, spin: 0.16, haze: 0.12 },
    { shape: 'pebble', paint: 'stone', seed: 6, at: [0.3, -0.66], tall: [0.5, -0.9], depth: 1, size: 0.055, spin: 0.14, haze: 0.1 },
    { shape: 'pebble', paint: 'stone', seed: 4, at: [-0.14, 0.7], tall: [-0.2, 0.96], depth: -2.4, size: 0.035, spin: 0.22, haze: 0.34 },
    { shape: 'crystal', paint: 'pink', seed: 1, at: [-0.42, 0.44], tall: [0.62, 0.72], depth: 0.4, size: 0.07, spin: 0.22, haze: 0 },
    { shape: 'bar', paint: 'pink', seed: 2, at: [-0.06, 0.36], tall: [-0.84, 0.36], depth: -0.6, size: 0.075, spin: 0.26, haze: 0.05 },
    { shape: 'crystal', paint: 'orchid', seed: 3, at: [-0.44, -0.26], tall: [-0.78, -0.56], depth: 1.6, size: 0.07, spin: 0.18, haze: 0 },
    { shape: 'bar', paint: 'orchid', seed: 4, at: [0.88, -0.3], tall: [0.8, -0.7], depth: 0.2, size: 0.09, spin: 0.2, haze: 0 },
    { shape: 'shard', paint: 'rock', seed: 5, at: [0.74, -0.4], tall: [0.3, -0.72], depth: 2.4, size: 0.05, spin: 0.3, haze: 0 },
    { shape: 'cube', paint: 'lime', seed: 6, at: [0.56, 0.56], tall: [0.8, 0.52], depth: 0.8, size: 0.05, spin: 0.3, haze: 0 },
    { shape: 'gem', paint: 'lime', seed: 7, at: [-0.86, -0.8], tall: [0.72, -0.94], depth: 3.2, size: 0.15, tallSize: 0.2, spin: 0.09, haze: 0 },
  ];

  const HORIZON = { paint: 'horizon', at: [-0.8, -1], tall: [-0.7, -1], radius: 1.25, tallRadius: 1.5, rise: 0.36, tallRise: 0.24, depth: -1 };

  const FILL_VERTEX = `
    varying vec3 vViewPosition;
    varying vec3 vRoundNormal;
    varying vec3 vLocal;
    void main() {
      vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);
      vViewPosition = viewPosition.xyz;
      vRoundNormal = normalMatrix * normalize(position);
      vLocal = position;
      gl_Position = projectionMatrix * viewPosition;
    }`;

  // Three flat tones picked by how a face meets the light. No gradients: that is the whole look.
  const FILL_FRAGMENT = `
    uniform vec3 uLit;
    uniform vec3 uShade;
    uniform vec3 uDeep;
    uniform vec3 uHaze;
    uniform vec3 uLight;
    uniform float uHazeAmount;
    uniform float uRound;
    uniform float uTerrain;
    varying vec3 vViewPosition;
    varying vec3 vRoundNormal;
    varying vec3 vLocal;
    void main() {
      vec3 facet = normalize(cross(dFdx(vViewPosition), dFdy(vViewPosition)));
      vec3 normal = normalize(mix(facet, normalize(vRoundNormal), uRound));
      float facing = dot(normal, uLight);
      vec3 color = facing > 0.5 ? uLit : (facing > -0.08 ? uShade : uDeep);
      if (uTerrain > 0.5) {
        vec3 warped = vLocal * 17.0 + 1.6 * sin(vLocal.yzx * 9.0);
        float land = sin(warped.x) * sin(warped.y + 1.9) + 0.6 * sin(warped.z * 1.7 + warped.x * 0.6);
        float edgeOn = 1.0 - dot(normalize(vRoundNormal), normalize(-vViewPosition));
        color = edgeOn > 0.9 ? uLit : (land > 0.42 ? uShade : uDeep);
      }
      gl_FragColor = vec4(mix(color, uHaze, uHazeAmount), 1.0);
    }`;

  // The outline is the object's back faces pushed outwards by a fixed number of pixels.
  const OUTLINE_VERTEX = `
    uniform vec2 uResolution;
    uniform float uWidth;
    void main() {
      vec4 clip = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
      vec4 outward = projectionMatrix * modelViewMatrix * vec4(position * 1.02, 1.0);
      vec2 direction = (outward.xy / outward.w - clip.xy / clip.w) * uResolution;
      float reach = length(direction);
      if (reach > 0.0001) clip.xy += direction / reach * uWidth * 2.0 / uResolution * clip.w;
      gl_Position = clip;
    }`;

  const OUTLINE_FRAGMENT = `
    uniform vec3 uColor;
    void main() { gl_FragColor = vec4(uColor, 1.0); }`;

  let threeModule;
  const loadThree = () => (threeModule ??= import(THREE_URL));

  const seededRandom = (seed) => () => {
    seed = (seed + 0x6d2b79f5) | 0;
    let mixed = Math.imul(seed ^ (seed >>> 15), 1 | seed);
    mixed = (mixed + Math.imul(mixed ^ (mixed >>> 7), 61 | mixed)) ^ mixed;
    return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296;
  };

  const easeOutExpo = (progress) => (progress >= 1 ? 1 : 1 - Math.pow(2, -10 * progress));
  const clamp01 = (value) => Math.min(1, Math.max(0, value));

  function browserDrawsWebGL() {
    try {
      return Boolean(document.createElement('canvas').getContext('webgl2'));
    } catch {
      return false;
    }
  }

  // A lumpy ball with a few flat cuts, the way a stone breaks.
  function chiselledBall(THREE, seed, { detail, lumpiness, cuts, cutDepth, stretch }) {
    const random = seededRandom(seed);
    const geometry = new THREE.IcosahedronGeometry(1, detail);
    const positions = geometry.attributes.position;
    const proportions = new THREE.Vector3(1 + random() * stretch, 1 - random() * stretch * 0.6, 1 - random() * stretch * 0.4);
    const phase = [random() * 6, random() * 6, random() * 6];
    const planes = Array.from({ length: cuts }, () => ({
      normal: new THREE.Vector3(random() - 0.5, random() - 0.5, random() - 0.5).normalize(),
      distance: 1 - cutDepth * (0.5 + random() * 0.5),
    }));
    const point = new THREE.Vector3();
    for (let index = 0; index < positions.count; index += 1) {
      point.fromBufferAttribute(positions, index);
      const lump = Math.sin(point.x * 2.6 + phase[0]) * Math.sin(point.y * 3.1 + phase[1]) * Math.sin(point.z * 2.3 + phase[2]);
      point.multiplyScalar(1 + lump * lumpiness);
      for (const plane of planes) {
        const over = point.dot(plane.normal) - plane.distance;
        if (over > 0) point.addScaledVector(plane.normal, -over);
      }
      point.multiply(proportions);
      positions.setXYZ(index, point.x, point.y, point.z);
    }
    return geometry;
  }

  function pointedPrism(THREE, sides, radius, halfLength, tip) {
    const profile = [[0, -halfLength], [radius, -halfLength + tip], [radius, halfLength - tip], [0, halfLength]];
    return new THREE.LatheGeometry(profile.map(([x, y]) => new THREE.Vector2(x, y)), sides);
  }

  const SHAPES = {
    boulder: (THREE, seed) => ({ geometry: chiselledBall(THREE, seed, { detail: 2, lumpiness: 0.05, cuts: 16, cutDepth: 0.42, stretch: 0.12 }), crease: 16 }),
    rock: (THREE, seed) => ({ geometry: chiselledBall(THREE, seed, { detail: 1, lumpiness: 0.28, cuts: 5, cutDepth: 0.5, stretch: 0.45 }), crease: 28 }),
    pebble: (THREE, seed) => ({ geometry: chiselledBall(THREE, seed, { detail: 0, lumpiness: 0.2, cuts: 2, cutDepth: 0.4, stretch: 0.4 }), crease: 20 }),
    crystal: (THREE) => ({ geometry: pointedPrism(THREE, 6, 0.42, 1, 0.45), crease: 10 }),
    shard: (THREE) => ({ geometry: pointedPrism(THREE, 4, 0.6, 1, 0.9), crease: 10 }),
    bar: (THREE) => ({ geometry: new THREE.BoxGeometry(0.38, 1.9, 0.38), crease: 10 }),
    cube: (THREE) => ({ geometry: new THREE.BoxGeometry(1.2, 1.2, 1.2), crease: 10 }),
    gem: (THREE) => ({ geometry: new THREE.DodecahedronGeometry(1, 0), crease: 10 }),
  };

  function buildStage(THREE, root, canvas) {
    const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
    renderer.setClearColor(0x000000, 0);
    const scene = new THREE.Scene();
    const camera = new THREE.PerspectiveCamera(FIELD_OF_VIEW, 1, 0.1, 60);
    const resolution = new THREE.Vector2(1, 1);
    const light = new THREE.Vector3(...LIGHT_DIRECTION).normalize();
    const tokens = getComputedStyle(root);
    const screenColor = (token) => new THREE.Color(tokens.getPropertyValue(token).trim()).convertLinearToSRGB();
    const haze = screenColor('--field');

    const outlineMaterial = new THREE.ShaderMaterial({
      vertexShader: OUTLINE_VERTEX,
      fragmentShader: OUTLINE_FRAGMENT,
      side: THREE.BackSide,
      uniforms: { uColor: { value: screenColor('--line') }, uResolution: { value: resolution }, uWidth: { value: OUTLINE_PIXELS } },
    });

    function fillMaterial(paint, hazeAmount, options = {}) {
      const [lit, shade, deep] = PAINTS[paint].map(screenColor);
      return new THREE.ShaderMaterial({
        vertexShader: FILL_VERTEX,
        fragmentShader: FILL_FRAGMENT,
        polygonOffset: true,
        polygonOffsetFactor: 1,
        polygonOffsetUnits: 1,
        uniforms: {
          uLit: { value: lit },
          uShade: { value: shade },
          uDeep: { value: deep },
          uHaze: { value: haze },
          uLight: { value: light },
          uHazeAmount: { value: hazeAmount },
          uRound: { value: options.round ? 1 : 0 },
          uTerrain: { value: options.terrain ? 1 : 0 },
        },
      });
    }

    function drawnObject(geometry, paint, hazeAmount, crease, options) {
      const object = new THREE.Group();
      object.add(new THREE.Mesh(geometry, fillMaterial(paint, hazeAmount, options)));
      object.add(new THREE.Mesh(geometry, outlineMaterial));
      if (crease) {
        const creaseColor = new THREE.Color(tokens.getPropertyValue(PAINTS[paint][2]).trim()).lerp(new THREE.Color(tokens.getPropertyValue('--line').trim()), 0.45);
        object.add(new THREE.LineSegments(new THREE.EdgesGeometry(geometry, crease), new THREE.LineBasicMaterial({ color: creaseColor })));
      }
      return object;
    }

    const actors = CAST.map((role, index) => {
      const random = seededRandom(role.seed * 97 + index);
      const { geometry, crease } = SHAPES[role.shape](THREE, role.seed);
      const object = drawnObject(geometry, role.paint, role.haze, crease);
      object.rotation.set(random() * 6, random() * 6, random() * 6);
      scene.add(object);
      return {
        role,
        object,
        home: new THREE.Vector3(),
        scale: 1,
        axis: new THREE.Vector3(random() - 0.5, random() - 0.5, random() - 0.5).normalize(),
        bobPhase: random() * 6,
        bobSpeed: 0.25 + random() * 0.3,
        arriveAt: index * ARRIVE_STAGGER_SECONDS,
      };
    });

    const horizon = drawnObject(new THREE.IcosahedronGeometry(1, 24), HORIZON.paint, 0, 0, { round: true, terrain: true });
    scene.add(horizon);

    const halfFrameAt = (depth) => {
      const halfHeight = Math.tan((FIELD_OF_VIEW * Math.PI) / 360) * (CAMERA_DISTANCE - depth);
      return { halfWidth: halfHeight * camera.aspect, halfHeight };
    };

    function layOut() {
      const width = root.clientWidth;
      const height = root.clientHeight;
      const pixelRatio = Math.min(window.devicePixelRatio || 1, MAX_PIXEL_RATIO);
      renderer.setPixelRatio(pixelRatio);
      renderer.setSize(width, height, false);
      resolution.set(width * pixelRatio, height * pixelRatio);
      outlineMaterial.uniforms.uWidth.value = OUTLINE_PIXELS * pixelRatio;
      camera.aspect = width / height;
      camera.updateProjectionMatrix();

      const tall = camera.aspect < TALL_ASPECT;
      const front = halfFrameAt(0);
      const shortSide = Math.min(front.halfWidth, front.halfHeight) * 2;
      for (const actor of actors) {
        const [x, y] = tall ? actor.role.tall : actor.role.at;
        const frame = halfFrameAt(actor.role.depth);
        actor.home.set(x * frame.halfWidth, y * frame.halfHeight, actor.role.depth);
        actor.scale = (((tall && actor.role.tallSize) || actor.role.size) * shortSide) / 2;
      }
      const [horizonX, horizonY] = tall ? HORIZON.tall : HORIZON.at;
      const horizonFrame = halfFrameAt(HORIZON.depth);
      const radius = (tall ? HORIZON.tallRadius : HORIZON.radius) * Math.max(horizonFrame.halfWidth, horizonFrame.halfHeight);
      const rise = (tall ? HORIZON.tallRise : HORIZON.rise) * horizonFrame.halfHeight * 2;
      horizon.scale.setScalar(radius);
      horizon.position.set(horizonX * horizonFrame.halfWidth, horizonY * horizonFrame.halfHeight - radius + rise, HORIZON.depth);
      horizon.rotation.set(0.5, 0, 0.35);
    }

    const pointer = { x: 0, y: 0, easedX: 0, easedY: 0 };

    function pose(seconds, still) {
      pointer.easedX += (pointer.x - pointer.easedX) * (still ? 1 : POINTER_EASE);
      pointer.easedY += (pointer.y - pointer.easedY) * (still ? 1 : POINTER_EASE);
      const scrolled = clamp01(-root.getBoundingClientRect().top / Math.max(1, root.clientHeight));
      camera.position.set(pointer.easedX * POINTER_REACH.x, pointer.easedY * POINTER_REACH.y - scrolled * SCROLL_LIFT, CAMERA_DISTANCE);
      camera.lookAt(0, -scrolled * SCROLL_LIFT, 0);

      for (const actor of actors) {
        const arrived = still ? 1 : easeOutExpo(clamp01((seconds - actor.arriveAt) / ARRIVE_SECONDS));
        const bob = still ? 0 : Math.sin(seconds * actor.bobSpeed + actor.bobPhase) * actor.scale * 0.09;
        actor.object.position.copy(actor.home).multiplyScalar(1.35 - 0.35 * arrived);
        actor.object.position.y += bob;
        actor.object.position.z = actor.home.z;
        actor.object.scale.setScalar(Math.max(0.0001, actor.scale * arrived));
        if (!still) actor.object.rotateOnAxis(actor.axis, actor.role.spin * 0.016);
      }
      if (!still) horizon.rotation.y = seconds * 0.01;
    }

    return {
      layOut,
      pointTo(x, y) { pointer.x = x; pointer.y = y; },
      draw(seconds, still) { pose(seconds, still); renderer.render(scene, camera); },
    };
  }

  async function bringSceneToLife(root) {
    let stage;
    try {
      stage = buildStage(await loadThree(), root, root.querySelector('.hero__canvas'));
    } catch {
      root.classList.remove('hero--loading'); // the drawn still comes back and stays
      return;
    }

    const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
    let onScreen = true;
    let frame = 0;
    let startedAt = 0;

    const tick = (now) => {
      frame = 0;
      if (!startedAt) startedAt = now;
      stage.draw((now - startedAt) / 1000, still);
      root.classList.replace('hero--loading', 'hero--live');
      if (!still && onScreen && !document.hidden) frame = requestAnimationFrame(tick);
    };
    const wake = () => { if (!frame) frame = requestAnimationFrame(tick); };

    new ResizeObserver(() => { stage.layOut(); wake(); }).observe(root);
    new IntersectionObserver(([entry]) => { onScreen = entry.isIntersecting; if (onScreen) wake(); }).observe(root);
    document.addEventListener('visibilitychange', wake);
    root.addEventListener('pointermove', (event) => {
      if (event.pointerType !== 'mouse') return;
      const box = root.getBoundingClientRect();
      stage.pointTo(((event.clientX - box.left) / box.width) * 2 - 1, -(((event.clientY - box.top) / box.height) * 2 - 1));
    });
    root.addEventListener('pointerleave', () => stage.pointTo(0, 0));
    stage.layOut();
    wake();
  }

  function splitTitleIntoWords(root) {
    const title = root.querySelector('.hero__title');
    const words = title.textContent.trim().split(/\s+/);
    title.setAttribute('aria-label', words.join(' '));
    title.replaceChildren(...words.flatMap((word, order) => {
      const span = document.createElement('span');
      span.className = 'hero__word';
      span.style.setProperty('--hero-order', order);
      span.setAttribute('aria-hidden', 'true');
      span.textContent = word;
      return [span, ' '];
    }));
  }

  function revealCopy(root) {
    splitTitleIntoWords(root);
    root.classList.add('hero--armed');
    requestAnimationFrame(() => requestAnimationFrame(() => root.classList.remove('hero--armed')));
  }

  function whenNearScreen(root, action) {
    const watcher = new IntersectionObserver((entries) => {
      if (!entries.some((entry) => entry.isIntersecting)) return;
      watcher.disconnect();
      action(root);
    }, { rootMargin: '300px' });
    watcher.observe(root);
  }

  const canDrawLive = browserDrawsWebGL();

  document.querySelectorAll('.hero').forEach((root) => {
    revealCopy(root);
    if (!canDrawLive) return;
    root.classList.add('hero--loading');
    whenNearScreen(root, bringSceneToLife);
  });
})();
</script>

Orbit rings

A drawn specimen floating inside three rings (a hairline, a slowly turning dotted ring with two small crystals, a thick green ring that draws itself) with one caption on each side. Rings, object and captions arrive in sequence when the section scrolls into view.

Code React For Figma
<section class="orbit">
  <p class="orbit__caption orbit__caption--before">Every stone starts in a quarry.</p>

  <svg class="orbit__rings" viewBox="0 0 800 800" aria-hidden="true">
    <defs>
      <symbol id="orbit-rock" viewBox="0 0 160 150">
        <polygon class="orbit__face-a" points="30,26 70,8 118,14 104,52 52,60"/>
        <polygon class="orbit__face-b" points="8,70 30,26 52,60 44,104 14,108"/>
        <polygon class="orbit__face-b" points="52,60 104,52 112,104 44,104"/>
        <polygon class="orbit__face-c" points="118,14 150,44 154,92 112,104 104,52"/>
        <polygon class="orbit__face-c" points="14,108 44,104 40,138"/>
        <polygon class="orbit__face-c" points="44,104 112,104 130,126 92,144 40,138"/>
        <polygon class="orbit__face-c" points="112,104 154,92 130,126"/>
        <polygon class="orbit__rim" points="8,70 30,26 70,8 118,14 150,44 154,92 130,126 92,144 40,138 14,108"/>
      </symbol>
      <symbol id="orbit-crystal" viewBox="0 0 100 200">
        <polygon class="orbit__face-a" points="50,2 15,45 45,55"/>
        <polygon class="orbit__face-b" points="50,2 45,55 85,40"/>
        <polygon class="orbit__face-a" points="15,45 45,55 45,160 15,150"/>
        <polygon class="orbit__face-b" points="45,55 85,40 85,145 45,160"/>
        <polygon class="orbit__face-b" points="15,150 45,160 50,198"/>
        <polygon class="orbit__face-c" points="45,160 85,145 50,198"/>
        <polygon class="orbit__rim" points="50,2 85,40 85,145 50,198 15,150 15,45"/>
      </symbol>
    </defs>

    <circle class="orbit__ring orbit__ring--far" cx="400" cy="400" r="384"/>
    <g class="orbit__carousel">
      <circle class="orbit__ring orbit__ring--dotted" cx="400" cy="400" r="292"/>
      <use href="#orbit-crystal" class="orbit__paint-pink" x="92" y="360" width="34" height="68"/>
      <use href="#orbit-crystal" class="orbit__paint-lime" x="596" y="150" width="30" height="56" transform="rotate(50 611 178)"/>
    </g>
    <circle class="orbit__ring orbit__ring--signal" cx="400" cy="400" r="222" pathLength="100"/>
    <g class="orbit__specimen">
      <use href="#orbit-rock" class="orbit__paint-orchid" x="240" y="250" width="320" height="300"/>
    </g>
  </svg>

  <p class="orbit__caption orbit__caption--after">Three weeks later it lands on your desk.</p>
</section>

<style>
  .orbit {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(0, 46vw) 1fr;
    align-items: center;
    gap: var(--space-4);
    min-height: min(100svh, 900px);
    padding: var(--space-7) var(--space-4);
    overflow: hidden;
    background:
      radial-gradient(ellipse 40% 50% at 50% 50%, var(--field-glow), transparent 75%),
      var(--field);
  }

  .orbit__caption {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: var(--tracking-display);
    text-wrap: balance;
    text-shadow: 0 0 0.6em var(--glow);
  }

  .orbit__caption--before { text-align: right; }
  .orbit__caption--after { --orbit-wait: var(--time-reveal); }

  .orbit__word {
    display: inline-block;
    transition:
      opacity var(--time-settle) var(--ease-cubic),
      filter var(--time-settle) var(--ease-cubic);
    transition-delay: calc(var(--orbit-order) * var(--stagger-word) + var(--orbit-wait, 0s) + var(--time-reveal));
  }

  .orbit--waiting .orbit__word { opacity: 0; filter: blur(12px); }

  .orbit__rings {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    overflow: visible;
  }

  .orbit__ring {
    fill: none;
    transform-box: fill-box;
    transform-origin: center;
    transition:
      opacity var(--time-settle) var(--ease-cubic),
      scale var(--time-settle) var(--ease-expo),
      stroke-dashoffset var(--time-draw) var(--ease-expo) var(--time-quick);
  }

  .orbit__ring--far { stroke: var(--signal); stroke-width: 1; opacity: 0.45; }
  .orbit__ring--dotted { stroke: var(--signal); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 11; opacity: 0.8; }
  .orbit__ring--signal { stroke: var(--signal); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 96 100; stroke-dashoffset: 0; rotate: -96deg; }

  .orbit--waiting .orbit__ring { opacity: 0; scale: 0.82; }
  .orbit--waiting .orbit__ring--far { scale: 0.7; }
  .orbit--waiting .orbit__ring--signal { stroke-dashoffset: 96; opacity: 1; scale: 1; }

  .orbit__carousel {
    transform-origin: 400px 400px;
    animation: orbit-turn var(--time-turn) linear infinite;
  }

  .orbit__specimen {
    transform-origin: 400px 400px;
    animation: orbit-float var(--time-drift) ease-in-out infinite alternate;
    transition: scale var(--time-settle) var(--ease-expo), opacity var(--time-reveal) var(--ease-cubic);
  }

  .orbit--waiting .orbit__specimen { scale: 0.6; opacity: 0; }

  .orbit__paint-orchid { --orbit-a: var(--orchid); --orbit-b: var(--orchid-shade); --orbit-c: var(--orchid-deep); }
  .orbit__paint-pink { --orbit-a: var(--pink); --orbit-b: var(--pink-shade); --orbit-c: var(--pink-deep); }
  .orbit__paint-lime { --orbit-a: var(--lime); --orbit-b: var(--lime-shade); --orbit-c: var(--lime-deep); }
  .orbit__face-a { fill: var(--orbit-a); }
  .orbit__face-b { fill: var(--orbit-b); }
  .orbit__face-c { fill: var(--orbit-c); }
  .orbit__face-a, .orbit__face-b, .orbit__face-c { stroke: var(--orbit-c); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .orbit__rim { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

  @keyframes orbit-turn { to { rotate: 360deg; } }
  @keyframes orbit-float {
    from { translate: 0 -10px; rotate: -3deg; }
    to { translate: 0 12px; rotate: 4deg; }
  }

  @media (max-width: 860px) {
    .orbit {
      grid-template-columns: minmax(0, 1fr);
      justify-items: center;
      gap: var(--space-5);
      padding: var(--space-6) var(--space-4);
    }
    .orbit__caption--before, .orbit__caption--after { text-align: center; max-width: 12em; }
    .orbit__rings { max-width: 460px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .orbit__word, .orbit__ring, .orbit__specimen { transition: none; }
    .orbit__carousel, .orbit__specimen { animation: none; }
  }
</style>

<script>
(() => {
  const VISIBLE_SHARE = 0.35;

  function wrapWords(caption) {
    const words = caption.textContent.trim().split(/\s+/);
    caption.setAttribute('aria-label', words.join(' '));
    caption.replaceChildren(...words.flatMap((word, order) => {
      const span = document.createElement('span');
      span.className = 'orbit__word';
      span.style.setProperty('--orbit-order', order);
      span.setAttribute('aria-hidden', 'true');
      span.textContent = word;
      return [span, ' '];
    }));
  }

  function setUpOrbit(root) {
    root.querySelectorAll('.orbit__caption').forEach(wrapWords);
    root.classList.add('orbit--waiting');
    const watcher = new IntersectionObserver(([entry]) => {
      if (!entry.isIntersecting) return;
      watcher.disconnect();
      root.classList.remove('orbit--waiting');
    }, { threshold: VISIBLE_SHARE });
    watcher.observe(root);
  }

  document.querySelectorAll('.orbit').forEach(setUpOrbit);
})();
</script>

Chapter stepper

A story in three steps that plays by itself: title and paragraph appear word by word on the left, a drawn illustration assembles on the right, and a segmented progress bar at the bottom fills per chapter. Clicking a segment or Skip takes over and stops the autoplay. Without the script the chapters are simply stacked.

Code React For Figma
<section class="chapters" aria-label="How a box is made">
  <svg class="chapters__symbols" width="0" height="0" aria-hidden="true">
    <defs>
      <symbol id="chapters-rock" viewBox="0 0 160 150">
        <polygon class="chapters__face-a" points="30,26 70,8 118,14 104,52 52,60"/>
        <polygon class="chapters__face-b" points="8,70 30,26 52,60 44,104 14,108"/>
        <polygon class="chapters__face-b" points="52,60 104,52 112,104 44,104"/>
        <polygon class="chapters__face-c" points="118,14 150,44 154,92 112,104 104,52"/>
        <polygon class="chapters__face-c" points="14,108 44,104 40,138"/>
        <polygon class="chapters__face-c" points="44,104 112,104 130,126 92,144 40,138"/>
        <polygon class="chapters__face-c" points="112,104 154,92 130,126"/>
        <polygon class="chapters__rim" points="8,70 30,26 70,8 118,14 150,44 154,92 130,126 92,144 40,138 14,108"/>
      </symbol>
      <symbol id="chapters-crystal" viewBox="0 0 100 200">
        <polygon class="chapters__face-a" points="50,2 15,45 45,55"/>
        <polygon class="chapters__face-b" points="50,2 45,55 85,40"/>
        <polygon class="chapters__face-a" points="15,45 45,55 45,160 15,150"/>
        <polygon class="chapters__face-b" points="45,55 85,40 85,145 45,160"/>
        <polygon class="chapters__face-b" points="15,150 45,160 50,198"/>
        <polygon class="chapters__face-c" points="45,160 85,145 50,198"/>
        <polygon class="chapters__rim" points="50,2 85,40 85,145 50,198 15,150 15,45"/>
      </symbol>
      <symbol id="chapters-gem" viewBox="0 0 120 120">
        <polygon class="chapters__face-a" points="60,30 88.5,50.7 77.6,84.3 42.4,84.3 31.5,50.7"/>
        <polygon class="chapters__face-a" points="31.5,50.7 6.7,42.7 27.1,14.7 60,4 60,30"/>
        <polygon class="chapters__face-b" points="60,30 60,4 92.9,14.7 113.3,42.7 88.5,50.7"/>
        <polygon class="chapters__face-b" points="42.4,84.3 27.1,105.3 6.7,77.3 6.7,42.7 31.5,50.7"/>
        <polygon class="chapters__face-c" points="88.5,50.7 113.3,42.7 113.3,77.3 92.9,105.3 77.6,84.3"/>
        <polygon class="chapters__face-c" points="77.6,84.3 92.9,105.3 60,116 27.1,105.3 42.4,84.3"/>
        <polygon class="chapters__rim" points="60,4 92.9,14.7 113.3,42.7 113.3,77.3 92.9,105.3 60,116 27.1,105.3 6.7,77.3 6.7,42.7 27.1,14.7"/>
      </symbol>
    </defs>
  </svg>

  <div class="chapters__stage">
    <article class="chapters__chapter">
      <div class="chapters__text">
        <h2 class="chapters__title">Quarried by hand.</h2>
        <p class="chapters__lead">Our pickers work small family quarries in four countries. Nothing is blasted, dyed or glued. What the hill gives up is what you get.</p>
      </div>
      <svg class="chapters__art" viewBox="0 0 400 400" aria-hidden="true">
        <use class="chapters__piece chapters__paint-rock" href="#chapters-rock" x="60" y="90" width="290" height="272" style="rotate: -8deg"/>
        <use class="chapters__piece chapters__paint-stone" href="#chapters-rock" x="20" y="250" width="130" height="122" style="rotate: 28deg"/>
        <use class="chapters__piece chapters__paint-stone" href="#chapters-rock" x="290" y="40" width="80" height="75" style="rotate: -30deg"/>
        <use class="chapters__piece chapters__paint-pink" href="#chapters-crystal" x="40" y="60" width="40" height="80" style="rotate: -24deg"/>
      </svg>
    </article>

    <article class="chapters__chapter">
      <div class="chapters__text">
        <h2 class="chapters__title">Sorted by eye.</h2>
        <p class="chapters__lead">Each month has one theme: a colour, a habit, a place. Three specimens are picked to tell it, and no two boxes are quite the same.</p>
      </div>
      <svg class="chapters__art" viewBox="0 0 400 400" aria-hidden="true">
        <use class="chapters__piece chapters__paint-orchid" href="#chapters-crystal" x="150" y="40" width="130" height="260" style="rotate: 6deg"/>
        <use class="chapters__piece chapters__paint-pink" href="#chapters-crystal" x="60" y="130" width="100" height="200" style="rotate: -18deg"/>
        <use class="chapters__piece chapters__paint-orchid" href="#chapters-crystal" x="260" y="150" width="84" height="168" style="rotate: 24deg"/>
        <use class="chapters__piece chapters__paint-rock" href="#chapters-rock" x="70" y="270" width="270" height="110"/>
        <use class="chapters__piece chapters__paint-lime" href="#chapters-crystal" x="330" y="50" width="30" height="60" style="rotate: 40deg"/>
      </svg>
    </article>

    <article class="chapters__chapter">
      <div class="chapters__text">
        <h2 class="chapters__title">Yours to keep.</h2>
        <p class="chapters__lead">The box lands with a field card for every stone: where it formed, how old it is and why it looks the way it does.</p>
      </div>
      <svg class="chapters__art" viewBox="0 0 400 400" aria-hidden="true">
        <use class="chapters__piece chapters__paint-lime" href="#chapters-gem" x="80" y="80" width="240" height="240"/>
        <use class="chapters__piece chapters__paint-pink" href="#chapters-crystal" x="320" y="230" width="44" height="88" style="rotate: 30deg"/>
        <use class="chapters__piece chapters__paint-stone" href="#chapters-rock" x="30" y="50" width="76" height="71"/>
        <use class="chapters__piece chapters__paint-rock" href="#chapters-rock" x="270" y="20" width="90" height="84" style="rotate: 50deg"/>
      </svg>
    </article>
  </div>

  <div class="chapters__controls">
    <button class="chapters__skip" type="button">Skip</button>
    <div class="chapters__bar"></div>
  </div>
</section>

<style>
  .chapters {
    position: relative;
    display: grid;
    gap: var(--space-5);
    padding: var(--space-7) var(--space-4) var(--space-4);
    overflow: hidden;
    background:
      radial-gradient(ellipse 50% 60% at 78% 45%, var(--field-glow), transparent 72%),
      var(--field);
  }

  .chapters__symbols { position: absolute; }

  .chapters__stage {
    display: grid;
    gap: var(--space-6);
    width: 100%;
    max-width: var(--page);
    margin: 0 auto;
  }

  .chapters__chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    align-items: center;
    gap: var(--space-5);
  }

  /* With the script running, chapters share one cell and take turns. */
  .chapters--live .chapters__chapter {
    grid-area: 1 / 1;
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--time-reveal) var(--ease-cubic), visibility 0s var(--time-reveal);
  }

  .chapters--live .chapters__chapter--current {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }

  .chapters__text { max-width: 34rem; justify-self: center; }

  .chapters__title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-title);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: var(--tracking-display);
    text-shadow: 0 0 0.6em var(--glow);
  }

  .chapters__lead {
    margin: 0;
    color: var(--lilac-dim);
    font-size: var(--text-lead);
    line-height: 1.35;
    text-wrap: pretty;
  }

  .chapters__word {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
  }

  .chapters__chapter--current .chapters__word {
    opacity: 1;
    filter: none;
    transition:
      opacity var(--time-settle) var(--ease-cubic) calc(var(--chapters-order) * var(--stagger-word) + var(--time-quick)),
      filter var(--time-settle) var(--ease-cubic) calc(var(--chapters-order) * var(--stagger-word) + var(--time-quick));
  }

  .chapters__art {
    display: block;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    overflow: visible;
    animation: chapters-float var(--time-drift) ease-in-out infinite alternate;
  }

  .chapters__piece {
    transform-box: fill-box;
    transform-origin: center;
  }

  .chapters--live .chapters__piece { scale: 0; }

  .chapters--live .chapters__chapter--current .chapters__piece {
    scale: 1;
    transition: scale var(--time-settle) var(--ease-expo);
  }

  .chapters__chapter--current .chapters__piece:nth-child(2) { transition-delay: var(--stagger-item); }
  .chapters__chapter--current .chapters__piece:nth-child(3) { transition-delay: calc(var(--stagger-item) * 2); }
  .chapters__chapter--current .chapters__piece:nth-child(4) { transition-delay: calc(var(--stagger-item) * 3); }
  .chapters__chapter--current .chapters__piece:nth-child(5) { transition-delay: calc(var(--stagger-item) * 4); }

  .chapters__paint-rock { --chapters-a: var(--rock); --chapters-b: var(--rock-shade); --chapters-c: var(--rock-deep); }
  .chapters__paint-stone { --chapters-a: var(--stone); --chapters-b: var(--stone-shade); --chapters-c: var(--stone-deep); }
  .chapters__paint-orchid { --chapters-a: var(--orchid); --chapters-b: var(--orchid-shade); --chapters-c: var(--orchid-deep); }
  .chapters__paint-pink { --chapters-a: var(--pink); --chapters-b: var(--pink-shade); --chapters-c: var(--pink-deep); }
  .chapters__paint-lime { --chapters-a: var(--lime); --chapters-b: var(--lime-shade); --chapters-c: var(--lime-deep); }
  .chapters__face-a { fill: var(--chapters-a); }
  .chapters__face-b { fill: var(--chapters-b); }
  .chapters__face-c { fill: var(--chapters-c); }
  .chapters__face-a, .chapters__face-b, .chapters__face-c { stroke: var(--chapters-c); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .chapters__rim { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

  .chapters__controls {
    display: none;
    justify-items: center;
    gap: var(--space-2);
    width: 100%;
    max-width: var(--page);
    margin: 0 auto;
  }

  .chapters--live .chapters__controls { display: grid; }

  .chapters__skip {
    min-width: var(--tap);
    min-height: var(--tap);
    padding: 0 var(--space-3);
    border: 0;
    background: none;
    color: var(--lilac-dim);
    font: inherit;
    font-size: var(--text-small);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--time-quick) var(--ease-cubic);
  }

  .chapters__skip:hover,
  .chapters__skip:focus-visible { color: var(--lilac); }

  .chapters__bar {
    display: flex;
    gap: var(--space-2);
    width: 100%;
  }

  /* The button is tall enough to tap, the line inside it is thin. */
  .chapters__segment {
    flex: 1;
    display: grid;
    align-items: center;
    height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .chapters__track {
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: var(--radius-bar);
    background: var(--hairline);
    transition: height var(--time-quick) var(--ease-cubic);
  }

  .chapters__segment:hover .chapters__track { height: 5px; }

  .chapters__fill {
    display: block;
    height: 100%;
    background: var(--lilac);
    transform: scaleX(0);
    transform-origin: left;
  }

  .chapters__segment--done .chapters__fill { transform: none; }
  .chapters__segment--current .chapters__fill { animation: chapters-fill var(--time-chapter) linear forwards; }
  .chapters--resting .chapters__segment--current .chapters__fill { animation-play-state: paused; }
  .chapters--manual .chapters__segment--current .chapters__fill { animation: none; transform: none; }

  @keyframes chapters-fill { to { transform: none; } }
  @keyframes chapters-float {
    from { translate: 0 -8px; rotate: -1.5deg; }
    to { translate: 0 10px; rotate: 2deg; }
  }

  @media (max-width: 760px) {
    .chapters { padding-top: var(--space-6); }
    .chapters__chapter { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .chapters__art { grid-row: 1; max-width: 250px; }
    .chapters--live .chapters__stage { min-height: 31rem; align-items: start; }
  }

  @media (prefers-reduced-motion: reduce) {
    .chapters__art { animation: none; }
    .chapters--live .chapters__chapter, .chapters__chapter--current .chapters__word, .chapters--live .chapters__chapter--current .chapters__piece, .chapters__track { transition: none; }
  }
</style>

<script>
(() => {
  function wrapWords(element, firstOrder) {
    const words = element.textContent.trim().split(/\s+/);
    element.setAttribute('aria-label', words.join(' '));
    element.replaceChildren(...words.flatMap((word, index) => {
      const span = document.createElement('span');
      span.className = 'chapters__word';
      span.style.setProperty('--chapters-order', firstOrder + index);
      span.setAttribute('aria-hidden', 'true');
      span.textContent = word;
      return [span, ' '];
    }));
    return firstOrder + words.length;
  }

  function buildSegment(number) {
    const segment = document.createElement('button');
    segment.type = 'button';
    segment.className = 'chapters__segment';
    segment.setAttribute('aria-label', `Chapter ${number}`);
    segment.innerHTML = '<span class="chapters__track"><span class="chapters__fill"></span></span>';
    return segment;
  }

  function setUpChapters(root) {
    const chapters = [...root.querySelectorAll('.chapters__chapter')];
    const segments = chapters.map((_, index) => buildSegment(index + 1));
    root.querySelector('.chapters__bar').replaceChildren(...segments);

    for (const chapter of chapters) {
      const wordsInTitle = wrapWords(chapter.querySelector('.chapters__title'), 0);
      wrapWords(chapter.querySelector('.chapters__lead'), wordsInTitle + 3);
    }

    const show = (current) => {
      chapters.forEach((chapter, index) => chapter.classList.toggle('chapters__chapter--current', index === current));
      segments.forEach((segment, index) => {
        segment.classList.toggle('chapters__segment--done', index < current);
        segment.classList.toggle('chapters__segment--current', index === current);
        segment.setAttribute('aria-current', String(index === current));
      });
    };
    const stopTurning = () => root.classList.add('chapters--manual');

    segments.forEach((segment, index) => {
      segment.addEventListener('click', () => { stopTurning(); show(index); });
      segment.addEventListener('animationend', () => show((index + 1) % chapters.length));
    });
    root.querySelector('.chapters__skip').addEventListener('click', () => { stopTurning(); show(chapters.length - 1); });

    if (matchMedia('(prefers-reduced-motion: reduce)').matches) stopTurning();
    new IntersectionObserver(([entry]) => root.classList.toggle('chapters--resting', !entry.isIntersecting), { threshold: 0.3 }).observe(root);

    root.classList.add('chapters--live', 'chapters--resting');
    show(0);
  }

  document.querySelectorAll('.chapters').forEach(setUpChapters);
})();
</script>

Specimen cards

Three dark glass cards, each with a floating drawn object on a lit plate, a name, a line of text and a small fact sheet. Cards rise in one after another; on hover the object grows and tilts.

Code React For Figma
<section class="specimens">
  <svg class="specimens__symbols" width="0" height="0" aria-hidden="true">
    <defs>
      <symbol id="specimens-rock" viewBox="0 0 160 150">
        <polygon class="specimens__face-a" points="30,26 70,8 118,14 104,52 52,60"/>
        <polygon class="specimens__face-b" points="8,70 30,26 52,60 44,104 14,108"/>
        <polygon class="specimens__face-b" points="52,60 104,52 112,104 44,104"/>
        <polygon class="specimens__face-c" points="118,14 150,44 154,92 112,104 104,52"/>
        <polygon class="specimens__face-c" points="14,108 44,104 40,138"/>
        <polygon class="specimens__face-c" points="44,104 112,104 130,126 92,144 40,138"/>
        <polygon class="specimens__face-c" points="112,104 154,92 130,126"/>
        <polygon class="specimens__rim" points="8,70 30,26 70,8 118,14 150,44 154,92 130,126 92,144 40,138 14,108"/>
      </symbol>
      <symbol id="specimens-crystal" viewBox="0 0 100 200">
        <polygon class="specimens__face-a" points="50,2 15,45 45,55"/>
        <polygon class="specimens__face-b" points="50,2 45,55 85,40"/>
        <polygon class="specimens__face-a" points="15,45 45,55 45,160 15,150"/>
        <polygon class="specimens__face-b" points="45,55 85,40 85,145 45,160"/>
        <polygon class="specimens__face-b" points="15,150 45,160 50,198"/>
        <polygon class="specimens__face-c" points="45,160 85,145 50,198"/>
        <polygon class="specimens__rim" points="50,2 85,40 85,145 50,198 15,150 15,45"/>
      </symbol>
      <symbol id="specimens-gem" viewBox="0 0 120 120">
        <polygon class="specimens__face-a" points="60,30 88.5,50.7 77.6,84.3 42.4,84.3 31.5,50.7"/>
        <polygon class="specimens__face-a" points="31.5,50.7 6.7,42.7 27.1,14.7 60,4 60,30"/>
        <polygon class="specimens__face-b" points="60,30 60,4 92.9,14.7 113.3,42.7 88.5,50.7"/>
        <polygon class="specimens__face-b" points="42.4,84.3 27.1,105.3 6.7,77.3 6.7,42.7 31.5,50.7"/>
        <polygon class="specimens__face-c" points="88.5,50.7 113.3,42.7 113.3,77.3 92.9,105.3 77.6,84.3"/>
        <polygon class="specimens__face-c" points="77.6,84.3 92.9,105.3 60,116 27.1,105.3 42.4,84.3"/>
        <polygon class="specimens__rim" points="60,4 92.9,14.7 113.3,42.7 113.3,77.3 92.9,105.3 60,116 27.1,105.3 6.7,77.3 6.7,42.7 27.1,14.7"/>
      </symbol>
    </defs>
  </svg>

  <header class="specimens__head">
    <p class="specimens__eyebrow">The November box</p>
    <h2 class="specimens__title">Three stones. One theme: fire.</h2>
  </header>

  <ul class="specimens__grid">
    <li class="specimens__card">
      <div class="specimens__plate">
        <span class="specimens__number">01</span>
        <svg class="specimens__art" viewBox="0 0 200 200" aria-hidden="true">
          <use class="specimens__paint-pink" href="#specimens-crystal" x="62" y="14" width="86" height="172"/>
        </svg>
      </div>
      <h3 class="specimens__name">Amethyst point</h3>
      <p class="specimens__note">Grown in a gas bubble inside cooling lava, one slow layer at a time.</p>
      <dl class="specimens__facts">
        <div class="specimens__fact"><dt>Origin</dt><dd>Artigas, Uruguay</dd></div>
        <div class="specimens__fact"><dt>Age</dt><dd>130 million years</dd></div>
        <div class="specimens__fact"><dt>Hardness</dt><dd>7</dd></div>
      </dl>
    </li>

    <li class="specimens__card">
      <div class="specimens__plate">
        <span class="specimens__number">02</span>
        <svg class="specimens__art" viewBox="0 0 200 200" aria-hidden="true">
          <use class="specimens__paint-lime" href="#specimens-gem" x="30" y="30" width="140" height="140"/>
        </svg>
      </div>
      <h3 class="specimens__name">Peridot nodule</h3>
      <p class="specimens__note">A piece of the mantle, carried up whole by an eruption and dropped on a beach.</p>
      <dl class="specimens__facts">
        <div class="specimens__fact"><dt>Origin</dt><dd>Lanzarote, Spain</dd></div>
        <div class="specimens__fact"><dt>Age</dt><dd>290 years</dd></div>
        <div class="specimens__fact"><dt>Hardness</dt><dd>6.5</dd></div>
      </dl>
    </li>

    <li class="specimens__card">
      <div class="specimens__plate">
        <span class="specimens__number">03</span>
        <svg class="specimens__art" viewBox="0 0 200 200" aria-hidden="true">
          <use class="specimens__paint-rock" href="#specimens-rock" x="22" y="32" width="156" height="146"/>
        </svg>
      </div>
      <h3 class="specimens__name">Basalt bomb</h3>
      <p class="specimens__note">Thrown out molten, it cooled in the air and landed already shaped.</p>
      <dl class="specimens__facts">
        <div class="specimens__fact"><dt>Origin</dt><dd>Reykjanes, Iceland</dd></div>
        <div class="specimens__fact"><dt>Age</dt><dd>800 years</dd></div>
        <div class="specimens__fact"><dt>Hardness</dt><dd>6</dd></div>
      </dl>
    </li>
  </ul>
</section>

<style>
  .specimens {
    padding: var(--space-7) var(--space-4);
    background: linear-gradient(var(--field), var(--field-deep));
  }

  .specimens__symbols { position: absolute; }

  .specimens__head {
    max-width: var(--page);
    margin: 0 auto var(--space-6);
    text-align: center;
  }

  .specimens__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
    color: var(--lime);
    font-size: var(--text-small);
    font-weight: 500;
  }

  .specimens__eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--radius-bar);
    background: currentColor;
    rotate: 45deg;
  }

  .specimens__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: var(--tracking-display);
    text-wrap: balance;
    text-shadow: 0 0 0.6em var(--glow);
  }

  .specimens__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-3);
    max-width: var(--page);
    margin: 0 auto;
    padding: 0;
    list-style: none;
  }

  .specimens__card {
    padding: var(--space-2) var(--space-2) var(--space-4);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-l);
    background: var(--glass);
    transition:
      opacity var(--time-settle) var(--ease-cubic),
      translate var(--time-settle) var(--ease-expo),
      border-color var(--time-quick) var(--ease-cubic);
    transition-delay: calc(var(--specimens-order, 0) * var(--stagger-item)), calc(var(--specimens-order, 0) * var(--stagger-item)), 0s;
  }

  .specimens--waiting .specimens__card { opacity: 0; translate: 0 var(--space-5); }
  .specimens__card:hover { border-color: var(--lilac-dim); }

  .specimens__plate {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-m);
    background:
      radial-gradient(ellipse 55% 60% at 50% 46%, var(--field-glow), transparent 72%),
      var(--field);
  }

  .specimens__number {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    color: var(--lilac-dim);
    font-size: var(--text-small);
    font-weight: 500;
  }

  .specimens__art {
    width: 62%;
    max-height: 86%;
    overflow: visible;
    animation: specimens-float var(--time-drift) ease-in-out infinite alternate;
    transition: scale var(--time-settle) var(--ease-expo), rotate var(--time-settle) var(--ease-expo);
  }

  .specimens__card:nth-child(2) .specimens__art { animation-delay: -3s; }
  .specimens__card:nth-child(3) .specimens__art { animation-delay: -6s; }
  .specimens__card:hover .specimens__art { scale: 1.12; rotate: 14deg; }

  .specimens__name {
    margin: var(--space-4) var(--space-3) var(--space-2);
    font-size: var(--text-lead);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: var(--tracking-display);
  }

  .specimens__note {
    margin: 0 var(--space-3) var(--space-4);
    color: var(--lilac-dim);
  }

  .specimens__facts { margin: 0 var(--space-3); }

  .specimens__fact {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-top: 1px solid var(--hairline);
    font-size: var(--text-small);
  }

  .specimens__fact dt { color: var(--lilac-dim); }
  .specimens__fact dd { margin: 0; font-weight: 500; text-align: right; }

  .specimens__paint-rock { --specimens-a: var(--rock); --specimens-b: var(--rock-shade); --specimens-c: var(--rock-deep); }
  .specimens__paint-pink { --specimens-a: var(--pink); --specimens-b: var(--pink-shade); --specimens-c: var(--pink-deep); }
  .specimens__paint-lime { --specimens-a: var(--lime); --specimens-b: var(--lime-shade); --specimens-c: var(--lime-deep); }
  .specimens__face-a { fill: var(--specimens-a); }
  .specimens__face-b { fill: var(--specimens-b); }
  .specimens__face-c { fill: var(--specimens-c); }
  .specimens__face-a, .specimens__face-b, .specimens__face-c { stroke: var(--specimens-c); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .specimens__rim { fill: none; stroke: var(--line); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

  @keyframes specimens-float {
    from { translate: 0 -6px; }
    to { translate: 0 8px; }
  }

  @media (max-width: 720px) {
    .specimens { padding: var(--space-6) var(--space-3); }
    .specimens__head { margin-bottom: var(--space-5); }
  }

  @media (prefers-reduced-motion: reduce) {
    .specimens__card, .specimens__art { transition: none; }
    .specimens__art { animation: none; }
  }
</style>

<script>
(() => {
  function setUpSpecimens(root) {
    root.querySelectorAll('.specimens__card').forEach((card, order) => card.style.setProperty('--specimens-order', order));
    root.classList.add('specimens--waiting');
    const watcher = new IntersectionObserver(([entry]) => {
      if (!entry.isIntersecting) return;
      watcher.disconnect();
      root.classList.remove('specimens--waiting');
    }, { threshold: 0.15 });
    watcher.observe(root);
  }

  document.querySelectorAll('.specimens').forEach(setUpSpecimens);
})();
</script>

Loading screen

Full-screen wait state: a column of light with crystals hanging in it, the wordmark, a status word with passing tint and a three-segment bar that fills in a loop. CSS only.

Code React For Figma
<div class="loader" role="status" aria-label="Loading">
  <svg class="loader__symbols" width="0" height="0" aria-hidden="true">
    <defs>
      <symbol id="loader-crystal" viewBox="0 0 100 200">
        <polygon class="loader__face-a" points="50,2 15,45 45,55"/>
        <polygon class="loader__face-b" points="50,2 45,55 85,40"/>
        <polygon class="loader__face-a" points="15,45 45,55 45,160 15,150"/>
        <polygon class="loader__face-b" points="45,55 85,40 85,145 45,160"/>
        <polygon class="loader__face-b" points="15,150 45,160 50,198"/>
        <polygon class="loader__face-c" points="45,160 85,145 50,198"/>
        <polygon class="loader__rim" points="50,2 85,40 85,145 50,198 15,150 15,45"/>
      </symbol>
      <symbol id="loader-gem" viewBox="0 0 120 120">
        <polygon class="loader__face-a" points="60,30 88.5,50.7 77.6,84.3 42.4,84.3 31.5,50.7"/>
        <polygon class="loader__face-a" points="31.5,50.7 6.7,42.7 27.1,14.7 60,4 60,30"/>
        <polygon class="loader__face-b" points="60,30 60,4 92.9,14.7 113.3,42.7 88.5,50.7"/>
        <polygon class="loader__face-b" points="42.4,84.3 27.1,105.3 6.7,77.3 6.7,42.7 31.5,50.7"/>
        <polygon class="loader__face-c" points="88.5,50.7 113.3,42.7 113.3,77.3 92.9,105.3 77.6,84.3"/>
        <polygon class="loader__face-c" points="77.6,84.3 92.9,105.3 60,116 27.1,105.3 42.4,84.3"/>
        <polygon class="loader__rim" points="60,4 92.9,14.7 113.3,42.7 113.3,77.3 92.9,105.3 60,116 27.1,105.3 6.7,77.3 6.7,42.7 27.1,14.7"/>
      </symbol>
    </defs>
  </svg>

  <div class="loader__beam" aria-hidden="true">
    <svg class="loader__mote loader__mote--one loader__paint-orchid" viewBox="0 0 100 200"><use href="#loader-crystal"/></svg>
    <svg class="loader__mote loader__mote--two loader__paint-pink" viewBox="0 0 100 200"><use href="#loader-crystal"/></svg>
    <svg class="loader__mote loader__mote--three loader__paint-orchid" viewBox="0 0 120 120"><use href="#loader-gem"/></svg>
    <svg class="loader__mote loader__mote--four loader__paint-pink" viewBox="0 0 100 200"><use href="#loader-crystal"/></svg>
    <svg class="loader__mote loader__mote--five loader__paint-lime" viewBox="0 0 120 120"><use href="#loader-gem"/></svg>
  </div>

  <div class="loader__brand" aria-hidden="true">
    <svg class="loader__mark" viewBox="0 0 28 28">
      <path d="M14 2.5 24 8v12l-10 5.5L4 20V8z"/>
      <path d="M4 8l10 5.5L24 8M14 13.5v12"/>
    </svg>
    <span class="loader__name">driftstone</span>
    <span class="loader__edition">Monthly</span>
  </div>
  <p class="loader__status" aria-hidden="true">Unpacking</p>

  <div class="loader__bar" aria-hidden="true">
    <span class="loader__segment"><span class="loader__fill loader__fill--one"></span></span>
    <span class="loader__segment"><span class="loader__fill loader__fill--two"></span></span>
    <span class="loader__segment"><span class="loader__fill loader__fill--three"></span></span>
  </div>
</div>

<style>
  .loader {
    position: relative;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: var(--space-2);
    min-height: max(100svh, 560px);
    padding: var(--space-4);
    overflow: hidden;
    background: var(--field);
  }

  .loader__symbols { position: absolute; }

  /* A column of light from above. The loose crystals hang inside it. */
  .loader__beam {
    position: absolute;
    inset: 0 0 6%;
    left: 50%;
    width: min(260px, 60vw);
    translate: -50% 0;
  }

  .loader__beam::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--hairline) 30%, var(--glow) 50%, var(--hairline) 70%, transparent);
    -webkit-mask-image: linear-gradient(black, transparent);
    mask-image: linear-gradient(black, transparent);
  }

  .loader__mote {
    position: absolute;
    overflow: visible;
    animation: loader-float-a var(--time-drift) ease-in-out infinite alternate;
  }

  .loader__mote--one { top: 30%; left: 4%; width: 22px; rotate: 14deg; }
  .loader__mote--two { top: 27%; left: 62%; width: 20px; rotate: 112deg; animation-name: loader-float-b; animation-delay: -2s; }
  .loader__mote--three { top: 39%; left: 34%; width: 40px; animation-name: loader-float-c; animation-delay: -4s; }
  .loader__mote--four { top: 60%; left: 0%; width: 26px; rotate: -24deg; animation-name: loader-float-b; animation-delay: -5s; }
  .loader__mote--five { top: 68%; left: 54%; width: 44px; animation-name: loader-float-c; animation-delay: -1s; }

  .loader__paint-orchid { --loader-a: var(--orchid); --loader-b: var(--orchid-shade); --loader-c: var(--orchid-deep); }
  .loader__paint-pink { --loader-a: var(--pink); --loader-b: var(--pink-shade); --loader-c: var(--pink-deep); }
  .loader__paint-lime { --loader-a: var(--lime); --loader-b: var(--lime-shade); --loader-c: var(--lime-deep); }
  .loader__face-a { fill: var(--loader-a); }
  .loader__face-b { fill: var(--loader-b); }
  .loader__face-c { fill: var(--loader-c); }
  .loader__face-a, .loader__face-b, .loader__face-c { stroke: var(--loader-c); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .loader__rim { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

  .loader__brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    font-size: var(--text-title);
    line-height: 1;
    letter-spacing: var(--tracking-display);
  }

  .loader__mark {
    width: 0.92em;
    height: 0.92em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linejoin: round;
    animation: loader-turn var(--time-chapter) var(--ease-expo) infinite;
  }

  .loader__name { font-weight: 600; }
  .loader__edition { font-weight: 400; }

  .loader__status {
    position: relative;
    margin: 0;
    font-size: var(--text-lead);
    font-weight: 500;
    background: linear-gradient(100deg, var(--lilac) 0 38%, var(--orchid-shade) 50%, var(--lilac) 62% 100%) 0 0 / 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: loader-shimmer var(--time-shimmer) linear infinite;
  }

  .loader__bar {
    position: absolute;
    bottom: 12%;
    left: 50%;
    display: flex;
    width: min(236px, 60vw);
    translate: -50% 0;
  }

  .loader__segment {
    flex: 1;
    height: 3px;
    background: var(--pink-shade);
  }

  .loader__fill {
    display: block;
    height: 100%;
    background: var(--paper);
    transform-origin: left;
    animation: var(--time-chapter) linear infinite;
  }

  .loader__fill--one { animation-name: loader-fill-one; }
  .loader__fill--two { animation-name: loader-fill-two; }
  .loader__fill--three { animation-name: loader-fill-three; }

  @keyframes loader-fill-one {
    0% { transform: scaleX(0); opacity: 1; }
    30%, 90% { transform: none; opacity: 1; }
    100% { transform: none; opacity: 0; }
  }
  @keyframes loader-fill-two {
    0%, 30% { transform: scaleX(0); opacity: 1; }
    60%, 90% { transform: none; opacity: 1; }
    100% { transform: none; opacity: 0; }
  }
  @keyframes loader-fill-three {
    0%, 60% { transform: scaleX(0); opacity: 1; }
    90% { transform: none; opacity: 1; }
    100% { transform: none; opacity: 0; }
  }
  @keyframes loader-float-a {
    from { translate: 0 -10px; }
    to { translate: 6px 14px; }
  }
  @keyframes loader-float-b {
    from { translate: -4px 12px; }
    to { translate: 8px -12px; }
  }
  @keyframes loader-float-c {
    from { translate: 0 8px; rotate: -8deg; }
    to { translate: -6px -10px; rotate: 10deg; }
  }
  @keyframes loader-turn { to { rotate: 120deg; } }
  @keyframes loader-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -50% 0; }
  }

  @media (prefers-reduced-motion: reduce) {
    .loader__mote, .loader__mark, .loader__status { animation: none; }
    .loader__fill { animation: none; }
    .loader__fill--two, .loader__fill--three { transform: scaleX(0); }
  }
</style>

Style

  • --field #6d2d93
  • --field-glow #8f4fb8
  • --field-deep #2a0d49
  • --void #160923
  • --glass rgba(22, 9, 35, 0.5)
  • --line #2a0f45
  • --hairline rgba(246, 232, 255, 0.16)
  • --glow rgba(246, 232, 255, 0.32)
  • --rock #45275c
  • --rock-shade #2c1740
  • --rock-deep #1f0e2d
  • --stone #a66be0
  • --stone-shade #6a2fa0
  • --stone-deep #4a1c7a
  • --orchid #e6b8ff
  • --orchid-shade #b46fe6
  • --orchid-deep #7a37b8
  • --pink #e88bff
  • --pink-shade #c05ae6
  • --pink-deep #8f35bd
  • --lime #bdfb92
  • --lime-shade #93e070
  • --lime-deep #6cbf5a
  • --signal #6fd08a
  • --lilac #f6e8ff
  • --lilac-dim rgba(246, 232, 255, 0.62)
  • --paper #fbfbfb
  • --plum-ink #6d2d93

Type

  • Figtree for everything: headlines at 500, wordmark at 600, body at 400, stands in for a licensed soft geometric grotesk with round bowls and tight spacing, used as the only family on the site

Motion

  • Objects in the 3D scene never stop: each turns slowly on its own axis and bobs a few pixels, every one at a different speed.
  • Moving the mouse shifts the camera a little with a slow ease, so near objects slide further than far ones.
  • Scrolling lifts the camera, so the scene sinks away at different speeds by depth.
  • On load, objects fly in from outside the frame and grow from nothing, 70 ms apart, 1.6 s each, exponential ease out.
  • Text arrives word by word: each word fades in from a 12 px blur over 1.4 s, 55 to 90 ms after the one before.
  • A band of tint passes through button labels and status text every 5 s, linear, endless.
  • On hover a dark pill button swaps to white in 0.3 s while its arrow leaves to the right and a second arrow enters from the left in 0.8 s.
  • Rings arrive by scaling up from about 80 percent in 1.4 s; the thick ring draws itself around in 2.4 s; the dotted ring turns once in 80 s.
  • Progress is a row of thin segments that fill left to right at constant speed, one segment per chapter.
  • Under reduced motion the scene renders one still frame, text is simply there, and nothing loops.

Rules

  • One colour family: the page, the shadows and most objects are all purple, from near-black aubergine to pale orchid. Lime is the only other colour and appears on one or two small things per screen.
  • Every object is shaded in exactly three flat tones (lit, turned, away) with no gradients, plus a thin dark-purple outline and thin crease lines. It should look drawn, not rendered.
  • The field is never flat: a lighter pool sits behind the main object, corners fall off to deep purple, and paper grain covers everything.
  • One typeface, medium weight, tight tracking, lines set almost solid. Headlines are Title Case, short sentences that end with full stops.
  • Text is pale lilac with a soft glow and sits directly over the scene, even across objects. No panels behind headlines.
  • The main button is a near-black pill with a 16 px radius holding a white square tile with an arrow. Secondary buttons are plain white with purple text and an 8 px radius.
  • Layouts are centred and sparse: one statement and one action per screen, objects pushed to the edges and corners and cropped by the frame.
  • Light always comes from the top left, on 3D objects and on flat drawings alike.
base.css
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600&display=swap');

:root {
  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif; /* the one family, used for everything */

  --field: #6d2d93; /* page field, the purple everything floats in */
  --field-glow: #8f4fb8; /* light pool behind the main object */
  --field-deep: #2a0d49; /* vignette, far depth, section floors */
  --void: #160923; /* darkest ink: dark buttons, deepest shadow */
  --glass: rgba(22, 9, 35, 0.5); /* translucent panels over the field */
  --line: #2a0f45; /* drawn outlines around every object */
  --hairline: rgba(246, 232, 255, 0.16); /* thin rules and card borders */
  --glow: rgba(246, 232, 255, 0.32); /* soft light around headlines, the beam of the loader */

  --rock: #45275c; /* dark rock, lit faces */
  --rock-shade: #2c1740; /* dark rock, turned faces */
  --rock-deep: #1f0e2d; /* dark rock, faces away from light */
  --stone: #a66be0; /* mid rock, lit faces */
  --stone-shade: #6a2fa0; /* mid rock, turned faces */
  --stone-deep: #4a1c7a; /* mid rock, faces away from light */
  --orchid: #e6b8ff; /* hero object and pale crystals, lit faces */
  --orchid-shade: #b46fe6; /* hero object, turned faces */
  --orchid-deep: #7a37b8; /* hero object, faces away from light */
  --pink: #e88bff; /* pink crystal, lit faces */
  --pink-shade: #c05ae6; /* pink crystal, turned faces */
  --pink-deep: #8f35bd; /* pink crystal, faces away from light */
  --lime: #bdfb92; /* the one loud accent, lit faces */
  --lime-shade: #93e070; /* accent, turned faces */
  --lime-deep: #6cbf5a; /* accent, faces away from light */
  --signal: #6fd08a; /* progress ring and active marks */

  --lilac: #f6e8ff; /* main text on the field */
  --lilac-dim: rgba(246, 232, 255, 0.62); /* secondary text, words not yet read */
  --paper: #fbfbfb; /* light buttons and tiles */
  --plum-ink: #6d2d93; /* text on paper buttons */

  --text-display: clamp(2.375rem, 6.3vw, 5.25rem); /* hero headline */
  --text-title: clamp(1.75rem, 3.4vw, 2.75rem); /* section and chapter titles */
  --text-lead: clamp(1.125rem, 1.9vw, 1.5rem); /* captions and lead paragraphs */
  --text-body: 1rem; /* buttons and body */
  --text-small: 0.875rem; /* nav links, labels */
  --text-brand: 1.3125rem; /* wordmark in the bar */
  --leading-display: 0.96; /* headline lines sit almost on each other */
  --leading-body: 1.45; /* running text */
  --tracking-display: -0.035em; /* headline */
  --tracking-body: -0.02em; /* buttons and labels */

  --radius-bar: 2px; /* progress segments */
  --radius-s: 8px; /* small buttons */
  --radius-m: 10px; /* arrow tile inside a pill */
  --radius-l: 16px; /* pills, cards, menu button */

  --space-1: 4px; /* hairline gaps */
  --space-2: 8px; /* inside buttons */
  --space-3: 16px; /* between small things */
  --space-4: 24px; /* page gutter */
  --space-5: 40px; /* between blocks */
  --space-6: 72px; /* section padding, phones */
  --space-7: 128px; /* section padding, desktop */
  --tap: 48px; /* smallest tap target */
  --page: 1240px; /* widest content column */

  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1); /* long settles: objects arriving */
  --ease-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); /* everything else */
  --time-quick: 0.3s; /* hover colour swaps */
  --time-reveal: 0.6s; /* words and labels fading in */
  --time-move: 0.8s; /* buttons and tiles sliding */
  --time-settle: 1.4s; /* objects and rings arriving */
  --time-shimmer: 5s; /* light passing over a label, linear, endless */
  --time-drift: 9s; /* one float cycle of a drawn object */
  --time-draw: 2.4s; /* a ring drawing itself */
  --time-turn: 80s; /* one turn of the dotted ring, linear */
  --time-chapter: 7s; /* how long one chapter holds, also one loop of the loader */
  --stagger-word: 70ms; /* gap between words arriving */
  --stagger-item: 120ms; /* gap between cards or drawn pieces arriving */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--lilac);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Paper grain over the whole page: the field never looks like flat screen colour. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

For your agent

Use the kitbash MCP server at https://kitbash.me/mcp. Call get_pack("toon-orbit"), 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