/* ==========================================================================
   Site header — fixed, translucent. Used on pages with a full-bleed hero
   directly underneath (the homepage).
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  background-color: rgb(250 249 247 / 0.82);
  /* Only worth the cost while the hero photo is behind it. A backdrop-filter on
     a fixed element forces the compositor to re-blur every scroll frame, so it
     is switched off below the hero -- which is where most scrolling happens. */
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Toggled by script.js once the hero is scrolled past */
.site-header.is-scrolled {
  background-color: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  text-decoration: none;
  color: var(--ink);
}

.logo-text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--step-0);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background-color: var(--accent-tint);
}

@media (max-width: 560px) {
  .logo-text {
    font-size: 1rem;
  }

  .site-nav a {
    padding: 0.5rem 0.6rem;
    font-size: var(--step--1);
  }
}
