.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nav-wrap.is-scrolled {
  background: rgba(243, 245, 239, .96);
  border-bottom-color: rgba(182, 198, 179, .9);
  box-shadow: 0 10px 28px rgba(24, 33, 30, .08);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
  width: 48px;
  height: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(24, 33, 30, .16);
  border-radius: 50%;
  background: rgba(24, 33, 30, .94);
  color: #b8f36a;
  box-shadow: 0 12px 28px rgba(24, 33, 30, .18);
  font: 20px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .2s ease;
}

.back-to-top span {
  color: #d8e5d2;
  font: 700 8px/1 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #26352f;
  outline: 3px solid rgba(184, 243, 106, .28);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
