/* ===========================================================
   motion.css — トップページの動き（2026-11-25）
   参考：プラウドデータ https://www.proud-g.jp/index.html
   ・メイン画像の動画化 ・キャッチコピーの1文字ずつ表示
   ・横に流れる帯（なめらかなスクロールは motion.js のみ）
   「動きを減らす」設定の端末でも動かす（なめらかなスクロールだけは止める）。
   =========================================================== */

/* ---------- 1. メイン画像の動画 ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 文字が読めるよう、動画は暗めに表示する */
  filter: brightness(0.62) saturate(0.9);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
  pointer-events: none;
}

.hero.has-video .hero-video {
  opacity: 1;
}

/* 文字の後ろだけを暗くする層。人物の写真でも白い文字が読めるようにしつつ、
   画面の端の人物は明るく見せる */
.hero-video-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 58% 52% at 50% 50%, rgba(8, 14, 22, 0.62) 0%, rgba(8, 14, 22, 0.32) 70%, rgba(8, 14, 22, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.2), rgba(8, 14, 22, 0.35));
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.hero.has-video .hero-video-shade {
  opacity: 1;
}

/* ---------- 2. キャッチコピーを1文字ずつ表示 ---------- */
/* 行ごとに浮かび上がる従来の動きは止め、文字単位の動きに置き換える */
.hero-motion .hero-title.is-split > span {
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-title.is-split .char {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.45em) scale(0.6);
  animation: motionCharPop 700ms cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
  animation-delay: calc(280ms + var(--i) * 70ms);
}

@keyframes motionCharPop {
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 3. 横に流れる帯 ---------- */
.motion-band {
  overflow: hidden;
  padding: 56px 0 64px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.motion-band-row {
  overflow: hidden;
}

.motion-band-row + .motion-band-row {
  margin-top: 28px;
}

.motion-band-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.motion-band-words li {
  display: flex;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(24, 141, 200, 0.55);
}

/* 単語の区切りに小さな丸を置く */
.motion-band-words li::after {
  content: "";
  width: 10px;
  height: 10px;
  margin: 0 0.9em;
  border-radius: 50%;
  background: var(--accent);
}

.motion-band-photos {
  gap: 20px;
  padding-right: 20px;
}

.motion-band-photos li {
  flex: none;
  width: clamp(220px, 26vw, 360px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
}

.motion-band-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .motion-band {
    padding: 40px 0 44px;
  }

  .motion-band-row + .motion-band-row {
    margin-top: 20px;
  }

  .motion-band-photos {
    gap: 12px;
    padding-right: 12px;
  }
}

/* 「動きを減らす」設定の端末でも、背景の動画・文字・帯は動かす（代表判断・2026-11-30） */
