.menu-substrate {
  width: 100%;
  height: 60px
}

.menu {
  background: var(--bg-menu);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  transition: top .4s ease-out
}

.menu__wrap {
  display: grid;
  grid-template-areas: "logo""menu";
  grid-template-rows: -webkit-min-content 1fr;
  grid-template-rows: min-content 1fr;
  transition: all 1s cubic-bezier(.2, .9, .3, 1)
}

.menu.hide {
  top: -100%;
  transition: top .8s ease-in
}

.menu.active .menu__wrap {
  height: 100vh
}

.menu.active .menu__item {
  height: 100%;
  margin-top: 0;
  opacity: 1;
  transition: all 1s cubic-bezier(.2, .9, .3, 1), opacity .7s linear .3s
}

.menu__hamburger {
  background: transparent;
  width: 2rem;
  height: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  position: absolute;
  top: 10px;
  left: calc(var(--wrap) - 5px);
  padding: 5px
}

.menu__hamburger span {
  display: block;
  background: var(--c-dark);
  border-radius: 2px;
  height: 1.8px;
  width: 100%;
  transition: all 1s cubic-bezier(.175, .885, .32, 1.275)
}

.menu__hamburger span:nth-of-type(3) {
  transition-delay: .1s
}

.menu__hamburger.active span {
  transition: all 1s cubic-bezier(.175, .885, .32, 1.275);
  position: absolute;
  width: 80%
}

.menu__hamburger.active span:first-of-type {
  transform: rotate(-45deg);
  transition-delay: .1s
}

.menu__hamburger.active span:nth-of-type(2) {
  transform: rotate(45deg);
  transition-delay: .1s
}

.menu__hamburger.active span:nth-of-type(3) {
  width: 0;
  opacity: 0
}

.menu__item {
  display: grid;
  grid-area: menu;
  grid-template-areas: "nav""btn""g";
  grid-template-rows: 1fr -webkit-min-content -webkit-min-content;
  grid-template-rows: 1fr min-content min-content;
  height: 0;
  margin-top: -100%;
  opacity: 0;
  overflow: hidden;
  transition: all 1s cubic-bezier(.2, .9, .3, 1), opacity .1s linear
}

.menu__logo {
  grid-area: logo;
  width: 100%;
  padding: 10px 0;
}

.menu__logo > img {
  max-width: 120px;
  display: block;
  margin: 0 auto;
}

.menu__nav {
  grid-area: nav;
  margin: 20px auto;
  width: 100%
}

.menu__nav-item {
  margin-left: 10px;
  position: relative;
  border-bottom: 1px solid var(--bg-secondary)
}

.menu__nav-item a {
  padding: 16px 10px 16px 0;
  display: block;
  position: relative;
  z-index: 1
}

.menu__nav-item:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid var(--c-dark);
  border-right: 2px solid var(--c-dark);
  border-radius: 2px;
  transform: rotate(-45deg);
  opacity: .5
}

.menu__nav-item:hover:after {
  border-color: var(--c-secondary)
}

.menu__nav-item.active:after {
  border-color: var(--c-accent)
}

.menu__btn {
  grid-area: btn;
  margin: 10px auto;
  width: 100%
}

.menu__geberich {
  display: none;
  grid-area: g;
  width: 80px;
  height: auto;
  margin: 10px auto;
  fill: #b7bcc1
}

@media(min-width:980px) {
  .menu-substrate {
    height: 70px
  }

  .menu__wrap {
    grid-template-areas: "logo nav btn";
    grid-template-columns: -webkit-min-content 1fr -webkit-max-content;
    grid-template-columns: min-content 1fr max-content;
    align-items: center
  }

  .menu.active .menu__wrap {
    height: auto
  }

  .menu__item {
    display: contents;
    font-size: 14px
  }

  .menu__logo {
    width: 120px
  }

  .menu__geberich,
  .menu__hamburger {
    display: none
  }

  .menu__nav {
    margin: 0
  }

  .menu__nav-wrap {
    display: flex;
    flex-direction: row;
    justify-content: center
  }

  .menu__nav-item {
    border-bottom: none;
    border-top: 2px solid var(--bg-secondary);
    margin-left: 0;
    padding-left: 5px;
    padding-right: 5px;
    text-align: center
  }

  .menu__nav-item a {
    display: inline-block;
    padding: 27px 20px
  }

  .menu__nav-item:hover {
    border-color: var(--c-secondary)
  }

  .menu__nav-item.active {
    border-color: var(--c-accent)
  }

  .menu__nav-item:after {
    content: normal
  }
}

@media screen and (min-width:1600px) {
  .menu__geberich {
    display: none;
    position: absolute;
    right: calc(50% - 50vw + 20px)
  }
}