/* =========================================================
   アニメーション（旧サイトの animate.css と同じ動き）
   要素の下の端が画面に入ったときに1回だけ動く（main.js で is-animated を付ける）
   ブロックの「高度な設定 > 追加CSSクラス」に次のクラスを書くと使える
     anim-bounce      … 跳ねる（丸アイコンなど）
     anim-fade-up     … 下からふわっと表示
     anim-fade-right  … 右からふわっと表示
     anim-delay-02〜anim-delay-1 … 動き出すまでの時間（0.2秒〜1秒）
   ========================================================= */
html.js-anim .anim-bounce:not(.is-animated),
html.js-anim .anim-fade-up:not(.is-animated),
html.js-anim .anim-fade-right:not(.is-animated) { visibility: hidden; }

.anim-bounce.is-animated,
.anim-fade-up.is-animated,
.anim-fade-right.is-animated { animation-duration: 1s; animation-fill-mode: both; }

.anim-bounce.is-animated { animation-name: hayahito-bounce; transform-origin: center bottom; }
.anim-fade-up.is-animated { animation-name: hayahito-fade-up; }
.anim-fade-right.is-animated { animation-name: hayahito-fade-right; }

.anim-delay-02 { animation-delay: .2s; }
.anim-delay-04 { animation-delay: .4s; }
.anim-delay-06 { animation-delay: .6s; }
.anim-delay-08 { animation-delay: .8s; }
.anim-delay-1  { animation-delay: 1s; }

@keyframes hayahito-bounce {
	0%, 20%, 53%, 80%, 100% { animation-timing-function: cubic-bezier(.215, .61, .355, 1); transform: translate3d(0, 0, 0); }
	40%, 43% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -30px, 0); }
	70% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -15px, 0); }
	90% { transform: translate3d(0, -4px, 0); }
}
@keyframes hayahito-fade-up {
	0% { opacity: 0; transform: translate3d(0, 100%, 0); }
	100% { opacity: 1; transform: none; }
}
@keyframes hayahito-fade-right {
	0% { opacity: 0; transform: translate3d(100%, 0, 0); }
	100% { opacity: 1; transform: none; }
}
/* 右からの動きで横スクロールが出ないようにする */
.entry-content { overflow-x: clip; }

/* 動きを減らす設定の利用者には、アニメーションせずに表示する */
@media (prefers-reduced-motion: reduce) {
	html.js-anim .anim-bounce, html.js-anim .anim-fade-up, html.js-anim .anim-fade-right { visibility: visible !important; animation: none !important; }
}
