kitbash Sign in Connect agent
Components

Service rows and cards

Numbered pill rows that fill black with an ink-blot mask, lift on hover and swap the illustrated garden plan beside them; two cards on the right, dark and sage, with a pointer spotlight and a turning arrow.

Part of the style

Glass Garden

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --stone: #bec3c3;
  --stone-light: #ced3d3;
  --stone-shade: #b3b8b8;
  --paper: #f4f9f9;
  --mist: #cbd0d0;
  --ink: #030204;
  --ink-soft: #1f1d21;
  --charcoal: #353337;
  --graphite: #4a474c;
  --ash: #7f8585;
  --sage-mid: #646a6a;
  --sage-pale: #a9aeae;
  --forest: #333136;
  --line: rgba(3, 2, 4, 0.1);
  --grid-line: rgba(3, 2, 4, 0.045);
  --spot: rgba(217, 223, 223, 0.15);
  --shadow: rgba(3, 2, 4, 0.1);
  --glass: rgba(205, 210, 210, 0.55);
  --linen: #c7cccc;
  --sand: #b3b8b8;
  --pool: #a6abab;
  --stone-deep: #a6acac;
  --glass-light: #ced3d3;
  --glass-shadow: #6e7474;
  --sage: #7d6759;
  --lime: #fddecc;
  --pearl-1: #fcceb2;
  --sticker-leaf: #995626;
  --mint-card: #bd9d8a;
  --pearl-4: #897264;
  --sand-deep: #837872;
  --sticker-lemon: #996e53;
  --horn: #867265;
  --pearl-2: #897264;
  --sticker-rose: #95735e;
  --rose-light: #8d7363;
  --pearl-3: #897264;
  --sticker-terracotta: #897264;
  --sticker-azul: #7d6759;
}
</style>

