kitbash Sign in Connect agent
Components

Pill questions

A two-column block: a drawn dog asleep in a tyre with floating Zs on one side, sand-coloured pill questions that open in place on the other.

Part of the style

Tangerine Pill Parade

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --blush: #e05527;
  --cream: #f15b29;
  --sand: #dc5427;
  --shell: #e75828;
  --ink: #010000;
  --ink-soft: #1d0c0b;
  --white: #ffdace;
  --orange: #7f0601;
  --orange-deep: #ad4437;
  --orange-faint: rgba(195, 80, 65, 0.45);
}
</style>

<section class="faq">
  <div class="faq__side">
    <p class="faq__label">Questions people ask</p>
    <h2 class="faq__title">Before you<br>wheel it in</h2>
    <div class="faq__nap">
      <svg class="faq__dog" viewBox="0 0 260 200" role="img" aria-label="A drawn spotted dog asleep, curled up inside an old bicycle tyre">
        <ellipse class="faq__shadow" cx="130" cy="186" rx="104" ry="9" />
        <ellipse class="faq__tyre" cx="130" cy="128" rx="104" ry="54" />
        <ellipse class="faq__tread" cx="130" cy="128" rx="92" ry="44" />
        <path class="faq__white faq__body" d="M60 130 C 56 92, 112 78, 150 86 C 196 94, 214 120, 200 142 C 186 162, 92 166, 68 152 C 62 148, 60 140, 60 130 Z" />
        <path class="faq__ink" d="M112 92 C 126 86, 146 88, 152 98 C 140 112, 120 110, 112 92 Z" />
        <path class="faq__line" d="M196 136 C 214 132, 222 150, 204 158 C 192 162, 176 156, 170 150" />
        <path class="faq__white" d="M48 132 C 44 110, 64 98, 84 104 C 102 110, 104 132, 92 144 C 80 154, 52 150, 48 132 Z" />
        <path class="faq__orange" d="M86 108 L96 104 L104 128 L94 132 Z" />
        <path class="faq__ink" d="M58 104 C 50 112, 52 128, 62 132 C 68 120, 66 108, 58 104 Z" />
        <ellipse class="faq__white" cx="56" cy="142" rx="13" ry="9" />
        <circle class="faq__dot" cx="45" cy="140" r="3.5" />
        <path class="faq__line" d="M68 124 q6 5 12 0 M60 152 q12 6 26 0" />
      </svg>
      <span class="faq__z" style="--i: 0">z</span>
      <span class="faq__z" style="--i: 1">z</span>
      <span class="faq__z" style="--i: 2">z</span>
    </div>
  </div>
  <div class="faq__list">
    <details class="faq__item" open>
      <summary class="faq__q">Do I need to book, or can I just turn up?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">Both work. A booking keeps your spot on the stand; a walk-in gets a look the same day and a time for the fix.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__q">How long does a full service take?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">Usually two days. Older bikes with stuck parts can take a third.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__q">Will you work on a bike you didn't sell me?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">We don't sell bikes at all. Every bike on our bench came from somewhere else.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__q">Can you fix e-bikes?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">Everything but the battery and the motor. Those go back to their maker.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__q">What if the part is out of stock?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">We call you with two choices and a price for each before ordering anything.</p>
    </details>
    <details class="faq__item">
      <summary class="faq__q">What's with the dog?<span class="faq__plus" aria-hidden="true"></span></summary>
      <p class="faq__a">Quality control. Mostly naps.</p>
    </details>
  </div>
</section>

