/* MENU */

nav {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border-top: 1px solid;
  border-bottom: 1px solid;
  padding: var(--base-margin) 0.3rem;
  margin: 2rem 0 var(--base-margin) 0;
}

/* SMALL SCREEN */

@media screen and (min-width: 768px) {
  nav a {
    font-size: var(--base-font-size);
  }
  .topnav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* SMALL + BIG SCREEN */

.topnav {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.topnav .icon {
  display: none;
}

/* BIG SCREEN */

@media screen and (max-width: 767px) {
  .topnav {
    height: 5rem;
  }
  .topnav a {
    font-size: 3rem;
    line-height: 5rem;
  }
  .topnav a {
    display: none;
  }
  .topnav a.icon {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .topnav.responsive {
    height: auto;
  }
  .topnav.responsive a {
    display: block;
  }
  .topnav.responsive a:first-child {
    margin-top: 5rem;
  }
  /* Hamburger itself*/
  .hamburger {
    position: relative;
    margin-top: 1.25rem;
    height: 2.5rem;
    width: 3.5rem;
  }
  .hamburger__bar {
    width: 100%;
    height: 2px;
    background-color: black;
    position: absolute;
  }
  .opacity.hamburger__bar--one {
    top: 0;
  }
  .opacity.hamburger__bar--four {
    top: calc(100% - 2px);
  }
  .hamburger__bar.opacity {
    transition-property: opacity;
    transition-duration: 0.2s;
    opacity: 1;
  }
  .topnav.responsive .hamburger__bar.opacity {
    opacity: 0;
  }
  .hamburger__bar.rotate {
    transition-duration: 0.2s;
    transition-property: transform;
    transform: rotate(0deg);
    transform-origin: center center;
    top: calc(50% - calc(2px / 2));
  }
  .topnav.responsive .rotate.hamburger__bar--two {
    transform: rotate(35deg);
  }
  .topnav.responsive .rotate.hamburger__bar--three {
    transform: rotate(-35deg);
  }
}