.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  /* Same gutters as the results below, so the field lines up with the grid on a wide screen. */
  padding: var(--space-3) max(var(--space-5), calc((100% - var(--content-width)) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-2);
  background: var(--accent-bg);
  color: var(--accent);
}

/* Nothing searched yet: the field gets the room and the bar is no longer sticky. */
/* Two washes of colour instead of an image; at 9% they leave every contrast ratio untouched. */
.site-header--hero {
  position: static;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5) var(--space-7);
  background:
    radial-gradient(46% 70% at 14% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 64%),
    radial-gradient(42% 62% at 88% 4%, color-mix(in srgb, var(--fresh) 9%, transparent), transparent 64%);
  backdrop-filter: none;
  border-bottom: 0;
}

.hero__intro {
  max-width: 44ch;
  margin: var(--space-3) auto 0;
  text-align: center;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: var(--text-lg);
  text-wrap: pretty;
}

.site-header--hero .search-bar {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.site-header--hero .search__control {
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-2);
}

.site-header--hero .search__input {
  font-size: var(--text-lg);
}

/* On a phone: brand centred, the way back reduced to a 44px arrow pinned left.
   No `position: relative` here, it would drop the bar's stickiness. */
@media (max-width: 767px) {
  .site-header {
    justify-content: center;
  }

  .site-header--hero {
    justify-content: flex-start;
  }
}
