kitbash Sign in Connect agent
Components

Fitted headline sheet

A ruled sheet with a three-label meta row, a round black 300+ badge, a process chain, a lead with an orange button and a two-line caps title fitted edge to edge by script.

Part of the style

Machine Shop Grid

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --page: #000000;
  --ink: #f6f3ff;
  --ink-soft: rgba(245, 242, 255, 0.65);
  --paper: #000000;
  --on-dark: #000000;
  --rule-col: #060505;
  --grid-dark: rgba(0, 0, 0, 0.12);
  --hatch: #020101;
  --steel: #0e0b0c;
  --accent: #9039fe;
}
</style>

<section class="hero">
  <div class="hero__meta">
    <span class="hero__label">Precision instrument works</span>
    <span class="hero__label hero__label--mid">Abisko, Sweden</span>
    <span class="hero__label hero__label--end">Est. 1931</span>
  </div>

  <div class="hero__body">
    <p class="hero__badge"><strong class="hero__badge-number">300+</strong> Mounts<br>on the sky</p>
    <p class="hero__chain">
      <span>Optics &rarr; Mounts &rarr; Drives</span>
      <span class="hero__chain-soft">Built as one instrument</span>
    </p>
    <div class="hero__ask">
      <p class="hero__lead">We grind, mount and align telescopes for observatories that cannot lose a clear night. Glass, steel, drives and firmware, tested under a cold sky before anything ships.</p>
      <a class="hero__button" href="#">Start a commission <span class="hero__arrow" aria-hidden="true">&rarr;</span></a>
    </div>
  </div>

  <h1 class="hero__title" aria-label="Altaz Instruments">
    <span class="hero__line" aria-hidden="true">Altaz</span>
    <span class="hero__line" aria-hidden="true">Instruments</span>
  </h1>
</section>

<style>
  .hero {
    position: relative;
    padding: var(--space-l) var(--gutter);
    border-inline: var(--frame) solid var(--ink);
    background:
      repeating-linear-gradient(90deg,
        transparent 0 calc(var(--col-step) - var(--col-rule)),
        var(--rule-col) calc(var(--col-step) - var(--col-rule)) var(--col-step))
      calc(var(--col-offset) - var(--col-step) + var(--col-rule)) 0 / auto,
      var(--page);
    overflow: hidden;
  }
  .hero__meta,
  .hero__body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-l);
  }
  .hero__label {
    font: var(--weight-label) var(--text-label)/var(--lh-label) var(--font-display);
    text-transform: uppercase;
  }
  .hero__label--mid {
    justify-self: center;
  }
  .hero__label--end {
    justify-self: end;
  }
  .hero__body {
    margin-top: var(--space-l);
    align-items: start;
  }
  .hero__badge {
    display: grid;
    place-content: center;
    width: var(--badge);
    aspect-ratio: 1;
    margin: 0;
    border-radius: var(--radius-round);
    background: var(--ink);
    color: var(--on-dark);
    font-size: var(--text-body);
    line-height: var(--lh-body);
    font-weight: var(--weight-label);
    text-align: center;
  }
  .hero__badge-number {
    display: block;
    margin-bottom: 4px;
    font: var(--weight-mid) var(--badge-number)/1 var(--font-display);
    letter-spacing: -0.03em;
  }
  .hero__chain {
    display: grid;
    gap: var(--space-xs);
    margin: 0;
    font: var(--weight-label) var(--text-label)/var(--lh-label) var(--font-display);
    text-transform: uppercase;
  }
  .hero__chain-soft {
    color: var(--ink-soft);
  }
  .hero__lead {
    margin: 0 0 var(--space-l);
    font-size: var(--text-lead);
    line-height: var(--lh-lead);
    letter-spacing: 0;
  }
  .hero__button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    height: var(--cell-h);
    padding: 0 var(--cell-pad);
    background: var(--accent);
    color: var(--ink);
    font: var(--weight-label) var(--text-label)/var(--lh-label) var(--font-display);
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color var(--quick) var(--ease);
  }
  .hero__arrow {
    translate: -4px 0;
    transition: translate var(--quick) var(--ease);
  }
  .hero__button:hover,
  .hero__button:focus-visible {
    background: var(--paper);
  }
  .hero__button:hover .hero__arrow,
  .hero__button:focus-visible .hero__arrow {
    translate: 0 0;
  }

  /* The title is sized by the script so its widest line meets both edges; the clamp is the size before it runs. */
  .hero__title {
    margin: var(--space-l) 0 0;
    font-family: var(--font-display);
    font-size: clamp(56px, 15vw, 240px);
    font-weight: var(--weight-mid);
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
  }
  .hero__line {
    display: block;
    width: max-content;
  }

  @media (max-width: 56rem) {
    .hero {
      display: flex;
      flex-direction: column;
    }
    .hero__meta {
      grid-template-columns: 1fr auto;
    }
    .hero__label--mid {
      justify-self: end;
    }
    .hero__label--end {
      display: none;
    }
    .hero__title {
      order: 1;
    }
    .hero__body {
      order: 2;
      grid-template-columns: 1fr;
    }
    .hero__badge {
      order: 3;
      width: 140px;
    }
    .hero__chain {
      order: 2;
    }
  }
</style>

<script>
(() => {
  function fit(title) {
    const lines = [...title.querySelectorAll('.hero__line')];
    title.style.fontSize = '100px';
    const widest = Math.max(...lines.map((line) => line.getBoundingClientRect().width));
    const room = title.clientWidth;
    title.style.fontSize = `${Math.floor((room / widest) * 100 * 10) / 10}px`;
  }

  document.querySelectorAll('.hero__title').forEach((title) => {
    const refit = () => fit(title);
    new ResizeObserver(refit).observe(title);
    document.fonts.ready.then(refit);
  });
})();
</script>

Similar components

Backlit silhouette

Backlit silhouette

Hero

Hero

Halftone globe hero

Halftone globe hero

Opening line

Opening line

Swinging badge hero

Swinging badge hero

Typing hero with window

Typing hero with window

Slot machine gate

Slot machine gate

Mark and standfirst

Mark and standfirst