/* Header, hero, call to action, footer. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-6) var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6875rem;
}

.site-nav,
.eyebrow,
.button,
.site-footer {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/*
 * Deliberately not a flex container: an anonymous flex item would form around
 * the "Cap" text node and any gap would then split the wordmark in two.
 */
.brand__word {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.4375rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

/*
 * Brackets are stretched vertically so they overshoot the cap height the way
 * set matrix delimiters do, rather than sitting flush like ordinary glyphs.
 */
.brand__word::before,
.brand__word::after {
  display: inline-block;
  transform: scaleY(1.32);
  color: var(--color-accent);
  transition: transform var(--transition);
}

.brand__word::before {
  content: "[";
  margin-right: 0.2em;
}

.brand__word::after {
  content: "]";
  margin-left: 0.2em;
}

.brand__word-lead {
  color: var(--color-text);
}

.brand:hover .brand__word,
.brand:focus-visible .brand__word {
  color: var(--color-text);
}

/* Brackets ease outwards on hover, as though the contents were expanding. */
.brand:hover .brand__word::before,
.brand:focus-visible .brand__word::before {
  transform: scaleY(1.32) translateX(-0.09em);
}

.brand:hover .brand__word::after,
.brand:focus-visible .brand__word::after {
  transform: scaleY(1.32) translateX(0.09em);
}

.site-nav {
  display: flex;
  gap: var(--space-8);
  font-size: var(--step-micro);
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

.site-nav a {
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-text);
}

/*
 * Children stretch rather than sizing to content, so the ch-based measures
 * below stay bounded by the viewport on narrow screens. The button opts out
 * via align-self so the pill keeps its intrinsic width.
 */
/*
 * min-height keeps the hero reading as a full first screen now that the contact
 * section sits below it; flex alone would collapse it to content height once the
 * document outgrows the viewport.
 */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
  min-height: 74svh;
  max-width: 62rem;
  padding: var(--space-16) var(--gutter);
}

.eyebrow {
  margin: 0;
  font-size: var(--step-micro);
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

/*
 * `balance` rather than a ch-based max-width: the headline has to wrap evenly
 * across whichever system font the visitor's OS supplies, and those differ
 * enough in width to strand the last word if the measure is hard-coded.
 */
.hero__title {
  font-size: var(--step-hero);
  max-width: 20ch;
  text-wrap: balance;
}

/* Terminal cursor, echoing the reference site's headline treatment. */
.caret {
  display: inline-block;
  width: 0.055em;
  height: 0.82em;
  margin-left: 0.12em;
  vertical-align: baseline;
  background: var(--color-accent);
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero__lede {
  margin: 0;
  max-width: 58ch;
  font-size: var(--step-lede);
  color: var(--color-text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: var(--space-2);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--step-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  transition: transform var(--transition), filter var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--gutter);
  border-top: 1px solid var(--color-rule);
  font-size: var(--step-micro);
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.site-footer__mail {
  transition: color var(--transition);
}

.site-footer__mail:hover {
  color: var(--color-text);
}

@media (max-width: 40rem) {
  .site-nav {
    gap: var(--space-4);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* The short lockup leaves room for the nav even at 320px. */
@media (max-width: 22.5rem) {
  .site-nav {
    display: none;
  }
}
