/* Homepage drawer — premium animated menu */

.backdrop {
  transition: opacity 0.45s ease, visibility 0.45s ease, backdrop-filter 0.45s ease;
}

.backdrop.open {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(8, 10, 14, 0.52);
}

.drawerItems {
  background:
    radial-gradient(ellipse 90% 55% at 100% 0%, rgba(151, 140, 33, 0.14), transparent 58%),
    radial-gradient(ellipse 70% 45% at 0% 100%, rgba(45, 122, 122, 0.1), transparent 55%),
    linear-gradient(168deg, #1b1f28 0%, #14171d 48%, #0f1116 100%);
  box-shadow: -28px 0 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawerItems::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(151, 140, 33, 0.15) 18%,
    var(--primary-color) 50%,
    rgba(151, 140, 33, 0.15) 82%,
    transparent 100%
  );
  transform: scaleY(0);
  transform-origin: top;
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.drawerItems.open::before {
  transform: scaleY(1);
  opacity: 1;
}

.drawerItems::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(151, 140, 33, 0.12), transparent 68%);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.8s ease 0.15s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.drawerItems.open::after {
  opacity: 1;
  transform: scale(1);
}

.menu_close_icon {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateX(24px);
}

.drawerItems.open.drawer-animate .menu_close_icon {
  animation: drawerCloseIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.menu_close_icon svg {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu_close_icon:hover svg {
  transform: rotate(90deg) scale(1.08);
}

.menu_close_icon:hover span {
  letter-spacing: 0.2em;
  transition: letter-spacing 0.35s ease, color 0.3s ease;
}

.drawerItemsContent {
  position: relative;
  z-index: 1;
}

.menu_parents_links {
  perspective: 900px;
}

.menu_parents_links > .parent_link,
.menu_parents_links > .menu-group {
  opacity: 0;
  transform: translate3d(48px, 22px, 0);
  filter: blur(8px);
}

.drawerItems.open.drawer-animate .menu_parents_links > .parent_link,
.drawerItems.open.drawer-animate .menu_parents_links > .menu-group {
  animation: drawerLinkIn 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(1)  { animation-delay: 0.12s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(2)  { animation-delay: 0.19s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(3)  { animation-delay: 0.26s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(4)  { animation-delay: 0.33s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(5)  { animation-delay: 0.4s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(6)  { animation-delay: 0.47s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(7)  { animation-delay: 0.54s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(8)  { animation-delay: 0.61s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(9)  { animation-delay: 0.68s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(10) { animation-delay: 0.75s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(11) { animation-delay: 0.82s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(12) { animation-delay: 0.89s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(13) { animation-delay: 0.96s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(14) { animation-delay: 1.03s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(15) { animation-delay: 1.1s; }
.drawerItems.open.drawer-animate .menu_parents_links > *:nth-child(16) { animation-delay: 1.17s; }

@keyframes drawerLinkIn {
  0% {
    opacity: 0;
    transform: translate3d(52px, 24px, 0) rotateX(10deg);
    filter: blur(10px);
  }
  62% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg);
    filter: blur(0);
  }
}

@keyframes drawerCloseIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu_parents_links .parent_link,
.menu-group__toggle {
  position: relative;
  overflow: hidden;
  transition:
    color 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding-left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.35s ease;
}

.menu_parents_links .parent_link::after,
.menu-group__toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), rgba(151, 140, 33, 0.12));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu_parents_links .parent_link:hover,
.menu-group__toggle:hover {
  color: var(--primary-color);
  transform: translateX(12px);
  padding-left: 12px;
  text-shadow: 0 0 28px rgba(151, 140, 33, 0.22);
}

.menu_parents_links .parent_link:hover::after,
.menu-group__toggle:hover::after {
  width: 100%;
}

.menu-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.menu-group__toggle.parent_link {
  font-family: inherit;
  font-size: 1.7rem;
  font-weight: 300;
  color: #fff;
  padding: 0.85rem 0;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
  -webkit-appearance: none;
  appearance: none;
}

.drawerItems.open .menu-group .menu-group__toggle.parent_link {
  animation: none !important;
  opacity: 1;
  transform: none;
  filter: none;
}

.menu-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-group__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.menu-group.is-open .menu-group__chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--primary-color);
}

.menu-group__sub {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 0;
  overflow: hidden;
  padding: 0 0 0 0.15rem;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s ease;
}

.menu-group.is-open .menu-group__sub {
  max-height: min(72vh, 680px);
  padding: 0.35rem 0 0.85rem 0.15rem;
}

.menu-subgroup {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-subgroup__head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 2.75rem;
}

.menu-subgroup__toggle {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-right: 0.15rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    color 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-subgroup__toggle:hover {
  border-color: rgba(151, 140, 33, 0.55);
  background: rgba(151, 140, 33, 0.12);
  color: var(--primary-color);
}

.menu-subgroup__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-subgroup.is-open .menu-subgroup__chevron {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.menu-subgroup__sub {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  max-height: 0;
  overflow: hidden;
  margin: 0 0 0.25rem 1.45rem;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(151, 140, 33, 0.22);
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), margin 0.35s ease;
}

.menu-subgroup.is-open .menu-subgroup__sub {
  max-height: 420px;
  margin-bottom: 0.45rem;
  padding-top: 0.2rem;
  padding-bottom: 0.15rem;
}

.child_link {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.28rem;
  font-weight: 300;
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  margin-left: 0.35rem;
  opacity: 0;
  transform: translate3d(24px, 8px, 0);
  transition:
    color 0.35s ease,
    padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.child_link--parent {
  flex: 1;
  min-width: 0;
  margin-left: 0.35rem;
  margin-bottom: 0;
}

.menu-subgroup--flat .child_link--parent {
  margin-bottom: 0.1rem;
}

.grandchild_link {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.35;
  padding: 0.42rem 0.5rem 0.42rem 0;
  opacity: 0;
  transform: translate3d(18px, 6px, 0);
  transition:
    color 0.3s ease,
    padding-left 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.grandchild_link.grandchild-link--in {
  animation: grandchildLinkIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes grandchildLinkIn {
  from {
    opacity: 0;
    transform: translate3d(22px, 8px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

.grandchild_link:hover {
  color: var(--primary-color);
  padding-left: 0.35rem;
  transform: translateX(4px);
}

.child_link.child-link--in {
  animation: childLinkIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes childLinkIn {
  from {
    opacity: 0;
    transform: translate3d(28px, 10px, 0);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

.child_link:hover {
  color: var(--primary-color);
  padding-left: 1.45rem;
  border-color: rgba(151, 140, 33, 0.55);
  transform: translateX(6px);
}

.child_link--muted {
  opacity: 0.45;
  cursor: default;
}

.menu-group.is-open .child_link--muted {
  opacity: 0.45;
}

.menu-group.is-open .child_link--muted.child-link--in {
  animation: childLinkIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawerItems .navbar-social {
  opacity: 0;
  transform: translateY(28px);
}

.drawerItems.open.drawer-animate .navbar-social {
  animation: drawerSocialIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.48s forwards;
}

@keyframes drawerSocialIn {
  from {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.drawerItems .social-title {
  position: relative;
  display: inline-block;
}

.drawerItems .social-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 36px;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.65s;
}

.drawerItems.open.drawer-animate .social-title::after {
  transform: scaleX(1);
}

.drawerItems .social_icons {
  opacity: 0;
  transform: translateY(16px) scale(0.88);
}

.drawerItems.open.drawer-animate .social_icons {
  animation: drawerIconPop 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.drawerItems.open.drawer-animate .social_icons:nth-child(1) { animation-delay: 0.62s; }
.drawerItems.open.drawer-animate .social_icons:nth-child(2) { animation-delay: 0.7s; }
.drawerItems.open.drawer-animate .social_icons:nth-child(3) { animation-delay: 0.78s; }
.drawerItems.open.drawer-animate .social_icons:nth-child(4) { animation-delay: 0.86s; }

@keyframes drawerIconPop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.82);
  }
  70% {
    transform: translateY(-3px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.drawerItems .social_icons:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 10px 24px rgba(151, 140, 33, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .backdrop.open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .drawerItems.open.drawer-animate .menu_parents_links > *,
  .drawerItems.open.drawer-animate .menu_close_icon,
  .drawerItems.open.drawer-animate .navbar-social,
  .drawerItems.open.drawer-animate .social_icons,
  .child_link.child-link--in,
  .grandchild_link.grandchild-link--in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .menu_parents_links > .parent_link,
  .menu_parents_links > .menu-group {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .child_link,
  .grandchild_link {
    opacity: 1;
    transform: none;
  }

  .menu-group.is-open .child_link--muted {
    opacity: 0.45;
  }
}
