/* ==========================================================================
   Menu mobile
   ========================================================================== */

/* Full-screen native <dialog>, opened by js/modules/mobile-menu.js */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 11px 15px 40px;
  border: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden auto; /* the link highlight bleeds to the screen edges */
  overscroll-behavior: contain;
  background-color: var(--color-pink);
}

.mobile-menu__close {
  text-align: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 0;
  background-color: var(--color-red);
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-black);
  line-height: 21px; /* 41px tall, same as the header MENU button */
  align-self: flex-end;
}

.mobile-menu__nav {
  position: relative;
  width: 100%;
  padding: 24px 0 0;
  display: block;
}

.mobile-menu__cta {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  border: 0;
  background-color: var(--color-black);
  display: flex;
  width: 100%;
  min-height: 80px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-cream);
  line-height: 1.1;
  margin-top: 30px;
  justify-content: center;
  align-items: center;
}

.mobile-menu__logo {
  display: block;
  width: 100%;
  margin-top: 35px;
}

.mobile-menu__tagline {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--color-black);
  line-height: 1.1;
  text-align: center;
  margin-top: 55px;
}


/* Mobile — Figma "Menu Aberto" (440px frame: 1vw = 4.4px), so the menu
   keeps the same proportions on every phone width */
@media (max-width: 767px) {
  .mobile-menu {
    padding: 11px 13px 20.4545vw 3.4091vw;
  }

  .mobile-menu__nav {
    margin-left: -1.3636vw;
    padding: 2.5vw 0 0;
  }

  .mobile-menu__nav .nav__list {
    gap: 5.6818vw;
  }

  .mobile-menu__nav .nav__link {
    padding: 2.2727vw;
    font-size: 4.5455vw;
    line-height: 1.3;
  }

  .mobile-menu__nav .nav__link::before {
    inset: -2.0455vw -100vw;
  }

  .mobile-menu__cta {
    width: 93.1818vw;
    min-height: 18.1818vw;
    margin-top: 7.2727vw;
    padding: 4.5455vw;
    border-radius: 2.9545vw;
    font-size: 4.0909vw;
  }

  .mobile-menu__logo {
    width: 93.1818vw;
    margin-top: 7.0455vw;
  }

  .mobile-menu__tagline {
    margin: 6.5909vw 0 0 -3.4091vw;
    width: 100vw;
    font-size: 2.7273vw;
  }
}

.mobile-menu:not([open]) {
  display: none;
}

.mobile-menu::backdrop {
  background-color: rgb(12 12 12 / 0.8);
}

/* The dialog has a fixed height and scrolls: keep children at their natural size */
.mobile-menu > * {
  flex-shrink: 0;
}