<section class="services" aria-label="What we do">
  <div class="services__rows">
    <p class="services__intro">Pátio Norte plans, plants and builds outdoor rooms sized to how you live in them.</p>
    <button class="services__row is-active" type="button" aria-pressed="true" data-scene="0">
      <span class="services__face"><span class="services__number">01</span><span class="services__name">Garden design</span><svg class="services__arrow" viewBox="0 0 26 14" aria-hidden="true"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
      <span class="services__face services__face--ink" aria-hidden="true"><span class="services__number">01</span><span class="services__name">Garden design</span><svg class="services__arrow" viewBox="0 0 26 14"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
    </button>
    <button class="services__row" type="button" aria-pressed="false" data-scene="1">
      <span class="services__face"><span class="services__number">02</span><span class="services__name">Roof terraces</span><svg class="services__arrow" viewBox="0 0 26 14" aria-hidden="true"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
      <span class="services__face services__face--ink" aria-hidden="true"><span class="services__number">02</span><span class="services__name">Roof terraces</span><svg class="services__arrow" viewBox="0 0 26 14"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
    </button>
    <button class="services__row" type="button" aria-pressed="false" data-scene="2">
      <span class="services__face"><span class="services__number">03</span><span class="services__name">Public squares</span><svg class="services__arrow" viewBox="0 0 26 14" aria-hidden="true"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
      <span class="services__face services__face--ink" aria-hidden="true"><span class="services__number">03</span><span class="services__name">Public squares</span><svg class="services__arrow" viewBox="0 0 26 14"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
    </button>
    <button class="services__row" type="button" aria-pressed="false" data-scene="3">
      <span class="services__face"><span class="services__number">04</span><span class="services__name">Planting care</span><svg class="services__arrow" viewBox="0 0 26 14" aria-hidden="true"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
      <span class="services__face services__face--ink" aria-hidden="true"><span class="services__number">04</span><span class="services__name">Planting care</span><svg class="services__arrow" viewBox="0 0 26 14"><path d="M0 7h24M18 1l6 6-6 6"/></svg></span>
    </button>
  </div>

  <figure class="services__picture">
    <svg class="services__scenes" viewBox="0 0 528 514" preserveAspectRatio="xMidYMid slice" role="img" aria-label="Drawing of the chosen service">
      <g class="services__scene is-shown">
        <rect width="528" height="514" style="fill: var(--linen)"/>
        <g fill="none" stroke-width="1" style="stroke: var(--stone-shade)"><path d="M0 64h528M0 128h528M0 192h528M0 256h528M0 320h528M0 384h528M0 448h528M66 0v514M132 0v514M198 0v514M264 0v514M330 0v514M396 0v514M462 0v514"/></g>
        <path d="M-10 420C90 380 150 300 230 290s150 40 200-30 60-150 120-170" fill="none" stroke-width="34" stroke-linecap="round" style="stroke: var(--sand)"/>
        <path d="M-10 420C90 380 150 300 230 290s150 40 200-30 60-150 120-170" fill="none" stroke-width="34" stroke-dasharray="2 14" style="stroke: var(--sand-deep)"/>
        <circle cx="210" cy="170" r="92" style="fill: var(--sage-pale)"/>
        <circle cx="210" cy="170" r="92" fill="none" stroke-width="2" stroke-dasharray="4 6" style="stroke: var(--sage)"/>
        <ellipse cx="380" cy="380" rx="70" ry="44" style="fill: var(--pool)"/>
        <ellipse cx="368" cy="372" rx="30" ry="10" opacity="0.7" style="fill: var(--mist)"/>
        <g style="fill: var(--sage)"><circle cx="92" cy="92" r="40"/><circle cx="440" cy="78" r="46"/><circle cx="96" cy="270" r="30"/><circle cx="470" cy="470" r="38"/></g>
        <g style="fill: var(--sticker-leaf)"><circle cx="80" cy="80" r="22"/><circle cx="426" cy="64" r="26"/><circle cx="88" cy="262" r="16"/><circle cx="460" cy="460" r="20"/></g>
        <g style="fill: var(--forest)"><circle cx="92" cy="92" r="3"/><circle cx="440" cy="78" r="3"/><circle cx="96" cy="270" r="3"/><circle cx="470" cy="470" r="3"/></g>
        <rect x="250" y="300" width="70" height="16" rx="3" style="fill: var(--sticker-terracotta)"/>
        <circle cx="210" cy="170" r="6" style="fill: var(--lime)"/>
      </g>
      <g class="services__scene">
        <rect width="528" height="514" style="fill: var(--mist)"/>
        <circle cx="408" cy="110" r="46" style="fill: var(--pearl-4)"/>
        <rect x="40" y="250" width="448" height="264" style="fill: var(--stone-shade)"/>
        <g style="fill: var(--stone-deep)"><rect x="80" y="330" width="56" height="80"/><rect x="176" y="330" width="56" height="80"/><rect x="272" y="330" width="56" height="80"/><rect x="368" y="330" width="56" height="80"/><rect x="80" y="440" width="56" height="74"/><rect x="176" y="440" width="56" height="74"/><rect x="272" y="440" width="56" height="74"/><rect x="368" y="440" width="56" height="74"/></g>
        <rect x="30" y="238" width="468" height="14" style="fill: var(--charcoal)"/>
        <g stroke-width="5" style="stroke: var(--forest)"><path d="M90 238V140M250 238V140M410 238V140"/></g>
        <path d="M74 140h352" stroke-width="7" style="stroke: var(--forest)"/>
        <g stroke-width="2" style="stroke: var(--forest)"><path d="M110 140l-14 -14M150 140l-14 -14M190 140l-14 -14M230 140l-14 -14M270 140l-14 -14M310 140l-14 -14M350 140l-14 -14M390 140l-14 -14"/></g>
        <g style="fill: var(--sticker-terracotta)"><rect x="60" y="206" width="70" height="32" rx="4"/><rect x="300" y="206" width="110" height="32" rx="4"/></g>
        <g style="fill: var(--sticker-leaf)"><circle cx="78" cy="196" r="20"/><circle cx="110" cy="190" r="24"/><circle cx="320" cy="196" r="20"/><circle cx="354" cy="186" r="28"/><circle cx="392" cy="198" r="18"/></g>
        <g style="fill: var(--sage)"><circle cx="96" cy="182" r="12"/><circle cx="340" cy="176" r="14"/></g>
        <rect x="180" y="196" width="80" height="10" rx="5" style="fill: var(--paper)"/>
        <path d="M188 206v32M252 206v32" stroke-width="4" style="stroke: var(--paper)"/>
        <path d="M150 160c30-34 70-34 100 0" fill="none" stroke-width="3" style="stroke: var(--sticker-leaf)"/>
      </g>
      <g class="services__scene">
        <rect width="528" height="514" style="fill: var(--stone)"/>
        <g fill="none" stroke-width="2" style="stroke: var(--stone-deep)"><path d="M0 40h528M0 80h528M0 120h528M0 160h528M0 200h528M0 240h528M0 280h528M0 320h528M0 360h528M0 400h528M0 440h528M0 480h528M40 0v514M80 0v514M120 0v514M160 0v514M200 0v514M240 0v514M280 0v514M320 0v514M360 0v514M400 0v514M440 0v514M480 0v514"/></g>
        <circle cx="264" cy="257" r="96" stroke-width="10" style="fill: var(--mist); stroke: var(--paper)"/>
        <circle cx="264" cy="257" r="62" style="fill: var(--pool)"/>
        <circle cx="264" cy="257" r="18" style="fill: var(--paper)"/>
        <g fill="none" stroke-width="2" opacity="0.8" style="stroke: var(--paper)"><circle cx="264" cy="257" r="34"/><circle cx="264" cy="257" r="48"/></g>
        <g style="fill: var(--sage)"><circle cx="80" cy="80" r="44"/><circle cx="264" cy="64" r="44"/><circle cx="448" cy="80" r="44"/><circle cx="80" cy="434" r="44"/><circle cx="264" cy="450" r="44"/><circle cx="448" cy="434" r="44"/><circle cx="64" cy="257" r="44"/><circle cx="464" cy="257" r="44"/></g>
        <g opacity="0.55" style="fill: var(--sage-pale)"><circle cx="70" cy="70" r="22"/><circle cx="254" cy="54" r="22"/><circle cx="438" cy="70" r="22"/><circle cx="70" cy="424" r="22"/><circle cx="254" cy="440" r="22"/><circle cx="438" cy="424" r="22"/><circle cx="54" cy="247" r="22"/><circle cx="454" cy="247" r="22"/></g>
        <g style="fill: var(--sticker-terracotta)"><rect x="150" y="150" width="40" height="10" rx="3"/><rect x="338" y="354" width="40" height="10" rx="3"/></g>
        <circle cx="264" cy="257" r="5" style="fill: var(--lime)"/>
      </g>
      <g class="services__scene">
        <rect width="528" height="514" style="fill: var(--sage)"/>
        <circle cx="390" cy="130" r="70" style="fill: var(--pearl-4)"/>
        <path d="M120 514C110 380 170 250 300 190c-20 120-80 240-180 324z" style="fill: var(--sticker-leaf)"/>
        <path d="M120 514C170 390 220 300 300 190" fill="none" stroke-width="3" style="stroke: var(--sage-pale)"/>
        <path d="M300 514c20-120 90-210 210-240-20 110-100 200-210 240z" style="fill: var(--forest)"/>
        <path d="M300 514c60-100 120-170 210-240" fill="none" stroke-width="3" style="stroke: var(--sage)"/>
        <path d="M-20 360c80-60 170-60 230 10-90 40-170 40-230-10z" style="fill: var(--sage-pale)"/>
        <path d="M-20 360c80 0 150 4 230 10" fill="none" stroke-width="3" style="stroke: var(--sage)"/>
        <g style="fill: var(--mist)"><path d="M236 80c10 16 14 26 14 34a14 14 0 0 1-28 0c0-8 4-18 14-34z"/><path d="M196 140c7 11 10 18 10 24a10 10 0 0 1-20 0c0-6 3-13 10-24z"/><path d="M268 150c6 10 9 16 9 21a9 9 0 0 1-18 0c0-5 3-11 9-21z"/></g>
        <circle cx="390" cy="130" r="8" style="fill: var(--lime)"/>
      </g>
    </svg>
    <figcaption class="services__caption"><span class="services__caption-number">01</span> <span class="services__caption-name">Garden design</span></figcaption>
  </figure>

  <div class="services__cards">
    <a class="services__card" href="#">
      <span class="services__card-text">Wondering how a bare courtyard turns into a garden?</span>
      <span class="services__card-foot">
        <span class="services__card-title">Our<br>work.</span>
        <span class="services__disc"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 13L13 3M5 3h8v8"/></svg></span>
      </span>
    </a>
    <a class="services__card services__card--sage" href="#">
      <span class="services__card-text">Looking for people who know which tree survives a sea wind?</span>
      <span class="services__card-foot">
        <span class="services__card-title">Our<br>team.</span>
        <span class="services__disc"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 13L13 3M5 3h8v8"/></svg></span>
      </span>
    </a>
  </div>
