kitbash Sign in Connect agent
Components

Read-through statement and figures

A wide caps statement that fills word by word from grey to black with a blue tail, a small photo tile, two short paragraphs, a pill and big figures on hairlines.

Part of the style

Black Road White Page

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Fraunces:ital,opsz,wght@1,9..144,400..600&display=swap");
:root {
  --ink: #fff2f1;
  --ink-mid: rgba(255, 242, 241, 0.72);
  --ink-soft: rgba(255, 242, 241, 0.4);
  --paper: #334493;
  --night: #4c3736;
  --panel: #fff2f1;
  --on-night: #334493;
  --on-night-soft: rgba(51, 68, 147, 0.6);
  --on-night-faint: rgba(51, 68, 147, 0.24);
  --ghost: #3d4f9b;
  --lane: #40529d;
  --line-light: rgba(255, 242, 241, 0.14);
  --line-dark: rgba(51, 68, 147, 0.14);
  --signal: #fdb4b1;
  --signal-light: #d19b99;
  --rim: #a05554;
  --route: #8d5772;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, monospace;
}
</style>

<section class="statement">
  <div class="statement__left">
    <img class="statement__photo" src="assets/cloverleaf.jpg" alt="A motorway cloverleaf seen from the air, lined with warehouses" width="800" height="600" loading="lazy">
    <h2 class="statement__title">
      <span class="statement__word">We</span> <span class="statement__word">drive</span> <span class="statement__word">the</span> <span class="statement__word">night.</span>
      <span class="statement__word">You</span> <span class="statement__word">wake</span> <span class="statement__word statement__word--tail">up</span> <span class="statement__word statement__word--tail">there.</span>
    </h2>
  </div>

  <div class="statement__right">
    <div class="statement__text">
      <p>Every route, every driver and every seat sits with one company, so a delay in Vienna is our problem, not a gap between two operators.</p>
      <p>That means one booking, one helpline and one crew. <span class="statement__blue">Just one coach, from the first stop to the last.</span></p>
      <a class="statement__pill" href="#">More about us</a>
    </div>

    <p class="statement__caption">Counted at the end of every season</p>
    <dl class="statement__figures">
      <div class="statement__figure">
        <dt class="statement__label">Seats sold each week</dt>
        <dd class="statement__number" data-value="3400" data-suffix="+">3,400+</dd>
      </div>
      <div class="statement__figure">
        <dt class="statement__label">On-time departures</dt>
        <dd class="statement__number" data-value="97.6" data-suffix="%">97.6%</dd>
      </div>
      <div class="statement__figure">
        <dt class="statement__label">Years on the road</dt>
        <dd class="statement__number" data-value="11" data-suffix="+">11+</dd>
      </div>
    </dl>
  </div>
</section>

<style>
  .statement {
    display: grid;
    gap: var(--space-xl) var(--gap);
    padding: var(--section-space) var(--edge);
    background: var(--paper);
    color: var(--ink);
  }
  .statement__left {
    display: grid;
    align-content: start;
    gap: var(--space-xl);
  }
  .statement__photo {
    width: clamp(140px, 13vw, 190px);
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-s);
  }
  .statement__title {
    margin: 0;
    font-family: var(--font-display);
    font-variation-settings: "wdth" var(--display-width);
    font-size: var(--display-m);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    max-width: 9em;
  }
  .statement__word {
    color: var(--ink-soft);
    transition: color var(--quick) var(--ease);
  }
  .statement__word.is-read { color: var(--ink); }
  .statement__word--tail.is-read {
    background: linear-gradient(90deg, var(--signal), var(--signal-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .statement__right {
    display: grid;
    align-content: start;
    gap: var(--space-l);
  }
  .statement__text {
    display: grid;
    gap: var(--space-m);
    justify-items: start;
    max-width: 30em;
    font-size: var(--text-m);
    line-height: 1.35;
    color: var(--ink);
  }
  .statement__text p { margin: 0; }
  .statement__blue {
    background: linear-gradient(90deg, var(--signal), var(--signal-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .statement__pill {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    margin-top: var(--space-s);
    padding: 0 var(--space-m);
    border: var(--rule) solid var(--line-light);
    border-radius: var(--pill);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color var(--mid) var(--ease), color var(--mid) var(--ease), border-color var(--mid) var(--ease);
  }
  .statement__pill:hover,
  .statement__pill:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    outline: none;
  }
  .statement__caption {
    margin: var(--space-l) 0 0;
    padding-bottom: var(--space-s);
    border-bottom: var(--rule) solid var(--line-light);
    font-size: 11.5px;
    color: var(--ink-mid);
  }
  .statement__figures {
    display: grid;
    margin: 0;
  }
  .statement__figure {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-xs);
    padding: var(--space-m) 0 var(--space-l);
    border-bottom: var(--rule) solid var(--line-light);
  }
  .statement__number {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--stat);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
  }
  .statement__label {
    font-size: var(--text-s);
    color: var(--ink-mid);
  }

  @media (min-width: 820px) {
    .statement {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .statement__left {
      position: sticky;
      top: var(--space-l);
      align-self: start;
    }
    .statement__right {
      padding-left: calc((100% - var(--gap)) / 4);
    }
  }
</style>

<script>
(() => {
  const still = matchMedia('(prefers-reduced-motion: reduce)');
  function setup(root) {
    const words = [...root.querySelectorAll('.statement__word')];
    const title = root.querySelector('.statement__title');
    const update = () => {
      if (still.matches) { words.forEach((w) => w.classList.add('is-read')); return; }
      const box = title.getBoundingClientRect();
      const view = innerHeight;
      const progress = Math.min(1, Math.max(0, (view - box.top) / (view * 0.9)));
      const count = Math.round(progress * words.length);
      words.forEach((word, i) => word.classList.toggle('is-read', i < count));
    };
    let pending = false;
    const onScroll = () => {
      if (pending) return;
      pending = true;
      requestAnimationFrame(() => { pending = false; update(); });
    };
    new IntersectionObserver(([entry]) => {
      if (entry.isIntersecting) { addEventListener('scroll', onScroll, { passive: true }); update(); }
      else removeEventListener('scroll', onScroll);
    }).observe(root);
    addEventListener('resize', onScroll);
    update();

    const numbers = [...root.querySelectorAll('.statement__number')];
    const format = (value, decimals) => value.toLocaleString('en-US', { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
    const count = (el) => {
      const target = parseFloat(el.dataset.value);
      const decimals = (el.dataset.value.split('.')[1] || '').length;
      const suffix = el.dataset.suffix || '';
      const start = performance.now();
      const step = (now) => {
        const t = Math.min(1, (now - start) / 1400);
        const eased = 1 - Math.pow(1 - t, 4);
        el.textContent = format(target * eased, decimals) + suffix;
        if (t < 1) requestAnimationFrame(step);
      };
      requestAnimationFrame(step);
    };
    if (!still.matches) {
      const seen = new IntersectionObserver((entries) => {
        for (const entry of entries) {
          if (!entry.isIntersecting) continue;
          count(entry.target);
          seen.unobserve(entry.target);
        }
      }, { threshold: 0.4 });
      numbers.forEach((n) => seen.observe(n));
    }
  }
  document.querySelectorAll('.statement').forEach(setup);
})();
</script>

Similar components

Quiet statement

Quiet statement

Typed statement

Typed statement

Night statement and figures

Night statement and figures

Italic-emphasis statement

Italic-emphasis statement

Lead entry

Lead entry

Shaded statement

Shaded statement

Notes

Notes

Letter and footer

Letter and footer