/* menu.css — shared site chrome and the full-screen menu overlay.
   No persistent nav strip: the artwork owns the page. Chrome is two
   corners — the PROVING SEASON wordmark (always the way home) top-left,
   MENU + sound top-right — and the menu itself is a full-viewport takeover
   in the site's own language, tinted by the focused fighter's accent. */

/* ---- Corner chrome ---- */

.site-brand {
  position: fixed;
  top: clamp(0.9rem, 2.5vw, 1.75rem);
  left: clamp(0.9rem, 2.5vw, 1.75rem);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.9em;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 75%;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  /* same pill treatment as the right-hand cluster — the chrome floats over
     light sections (the paper bands) as well as dark ones */
  background: rgba(16, 16, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(58, 58, 66, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-brand::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
  transition: background-color 0.3s ease;
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--accent);
}

.chrome-right {
  position: fixed;
  top: clamp(0.9rem, 2.5vw, 1.75rem);
  right: clamp(0.9rem, 2.5vw, 1.75rem);
  z-index: 60;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

/* The sound toggle gets adopted into the cluster on every page. Its pill
   styling lives HERE (shared chrome), not in per-page stylesheets — pages
   like tournament/brackets/about never define it themselves. */
.chrome-right .sound-toggle {
  position: static;
  transform: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.9em;
  color: color-mix(in srgb, var(--paper) 55%, var(--ink));
  background: rgba(16, 16, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(58, 58, 66, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chrome-right .sound-toggle:hover,
.chrome-right .sound-toggle:focus-visible {
  color: var(--paper);
  border-color: var(--accent);
}

/* ---- Sound beckon ----
   While the page's music is NOT audibly playing (sound off, or blocked by
   the browser until a gesture), the toggle breathes: a slow fade up to an
   accent-lit state and back. The moment music plays, it stops. sound.js
   drives the class from the real <audio> playing/pause events. */

@keyframes sound-beckon {
  0%, 100% {
    color: color-mix(in srgb, var(--paper) 45%, var(--ink));
    border-color: rgba(58, 58, 66, 0.6);
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    color: var(--paper);
    border-color: var(--accent);
    box-shadow: 0 0 18px 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
}

.sound-toggle.is-beckoning {
  animation: sound-beckon 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  /* no pulsing — a steady lit state does the beckoning instead */
  .sound-toggle.is-beckoning {
    animation: none;
    color: var(--paper);
    border-color: var(--accent);
  }
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.9em;
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  text-transform: uppercase;
  letter-spacing: var(--tracking-utility);
  color: color-mix(in srgb, var(--paper) 55%, var(--ink));
  background: rgba(16, 16, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(58, 58, 66, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  color: var(--paper);
  border-color: var(--accent);
}

.menu-toggle .menu-glyph {
  display: inline-block;
  width: 14px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: transform 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-glyph {
  transform: rotate(90deg);
}

/* ---- Overlay ---- */

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 55; /* under the corner chrome so MENU/CLOSE stays reachable */
  display: grid;
  align-content: center;
  background: rgba(13, 13, 17, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  visibility: hidden;
  opacity: 0;
}

.site-menu.is-open {
  visibility: visible;
  opacity: 1;
}

/* CSS-only fallback transition; GSAP takes over when present */
.site-menu:not(.gsap) {
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.site-menu:not(.gsap).is-open {
  transition: opacity 0.25s ease;
}

.site-menu-list {
  display: grid;
  gap: clamp(0.4rem, 1.8vh, 1rem);
  padding-inline: clamp(1.5rem, 12vw, 14rem);
  list-style: none;
  margin: 0;
}

.site-menu-item a,
.site-menu-item .soon-entry {
  display: flex;
  align-items: baseline;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  text-decoration: none;
}

.site-menu-item .num {
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  letter-spacing: var(--tracking-utility);
  color: var(--accent);
  min-width: 2.5ch;
}

.site-menu-item .label {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5.2vw, 4rem);
  line-height: 1.04;
  color: var(--paper);
  transition: color 0.18s ease, transform 0.18s ease;
}

.site-menu-item .desc {
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  letter-spacing: var(--tracking-utility);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 38%, var(--ink));
  white-space: nowrap;
}

.site-menu-item a:hover .label,
.site-menu-item a:focus-visible .label {
  color: var(--accent);
  transform: translateX(0.15em);
}

/* Not-yet-built destinations: present, dimmed, honest — the menu's
   version of the locked "?" slot. */
.site-menu-item .soon-entry {
  cursor: default;
}

.site-menu-item .soon-entry .label {
  color: color-mix(in srgb, var(--paper) 30%, var(--ink));
}

.soon-chip {
  align-self: center;
  font-family: var(--font-utility);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 45%, var(--ink));
  border: 1px solid var(--hairline);
  padding: 0.25em 0.6em;
}

.site-menu-foot {
  margin-top: clamp(1.5rem, 5vh, 3rem);
  padding-inline: clamp(1.5rem, 12vw, 14rem);
  font-family: var(--font-utility);
  font-size: var(--text-utility);
  letter-spacing: var(--tracking-utility);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 30%, var(--ink));
}

@media (max-width: 700px) {
  .site-brand { font-size: 0.8rem; }

  .menu-toggle .menu-label,
  .chrome-right .sound-label { display: none; } /* icons only, art stays clear */

  .site-menu-item .desc { display: none; }
}

/* Ownership + studio credit. Dimmer than the tagline above it — this is
   the small print, not part of the menu's voice. */
.site-menu-legal {
  margin-top: 0.9rem;
  padding-inline: clamp(1.5rem, 12vw, 14rem);
  font-family: var(--font-utility);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  line-height: 1.9;
  color: color-mix(in srgb, var(--paper) 22%, var(--ink));
}

.site-menu-legal a {
  color: color-mix(in srgb, var(--paper) 38%, var(--ink));
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 18%, var(--ink));
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-menu-legal a:hover,
.site-menu-legal a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
