/* THE WITH — the menu. loaded after site.css on every page.
   the button is the middle of the footer (.foot__c, styled in site.css,
   so its size, weight and tracking are still the footer dials in tune).
   the panel covers the page; the footer stays on top of it, so the same
   button closes it. */

/* the footer's middle is a button now, not a link. make it look like one of the words. */
button.foot__c {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  padding-left: 0;
  padding-right: 0;
  -webkit-tap-highlight-color: transparent;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 14vh) 8vw calc(var(--safe-b) + 14vh);
  background: rgba(19, 13, 9, 0.9);
  background: color-mix(in srgb, var(--ground, #130d09) 90%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: var(--foot-color, var(--ink, #f2ecd9));
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.menu-open .menu { opacity: 1; }
/* the footer rides above the panel, so "close" sits where "menu" was */
body.menu-open .foot { z-index: 41; }

.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 5.5vh, 64px);
  text-align: center;
}
.menu__item {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 6px 0;
  transition: opacity 0.25s ease;
}
.menu__item:hover { opacity: 0.72; }
.menu__item:focus-visible { outline: 1px solid currentColor; outline-offset: 8px; }
.menu__item[aria-current='page'] { opacity: 0.5; }
.menu__item[aria-current='page']:hover { opacity: 0.5; }

.menu__label {
  display: block;
  font-size: clamp(26px, 3.3vw, 58px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}
.menu__sub {
  display: block;
  margin-top: 0.9em;
  font-size: clamp(10px, 0.78vw, 13px);
  font-weight: 400;
  letter-spacing: 0.24em;
  line-height: 1.5;
  opacity: 0.66;
}

@media (max-width: 860px) {
  .menu__label { font-size: clamp(24px, 7.4vw, 40px); }
  .menu__sub { font-size: 10px; letter-spacing: 0.2em; max-width: 78vw; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .menu { transition: none; }
}
