/* Topbar directory menu for the awards test. */

.topbar__menu {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.topbar__menu span { color: var(--accent); }
.topbar__menu:hover { color: var(--ink); border-color: var(--ink); }

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
}

.site-menu.is-open { display: block; }

.site-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 8, 0.62);
  backdrop-filter: blur(5px);
}

.site-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 100%);
  height: 100%;
  padding: max(22px, env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  border-left: 1px solid var(--line);
  background: #121019;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.42);
  overflow: auto;
  animation: menuIn 0.35s var(--ease-soft, ease) both;
}

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

.site-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.site-menu__head p {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.site-menu__close {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.site-menu__panel > a,
.site-menu__panel > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.site-menu__panel > a span,
.site-menu__panel > button span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.site-menu__panel > a:hover,
.site-menu__panel > button:hover { color: var(--accent); }

body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .topbar__feedback { display: none; }

  .topbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #08070c;
  }

  .site-menu {
    background: #08070c;
  }

  .site-menu__backdrop {
    display: none;
  }

  .site-menu__panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border-left: 0;
    animation: none;
  }
  .site-menu__panel > a,
  .site-menu__panel > button { font-size: 19px; padding: 17px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu__panel { animation: none; }
}
