/* ==========================================================================
   TOPページ ヒーロー「写真スライダー」スタイル
   - index.html のヒーローを、「仕事を知る」01・02・04・05・06のメイン写真の
     ズームイン切り替えにする（他のセクションは元のまま）
   ========================================================================== */

.hero__photoslider-outer {
  position: relative;
  z-index: 1;
  width: 100vw;
  margin: 40px calc(-50vw + 50%) 0 calc(-50vw + 50%);
  padding-right: clamp(60px, 16vw, 320px);
}

@media screen and (max-width: 900px) {
  .hero__photoslider-outer {
    padding-right: clamp(30px, 8vw, 160px);
  }
}

.hero__photoslider {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
  background: var(--ebm-bg-soft);
}

/* 5枚を4秒ずつ順番にクロスフェード（20秒で1周） */

.hero__photoslide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: hero-slide-cycle 20s infinite;
  animation-fill-mode: backwards;
}

.hero__photoslide:nth-child(1) { animation-delay: 0s; }
.hero__photoslide:nth-child(2) { animation-delay: 4s; }
.hero__photoslide:nth-child(3) { animation-delay: 8s; }
.hero__photoslide:nth-child(4) { animation-delay: 12s; }
.hero__photoslide:nth-child(5) { animation-delay: 16s; }

@keyframes hero-slide-cycle {
  0%    { opacity: 0; }
  1.25% { opacity: 1; }
  18%   { opacity: 1; }
  20%   { opacity: 0; }
  100%  { opacity: 0; }
}

.hero__photoslider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1);
  animation: hero-photo-zoom 20s infinite;
}

.hero__photoslide:nth-child(1) .hero__photoslider-img {
  animation-delay: 0s;
  filter: brightness(1.16) saturate(0.88) hue-rotate(-6deg);
}
.hero__photoslide:nth-child(2) .hero__photoslider-img { animation-delay: 4s; }
.hero__photoslide:nth-child(3) .hero__photoslider-img { animation-delay: 8s; }
.hero__photoslide:nth-child(4) .hero__photoslider-img {
  animation-delay: 12s;
  filter: brightness(1.14) saturate(0.88) hue-rotate(-6deg);
}
.hero__photoslide:nth-child(5) .hero__photoslider-img { animation-delay: 16s; }

@keyframes hero-photo-zoom {
  0%    { transform: scale(1); }
  20%   { transform: scale(1.03); }
  100%  { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__photoslide,
  .hero__photoslider-img {
    animation: none !important;
  }
  .hero__photoslide {
    opacity: 0;
  }
  .hero__photoslide:nth-child(1) {
    opacity: 1;
  }
}

/* ---- PC：キャッチの下に、別案トップの動画の枠と同じ横長比率（95%）のスライダー ---- */

@media screen and (min-width: 901px) {
  .hero__photoslider {
    aspect-ratio: 1442 / 574;
    transform: scale(0.95);
    transform-origin: 0 0;
  }
}
