#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 1.5rem 0;
  pointer-events: none;
}

.nav-shell {
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-inline: auto;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(25, 53, 45, 0.13);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow:
    0 16px 45px rgba(25, 53, 45, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

.nav-brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  min-width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--navy);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(25, 53, 45, 0.18);
  transform: rotate(-3deg);
  transition:
    transform 170ms ease,
    background-color 170ms ease;
}

.nav-brand:hover .brand-mark {
  background: var(--coral);
  color: var(--ink);
  transform: rotate(3deg) translateY(-2px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 13px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 820;
  text-decoration: none;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.nav-link:hover {
  background: rgba(168, 213, 189, 0.25);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-link.active {
  background: var(--navy);
  color: var(--paper);
  box-shadow: 0 7px 18px rgba(25, 53, 45, 0.15);
}

.nav-link.active::after {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
  transform: translateX(-50%);
}

.nav-contact {
  display: inline-flex;
  min-height: 44px;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: var(--coral);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(201, 99, 79, 0.17);
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.nav-contact:hover {
  background: #f39a83;
  box-shadow: 0 12px 24px rgba(201, 99, 79, 0.24);
  transform: translateY(-2px);
}

.nav-contact span {
  font-size: 0.95rem;
  transition: transform 150ms ease;
}

.nav-contact:hover span {
  transform: translate(2px, -2px);
}

@media (max-width: 850px) {
  #site-header {
    padding-inline: 0.75rem;
  }

  .nav-shell {
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
  }

  .brand-copy small {
    display: none;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 0.25rem;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .nav-contact {
    justify-self: end;
  }
}

@media (max-width: 520px) {
  #site-header {
    padding-top: 0.65rem;
  }

  .nav-shell {
    padding: 0.55rem;
    border-radius: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand-copy strong {
    font-size: 0.8rem;
  }

  .nav-contact {
    min-height: 40px;
    padding-inline: 0.8rem;
  }

  .nav-link {
    min-height: 39px;
    padding: 0.52rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .nav-link,
  .nav-contact,
  .nav-contact span {
    transition: none;
  }
}
