/* motions */


/**************************************************************
* GLOBAL
**************************************************************/

/* Fadein blocks */

/* js-transient-obi（画像）*/
.js-transient-obi:not(.wp-theme-headline) {
  position: relative;
  overflow: hidden;
}

.js-transient-obi:not(.wp-theme-headline)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0% 50%;
  background: var(--wp--preset--color--foreground);
}

.js-transient-obi:not(.wp-theme-headline) > img {
  position: relative;
  z-index: 1;
  opacity: 0;
}

.js-transient-obi:not(.wp-theme-headline).is-animated::before {
  animation: transient-bg-cover-fx 1.5s ease-in-out forwards;
}

.js-transient-obi:not(.wp-theme-headline).is-animated > img {
  opacity: 1;
  transition-delay: 0.75s;
}

/* js-transient-obi（見出し）*/
.js-transient-obi[class*="wp-theme-headline"] {
  overflow: hidden;
  position: relative;
  display: inline-block;
}

.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__alphabetic,
.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__kana {
  position: relative;
  overflow: hidden;
}

.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__alphabetic > strong,
.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__kana > strong {
  opacity: 0;
}

.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__alphabetic::before,
.js-transient-obi[class*="wp-theme-headline"] .wp-theme-headline__kana::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0% 50%;
  background: var(--wp--preset--color--foreground);
}

.js-transient-obi[class*="wp-theme-headline"].is-animated .wp-theme-headline__alphabetic > strong,
.js-transient-obi[class*="wp-theme-headline"].is-animated .wp-theme-headline__kana > strong {
  opacity: 1;
  transition-delay: 0.75s;
}

.js-transient-obi[class*="wp-theme-headline"].is-animated .wp-theme-headline__alphabetic::before,
.js-transient-obi[class*="wp-theme-headline"].is-animated .wp-theme-headline__kana::before {
  animation: transient-bg-cover-fx 1.5s ease-in-out forwards;
}



/* wp-headline */
.wp-headline {
  animation: headline-flicker-2-fx 1.5s ease 0s alternate none running infinite;
}
.wp-headline::before,
.wp-headline::after {
  animation: headline-flicker-sidelines-fx 1.5s infinite alternate;
}

@keyframes headline-flicker-1-fx {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    text-shadow:
      -0.2rem -0.2rem 1rem #fff,
      0.2rem 0.2rem 1rem #fff,
      0 0 2rem var(--wp--preset--color--primary),
      0 0 4rem var(--wp--preset--color--primary),
      0 0 6rem var(--wp--preset--color--primary),
      0 0 8rem var(--wp--preset--color--primary),
      0 0 10rem var(--wp--preset--color--primary);
    box-shadow:
      0 0 .5rem #fff,
      inset 0 0 .5rem #fff,
      0 0 2rem var(--wp--preset--color--secondary),
      inset 0 0 2rem var(--wp--preset--color--secondary),
      0 0 4rem var(--wp--preset--color--secondary),
      inset 0 0 4rem var(--wp--preset--color--secondary);
  }
  20%,
  24%,
  55% {
    text-shadow: none;
    box-shadow: none;
  }
}

@keyframes headline-flicker-2-fx {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    text-shadow:
      -0.2rem -0.2rem 1rem var(--wp--preset--color--primary),
      0.2rem 0.2rem 1rem var(--wp--preset--color--primary),
      0 0 2rem var(--wp--preset--color--primary),
      0 0 4rem var(--wp--preset--color--primary),
      0 0 6rem var(--wp--preset--color--primary),
      0 0 8rem var(--wp--preset--color--primary),
      0 0 10rem var(--wp--preset--color--primary);
    box-shadow:
      0 0 .5rem #fff,
      inset 0 0 .5rem #fff,
      0 0 2rem var(--wp--preset--color--secondary),
      inset 0 0 2rem var(--wp--preset--color--secondary),
      0 0 4rem var(--wp--preset--color--secondary),
      inset 0 0 4rem var(--wp--preset--color--secondary);
  }
  20%,
  24%,
  55% {
    text-shadow: none;
    box-shadow: none;
  }
}

@keyframes headline-flicker-sidelines-fx {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    box-shadow:
      0 0 .5rem var(--wp--preset--color--secondary),
      inset 0 0 .5rem var(--wp--preset--color--secondary),
      0 0 2rem var(--wp--preset--color--secondary),
      inset 0 0 2rem var(--wp--preset--color--secondary),
      0 0 4rem var(--wp--preset--color--secondary),
      inset 0 0 4rem var(--wp--preset--color--secondary);
  }
  20%,
  24%,
  55% {
    box-shadow: none;
  }
}



/**************************************************************
* HERO
**************************************************************/

/* states */
#hero .hero-logo,
#hero .hero-catch__block-1 > strong,
#hero .hero-catch__block-2,
#hero .hero-catch__block-2 > strong  {
  opacity: 0;
}

#hero .hero-catch__block-2 {
  overflow: hidden;
  transform-origin: 100% 50%;
}

/* animation */

/* hero rail-horizontal-txt */
.rail-horizontal-txt {
  --rail-speed: 80s;
}

.rail-horizontal-txt__body > p {
  animation: rail-loop-slide var(--rail-speed, 80s) infinite linear both;
  will-change: transform;
}



/**************************************************************
* KEYFRAMES DEFINITIONS
**************************************************************/
@keyframes rail-loop-slide {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-101%);
  }
}

@keyframes transient-bg-cover-fx {
  0% {
    opacity: 1;
    transform: scaleX(0);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    opacity: 1;
    transform: translateX(102%);
  }
}