/* UPTURNLAB mobile drawer */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  background: #00112c; /* добавить */
}

.mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #00112c;
  opacity: 0;
  /* Убираем задержку — backdrop появляется мгновенно */
  transition: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.mobile-menu.is-open .mobile-menu__backdrop {
  opacity: 1;
}

.mobile-menu.is-open .mobile-menu__backdrop {
  opacity: 1;
}

.mobile-menu__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(78vw, 340px);
  /* height: 100% заменяем на fixed top/bottom чтобы не было зазора */
  padding: 20px 22px 26px;
  display: flex;
  flex-direction: column;
  background: #2450cd;
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  /* Убираем субпиксельный зазор */
  -webkit-transform: translateX(100%);
  will-change: transform;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
  -webkit-transform: translateX(0);
}

@media (max-width: 1024px) {
  .mobile-menu__top {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
  }

  .mobile-menu__socials {
    display: flex;
    gap: 10px;
  }

  .mobile-menu__socials a {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }

  .mobile-menu__phone {
    align-self: flex-start;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.12em;
    font-style: italic;
  }

  .mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .mobile-menu__nav a,
  .mobile-menu__nav a:visited,
  .mobile-menu__nav a:hover,
  .mobile-menu__nav a:focus,
  .mobile-menu__nav a:active {
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    line-height: normal;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .mobile-menu__nav a.mobile-menu__muted,
  .mobile-menu__nav a.mobile-menu__muted:visited,
  .mobile-menu__nav a.mobile-menu__muted:hover,
  .mobile-menu__nav a.mobile-menu__muted:focus,
  .mobile-menu__nav a.mobile-menu__muted:active {
    color: rgba(255, 255, 255, 0.65);
  }

  .mobile-menu__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .mobile-menu__lang,
  .mobile-lang__toggle {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
  }

  .mobile-lang {
    position: relative;
  }

  .mobile-lang__dropdown {
    position: absolute;
    left: 0;
    bottom: calc(100% + 14px);
    z-index: 20;
    display: grid;
    gap: 8px;
    min-width: 126px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(63, 104, 232, 0.92);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  }

  .mobile-lang.is-open .mobile-lang__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-lang__dropdown a,
  .mobile-lang__dropdown a:visited,
  .mobile-lang__dropdown a:hover,
  .mobile-lang__dropdown a:focus,
  .mobile-lang__dropdown a:active {
    display: block;
    padding: 10px 16px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .mobile-lang__dropdown a.is-active {
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-menu__close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }
}

@media (max-width: 430px) {
  .mobile-menu__panel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu__socials a {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .mobile-menu__phone {
    min-height: 34px;
    font-size: 12px;
  }

  .mobile-menu__nav a,
  .mobile-menu__nav a:visited,
  .mobile-menu__nav a:hover,
  .mobile-menu__nav a:focus,
  .mobile-menu__nav a:active {
    font-size: 20px;
    line-height: 1.04;
  }
}