/* Burger header */
body.header-menu-open {
  overflow-x: hidden;
  overflow-x: clip;
}

.site-header {
  --header-height: 78px;
  z-index: 200;
  isolation: isolate;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 34px rgba(7, 22, 47, 0.07);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.header-inner {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
}

.site-header .brand {
  min-width: 0;
}

.site-header .brand__mark {
  width: 40px;
  height: 42px;
  border-radius: 10px;
}

.header-actions {
  gap: 10px;
}

.header-socials {
  gap: 7px;
}

.site-header .social-link {
  width: 42px;
  height: 42px;
  border-color: #dfe7f2;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(17, 49, 99, 0.07);
}

.site-header .button--header {
  display: inline-flex;
  min-height: 46px;
  gap: 10px;
  padding: 0 18px;
  border-radius: 14px;
  background: #0758f8;
  box-shadow: 0 12px 26px rgba(7, 88, 248, 0.2);
  font-size: 12px;
}

.button--header__short {
  display: none;
}

.site-header .button--header svg {
  width: 17px;
  height: 17px;
  transition: transform 180ms ease;
}

.menu-toggle {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  color: #07162f;
  background: #f3f7fd;
  box-shadow:
    0 8px 20px rgba(17, 49, 99, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition:
    color 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.menu-toggle__lines {
  position: relative;
  display: flex;
  width: 19px;
  height: 16px;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle__lines i {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-toggle__lines i:nth-child(2) {
  width: 13px;
  align-self: flex-end;
}

.menu-toggle[aria-expanded="true"] {
  border-color: #0758f8;
  color: #fff;
  background: #0758f8;
  box-shadow: 0 14px 28px rgba(7, 88, 248, 0.24);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines i:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines i:nth-child(2) {
  opacity: 0;
  transform: translateX(8px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines i:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.header-menu {
  --header-height: 78px;
  position: fixed;
  z-index: 190;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 300ms ease;
}

.header-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.header-menu__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(4, 12, 25, 0.34);
  cursor: default;
  opacity: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 300ms ease;
}

.header-menu.is-open .header-menu__backdrop {
  opacity: 1;
}

.header-menu__panel {
  position: absolute;
  top: 12px;
  right: max(16px, calc((100vw - var(--container)) / 2));
  width: min(500px, calc(100% - 32px));
  max-height: calc(100svh - var(--header-height) - 24px);
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(210, 221, 237, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(5, 20, 45, 0.22);
  opacity: 0;
  transform: translateY(-16px) scale(0.975);
  transform-origin: top right;
  transition:
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.header-menu__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.header-menu.is-open .header-menu__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.header-menu .main-nav {
  position: static;
  display: grid;
  width: 100%;
  padding: 0;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

.header-menu .main-nav a {
  position: relative;
  display: grid;
  min-height: 62px;
  padding: 0 14px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  border-radius: 16px;
  color: #0a1830;
  background: transparent;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.header-menu .main-nav a + a::before {
  position: absolute;
  top: -3px;
  right: 14px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 157, 183, 0.22) 12%, rgba(139, 157, 183, 0.22) 88%, transparent 100%);
  content: "";
  pointer-events: none;
}

.header-menu .main-nav a::after {
  display: none;
}

.header-menu .main-nav span {
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 700;
  letter-spacing: 0;
}

.header-menu__footer {
  display: grid;
  margin-top: 16px;
}

.header-menu__socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.header-menu__social {
  position: relative;
  display: grid;
  min-height: 62px;
  padding: 7px 10px 7px 7px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: filter 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.header-menu__social--telegram {
  background: linear-gradient(110deg, #168bc9 0%, #2aabee 54%, #137fbd 100%);
  box-shadow:
    0 12px 24px rgba(29, 147, 210, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.header-menu__social--max {
  background: linear-gradient(110deg, #4b62f2 0%, #7135ee 56%, #9b33d9 100%);
  box-shadow:
    0 12px 24px rgba(91, 51, 230, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.header-menu__social-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-menu__social-icon img {
  display: block;
  width: 27px;
  height: 27px;
}

@media (hover: hover) {
  .menu-toggle:hover {
    border-color: rgba(7, 88, 248, 0.28);
    color: #0758f8;
    background: #eaf2ff;
    transform: translateY(-1px);
  }

  .menu-toggle[aria-expanded="true"]:hover {
    color: #fff;
    background: #1768ff;
  }

  .site-header .button--header:hover svg {
    transform: translateX(3px);
  }

  .header-menu .main-nav a:hover {
    color: #0758f8;
    background: #f0f5ff;
    transform: translateX(3px);
  }

  .header-menu__social:hover {
    transform: translateY(-2px);
    filter: brightness(1.06) saturate(1.04);
  }

}

@media (max-width: 760px) {
  .site-header {
    --header-height: 70px;
  }

  .header-menu {
    --header-height: 70px;
  }

  .header-inner {
    min-height: var(--header-height);
    gap: 12px;
  }

  .site-header .brand__mark {
    width: 36px;
    height: 38px;
  }

  .site-header .brand__copy strong {
    font-size: 17px;
  }

  .site-header .brand__copy small {
    margin-top: 5px;
    font-size: 8px;
  }

  .header-actions {
    gap: 7px;
  }

  .site-header .social-link {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .site-header .social-link img {
    width: 23px;
    height: 23px;
  }

  .site-header .button--header {
    min-height: 40px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 11px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .header-menu__panel {
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100svh - var(--header-height));
    padding: 18px;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    transform-origin: top center;
  }

  .header-menu .main-nav a {
    min-height: 57px;
    border-radius: 14px;
  }

  .header-menu .main-nav span {
    font-size: 22px;
  }

  .header-menu__social {
    min-height: 54px;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .header-menu__social-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .header-menu__social-icon img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    width: calc(100% - 20px);
    gap: 8px;
  }

  .site-header .brand {
    gap: 8px;
  }

  .header-socials {
    gap: 4px;
  }

  .site-header .social-link {
    width: 34px;
    height: 34px;
  }

  .site-header .button--header {
    min-height: 38px;
    padding: 0 11px;
  }

  .site-header .button--header svg,
  .button--header__full {
    display: none;
  }

  .button--header__short {
    display: inline;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 380px) {
  .site-header .brand__copy {
    display: none;
  }
}

