/* Site menu: the only navigation on the site. A button fixed top-left opens a
   full-screen yellow curtain. Markup lives in /static/site/menu.html. */
.site-menu-btn {
  position: fixed;
  left: 32px;
  top: 28px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--menu-btn-color, #24124f);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease;
}
.site-menu-btn span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.2s ease;
}
.site-menu-btn:focus-visible {
  outline: 3px solid #6a3ae6;
  outline-offset: 2px;
}
.menu-open .site-menu-btn {
  color: #24124f;
}
.menu-open .site-menu-btn span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.menu-open .site-menu-btn span:nth-child(2) {
  opacity: 0;
}
.menu-open .site-menu-btn span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #ffd23f;
  color: #24124f;
  font-family: var(--font-ui, "Inter Tight", system-ui, sans-serif);
  clip-path: circle(0px at 56px 52px);
  transition: clip-path 0.65s cubic-bezier(0.7, 0, 0.2, 1);
}
.site-menu[hidden] {
  display: none;
}
.site-menu.is-open {
  clip-path: circle(150vmax at 56px 52px);
}

.site-menu__nav {
  position: absolute;
  left: clamp(72px, 16vw, 232px);
  top: 50%;
  transform: translateY(-54%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-menu__nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #24124f;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-menu__n {
  position: relative;
  width: 28px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.site-menu__n::after {
  /* star marker that replaces the number on hover / focus */
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%) scale(0.2) rotate(-40deg);
  background: #5b2bd6;
  clip-path: path("M13,0 Q15.1,10.9 26,13 Q15.1,15.1 13,26 Q10.9,15.1 0,13 Q10.9,10.9 13,0 Z");
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.2s ease;
}
.site-menu__en {
  font-family: var(--font-display, "Anton", "Impact", sans-serif);
  font-size: clamp(46px, min(8.2vw, 11vh), 88px);
  line-height: 1.06;
  letter-spacing: 0.017em;
}
.site-menu__zh {
  writing-mode: vertical-rl;
  font-family: var(--font-cn-serif, "Songti SC", serif);
  font-weight: 900;
  font-size: clamp(16px, min(2.4vw, 3.2vh), 26px);
  line-height: 1;
  letter-spacing: 0.2em;
  color: #4a3878;
}
.site-menu__nav a:hover,
.site-menu__nav a:focus-visible,
.site-menu__nav a[aria-current="true"] {
  color: #5b2bd6;
  transform: translateX(16px);
  outline: none;
}
.site-menu__nav a:hover .site-menu__zh,
.site-menu__nav a:focus-visible .site-menu__zh,
.site-menu__nav a[aria-current="true"] .site-menu__zh {
  color: #5b2bd6;
}
.site-menu__nav a:hover .site-menu__n,
.site-menu__nav a:focus-visible .site-menu__n,
.site-menu__nav a[aria-current="true"] .site-menu__n {
  color: transparent;
}
.site-menu__nav a:hover .site-menu__n::after,
.site-menu__nav a:focus-visible .site-menu__n::after,
.site-menu__nav a[aria-current="true"] .site-menu__n::after {
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0deg);
}

/* staggered entrance for the links */
.site-menu__nav a,
.site-menu__links {
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity 0.45s ease,
    translate 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.2s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-menu.is-open .site-menu__nav a,
.site-menu.is-open .site-menu__links {
  opacity: 1;
  translate: 0 0;
}
.site-menu.is-open .site-menu__nav a:nth-child(1) {
  transition-delay: 0.16s, 0.16s, 0s, 0s;
}
.site-menu.is-open .site-menu__nav a:nth-child(2) {
  transition-delay: 0.21s, 0.21s, 0s, 0s;
}
.site-menu.is-open .site-menu__nav a:nth-child(3) {
  transition-delay: 0.26s, 0.26s, 0s, 0s;
}
.site-menu.is-open .site-menu__nav a:nth-child(4) {
  transition-delay: 0.31s, 0.31s, 0s, 0s;
}
.site-menu.is-open .site-menu__nav a:nth-child(5) {
  transition-delay: 0.36s, 0.36s, 0s, 0s;
}
.site-menu.is-open .site-menu__nav a:nth-child(6) {
  transition-delay: 0.41s, 0.41s, 0s, 0s;
}
.site-menu.is-open .site-menu__links {
  transition-delay: 0.5s;
}

.site-menu__links {
  position: absolute;
  left: calc(clamp(72px, 16vw, 232px) + 46px);
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}
.site-menu__links a {
  color: #24124f;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.site-menu__links a:hover,
.site-menu__links a:focus-visible {
  color: #5b2bd6;
}

.site-menu__art img,
.site-menu__art svg {
  position: absolute;
  display: block;
}
.site-menu__planet {
  right: -9.7vw;
  bottom: 5vh;
  width: min(54vw, 780px);
  height: auto;
}
.site-menu__astronaut {
  right: 16.7vw;
  top: 13vh;
  width: min(16.7vw, 240px);
  height: auto;
  animation: site-menu-float 7s ease-in-out infinite;
}
.site-menu__mint {
  right: 5.5vw;
  top: 10vh;
  width: min(7.6vw, 110px);
  height: auto;
}
.site-menu__spark--a {
  right: 41vw;
  top: 10.7vh;
  width: 30px;
  height: 30px;
  fill: #6a3ae6;
}
.site-menu__spark--b {
  right: 3vw;
  top: 33vh;
  width: 18px;
  height: 18px;
  fill: #ffffff;
}
.site-menu__spark--c {
  right: 45.6vw;
  top: 66vh;
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

@keyframes site-menu-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
}

@media (max-width: 720px) {
  .site-menu-btn {
    left: 10px;
    top: 10px;
  }
  .site-menu {
    clip-path: circle(0px at 34px 34px);
  }
  .site-menu.is-open {
    clip-path: circle(150vmax at 34px 34px);
  }
  .site-menu__nav {
    left: 28px;
    top: 96px;
    transform: none;
    gap: 4px;
  }
  .site-menu__nav a {
    gap: 12px;
  }
  .site-menu__n {
    width: 22px;
    font-size: 12px;
  }
  .site-menu__links {
    left: 62px;
    bottom: 28px;
    gap: 18px;
  }
  .site-menu__planet {
    right: -34vw;
    bottom: 9vh;
    width: 96vw;
  }
  .site-menu__astronaut {
    right: 6vw;
    top: auto;
    bottom: 34vh;
    width: 26vw;
  }
  .site-menu__mint {
    right: 8vw;
    top: 3vh;
    width: 14vw;
  }
  .site-menu__spark--a,
  .site-menu__spark--c {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu,
  .site-menu__nav a,
  .site-menu__links,
  .site-menu-btn span {
    transition: none !important;
  }
  .site-menu__astronaut {
    animation: none;
  }
}

/* lock page scroll while the curtain is open */
html.menu-open,
html.menu-open body {
  overflow: hidden;
}
