/* Section menu for tablets and phones (≤ 980px).
   Built on <details>: it opens and closes without JavaScript; menu.js only closes it
   after a link is chosen, on Escape and on a click outside. */
.menu { display: none; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--navy); font: 600 .95rem/1 var(--text); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { border-color: var(--navy); }
.menu__icon { position: relative; width: 18px; height: 12px; flex: none; }
.menu__icon i { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.menu__icon i:nth-child(1) { top: 0; }
.menu__icon i:nth-child(2) { top: 5px; }
.menu__icon i:nth-child(3) { top: 10px; }
.menu[open] .menu__icon i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu[open] .menu__icon i:nth-child(2) { opacity: 0; }
.menu[open] .menu__icon i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
.menu[open] > summary { border-color: var(--navy); }

/* Dimmed page behind the open panel; tapping it closes the menu (it belongs to <summary>) */
.menu[open] > summary::after { content: ""; position: fixed; inset: 73px 0 0 0; background: rgba(3, 15, 64, .38); cursor: default; }

.menu__panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 1; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 22px 34px -18px rgba(3, 15, 64, .35); padding: 6px max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px)); max-height: calc(100vh - 73px); overflow-y: auto; animation: menu-in .18s ease-out; }
.menu__panel ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1140px; }
.menu__panel li a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--navy); text-decoration: none; font: 600 1.4rem/1.1 var(--display); }
.menu__panel li a::after { content: ""; width: 9px; height: 9px; flex: none; border-top: 2px solid var(--lime); border-right: 2px solid var(--lime); transform: rotate(45deg); }
.menu__panel li a:hover, .menu__panel li a:focus-visible { color: var(--indigo); }
.menu__panel li a[aria-current="page"] { color: var(--cyan-ink); }
.menu__panel .menu__contact { display: flex; justify-content: center; margin: 22px auto 0; max-width: 1140px; padding: 15px 20px; background: var(--navy); color: #fff; font: 600 1rem/1 var(--text); text-decoration: none; border-radius: 2px; }
.menu__panel .menu__contact:hover { background: var(--navy-2); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 980px) {
  /* backdrop-filter would make the header the containing block of the fixed backdrop */
  .top { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu { display: block; }
  .top__actions { display: flex; align-items: center; gap: 10px; }
}
@media (max-width: 640px) {
  /* Phones: the Contact button moves into the menu to leave room for both logos */
  .top__actions .nav { display: none; }
  .menu[open] > summary::after { top: 63px; }
  .menu__panel { max-height: calc(100vh - 63px); }
}
@media (prefers-reduced-motion: reduce) {
  .menu__panel { animation: none; }
  .menu__icon i { transition: none; }
}
