/* Mobile home navigation: the desktop header remains unchanged. */
.mobile-hero-nav {
  display: none;
}

@media (max-width: 760px) {
  .hero > .nav.shell {
    position: absolute;
    inset: 24px 0 auto;
    z-index: 4;
    display: flex;
    justify-content: center;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero > .nav .brand img {
    width: 176px;
  }

  .hero > .nav :is(.nav-links, .nav-cta, .menu-toggle),
  .hero > :is(.menu-backdrop, .mobile-menu) {
    display: none !important;
  }

  .hero .hero-content.shell {
    justify-content: flex-start;
    min-height: 100svh;
    padding: 116px 0 15px;
  }

  .mobile-hero-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 380px);
    margin: auto auto 0;
  }

  .mobile-hero-nav a {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 98px;
    padding: 14px 10px 13px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 4px;
    color: rgba(255, 255, 255, .9);
    background: linear-gradient(145deg, rgba(32, 30, 35, .88), rgba(15, 15, 17, .84));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 30px rgba(0, 0, 0, .2);
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-hero-nav a::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 34px;
    height: 2px;
    background: var(--red);
  }

  .mobile-hero-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-hero-nav span {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
  }

  .mobile-hero-nav a:active {
    color: #fff;
    border-color: rgba(255, 46, 58, .72);
    background: rgba(213, 1, 13, .86);
  }

  .mobile-hero-nav a:focus-visible {
    outline: 2px solid #ff4650;
    outline-offset: 2px;
  }
}

@media (max-width: 360px) {
  .hero .hero-content.shell {
    padding-top: 104px;
  }

  .mobile-hero-nav a {
    min-height: 80px;
  }
}

/* Mobile browsers with persistent top/bottom chrome expose a much shorter
   usable viewport. Compact the vertical rhythm so the complete 2x2 menu stays
   together instead of clipping its second row. */
@media (max-width: 760px) and (max-height: 780px) {
  .hero .hero-content.shell {
    padding-top: 86px;
    padding-bottom: 15px;
  }

  .hero .location-pill {
    margin-bottom: 16px;
  }

  .hero .hero-content h1 {
    font-size: clamp(35px, 9.7vw, 40px);
  }

  .hero .hero-intro {
    margin-top: 17px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero .ask-card {
    padding: 10px 11px;
  }

  .hero .ask-head {
    padding-bottom: 10px;
  }

  .mobile-hero-nav {
    gap: 7px;
    margin-top: auto;
  }

  .mobile-hero-nav a {
    min-height: 80px;
    gap: 7px;
    padding-block: 10px;
  }

  .mobile-hero-nav svg {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-hero-nav a {
    transition: none;
  }
}
