.motion-menu {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
}

.motion-menu-phone {
  width: min(100%, 390px);
  height: 640px;
  margin-inline: auto;
}

.motion-menu-card { height: 560px; }

.motion-menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 69px;
  padding: var(--space-3) var(--space-4);
}

.motion-menu-bar img { width: 75px; height: auto; }

.motion-menu-btn,
.motion-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.motion-menu-bars,
.motion-menu-bars::before,
.motion-menu-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.motion-menu-bars { position: relative; }

.motion-menu-bars::before,
.motion-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.motion-menu-bars::before { top: -7px; }
.motion-menu-bars::after { top: 7px; }

.motion-menu-panel {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(231deg, #ff5733 2.74%, #d5006d 68.32%);
  color: #fff;
  visibility: hidden;
  opacity: 1;
  transform: translateY(-100%);
  transform-origin: top center;
  pointer-events: none;
}

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

.motion-menu-phone .motion-menu-panel {
  inset: 0;
  padding:
    calc(var(--space-8) + env(safe-area-inset-top, 0px))
    var(--space-10)
    var(--space-8);
}

.motion-menu-card .motion-menu-panel {
  top: var(--space-4);
  right: var(--space-4);
  width: min(420px, calc(100% - var(--space-8)));
  max-height: calc(100% - var(--space-8));
  padding: var(--space-8) var(--space-10);
  border-radius: 24px;
}

.motion-menu-head,
.motion-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.motion-menu-logo {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.motion-menu-logo img { width: 75px; height: auto; }

.motion-menu-x {
  position: relative;
  width: 24px;
  height: 24px;
}

.motion-menu-x::before,
.motion-menu-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.motion-menu-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.motion-menu-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.motion-menu-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-9);
  width: 100%;
  margin-top: var(--space-8);
}

.motion-menu-card .motion-menu-body { margin-top: var(--space-12); }

.motion-menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.motion-menu-list a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: #fff;
  font-size: var(--text-md);
  line-height: 1;
  letter-spacing: 0.16px;
  text-align: center;
  text-decoration: none;
}

.motion-menu-list a::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: transparent;
}

.motion-menu-list a[aria-current="page"] { font-weight: 700; }
.motion-menu-list a[aria-current="page"]::after { background: currentColor; }

.motion-menu-news {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #fff;
  border-radius: 40px;
  color: #fff;
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.15px;
  line-height: 1;
  cursor: pointer;
}

.motion-menu-foot { margin-top: var(--space-10); }

.motion-menu-ias {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.motion-menu-ias img { width: 80px; height: auto; }

.motion-menu-social {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.motion-menu-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.motion-menu-social img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.motion-menu-social li:first-child img { width: 24px; height: 24px; }

.motion-menu :focus-visible { outline-color: #fff; }

.stage.is-reduced .motion-menu.is-open .motion-menu-panel {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.stage.is-reduced .motion-menu:not(.is-open) .motion-menu-panel {
  opacity: 1;
  transform: none;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .topbar[data-motion="menu"] > .nav {
    display: flex;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(calc(-100% - var(--space-4)));
  }

  .topbar[data-motion="menu"] > .nav.is-shown {
    visibility: visible;
    pointer-events: auto;
  }

  .topbar[data-motion="menu"] > .nav.is-shown .nav-head,
  .topbar[data-motion="menu"] > .nav.is-shown .nav-foot {
    display: flex;
  }

  .topbar[data-motion="menu"] > .nav.is-shown .nav-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    width: 100%;
    margin-top: 0;
  }

  .topbar[data-motion="menu"] > .nav.is-shown .nav-foot {
    margin-top: 0;
  }
}

@media (max-width: 699px) {
  .topbar[data-motion="menu"] > .nav.is-shown .nav-body {
    flex: 1;
    justify-content: center;
    margin-top: 0;
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .topbar[data-motion="menu"] > .nav {
    transform: none;
  }

  .topbar[data-motion="menu"].is-open > .nav {
    visibility: visible;
    pointer-events: auto;
  }
}

@media (scripting: none) and (max-width: 1023px) {
  .topbar[data-motion="menu"].is-open > .nav {
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}
