/* Mobile nav: the hamburger button in the header, and the panel that
   slides in from the right over a dimming scrim when it's tapped.
   Hidden entirely above 760px, where the header's own .main-nav
   (see components/header/) is shown instead. */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-ink);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
}

/* The drawer sits directly under <body>, not inside <header>, because the
   header's backdrop-filter would otherwise create a containing block that
   clips this fixed-position drawer to the header's own height. */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  pointer-events: none;
}

.site-header.nav-open ~ .mobile-nav-drawer {
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.site-header.nav-open ~ .mobile-nav-drawer .mobile-nav-scrim {
  opacity: 1;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 340px;
  background: var(--color-panel);
  display: flex;
  flex-direction: column;
  padding: 26px 26px 32px;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.site-header.nav-open ~ .mobile-nav-drawer .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.mobile-nav-panel-title {
  font-family: var(--font-logo);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-panel-ink-soft);
}

.mobile-nav-close {
  display: flex;
  background: none;
  border: none;
  padding: 6px;
  margin: -6px;
  color: var(--color-panel-ink);
  cursor: pointer;
}

.mobile-nav-close svg {
  width: 22px;
  height: 22px;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--color-line-dark);
}

.mobile-nav-list li:first-child {
  border-top: 1px solid var(--color-line-dark);
}

.mobile-nav-list a {
  display: block;
  padding: 18px 2px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--color-panel-ink);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  color: var(--color-accent-bright);
  padding-left: 10px;
}

.mobile-nav-panel-foot {
  margin-top: auto;
  padding-top: 28px;
}
