/* Phones: About, Pricing and Contact fold into a menu under the top bar (menu.js).
   Wider screens keep them in the bar and never show the menu. */

.menu-toggle { display: none; }
.site-menu { display: none; }

@media (max-width: 759px) {
  .wide-only { display: none !important; }

  .menu-toggle {
    pointer-events: auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }
  .menu-toggle svg { width: 22px; height: 22px; }
  .menu-toggle path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    transform-origin: 12px 12px;
    transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  }
  /* Two lines that cross into an X when it's open. */
  .menu-toggle[aria-expanded="true"] .top { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bottom { transform: translateY(-3.5px) rotate(-45deg); }

  .site-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--menu-top, 64px);
    z-index: 20;
    display: block;
    padding: 4px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgb(0 0 0 / .12);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0s;
  }
  .site-menu a,
  .site-menu button {
    display: block;
    width: 100%;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    color: var(--text);
    font: 700 28px/1.1 var(--display, Georgia, serif);
    letter-spacing: -0.01em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }
  .site-menu > :last-child { border-bottom: 0; }
  .site-menu [aria-current="page"] { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle path, .site-menu, .site-menu.is-open { transition: none; }
}
