.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

/* No focus ring after a tap; keyboard focus (:focus-visible) still shows it */
.hamburger:focus:not(:focus-visible),
.mobile-nav__close:focus:not(:focus-visible) {
  outline: none;
}

.hamburger img,
.mobile-nav__close img {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: light) {
  .hamburger img,
  .mobile-nav__close img {
    filter: brightness(0);
  }
}

/* Mobile overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 0 24px 40px;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.4s;
  overflow: hidden;
}

.mobile-nav.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Lock page scroll behind the open menu */
body.nav-open {
  overflow: hidden;
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  flex-shrink: 0;
}

.mobile-nav__logo img {
  height: 24px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: light) {
  .mobile-nav__logo img {
    filter: brightness(0);
  }
}

.mobile-nav__close {
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  margin-right: -4px; /* line the icon up with the hamburger's */
}

.mobile-nav__links {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.mobile-nav__links a {
  font-size: clamp(48px, 12vw, 72px);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.15;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.mobile-nav__links a:hover,
.mobile-nav__links a.active {
  opacity: 1;
}

.mobile-nav__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  border-top: 1px solid var(--color-divider-light);
  padding-top: 24px;
}

.mobile-nav__email {
  display: inline-block;
  padding: 14px 0; /* 44px+ tap area around 17px of text */
  margin: -14px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  /* Hide the regular nav links on mobile */
  .nav__left,
  .nav__right {
    display: none;
  }

  /* Show logo left, hamburger right */
  .nav {
    justify-content: space-between;
  }

  .nav__center {
    position: static;
    transform: none;
  }
}

/* Language switch in the mobile menu: 44 × 44 tap areas around the small EN / SV letters.
   Negative margins keep the visual size; the wider gap stops the two areas overlapping. */
.mobile-nav__footer .lang-switch {
  gap: 10px;
}

.mobile-nav__footer .lang-switch a,
.mobile-nav__footer .lang-switch__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -13px -12px;
}
