@font-face {
  font-family: "Geource Sans CHS";
  src: url("/assets/fonts/GeourceSansCHS-Bold-hero.woff2?v=20261025-2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.home-hero-rotator {
  position: relative;
}

.home-hero-rotator img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

.home-hero-rotator img:first-child {
  /* Four images share a 40s loop, with each image visible for 10s. */
  animation: home-hero-first 40s ease-in-out infinite;
}

.home-hero-rotator img:nth-child(2) {
  animation: home-hero-second 40s ease-in-out infinite;
}

.home-hero-rotator img:nth-child(3) {
  animation: home-hero-third 40s ease-in-out infinite;
}

.home-hero-rotator img:nth-child(4) {
  animation: home-hero-fourth 40s ease-in-out infinite;
}

.home-hero-title {
  position: absolute;
  z-index: 2;
  top: 53%;
  left: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #fff;
  font-family: "Geource Sans CHS", "Noto Sans SC", sans-serif;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(4, 25, 59, 0.72), 0 8px 25px rgba(4, 25, 59, 0.42);
}

.home-hero-title span {
  display: block;
}

.home-hero-title-lead,
.home-hero-title-main {
  font-size: clamp(35px, 3.75vw, 50px);
}

.home-hero-title-ja {
  font-family: "Geource Sans CHS", "Hiragino Kaku Gothic ProN", "Noto Sans SC", sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.13em;
}

@media (max-width: 640px) {
  .home-hero-rotator img:nth-child(n + 2) {
    object-position: 75% center;
  }

  .home-hero-title {
    top: 49%;
    left: 24px;
  }

  .home-hero-title-lead,
  .home-hero-title-main {
    font-size: clamp(28px, 7.5vw, 36px);
  }

  .home-hero-title-ja {
    font-size: 14px;
  }
}

@keyframes home-hero-first {
  0%, 22.5% { opacity: 1; }
  25%, 97.5% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes home-hero-second {
  0%, 22.5% { opacity: 0; }
  25%, 47.5% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes home-hero-third {
  0%, 47.5% { opacity: 0; }
  50%, 72.5% { opacity: 1; }
  75%, 100% { opacity: 0; }
}

@keyframes home-hero-fourth {
  0%, 72.5% { opacity: 0; }
  75%, 97.5% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-rotator img:first-child {
    animation: none;
    opacity: 1;
  }

  .home-hero-rotator img:nth-child(n + 2) {
    animation: none;
    display: none;
  }
}
