/* Public navigation inspired by the Home menu, isolated from page components. */
.softown-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 16px;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 0;
  color: inherit;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease;
}

.softown-menu-icon {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  overflow: visible;
}

.softown-menu-lines-desktop {
  transform-origin: center;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}

.softown-menu-lines-mobile { display: none; }
.softown-menu-toggle:hover .softown-menu-lines-desktop { transform: scaleX(.82); }
.softown-menu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }

/* Keep the original availability action while putting Menu at the Home position. */
.site-header[data-softown-header="arenas"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

[data-softown-header="arenas"] .brand { justify-self: center; }
[data-softown-header="arenas"] .header-cta { justify-self: end; }
[data-softown-header="arenas"] .softown-header-cta-label { font-size: 14px; }

.softown-menu-dialog {
  --menu-paper: #e8dfcd;
  --menu-ink: #30291f;
  --menu-muted: #705b3e;
  --menu-line: rgb(48 41 31 / 26%);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--menu-ink);
  background: var(--menu-paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color-scheme: light;
  scrollbar-color: #a89474 var(--menu-paper);
}

.softown-menu-dialog:not([open]) { display: none; }
.softown-menu-dialog[open] { animation: softown-menu-enter .34s cubic-bezier(.2, .7, .2, 1) both; }
.softown-menu-dialog[open].is-closing { animation: softown-menu-exit .2s ease-in both; }
.softown-menu-dialog::backdrop { background: #231f1a; }
.softown-menu-dialog *, .softown-menu-dialog *::before, .softown-menu-dialog *::after { box-sizing: border-box; }

.softown-menu-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-inline: clamp(22px, 5vw, 96px);
}

.softown-menu-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../textures/paper-texture-strong.webp") repeat;
  opacity: .11;
  pointer-events: none;
  content: "";
}

.softown-menu-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 104px;
  border-bottom: 1px solid var(--menu-line);
}

.softown-menu-close {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 16px;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  color: var(--menu-ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.softown-menu-close-icon { position: relative; display: block; width: 32px; height: 32px; }
.softown-menu-close-icon::before, .softown-menu-close-icon::after {
  position: absolute;
  top: 15px;
  left: 0;
  width: 32px;
  height: 1.33px;
  background: currentColor;
  content: "";
}
.softown-menu-close-icon::before { transform: rotate(45deg); }
.softown-menu-close-icon::after { transform: rotate(-45deg); }

.softown-menu-dialog .softown-menu-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--menu-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}

.softown-menu-edition { justify-self: end; color: var(--menu-muted); letter-spacing: .04em; }
.softown-menu-content { display: grid; flex: 1; place-items: center; padding-block: clamp(24px, 3.5vh, 44px); }
.softown-menu-nav { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }

.softown-menu-dialog .softown-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 4px 12px;
  color: var(--menu-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-align: center;
  text-decoration: none;
  transition: color .2s ease, transform .25s cubic-bezier(.2, .7, .2, 1);
}

.softown-menu-link::after {
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
  content: "";
}

.softown-menu-dialog .softown-menu-link:is(:hover, :focus-visible, [aria-current="page"]) { color: var(--menu-muted); }
.softown-menu-link:is(:hover, :focus-visible, [aria-current="page"])::after { transform: scaleX(1); }
.softown-menu-link:hover { transform: translateX(3px); }
.softown-menu-dialog :is(a, button):focus-visible { outline: 2px solid var(--menu-muted); outline-offset: 4px; }

.softown-menu-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 64px;
  padding-block: 24px;
  border-top: 1px solid var(--menu-line);
}
.softown-menu-contact { display: flex; flex-direction: column; gap: 5px; text-align: center; }
.softown-menu-caption { color: var(--menu-muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.softown-menu-dialog .softown-menu-contact-link { color: var(--menu-ink); font-size: 14px; text-decoration: none; }
.softown-menu-contact-link:hover { text-decoration: underline; text-underline-offset: 4px; }

@keyframes softown-menu-enter { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes softown-menu-exit { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 767px) {
  .softown-menu-toggle { gap: 0; min-width: 44px; }
  .softown-menu-icon { width: 44px; height: 44px; flex-basis: 44px; }
  .softown-menu-label, .softown-menu-lines-desktop { display: none; }
  .softown-menu-lines-mobile { display: block; }
  .softown-menu-header { min-height: 84px; grid-template-columns: 1fr auto; gap: 16px; }
  .softown-menu-edition, .softown-menu-close-label { display: none; }
  .softown-menu-close-icon { width: 44px; height: 44px; }
  .softown-menu-close-icon::before, .softown-menu-close-icon::after { top: 21px; left: 6px; }
  .softown-menu-dialog .softown-menu-wordmark { font-size: 19px; }
  .softown-menu-nav { gap: 0; }
  .softown-menu-footer { gap: 16px 26px; padding-block: 20px; }
  .softown-menu-caption { font-size: 10px; }
  .softown-menu-dialog .softown-menu-contact-link { font-size: 12px; }
  .site-header[data-softown-header="arenas"] { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; min-height: 88px; }
  [data-softown-header="arenas"] .brand { font-size: 15px; gap: 8px; }
  [data-softown-header="arenas"] .brand-caption { font-size: 10px; }
  [data-softown-header="arenas"] .header-cta { justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 0; }
  [data-softown-header="arenas"] .softown-header-cta-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .softown-menu-dialog, .softown-menu-dialog *, .softown-menu-dialog *::before, .softown-menu-dialog *::after, .softown-menu-toggle, .softown-menu-lines-desktop {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
