.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg, rgba(247, 241, 233, 0.76));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--header-line, rgba(24, 21, 19, 0.06));
}

.site-header .shell {
  width: min(calc(100% - 28px), calc(var(--header-max, 1220px) + 2 * var(--pad)));
  margin: 0 auto;
}

.site-header__row {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: inline-flex;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--header-brand-line, rgba(24, 21, 19, 0.1));
  background: var(--header-brand-bg, rgba(255, 250, 244, 0.92));
  box-shadow: var(--header-brand-shadow, 0 10px 24px rgba(24, 21, 19, 0.08));
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand__name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.brand__role {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 18px;
}

.nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 140ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

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

.nav a.is-active,
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav a.is-active::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 1;
}

@media (max-width: 760px) {
  .site-header__row {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .nav {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, max-content);
    justify-content: flex-start;
    gap: 12px 16px;
  }
}

@media (max-width: 560px) {
  .brand__role {
    max-width: 100%;
    white-space: normal;
  }

  .nav {
    grid-template-columns: repeat(2, max-content);
  }
}
