@charset "utf-8";
.openbtn{
  position: relative;/*ボタン内側の基点となるためrelativeを指定*/
  cursor: pointer;
    width: 46px;
    height:46px;
    z-index: 3;
}

/*ボタン内側*/
.openbtn span{
    display: inline-block;
    transition: all .4s;/*アニメーションの設定*/
    position: absolute;
    left: 14px;
    height: 1px;
  background: #fff;
    width: 40%;
  }

.openbtn span:nth-of-type(1) {
  top:14px;
}

.openbtn span:nth-of-type(2) {
  top:23px;
}

.openbtn span:nth-of-type(3) {
  top:32px;
}

/*activeクラスが付与されると線が回転して×に*/

.openbtn.active span:nth-of-type(1) {
    top: 20px;
    left: 18px;
    transform: translateY(6px) rotate(-45deg);
    width: 32%;
    z-index: 3;
    background-color: #e60012;
}

.openbtn.active span:nth-of-type(2) {
  opacity: 0;/*真ん中の線は透過*/
}

.openbtn.active span:nth-of-type(3){
    top: 32px;
    left: 18px;
    transform: translateY(-6px) rotate(45deg);
    width: 32%;
    z-index: 3;
    background-color: #e60012;
}

.openbtn.active {
  position: fixed;
  top: 30px;
right: 25px;
}




.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s, visibility .5s;
  background-color: #fff;
  z-index: 2;
  width: 100vw;
  text-align: center;
  line-height: 4.5rem;
  padding-top: 40px;
}

.nav.active {
  opacity: 1;
  visibility: visible;
}




.nav a {
  position: relative;
  }
  .nav a::after {
    position: absolute;
    bottom: -4px;
    left: 0;
    content: '';
    width: 100%;
    height: 1px;
    background: #e60012;
    transform: scale(0, 1);
    transform-origin: left top;
    transition: transform .3s;
  }
  .nav a:hover::after {
    transform: scale(1, 1);
  }