.menu-btn {
  position: absolute;
  z-index: 1;
  right: 1rem;
  top: 1rem;
  height: 20px;
  width: 28px;
  cursor: pointer;
  @include transition-ease;

  &__burger {
    position: absolute;
    right: 0;
    top: 0.5rem;
    width: 28px;
    height: 3px;
    background: set-text-color($primary-color);
    @include transition-ease;

    &::before {
      content: '';
      position: absolute;
      top: -8px;
      width: 28px;
      height: 3px;
      background: set-text-color($primary-color);
      @include transition-ease;
    }

    &::after {
      content: '';
      position: absolute;
      top: 8px;
      width: 20px;
      height: 3px;
      background: set-text-color($primary-color);
      @include transition-ease;
    }

    &.open {
      transform: rotate(720deg);
      background: transparent;

      &::before {
        transform: rotate(45deg) translate(5px, 8px);
      }

      &::after {
        width: 28px;
        transform: rotate(-45deg) translate(3px, -7px);
      }
    }
  }
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  opacity: 0.98;
  visibility: hidden;

  &.open {
    visibility: visible;
  }

  .menu-nav {
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    background: $primary-color;
    list-style-type: none;
    padding-right: 1rem;
    transform: translateY(-100%);
    @include transition-ease;

    &.open {
      transform: translateY(0);
    }

    &__item {
      transform: translateX(100vw);
      @include transition-ease;

      &.open {
       transform: translateX(0); 
      }

      &.active > a {
        color: $secondary-color;
      }
    }

    &__link {
      display: inline-block;
      font-size: 2rem;
      text-transform: uppercase;
      padding: 2rem 0;
      font-weight: 300;
      @include transition-ease;

      &:hover {
        color: $secondary-color;
      }
    }
  }
}

@for $i from 1 through 4 {
  .menu-nav__item:nth-child(#{$i}) {
    transition-delay: ($i * 0.1s) + 0.15s;
  }
}