<style>
  .faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: var(--space-xl) var(--gap);
    padding: var(--section-space) var(--edge);
    background: var(--cream);
  }
  .faq__label {
    margin: 0 0 var(--space-s);
    color: var(--ink);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
  }
  .faq__title {
    margin: 0 0 var(--space-l);
    color: var(--ink);
    font-family: var(--font-display);
    font-stretch: var(--display-width);
    font-size: var(--display-l);
    font-weight: 800;
    line-height: 0.88;
    text-transform: uppercase;
  }
  .faq__nap {
    position: relative;
    max-width: 320px;
  }
  .faq__dog { width: 100%; height: auto; }
  .faq__dog * { stroke-linejoin: round; stroke-linecap: round; }
  .faq__shadow { fill: var(--sand); }
  .faq__tyre { fill: var(--ink); }
  .faq__tread { fill: var(--cream); stroke: var(--orange); stroke-width: 3px; stroke-dasharray: 6 8; }
  .faq__white { fill: var(--white); stroke: var(--ink); stroke-width: var(--line); }
  .faq__orange { fill: var(--orange); stroke: var(--ink); stroke-width: var(--line); }
  .faq__ink { fill: var(--ink); stroke: var(--ink); stroke-width: var(--line); }
  .faq__line { fill: none; stroke: var(--ink); stroke-width: var(--line); }
  .faq__dot { fill: var(--ink); }
  .faq__body { transform-box: fill-box; transform-origin: 50% 100%; animation: faq-breathe 2.6s var(--ease-swing) infinite alternate; }
  @keyframes faq-breathe { to { scale: 1.03 1.06; } }
  .faq__z {
    position: absolute;
    left: calc(18% + var(--i) * 7%);
    top: calc(30% - var(--i) * 12%);
    color: var(--orange);
    font-family: var(--font-display);
    font-stretch: var(--display-width);
    font-size: calc(22px + var(--i) * 8px);
    font-weight: 800;
    line-height: 1;
    animation: faq-float 2.4s var(--ease) calc(var(--i) * 0.8s) infinite;
  }
  @keyframes faq-float {
    0% { opacity: 0; translate: 0 10px; rotate: -10deg; }
    30% { opacity: 1; }
    100% { opacity: 0; translate: 14px -22px; rotate: 8deg; }
  }
  .faq.is-paused * { animation-play-state: paused !important; }

  .faq__list {
    display: grid;
    align-content: start;
    gap: 8px;
  }
  .faq__item {
    border-radius: 28px;
    background: var(--sand);
    transition: background-color var(--quick) var(--ease);
  }
  .faq__item[open] { background: var(--blush); }
  .faq__q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-m);
    min-height: 52px;
    padding: 8px 10px 8px 24px;
    color: var(--ink);
    font-size: var(--text-s);
    font-weight: 500;
    cursor: pointer;
    list-style: none;
  }
  .faq__q::-webkit-details-marker { display: none; }
  .faq__q:focus-visible { outline: var(--line) solid var(--orange); outline-offset: 2px; border-radius: var(--pill); }
  .faq__plus {
    position: relative;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orange);
    transition: rotate var(--quick) var(--ease);
  }
  .faq__plus::before,
  .faq__plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background: var(--white);
    translate: -50% -50%;
  }
  .faq__plus::after { rotate: 90deg; }
  .faq__item[open] .faq__plus { rotate: 45deg; }
  .faq__a {
    margin: 0;
    padding: 0 64px 18px 24px;
    color: var(--ink-soft);
    font-size: var(--text-s);
    line-height: 1.45;
  }

  @media (max-width: 760px) {
    .faq { grid-template-columns: 1fr; gap: var(--space-l); }
    .faq__nap { max-width: 240px; }
    .faq__a { padding-right: 24px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .faq__z { animation: none; opacity: 1; }
    .faq__body { animation: none; }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.faq')) {
      new IntersectionObserver(([entry]) => {
        root.classList.toggle('is-paused', !entry.isIntersecting);
      }).observe(root);
    }
  })();
</script>

Similar components

Numbered questions

Numbered questions

Question slips

Question slips

Question rows

Question rows

Questions

Questions

Before you come

Before you come

Question wheel

Question wheel

Information accordion

Information accordion

Good-to-know list

Good-to-know list