kitbash Sign in Connect agent
Components

Colour cards

Two flat cards, teal with yellow type and yellow with teal type: an engraved line sign, a small sans label, a serif title, one serif line and an italic link. Hover draws an outline in the text colour. On phones the cards become a snapping rail with the next one peeking in.

Part of the style

Dusk Sky Stadium

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #fff1f2;
  --ink-soft: #f7d7d8;
  --mist: #1b6656;
  --stone: #317364;
  --stone-shade: #facfd1;
  --veil: rgba(255, 254, 254, 0.34);
  --teal: #f3d4d5;
  --sun: #315f53;
  --moss: #9ec8bc;
  --rose: #816667;
}
</style>

<section class="decks" aria-label="Two decks">
  <ul class="decks__list">
    <li class="decks__item">
      <a class="decks__card decks__card--deep" href="#">
        <svg class="decks__sign" viewBox="0 0 80 80" aria-hidden="true" focusable="false">
          <path d="M28 25c-4-5 4-8 0-14M40 23c-4-6 4-9 0-16M52 25c-4-5 4-8 0-14" />
          <ellipse cx="40" cy="36" rx="26" ry="7" />
          <path d="M14 36v26c0 4 11.6 7 26 7s26-3 26-7V36" />
          <path d="M14 51c0 4 11.6 7 26 7s26-3 26-7M30 36c3-1.5 6-1.5 9 0s6 1.5 9 0" />
          <path class="decks__hatch" d="M20 41v9M26 42.5v9.5M32 43v10M38 43.5v10M44 43.5v10M50 43v10M56 42.5v9.5M62 41v9M20 56v9M26 58v9M32 59v9M38 59.5v9M44 59.5v9M50 59v9M56 58v9M62 56v9" />
        </svg>
        <span class="decks__label">Lower deck</span>
        <strong class="decks__title">Hot pools</strong>
        <span class="decks__line">Three stone pools, open to the sky in every season.</span>
        <span class="decks__more">Step in</span>
      </a>
    </li>
    <li class="decks__item">
      <a class="decks__card decks__card--bright" href="#">
        <svg class="decks__sign" viewBox="0 0 80 80" aria-hidden="true" focusable="false">
          <path d="M70 27c-2-3 2-5 0-9M40 23.5V20" />
          <circle cx="40" cy="26" r="2.5" />
          <path d="M22 47c0-11 8-17 18-17s18 6 18 17-8 19-18 19-18-8-18-19Z" />
          <path d="M27 34.5c4-3 22-3 26 0M57.5 43c6-1 9-5 10-11l4 1c0 9-5 17-13.5 20M22.5 41c-8-1-12 3-12 8s5 9 12.5 8M31 69h18" />
          <path class="decks__hatch" d="M27 50c1 6 5 11 11 12M31 46c1 6 4 10 9 11M36 43c1 4 3 7 6 8M49 60c3-2 5-5 5.5-9M51 54c1-2 1.5-4 1.5-6" />
        </svg>
        <span class="decks__label">Upper deck</span>
        <strong class="decks__title">Tea garden</strong>
        <span class="decks__line">A long table where you and the kettle take your time.</span>
        <span class="decks__more">Sit down</span>
      </a>
    </li>
  </ul>
</section>

<style>
  .decks {
    padding: calc(var(--section-space) / 2) var(--gutter);
  }
  .decks__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .decks__item {
    display: grid;
  }

  /* Card: one flat colour, text in the other. The border is the card's own colour until hover turns it into an outline. */
  .decks__card {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: clamp(21rem, 32vw, 29rem);
    padding: var(--space-xl) var(--space-l);
    overflow: hidden;
    border: var(--line-frame) solid transparent;
    border-radius: var(--radius-card);
    text-align: center;
    text-decoration: none;
    transition: border-color var(--time) var(--ease);
  }
  .decks__card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--grain);
    opacity: var(--grain-strength);
    mix-blend-mode: overlay;
  }
  .decks__card--deep {
    background-color: var(--teal);
    color: var(--sun);
  }
  .decks__card--bright {
    background-color: var(--sun);
    color: var(--teal);
  }
  .decks__card:hover,
  .decks__card:focus-visible {
    border-color: currentColor;
    outline: none;
  }

  /* Sign: a small engraving, thin outline with finer hatching. */
  .decks__sign {
    width: clamp(5rem, 7vw, 6.25rem);
    margin-bottom: var(--space-m);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .decks__hatch {
    stroke-width: 0.7;
  }

  .decks__label {
    font-size: var(--text-s);
    line-height: var(--leading-tight);
  }
  .decks__title {
    margin-top: var(--space-xs);
    font-family: var(--font-display);
    font-size: var(--display-m);
    font-weight: 400;
    line-height: var(--leading-tight);
  }
  .decks__line {
    max-width: 21em;
    margin-top: var(--space-s);
    font-family: var(--font-display);
    font-size: var(--text-m);
    line-height: var(--leading-tight);
    text-wrap: balance;
  }
  .decks__more {
    margin-top: var(--space-m);
    font-size: var(--text-xs);
    font-style: italic;
    text-decoration: underline var(--line-thin) transparent;
    text-underline-offset: 0.3em;
    transition: text-decoration-color var(--time) var(--ease);
  }
  .decks__card:hover .decks__more,
  .decks__card:focus-visible .decks__more {
    text-decoration-color: currentColor;
  }

  /* Phones: a rail that snaps card by card, the next one showing at the edge. */
  @media (max-width: 39.99rem) {
    .decks__list {
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-auto-columns: 84%;
      margin-inline: calc(var(--gutter) * -1);
      padding-inline: var(--gutter);
      overflow-x: auto;
      scroll-padding-inline: var(--gutter);
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
    }
    .decks__item {
      scroll-snap-align: start;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .decks__card,
    .decks__more {
      transition-duration: 0s;
    }
  }
</style>

Similar components

News cards

News cards

Card rail

Card rail

Three movements

Three movements

Work cards

Work cards

Feature cards

Feature cards

Stepped service cards

Stepped service cards

Project panes

Project panes

Feature cells

Feature cells