@charaset "utf-8";

@import url('https://fonts.googleapis.com/css2?family=Dosis&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Dosis', sans-serif;
}

/* main background setting */
main {
  position: relative;
  background-image: url('bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: -1;
}

/* main {
  position: relative;
  background-image: url('bg.jpg');
  background-size: cover;

  width: 100%;
  height: 100%;

  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 0;
} */

/* 背景と文字オーバーレイz-indexで表裏調整 */
main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.2);
  z-index: 0;
}

/* main::before {
  content: '';
  position: absolute;
  z-index: -1;
  // blurで指定したpxと同じ値を指定する
  top: -10px;
  bottom: -10px;
  left: -10px;
  right: -10px;
  background: inherit;
  filter: blur(10px);
} */

/* main {
  height: 100vh;
  background-color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
} */


.code {
  font-family: "M PLUS 1p";
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.05em;
}

.textAnimation {
  color: #fff;
  /* font-size: 80px; */
  font-size: 60px;
  /* font-weight: bold; */
  letter-spacing: 0.05em;
}

.textAnimation2 {
  color: #f00;
  /* font-size: 60px; */
  font-size: 30px;
  /* font-weight: bold; */
  letter-spacing: 0.05em;
}

.textAnimation:not(:first-of-type) {
  margin-top: 40px;
}

.textAnimation2:not(:first-of-type) {
  margin-top: 40px;
}

@keyframes showTextFromBottom1 {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
  }
}

@keyframes showTextFromTop1 {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
  }
}

@keyframes showTextFromTop {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes showTextFromBottom {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0px);
  }
}


.textAnimation span {
  display: inline-block;
}

.textAnimation > span {
  overflow: hidden;
}

/* .textAnimation > span:nth-of-type(odd) > span {
  animation: showTextFromTop cubic-bezier(0, 0.8, 0.2, 1) 1s backwards;
}
.textAnimation > span:nth-of-type(even) > span {
  animation: showTextFromBottom cubic-bezier(0, 0.8, 0.2, 1) 1s backwards;
} */

.textAnimation2 span {
  display: inline-block;
}

.textAnimation2 > span {
  overflow: hidden;
}

.textAnimation2 > span:nth-of-type(odd) > span {
  animation: showTextFromTop cubic-bezier(0, 0.8, 0.2, 1) 3s backwards;
}
.textAnimation2 > span:nth-of-type(even) > span {
  animation: showTextFromBottom cubic-bezier(0, 0.8, 0.2, 1) 3s backwards;
}


.textAnimation span:nth-of-type(odd) {
  animation: showTextFromTop1 ease-out 2s backwards;
}

.textAnimation span:nth-of-type(even) {
  animation: showTextFromBottom1 ease-out 2s backwards;
} 
