.mobile-menu-socials {
  display: none;
}

@media (max-width: 980px) {
  body.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  /* backdrop-filter i l'animació del header creaven un context nou per al
     menú fixed després de fer scroll. En obrir-lo, el tornem al viewport. */
  body.menu-open .site-header.is-scrolled {
    animation: none;
    transform: none;
    backdrop-filter: none;
  }

  .site-header {
    z-index: 1000;
  }

  .site-header #main-nav {
    position: fixed;
    z-index: 999;
    top: 86px;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100dvh - 86px);
    min-height: 0;
    padding: clamp(24px, 6vh, 58px) max(24px, 8vw) calc(24px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    background: #17231f;
  }

  .site-header #main-nav.open {
    display: flex;
  }

  .site-header #main-nav a {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    font-family: var(--serif);
    font-size: clamp(23px, 7vw, 32px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -.015em;
    white-space: normal;
  }

  .site-header #main-nav a::after {
    display: none;
  }

  .brand-cluster > .social-links {
    display: none;
  }

  .site-header #main-nav .mobile-menu-socials {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: auto;
    padding: 30px 0 4px;
    border: 0;
  }

  .site-header #main-nav .mobile-menu-socials a {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fff;
  }

  .site-header #main-nav .mobile-menu-socials svg {
    width: 19px;
    height: 19px;
  }

  .site-header #main-nav .mobile-menu-socials a[aria-label="Instagram"] {
    border-color: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0 5%, #fd5949 42%, #d6249f 62%, #285aeb 92%);
  }

  .site-header #main-nav .mobile-menu-socials a[aria-label="YouTube"] {
    border-color: #ff0000;
    background: #ff0000;
  }

  .site-header #main-nav .mobile-menu-socials a[aria-label="Facebook"] {
    border-color: #1877f2;
    background: #1877f2;
  }

  .site-header #main-nav .mobile-menu-socials a[aria-label="X"] {
    border-color: #000;
    background: #000;
  }

  .site-header #main-nav .mobile-menu-socials a:hover,
  .site-header #main-nav .mobile-menu-socials a:focus-visible {
    color: #fff;
    transform: none;
    filter: brightness(1.08);
  }

  .nav-toggle {
    position: relative;
    z-index: 1001;
  }
}

@media (max-width: 680px) {
  .site-header #main-nav {
    top: 72px;
    height: calc(100dvh - 72px);
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 980px) {
    .site-header #main-nav { height: calc(100vh - 86px); }
  }
  @media (max-width: 680px) {
    .site-header #main-nav { height: calc(100vh - 72px); }
  }
}
