/* Shared mobile navigation: a quiet panel reveal and staggered links. */
@keyframes av-menu-enter {
  from { opacity:0;transform:translateY(-22px) scale(.985); }
  to { opacity:1;transform:translateY(0) scale(1); }
}
@keyframes av-menu-link-enter {
  from { opacity:0;transform:translateY(-10px); }
  to { opacity:1;transform:translateY(0); }
}
@media (max-width:1000px) {
  html body #menuDialog {
    inset:0;
    width:calc(100% - 16px);
    max-width:600px;
    margin:8px auto;
    min-height:calc(100dvh - 16px);
    max-height:calc(100dvh - 16px);
    padding:0;
    border:1px solid #ffffff26;
    border-radius:24px;
    background:#1b1d20;
    color:#f3f3f1;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  html body #menuDialog[open] {
    display:flex;
    flex-direction:column;
    animation:av-menu-enter 420ms cubic-bezier(.22,1,.36,1) both;
  }
  html body #menuDialog::backdrop { background:#111214b8;backdrop-filter:blur(10px); }
  html body #menuDialog .dialog-head {
    top:0;
    padding:18px 20px;
    min-height:80px;
    background:#1b1d20;
    border-bottom:1px solid #ffffff15;
  }
  html body #menuDialog .dialog-head .wordmark { width:clamp(145px,45%,195px);color:inherit; }
  html body #menuDialog .dialog-head .icon-button {
    width:44px;height:44px;border:1px solid #ffffff24;border-radius:50%;
  }
  html body #menuDialog .dialog-head .icon-button svg { width:26px;height:26px;stroke-width:1.2; }
  html body #menuDialog .menu-links {
    flex:1 0 auto;
    padding:24px;
    gap:6px;
    justify-content:center;
    align-items:center;
  }
  html body #menuDialog .menu-links a {
    display:block;
    width:100%;
    padding:12px 16px;
    border:0;
    border-radius:12px;
    font-size:clamp(23px,6vw,30px);
    line-height:1.25;
    font-weight:500;
    letter-spacing:-.035em;
    color:inherit;
    text-align:center;
    transition:background 160ms ease,color 160ms ease;
  }
  html body #menuDialog .menu-links a:is(:hover,:focus-visible) { background:#ffffff09;outline-offset:-2px; }
  html body #menuDialog[open] .menu-links>a {
    animation:av-menu-link-enter 400ms cubic-bezier(.22,1,.36,1) both;
    animation-delay:calc(60ms + var(--menu-index,0)*35ms);
  }
  html body #menuDialog .menu-links>a:nth-child(2) { --menu-index:1; }
  html body #menuDialog .menu-links>a:nth-child(3) { --menu-index:2; }
  html body #menuDialog .menu-links>a:nth-child(4) { --menu-index:3; }
  html body #menuDialog .menu-links>a:nth-child(5) { --menu-index:4; }
  html body #menuDialog .menu-links>a:nth-child(6) { --menu-index:5; }
  html body #menuDialog .menu-languages { margin:0;padding:15px 20px;gap:12px;justify-content:center; }
  html body #menuDialog .menu-languages button { min-width:40px;min-height:40px; }
  html body #menuDialog .menu-contacts {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:8px 16px;
    margin:0 20px;
    padding:18px 0 max(22px,env(safe-area-inset-bottom));
    border-top:1px solid #ffffff18;
  }
  html body #menuDialog .menu-contacts a { min-height:40px;font-size:13px; }
  html body #menuDialog .menu-contacts svg { width:17px;height:17px; }
}
@media (max-width:1000px) and (max-height:700px) {
  html body #menuDialog .menu-links { padding-block:12px;gap:0; }
  html body #menuDialog .menu-links a { padding-block:9px;font-size:23px; }
  html body #menuDialog .menu-languages { padding-block:8px; }
}
@media (prefers-reduced-motion:reduce) {
  html body #menuDialog[open],html body #menuDialog[open] .menu-links>a { animation:none; }
  html body #menuDialog .menu-links a { transition:none; }
}
