kitbash Sign in Connect agent
Components

Capitals over a portrait

A grayscale portrait matted in black on the left, with orange condensed capital lines laid across it and the putty page; the middle line blinks through phrases.

Part of the style

Orange Caps on Putty

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #030101;
  --putty: #dfe4e8;
  --sheet: #ffffff;
  --ink-soft: #646a6e;
  --mat-soft: #524a4a;
  --on-ink: #ffffff;
  --flare: #df531e;
  --screen-rust: #753c29;
  --screen-green: #df531e;
}
</style>

<section class="hero">
  <figure class="hero__mat">
    <img class="hero__photo" src="assets/hero-bust.jpg" alt="A bronze bust in profile, turned to the right, in hard studio light" width="958" height="1200" />
  </figure>
  <h1 class="hero__caps">
    <span class="hero__line">Ostler, design &amp; build</span>
    <span class="hero__line hero__cycle" aria-live="off">
      <span class="hero__phrase is-current">Websites for small brands</span>
      <span class="hero__phrase">Identity, type &amp; print</span>
      <span class="hero__phrase">Motion, sound &amp; film</span>
    </span>
    <span class="hero__line hero__line--last">Port Calder, on the coast</span>
  </h1>
  <p class="hero__caption">Studio of two. Est. 2016</p>
</section>

<style>
  .hero {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    padding: var(--edge);
  }
  .hero__mat {
    margin: 0;
    height: clamp(460px, 50vw, 760px);
    background: var(--ink);
    overflow: hidden;
  }
  .hero__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    filter: grayscale(1) contrast(1.25) brightness(0.95);
  }
  .hero__caps {
    position: absolute;
    left: var(--edge);
    right: var(--edge);
    top: 50%;
    translate: 0 -50%;
    margin: 0;
    display: grid;
    justify-items: center;
    color: var(--flare);
    font-family: var(--font-display);
    font-size: var(--display-s);
    font-weight: 700;
    line-height: var(--display-leading);
    letter-spacing: -0.005em;
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
  }
  .hero__line {
    display: block;
  }
  .hero__line--last {
    margin-top: 0.9em;
  }
  .hero__cycle {
    display: grid;
  }
  .hero__phrase {
    grid-area: 1 / 1;
    visibility: hidden;
  }
  .hero__phrase.is-current {
    visibility: visible;
  }
  .hero__cycle.is-blank .hero__phrase {
    visibility: hidden;
  }
  .hero__caption {
    position: absolute;
    right: var(--edge);
    bottom: var(--edge);
    margin: 0;
    padding: 0 var(--edge) var(--edge) 0;
    font-size: var(--text-m);
    font-weight: 500;
    text-transform: uppercase;
  }

  @media (max-width: 40rem) {
    .hero {
      grid-template-columns: 1fr;
    }
    .hero__mat {
      height: clamp(440px, 125vw, 620px);
    }
    .hero__caps {
      top: auto;
      bottom: calc(var(--edge) * 4);
      translate: none;
      font-size: clamp(28px, 8.6vw, 44px);
      line-height: 0.92;
    }
    .hero__caption {
      position: static;
      padding: 0;
    }
  }
</style>

<script>
(() => {
  const still = window.matchMedia('(prefers-reduced-motion: reduce)');
  for (const root of document.querySelectorAll('.hero')) {
    const cycle = root.querySelector('.hero__cycle');
    const phrases = [...root.querySelectorAll('.hero__phrase')];
    if (!cycle || phrases.length < 2) continue;
    let index = 0;
    let timer = 0;
    let visible = false;
    const step = () => {
      cycle.classList.add('is-blank');
      window.setTimeout(() => {
        phrases[index].classList.remove('is-current');
        index = (index + 1) % phrases.length;
        phrases[index].classList.add('is-current');
        cycle.classList.remove('is-blank');
      }, 160);
    };
    const run = () => {
      window.clearInterval(timer);
      timer = 0;
      if (visible && !still.matches) timer = window.setInterval(step, 2200);
    };
    new IntersectionObserver((entries) => {
      visible = entries[0].isIntersecting;
      run();
    }).observe(root);
    still.addEventListener('change', run);
  }
})();
</script>

Similar components

Dot-mosaic hero

Dot-mosaic hero

Split opening

Split opening

Hello column

Hello column

Film reel

Film reel

Turning orb

Turning orb

Sticker headline hero

Sticker headline hero

Ruled hero

Ruled hero

Swapping chip wordmark

Swapping chip wordmark