/*
 * MobileMenu.module.css → the site chrome's overlay menu.
 *
 * Ported by scripts/port-css.mjs. Class names are prefixed to survive being
 * flattened out of CSS Modules; design tokens are rewritten to the custom
 * properties theme.json emits. Edit this file, not the original.
 */

.px-menu {
  position: fixed;
  inset: 0;
  z-index: var(--wp--custom--z--menu);
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--bone);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-y: auto;
  overscroll-behavior: contain;

  /* Hidden with opacity and `pointer-events` rather than `visibility`.
     `inert` on the element already removes it from the tab order and the
     accessibility tree, and keeping it CSS-visible means focus() works the
     instant it opens — a `visibility` transition makes that timing-dependent
     and it fails under prefers-reduced-motion. */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-1.5%);
  transition:
    opacity var(--wp--custom--duration--base) var(--wp--custom--ease--out),
    transform var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.px-menu[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.px-menu__spacer {
  height: var(--wp--custom--header-height);
}

.px-menu__body {
  width: 100%;
  max-width: var(--wp--custom--container);
  margin-inline: auto;
  padding: var(--wp--preset--spacing--xl) var(--wp--custom--gutter) var(--wp--preset--spacing--xxxl);
  display: grid;
  gap: var(--wp--preset--spacing--xxxl);
  align-content: start;
}

@media (min-width: 860px) {
  .px-menu__body {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--wp--preset--spacing--band);
    align-content: center;
  }
}

/* ---- Primary list ---- */

.px-menu__primary {
  display: grid;
  gap: 0.15em;
}

.px-menu__primary-item {
  border-bottom: 1px solid var(--line);
}

.px-menu__primary-link {
  display: grid;
  gap: 0.15em;
  padding-block: clamp(0.5rem, 2vw, 0.85rem);
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xxxl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--wp--preset--color--bone);
  transition:
    color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
    padding-left var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.px-menu__primary-link:hover,
.px-menu__primary-link[data-active='true'] {
  color: var(--wp--preset--color--sage);
  padding-left: 0.5rem;
}

.px-menu__primary-hint {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---- Menu CTA ----
   Sits below the doors rather than among them, and is the only filled shape
   in the overlay — same rule as the header, for the same reason. */

.px-menu__menu-cta {
  display: grid;
  gap: 0.2em;
  justify-items: center;
  text-align: center;
  margin-top: var(--wp--preset--spacing--lg);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: var(--wp--preset--color--bone);
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.px-menu__menu-cta:hover {
  background: var(--wp--preset--color--sage);
}

.px-menu__menu-cta-hint {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---- Secondary column ---- */

.px-menu__aside {
  display: grid;
  gap: var(--wp--preset--spacing--xl);
  align-content: start;
}

.px-menu__group {
  display: grid;
  gap: var(--wp--preset--spacing--sm);
}

.px-menu__group-title {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding-bottom: var(--wp--preset--spacing--xs);
  border-bottom: 1px solid var(--line);
}

.px-menu__secondary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--lg);
}

.px-menu__secondary-link {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-block: 0.25rem;
  transition: color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.px-menu__secondary-link:hover {
  color: var(--wp--preset--color--bone);
}

.px-menu__slash {
  color: var(--dot, var(--wp--preset--color--sage));
}

.px-menu__contact {
  display: grid;
  gap: 0.35rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--sm);
  color: var(--fg-muted);
}

.px-menu__contact a:hover {
  color: var(--wp--preset--color--bone);
}

.px-menu__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--lg);
}

.px-menu__social {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.px-menu__social:hover {
  color: var(--wp--preset--color--bone);
}

.px-menu__footer {
  border-top: 1px solid var(--line);
}

.px-menu__footer-inner {
  width: 100%;
  max-width: var(--wp--custom--container);
  margin-inline: auto;
  padding: var(--wp--preset--spacing--lg) var(--wp--custom--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--md);
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---- Grid the overlay actually renders in ----
 * The module put the primary list and the menu CTA straight into .body and let
 * the grid handle them; a wp_nav_menu() adds a <nav> around the list, so the
 * doors get an explicit column of their own instead.
 */

.px-menu__doors {
  display: grid;
  gap: var(--wp--preset--spacing--md);
  align-content: start;
}

.px-menu__primary-link {
  display: grid;
}

.px-menu__group-title {
  margin: 0;
}
