@charset "utf-8";

/*===========================================================*/
/*機能編 4-2-4　背景色が伸びる（左から右）　 */
/*===========================================================*/

/*========= ローディング画面のためのCSS ===============*/
#splash {
  position: fixed;
  width: 100%;
  height: 100%;
  opacity: 1;
  animation-name: splashSequence;
  animation-duration: 1.8s;
  animation-delay: 0.7s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  background: url("../../img/main_logo_load.png") center/10% no-repeat,
    linear-gradient(180deg, #000000 0%, #16213e 50%, #061527 100%);
}
@media screen and (max-width: 690px) {
  #splash {
    background: url("../../img/main_logo_load.png") center/30% no-repeat,
      linear-gradient(180deg, #000000 0%, #16213e 50%, #061527 100%);
  }
}
@media screen and (max-width: 450px) {
  #splash {
    background: url("../../img/main_logo_load.png") center/50% no-repeat,
      linear-gradient(180deg, #000000 0%, #16213e 50%, #061527 100%);
  }
}

#splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  animation-name: overlayFadeOut;
  animation-duration: 0.5s;
  animation-delay: 0.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

#splash-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes overlayFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes splashSequence {
  0% {
    background-image: url("../../img/main_logo_load.png"),
      linear-gradient(180deg, #000000 0%, #16213e 50%, #061527 100%);
    background-position: center, center;
    opacity: 1;
  }
  100% {
    background-image: url("../../img/main_logo_load.png"),
      linear-gradient(180deg, #000000 0%, #16213e 50%, #061527 100%);
    background-position: center, center;
    opacity: 0;
  }
}

/*========= 画面遷移のためのCSS ===============*/

/*画面遷移アニメーション*/

.splashbg {
  display: none;
}

body.appear .splashbg {
  display: block;
  content: "";
  position: fixed;
  z-index: 9999;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  transform: scaleX(0);
  background: linear-gradient(
    38deg,
    #d2d200 0%,
    #a55f00 100%
  ); /*伸びる背景色の設定*/
  animation-name: PageAnime;
  animation-duration: 0.8s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

@keyframes PageAnime {
  0% {
    transform-origin: left;
    transform: scaleX(0);
  }
  50% {
    transform-origin: left;
    transform: scaleX(1);
  }
  50.001% {
    transform-origin: right;
  }
  100% {
    transform-origin: right;
    transform: scaleX(0);
  }
}

/*画面遷移の後現れるコンテンツ設定*/
#container {
  opacity: 0; /*はじめは透過0に*/
}

/*bodyにappearクラスがついたら出現*/
body.appear #container {
  animation-name: PageAnimeAppear;
  animation-duration: 1s;
  animation-delay: 0.8s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes PageAnimeAppear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
