@charset "UTF-8";
/* =========================================================
   トップページ ヒービジュアル (Swiper + Ken Burns)
   ========================================================= */

body {
  overflow-x: hidden;
}

/* カルーセル全体
   ─ セゾン方式：1600×900 を基準にビューポート幅に連動して全要素を等倍スケール。
   ─ 画像・テキスト・ボタン・インジケーターの相対位置が常に固定される。 */
#visual {
  position: relative;
  width: 100vw;
  overflow: hidden;
}

#visual .swiper {
  width: 100%;
}

/* スライド */
.hero-slide {
  position: relative;
  width: 100%;
  overflow: hidden;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* PC: 1600×900 基準。幅に連動して等倍スケールだが、高さは 900px で cap。
   画像は object-fit: cover + 下寄せで人物イラスト側を優先残存。 */
@media screen and (min-width: 768px) {
  :root {
    --hero-h: min(calc(100vw * 900 / 1600));
  }

  #visual {
    height: var(--hero-h);
    aspect-ratio: unset !important;
  }

  #visual .swiper {
    height: var(--hero-h);
    overflow: hidden;
  }

  #visual .swiper-slide,
  .hero-slide {
    height: var(--hero-h);
  }

  .hero-slide picture {
    height: var(--hero-h);
    overflow: hidden;
  }

  #visual .swiper-wrapper {
    height: var(--hero-h);
  }

  .hero-slide picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }
}

/* フェードのイージング */
.js-hero-swiper .swiper-slide {
  transition-timing-function: ease-in-out !important;
}

/* Swiper の slide 幅を強制的にビューポート幅に */
.js-hero-swiper .swiper-slide {
  width: 100vw !important;
  flex-shrink: 0;
  z-index: 1;
}

/* アクティブスライドを最前面に */
.js-hero-swiper .swiper-slide-active {
  z-index: 10;
}

/* Swiper の loop + fade で slide 1 などが裏面に透けて見える問題への対策。
   重要: Swiperの .swiper-slide-prev / -next クラスは DOM 上の前後で付与されるため、
   loopFix によって slide 1 が DOM 上 active の隣に再配置されると、論理的に無関係なのに
   prev/next クラスが付いて表示されてしまう。
   そのためクラスベースの visibility 制御は使わず、JS側で realIndex ベースに
   inline visibility を直接管理する（hero.js の on イベント参照）。
   CSS は「初期表示の保険」として全スライドを hidden にしておくだけ。 */
.js-hero-swiper .swiper-slide {
  visibility: hidden;
}

/* 画像全体をリンク化 */
.hero-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  /* SP: <a>のドラッグ/長押しメニューがSwiperのスワイプを邪魔しないように抑制 */
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  transition: transform 0.5s ease;
}

.js-hero-swiper.is-hovered .hero-link {
  transform: scale(1.06);
}

/* グローバルの `a:hover img { opacity: 0.8 }` を無効化
   （Ken Burns の scale と重なると画像が著しくぼやけるため） */
.hero-link:hover img,
.hero-link:focus img {
  opacity: 1;
}

/* インジケーター（PC: 画像左下に重なる） */
.hero-indicator-wrap {
  position: absolute;
  /* 画面幅に応じてスケールしつつ、最低でも画像下から32px確保 */
  bottom: calc(32 / 1600 * 100vw);
  left: calc(80 / 1600 * 100vw);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 20;
  height: 24px;
  /* 下のバナー<a>へクリックを透過させない（wrapper全域でクリックを受け止める） */
  pointer-events: auto;
}

@media screen and (min-width: 1600px) {
  .hero-indicator-wrap {
    bottom: 32px;
    left: 80px;
  }
}

.hero-indicator-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 各インジケーターバー（当たり判定12px、視覚バーは::beforeで2px描画） */
.hero-ind {
  position: relative;
  width: 20px;
  /* 非アクティブ幅 PC */
  height: 12px;
  flex-shrink: 0;
  cursor: pointer;
  transition: width 0.3s ease;
  pointer-events: auto;
  overflow: hidden;
  border-radius: 3px;
}

.hero-ind::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  transition: background-color 0.4s;
}

.hero-ind.is-active {
  width: 64px;
  /* アクティブ幅 PC */
}

/* アクティブ時の進捗Fill（JS で幅をアニメ） */
.hero-ind-fill {
  position: absolute;
  left: 0;
  top: 5px;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  border-radius: 3px;
  pointer-events: none;
  transition: background-color 0.4s;
}

/* 再生/停止ボタン（24×24 丸） */
.hero-play-btn {
  position: relative;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  pointer-events: auto;
  box-sizing: border-box;
  transition: opacity 0.2s ease, border-color 0.4s;
}

.hero-play-btn:hover {
  opacity: 0.75;
}

/* 一時停止アイコン（2本の縦バー） */
.hero-play-btn.is-playing::before,
.hero-play-btn.is-playing::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 2px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 3px;
  transition: background-color 0.4s;
}

.hero-play-btn.is-playing::before {
  left: 8px;
}

.hero-play-btn.is-playing::after {
  left: 12px;
}

/* 再生アイコン（右向き三角） */
.hero-play-btn.is-paused::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #ffffff;
}

/* PC：左右矢印は非表示（Figmaデザインでは使わない） */
.swiper-button-prev,
.swiper-button-next {
  display: none !important;
}

/* SP */
@media (max-width: 767px) {
  /* SP: インジケーターは画像下部、左右に20px余白を確保。
     wrap が 100vw - 40px を占有し、track が flex:1 で残り幅を埋める。
     バーの幅は track 幅に対する比率（active 7 : inactive 4）で配分される。
     ※ track-button間のgap(16px)、play buttonサイズ(24px)、bar間gap(8px) は維持。 */
  .hero-indicator-wrap {
    left: 20px;
    right: 20px;
    transform: none;
    bottom: 20px;
  }

  .hero-indicator-track {
    flex: 1;
    min-width: 0;
  }

  .hero-ind {
    flex: 4;
    width: auto;
    /* 非アクティブ幅 SP（track内で4の比率） */
  }

  .hero-ind.is-active {
    flex: 7;
    width: auto;
    /* アクティブ幅 SP（track内で7の比率） */
  }
}

/* 明るい背景のスライド時：インジケーターを紺色に切替（JS が is-light-bg クラスを付与） */
.hero-indicator-wrap.is-light-bg .hero-ind::before {
  background-color: rgba(5, 51, 148, 0.4);
}

.hero-indicator-wrap.is-light-bg .hero-ind-fill {
  background-color: #053394;
}

.hero-indicator-wrap.is-light-bg .hero-play-btn {
  border-color: #053394;
}

.hero-indicator-wrap.is-light-bg .hero-play-btn.is-playing::before,
.hero-indicator-wrap.is-light-bg .hero-play-btn.is-playing::after {
  background-color: #053394;
}

.hero-indicator-wrap.is-light-bg .hero-play-btn.is-paused::before {
  border-color: transparent transparent transparent #053394;
}
