kitbash Sign in Connect agent
Components

Process reader

A long reading column of numbered steps with a sticky step index on the left that turns the step in view black.

Part of the style

Faded Label Index

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #f15b29;
  --ink: #1d0c0b;
  --ink-deep: #040000;
  --ink-faded: #ad4321;
  --tile: #1c0b0b;
  --tile-ink: #f15b29;
  --flood: #d15c4c;
}
</style>

<section class="process" aria-labelledby="process-title">
  <nav class="process__index" aria-label="Steps">
    <ol class="process__steps">
      <li><a class="process__jump is-current" href="#" data-step="0">Drop-off &amp; Diagnosis</a></li>
      <li><a class="process__jump" href="#" data-step="1">Strip &amp; Clean</a></li>
      <li><a class="process__jump" href="#" data-step="2">Mend &amp; Reassemble</a></li>
      <li><a class="process__jump" href="#" data-step="3">Regulate &amp; Return</a></li>
    </ol>
  </nav>

  <div class="process__intro">
    <p class="process__label">Repairs</p>
    <h2 class="process__head" id="process-title">How a clock goes through</h2>
    <p class="process__text">Most pieces spend three to eight weeks with us, from the first look under the loupe to the day they tick on your own wall.</p>
  </div>

  <div class="process__reading">
    <article class="process__step">
      <p class="process__label">Process</p>
      <h3 class="process__head">Drop-off &amp; Diagnosis</h3>
      <p class="process__text">Bring the clock in, or send photographs first. We open the case with you there, listen to it, and write down every fault we can find before we promise anything.</p>
      <p class="process__text">If the movement is past saving we say so on the day, and point you to a case-maker or a collector who can give it a second life.</p>
    </article>
    <article class="process__step">
      <p class="process__label">Process</p>
      <h3 class="process__head">Strip &amp; Clean</h3>
      <p class="process__text">The movement comes apart down to the last screw. Plates and wheels are washed, pivots are polished, and worn holes are marked for bushing.</p>
      <p class="process__text">Every part is laid out on a numbered tray and photographed, so the clock goes back together exactly as it left the maker.</p>
    </article>
    <article class="process__step">
      <p class="process__label">Process</p>
      <h3 class="process__head">Mend &amp; Reassemble</h3>
      <p class="process__text">Broken teeth are replaced, springs are renewed and missing pieces are cut by hand on the lathe. Then the movement is rebuilt and oiled with the lightest touch it will take.</p>
      <ul class="process__docs">
        <li><a class="process__doc" href="#">Sample repair note</a></li>
        <li><a class="process__doc" href="#">Our Winding Card</a></li>
      </ul>
    </article>
    <article class="process__step">
      <p class="process__label">Process</p>
      <h3 class="process__head">Regulate &amp; Return</h3>
      <p class="process__text">Every clock runs on the test stand for at least ten days while we set its beat and rate. When it keeps time within a minute a week, it comes home with a written note and a year of free adjustments.</p>
    </article>
  </div>
</section>

<style>
  .process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-m) var(--gap);
    align-items: start;
    padding: var(--space-l) var(--edge) var(--section-space);
  }
  .process p,
  .process h2,
  .process h3,
  .process ol,
  .process ul {
    margin: 0;
    padding: 0;
    font: inherit;
    list-style: none;
  }
  .process__index,
  .process__intro {
    position: sticky;
    top: calc(var(--space-l) + var(--space-m));
  }
  .process__index {
    grid-column: 1;
  }
  .process__intro {
    grid-column: 2;
  }
  .process__jump {
    color: var(--ink-faded);
    text-decoration: none;
    transition: color var(--time) var(--ease);
  }
  .process__jump:hover,
  .process__jump:focus-visible,
  .process__jump.is-current {
    color: var(--ink);
    outline: none;
  }
  .process__label,
  .process__text {
    color: var(--ink-faded);
  }
  .process__head {
    color: var(--ink);
  }
  .process .process__head + .process__text,
  .process .process__text + .process__text,
  .process .process__text + .process__docs {
    margin-top: var(--space-s);
  }
  .process__reading {
    grid-column: 3 / 5;
    display: grid;
    gap: var(--space-l);
    max-width: 34em;
  }
  .process__doc {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: var(--line);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--time) var(--ease-snap);
  }
  .process__doc:hover,
  .process__doc:focus-visible {
    text-decoration-color: var(--ink);
    outline: none;
  }

  @media (max-width: 1100px) {
    .process {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .process__intro {
      position: static;
      grid-column: 2 / 4;
    }
    .process__reading {
      grid-column: 2 / 4;
    }
  }

  @media (max-width: 760px) {
    .process {
      grid-template-columns: minmax(0, 1fr);
      padding-top: var(--space-m);
      font-size: var(--text-phone);
      line-height: var(--leading-phone);
    }
    .process__index {
      display: none;
    }
    .process__intro,
    .process__reading {
      grid-column: 1;
    }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.process')) {
      const jumps = [...root.querySelectorAll('.process__jump')];
      const steps = [...root.querySelectorAll('.process__step')];
      if (!steps.length) continue;
      const mark = (index) => jumps.forEach((jump, i) => jump.classList.toggle('is-current', i === index));
      const spy = new IntersectionObserver((entries) => {
        for (const entry of entries) {
          if (entry.isIntersecting) mark(steps.indexOf(entry.target));
        }
      }, { rootMargin: '-35% 0px -60% 0px' });
      steps.forEach((step) => spy.observe(step));
      jumps.forEach((jump, i) => jump.addEventListener('click', (event) => {
        event.preventDefault();
        const smooth = !matchMedia('(prefers-reduced-motion: reduce)').matches;
        steps[i]?.scrollIntoView({ behavior: smooth ? 'smooth' : 'auto', block: 'center' });
        mark(i);
      }));
    }
  })();
</script>

Similar components

Dictionary entry

Dictionary entry

Small caps statement

Small caps statement

Wiped statement

Wiped statement

Serif statement and lists

Serif statement and lists

Red flood studio

Red flood studio

Studio statement

Studio statement

Project chapter

Project chapter

Statement with pills

Statement with pills