/* Full-screen navigation only; the closed site header is intentionally untouched. */
#menuPanel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  width: min(460px, 90vw);
  z-index: 50;
  --menu-link-size: 17px;
  background: var(--paper); color: var(--ink); height: 100vh; height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 6% max(40px, env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .32s cubic-bezier(0.16, 1, 0.3, 1), opacity .28s ease, visibility 0s linear .32s;
}
#menuPanel.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
#menuPanel .menu-top { position: static; display: flex; justify-content: center; }
#menuPanel .menu-brand { display: block; width: 116px; height: auto; object-fit: contain; }
#menuPanel #menuClose { position: fixed; top: max(20px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); width: 48px; height: 48px; padding: 0; color: inherit; z-index: 1; background: var(--paper); cursor: pointer; }
#menuPanel #menuClose::before, #menuPanel #menuClose::after { content: ''; position: absolute; width: 30px; height: 1px; background: currentColor; left: 9px; top: 23px; transform: rotate(45deg); }
#menuPanel #menuClose::after { transform: rotate(-45deg); }
#menuPanel .menu-content { width: min(100%, 320px); margin: 4px auto 0; }
#menuPanel .menu-tagline { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 0 0 12px; font: 400 11px/1.6 var(--font-ui); letter-spacing: .3em; text-align: center; }
#menuPanel .menu-tagline::before, #menuPanel .menu-tagline::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#menuPanel .menu-introduction { margin: 0 0 10px; text-align: center; font: 400 23px/1.08 var(--font-heading); letter-spacing: -.02em; }
#menuPanel .menu-introduction span { display: block; }
#menuPanel .menu-introduction em { font-weight: inherit; }
#menuPanel .main-menu { margin: 0; }
#menuPanel .main-menu a { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 32px; padding: 3px 4px; border-bottom: 1px solid var(--line); color: inherit; font: 400 var(--menu-link-size)/1.25 var(--font-ui); letter-spacing: -.02em; }
#menuPanel .main-menu a:last-child { border-bottom: 0; }
#menuPanel .menu-arrow { flex-shrink: 0; font: 300 17px/1 var(--font-ui); transition: transform .2s ease; }
#menuPanel .main-menu a:hover .menu-arrow { transform: translateX(5px); }
#menuPanel a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
#menuPanel .menu-secondary { display: flex; justify-content: center; align-items: center; gap: 0; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
#menuPanel .menu-secondary a { display: flex; align-items: center; min-height: 32px; padding: 0 12px; font: 400 13px/1.4 var(--font-ui); letter-spacing: .12em; text-align: center; }
#menuPanel .menu-secondary a + a { border-left: 1px solid var(--line); }
#menuPanel a:focus-visible, #menuPanel button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
#menuPanel.open .menu-brand, #menuPanel.open .menu-tagline, #menuPanel.open .menu-introduction, #menuPanel.open .main-menu a, #menuPanel.open .menu-secondary { animation: menu-reveal .4s ease both; }
#menuPanel.open .menu-tagline { animation-delay: .04s; }
#menuPanel.open .menu-introduction { animation-delay: .07s; }
#menuPanel.open .main-menu a:nth-child(1) { animation-delay: .10s; }
#menuPanel.open .main-menu a:nth-child(2) { animation-delay: .13s; }
#menuPanel.open .main-menu a:nth-child(3) { animation-delay: .16s; }
#menuPanel.open .main-menu a:nth-child(4) { animation-delay: .19s; }
#menuPanel.open .main-menu a:nth-child(5) { animation-delay: .22s; }
#menuPanel.open .menu-secondary { animation-delay: .25s; }
@keyframes menu-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) {
  #menuPanel {
    width: 100vw;
    width: 100%;
    left: 0;
    right: 0;
  }
}
@media (max-width: 600px) {
  #menuPanel { --menu-link-size: 15px; padding: max(12px, env(safe-area-inset-top)) 7% 0; }
  #menuPanel .menu-content { width: min(100%, 270px); }
  #menuPanel .menu-brand { width: 96px; }
  #menuPanel #menuClose { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  #menuPanel .menu-tagline { gap: 12px; font-size: 9px; letter-spacing: .2em; margin-bottom: 12px; }
  #menuPanel .menu-introduction { font-size: 19px; margin-bottom: 10px; }
  #menuPanel .main-menu a { min-height: 32px; padding: 3px 2px; }
  #menuPanel .menu-arrow { font-size: 16px; }
  #menuPanel .menu-secondary { margin-top: 6px; padding-top: 4px; }
  #menuPanel .menu-secondary a { font-size: 12px; letter-spacing: .06em; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #menuPanel, #menuPanel .menu-arrow { transition: none; }
  #menuPanel.open .menu-brand, #menuPanel.open .menu-tagline, #menuPanel.open .menu-introduction, #menuPanel.open .main-menu a, #menuPanel.open .menu-secondary { animation: none; }
}

/* Decorative scenic footer stays in flow so short screens scroll without covering links. */
#menuPanel {
  --menu-gutter: 6vw;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
#menuPanel .menu-top, #menuPanel .menu-content { flex-shrink: 0; }
#menuPanel .menu-content { padding-bottom: 10px; }
#menuPanel::after {
  content: '';
  display: block;
  flex: 0 0 26vh;
  flex-basis: 26dvh;
  min-height: 120px;
  margin: auto calc(-1 * var(--menu-gutter)) 0;
  background: url('assets/images/menu-footer-landscape.webp') center 55% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 38%);
  mask-image: linear-gradient(to bottom, transparent, #000 38%);
  pointer-events: none;
}
@media (max-width: 600px) {
  #menuPanel { --menu-gutter: 7vw; }
  #menuPanel::after {
    flex-basis: 18vh;
    flex-basis: 18dvh;
    min-height: 100px;
    background-position: 85% 55%;
  }
}
#menuPanel .menu-secondary[aria-label="Studio partnership"] > a { font: 500 var(--menu-link-size)/1.25 var(--font-ui); letter-spacing: -.02em; }

@media (min-width: 901px) {
  #menuPanel { --menu-link-size: 19px; }
  #menuPanel .menu-brand { width: 140px; }
  #menuPanel .menu-content { width: 100%; }
}