</section>

<style>
  .services {
    display: grid;
    grid-template-columns: minmax(0, 418fr) minmax(0, 528fr) minmax(0, 308fr);
    gap: clamp(20px, 1.7vw, 24px);
    align-items: stretch;
    padding: var(--space-xl) var(--edge);
    background: var(--stone);
    color: var(--ink);
  }
  .services__rows { display: grid; align-content: start; gap: 35px; }
  .services__intro {
    max-width: 24em;
    margin: 0 0 1px;
    font: 400 var(--text-m)/2.06 var(--font-body);
  }
  .services__row {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 78px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform var(--time) var(--ease), border-color var(--time) var(--ease), box-shadow var(--time) var(--ease);
  }
  .services__row:hover { transform: scale(1.02); }
  .services__row:active { transform: scale(0.98); }
  .services__row:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
  .services__row.is-active { border-color: var(--ink); box-shadow: 0 10px 30px var(--shadow); }
  .services__face {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px 24px 32px;
  }
  .services__face--ink {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    -webkit-mask: var(--services-blot) 0 0 / 7100% 100% no-repeat;
    mask: var(--services-blot) 0 0 / 7100% 100% no-repeat;
  }
  .services__face--ink .services__number { color: var(--lime); }
  .services__row.is-filled .services__face--ink { animation: services-blot-in var(--time-blot) steps(70) forwards; }
  .services__row.is-draining .services__face--ink { animation: services-blot-out var(--time-blot) steps(70) forwards; }
  @keyframes services-blot-in { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 100% 0; mask-position: 100% 0; } }
  @keyframes services-blot-out { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
  .services__number { font: 700 var(--text-m)/1.7 var(--font-body); }
  .services__name { flex: 1; font: 300 var(--text-m)/1.7 var(--font-body); }
  .services__arrow { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; }

  .services__picture {
    position: relative;
    min-height: 420px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-s);
  }
  .services__scenes { position: absolute; inset: 0; width: 100%; height: 100%; }
  .services__scene { opacity: 0; transition: opacity var(--time) var(--ease); }
  .services__scene.is-shown { opacity: 1; }
  .services__caption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--paper);
    font: 500 var(--text-s)/1.2 var(--font-body);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .services__caption-number { font-weight: 700; }

  .services__cards { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
  .services__card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    min-height: 220px;
    padding: 30px;
    overflow: hidden;
    border-radius: var(--radius-s);
    background: var(--charcoal);
    color: var(--paper);
    text-decoration: none;
    transition: transform var(--time) var(--ease), background-color var(--time) var(--ease);
  }
  .services__card--sage { background: var(--sage); }
  .services__card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    background: radial-gradient(800px circle at var(--services-x, 50%) var(--services-y, 50%), var(--spot), transparent 40%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--time) var(--ease);
  }
  .services__card:hover::before,
  .services__card:focus-visible::before { opacity: 1; }
  .services__card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .services__card-text { font: 400 var(--text-m)/1.7 var(--font-body); }
  .services__card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
  .services__card-title { font: 700 28px/1 var(--font-body); }
  .services__disc {
    display: grid;
    place-items: center;
    flex: none;
    width: var(--tap);
    height: var(--tap);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--paper);
  }
  .services__card--sage .services__disc { background: var(--paper); color: var(--ink); }
  .services__disc svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform var(--time) var(--ease); }
  .services__card:hover .services__disc svg,
  .services__card:focus-visible .services__disc svg { transform: rotate(30deg); }

  @media (max-width: 1100px) {
    .services { grid-template-columns: 1fr 1fr; }
    .services__cards { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  }
  @media (max-width: 700px) {
    .services { grid-template-columns: 1fr; }
    .services__rows { gap: 18px; }
    .services__picture { min-height: 0; aspect-ratio: 1; }
    .services__cards { grid-template-columns: 1fr; }
    .services__face { padding: 20px 22px 20px 24px; }
  }
</style>

<script>
(() => {
  const FRAMES = 71;

  function blotSprite(aspect) {
    const frameWidth = 260;
    const frameHeight = Math.max(20, Math.round(frameWidth / aspect));
    const canvas = document.createElement('canvas');
    canvas.width = frameWidth * FRAMES;
    canvas.height = frameHeight;
    const context = canvas.getContext('2d');
    context.fillStyle = '#000';
    let seed = 11;
    const random = () => { seed = (seed * 16807) % 2147483647; return seed / 2147483647; };
    const reach = Math.hypot(frameWidth, frameHeight);
    const blots = Array.from({ length: 15 }, (_, index) => ({
      x: random() * frameWidth,
      y: random() * frameHeight,
      start: index === 0 ? 0 : random() * 0.5,
      size: (0.3 + random() * 0.35) * reach,
      wobble: random() * 10,
      drops: Array.from({ length: 3 }, () => ({ angle: random() * Math.PI * 2, distance: 0.6 + random() * 0.8, size: 0.04 + random() * 0.06 })),
    }));

    function blob(cx, cy, radius, wobble) {
      context.beginPath();
      for (let step = 0; step <= 28; step += 1) {
        const angle = (step / 28) * Math.PI * 2;
        const edge = radius * (1 + 0.16 * Math.sin(angle * 3 + wobble) + 0.09 * Math.sin(angle * 5 - wobble * 1.7));
        const x = cx + Math.cos(angle) * edge;
        const y = cy + Math.sin(angle) * edge * 0.5;
        if (step === 0) context.moveTo(x, y); else context.lineTo(x, y);
      }
      context.fill();
    }

    for (let frame = 0; frame < FRAMES; frame += 1) {
      const time = frame / (FRAMES - 1);
      context.save();
      context.beginPath();
      context.rect(frame * frameWidth, 0, frameWidth, frameHeight);
      context.clip();
      context.translate(frame * frameWidth, 0);
      if (frame === FRAMES - 1) {
        context.fillRect(0, 0, frameWidth, frameHeight);
      } else if (frame > 0) {
        for (const spot of blots) {
          const grown = Math.max(0, (time - spot.start) / (1 - spot.start));
          if (grown <= 0) continue;
          const radius = spot.size * grown ** 1.7;
          blob(spot.x, spot.y, Math.max(1, radius), spot.wobble + time * 2);
          for (const drop of spot.drops) {
            const distance = Math.max(radius, 4) * drop.distance + 3;
            const dropSize = Math.max(0.7, spot.size * drop.size * Math.min(1, grown * 4));
            blob(spot.x + Math.cos(drop.angle) * distance, spot.y + Math.sin(drop.angle) * distance, dropSize, drop.angle);
          }
        }
      }
      context.restore();
    }
    return `url("${canvas.toDataURL('image/png')}")`;
  }

  function setUp(root) {
    const rows = [...root.querySelectorAll('.services__row')];
    const scenes = [...root.querySelectorAll('.services__scene')];
    const captionNumber = root.querySelector('.services__caption-number');
    const captionName = root.querySelector('.services__caption-name');
    const box = rows[0].getBoundingClientRect();
    root.style.setProperty('--services-blot', blotSprite(box.width / Math.max(1, box.height) || 5.4));

    let active = rows.find((row) => row.classList.contains('is-active')) || rows[0];
    active.classList.add('is-filled');

    const fill = (row) => { row.classList.remove('is-draining'); row.classList.add('is-filled'); };
    const drain = (row) => {
      if (row === active || !row.classList.contains('is-filled')) return;
      row.classList.remove('is-filled');
      row.classList.add('is-draining');
    };

    function show(row) {
      const index = Number(row.dataset.scene);
      scenes.forEach((scene, order) => scene.classList.toggle('is-shown', order === index));
      captionNumber.textContent = row.querySelector('.services__number').textContent;
      captionName.textContent = row.querySelector('.services__name').textContent;
    }

    function choose(row) {
      if (row === active) return;
      const previous = active;
      previous.classList.remove('is-active');
      previous.setAttribute('aria-pressed', 'false');
      active = row;
      row.classList.add('is-active');
      row.setAttribute('aria-pressed', 'true');
      fill(row);
      drain(previous);
      show(row);
    }

    for (const row of rows) {
      row.addEventListener('pointerenter', () => fill(row));
      row.addEventListener('pointerleave', () => drain(row));
      row.addEventListener('focus', () => fill(row));
      row.addEventListener('blur', () => drain(row));
      row.addEventListener('click', () => choose(row));
    }

    for (const card of root.querySelectorAll('.services__card')) {
      card.addEventListener('pointermove', (event) => {
        const area = card.getBoundingClientRect();
        card.style.setProperty('--services-x', `${event.clientX - area.left}px`);
        card.style.setProperty('--services-y', `${event.clientY - area.top}px`);
      });
    }
  }

  document.querySelectorAll('.services').forEach(setUp);
})();
</script>

Similar components

Ringed services

Ringed services

Services list

Services list

Ruled lists

Ruled lists

Capability rows

Capability rows

Numbered services

Numbered services

Ruled trade list

Ruled trade list

News entry

News entry

Programme list

Programme list