/* ===========================
   KVアニメーション設定
   =========================== */

/* 1枚あたり5秒で切り替わるのを5回繰り返す場合は、25s/5sに設定 */
:root {
  --kv-loop: 25s;
  /* 全体ループ時間（= 枚数 × 1枚の表示時間） */
  --kv-per: 5s;
  /* 1枚の表示時間 */
}

/* 画像の割当（1枚目までpreload） */
.fv.is-kv-animated .slide:nth-child(1) .bg,
.fv.is-kv-animated .slide:nth-child(1) .fg {
  background-image: url("../img/KV_01.webp");
}


/* ===========================
   ↑設定ここまで↑
   これより下は編集非推奨
   =========================== */

/* ==============================
   FV（ヘッダー＋KV）
   ============================== */
.fv {
  width: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.fv::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, .8) 9.62%, rgba(0, 0, 0, 0) 30.77%),
    url("../img/KV_01.webp") center / cover no-repeat lightgray;
  filter: blur(8px);
  transform: scale(1.1);
  z-index: -1;
}

.fv__container {
  width: var(--container-w);
  max-width: var(--container-w);
  margin: 0 auto;
}

.header {
  height: var(--header-h);
  background-color: var(--color-accent);
  display: flex;
  align-items: center;
  padding-left: 12px;
}

@media (max-width: 809px) {
.header {
  padding-left: 6px;
}
}

.logo {
  height: 40px;
}

.kv {
  position: relative;
  width: 100%;
  height: calc(var(--fv-h) - var(--header-h));
}

/* タグライン */
.tagline_txt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tagline_txt p {
  color: var(--color-text_light);
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
}

@media (max-width: 809px) {
  .tagline_txt {
    padding: 27px 20px;
    gap: 17px;
  }

  .tagline_txt p {
    line-height: 18px;
  }

  .kv::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 10%, rgba(0, 0, 0, 0) 60%);
  }

}

.fv,
.fv__slides,
.slide {
  background-color: var(--color-key);
}

.fv.is-kv-animated {
  position: relative;
  isolation: isolate;
  --header-h: 60px;
  --fv-h: 590px;
}

.fv.is-kv-animated::before {
  content: none !important;
}

.fv.is-kv-animated .fv__container {
  position: relative;
  z-index: 1;
}

.fv.is-kv-animated .kv {
  height: calc(var(--fv-h) - var(--header-h));
  background: none;
}

.fv.is-kv-animated .kv::after {
  z-index: 2;
}

/* ===== スライド本体（FV直下） ===== */
.fv.is-kv-animated .fv__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.fv.is-kv-animated .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: kvFade var(--kv-loop) infinite linear;
  will-change: opacity;
}

/* 外側：全幅ブラー */
.fv.is-kv-animated .slide .bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: center / cover no-repeat;
  filter: blur(8px);
  transform: scale(1.1);
  will-change: filter, transform;
}

.fv.is-kv-animated .slide .fg {
  position: absolute;
  top: var(--header-h);
  left: 50%;
  height: calc(var(--fv-h) - var(--header-h));
  width: var(--container-w);
  max-width: var(--container-w);
  transform: translateX(-50%);
  overflow: hidden;
  background: center / cover no-repeat;
  z-index: 1;
}

.fv.is-kv-animated .slide .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, .8) 10%, rgba(0, 0, 0, 0) 40%);
}

.fv.is-kv-animated .slide .fg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(0deg, rgba(0, 0, 0, .8) 10%, rgba(0, 0, 0, 0) 40%);
}

.tagline_txt {
  z-index: 4;
}

/* 表示順（kv-per の倍数） */
.fv.is-kv-animated .slide:nth-child(1) {
  animation-delay: calc(var(--kv-per) * 0);
}

.fv.is-kv-animated .slide:nth-child(2) {
  animation-delay: calc(var(--kv-per) * 1);
}

.fv.is-kv-animated .slide:nth-child(3) {
  animation-delay: calc(var(--kv-per) * 2);
}

.fv.is-kv-animated .slide:nth-child(4) {
  animation-delay: calc(var(--kv-per) * 3);
}

.fv.is-kv-animated .slide:nth-child(5) {
  animation-delay: calc(var(--kv-per) * 4);
}

@keyframes kvFade {
  0% {
    opacity: 0;
  }

  6% {
    opacity: 1;
  }

  20% {
    opacity: 1;
  }

  24% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}