/* Phone/tablet menu (built by mobile-menu.ts), modeled on esrbespoke.au's mobile menu. */
.nwm, .nwm-open { display: none; }

@media (max-width: 991px) {
  /* Replace Webflow's menu button with ours */
  .menu-button.w-nav-button { display: none !important; }

  /* Burger: dark square with two lines */
  .nwm-open, .nwm-close {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nwm-open { background: #0a0a0a; margin-left: 8px; }
  .nwm-open span, .nwm-close span { display: block; width: 18px; height: 1.5px; background: #fff; transition: transform 0.3s ease; }
  .nwm-open:focus-visible, .nwm-close:focus-visible { outline: 2px solid #0077ff; outline-offset: 2px; }

  /* Full-screen panel, parked above the screen until opened */
  .nwm {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 10000;
    padding: 0 20px 28px; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; color: #0a0a0a; font-family: Intertight, Arial, sans-serif;
    transform: translateY(-100%); visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.84, 0), visibility 0s linear 0.5s;
  }
  .nwm.is-open {
    transform: none; visibility: visible;
    transition: transform 0.75s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s;
  }

  .nwm-top { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
  .nwm-logo { display: inline-flex; }
  .nwm-logo img { display: block; height: 28px; width: auto; }

  /* Close: light gray square with an X */
  .nwm-close { background: #ececec; gap: 0; }
  .nwm-close span { position: absolute; background: #0a0a0a; }
  .nwm-close { position: relative; }
  .nwm-close span:first-child { transform: rotate(45deg); }
  .nwm-close span:last-child { transform: rotate(-45deg); }

  /* Big links that type in letter by letter */
  .nwm-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 24px; }
  .nwm-link {
    color: #0a0a0a; text-decoration: none;
    font-size: clamp(42px, 11.5vw, 72px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em;
  }
  .nwm-link span span { opacity: 0; transition: opacity 0.12s ease; }
  .nwm.is-open .nwm-link span span { opacity: 1; transition-delay: calc(0.3s + var(--d) * 16ms); }
  .nwm-link:active, .nwm-link[aria-current="page"] { color: #0077ff; }

  /* Contact details at the bottom */
  .nwm-info {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: auto; padding-top: 48px;
    opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nwm.is-open .nwm-info { opacity: 1; transform: none; transition: opacity 0.5s ease 0.75s, transform 0.5s ease 0.75s; }
  .nwm-block { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; }
  .nwm-block p { margin: 0; }
  .nwm-block a { color: #0a0a0a; text-decoration: none; }
  .nwm-label { margin-bottom: 6px !important; font-size: 12px; letter-spacing: 0.12em; color: #818181; }
  .nwm-block .nwm-cta { color: #0077ff; }

  /* Page underneath stops scrolling while the menu is open */
  html.nwm-lock, html.nwm-lock body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .nwm, .nwm.is-open, .nwm-info, .nwm.is-open .nwm-info { transition: visibility 0s, opacity 0.2s ease; transform: none; }
  .nwm:not(.is-open) { opacity: 0; }
  .nwm-link span span, .nwm.is-open .nwm-link span span { opacity: 1; transition: none; }
}
