/* Uniwords English | HERO 7-photo crossfade
   既存の hero.css をこのファイルで置き換えます。
   文字・下線・CTA は固定し、写真のみ切り替えます。 */
.uw-hero {
  --uw-hero-mint: #84f3ec;
  --uw-hero-button: #14a896;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(440px, 39.583vw, 760px);
  overflow: hidden;
  background: #0b1726;
}

.uw-hero__slides,
.uw-hero__slide,
.uw-hero__slide img,
.uw-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uw-hero__slide {
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 0;
}

.uw-hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.uw-hero__slide img {
  display: block;
  object-fit: cover;
  object-position: center center;
}

.uw-hero__slide:first-child img {
  object-position: center 22%;
}

.uw-hero__shade {
  z-index: 2;
  background: linear-gradient(90deg, rgba(4, 18, 31, .30), rgba(4, 18, 31, .25));
  pointer-events: none;
}

/* PC: 文字ブロック全体を右側・縦中央に固定 */
.uw-hero__content {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 64px);
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
}

.uw-hero__heading {
  margin: 0;
  font-size: clamp(38px, 5vw, 76px);
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: .025em;
  text-align: right;
}

.uw-hero__heading span {
  display: block;
}

.uw-hero__accent {
  color: var(--uw-hero-mint);
}

.uw-hero__script {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 20px 0 30px;
  color: #ffb56c;
  font-family: "Caveat", cursive;
  font-size: clamp(34px, 4vw, 62px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-align: right;
  /* 筆記体と下線を一緒に、右上がりの手書き風に */
  transform: rotate(-2deg);
  transform-origin: left center;
}

/* 太めで緩やかに右上がりの手描き風ライン */
.uw-hero__script::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 22' preserveAspectRatio='none'%3E%3Cpath d='M5 16 C115 13 195 14 294 11 S480 7 595 5' fill='none' stroke='%2384f3ec' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.uw-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 13px 20px;
  border-radius: 5px;
  background: var(--uw-hero-button);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.uw-hero__button:hover,
.uw-hero__button:focus-visible {
  background: #087ea4;
}

.uw-hero__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #0b1726;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  /* > の字形による視覚的なずれを微調整 */
  padding: 0 0 2px 1px;
  box-sizing: border-box;
}

/* スマホ: 写真上部の右寄りにコピーを固定（参考スクリーンショット準拠） */
@media (max-width: 767px) {
  .uw-hero {
    height: min(780px, 100svh);
    min-height: 580px;
  }

  .uw-hero__content {
    top: 30px;
    right: 5%;
    bottom: auto;
    left: auto;
    transform: none;
    width: max-content;
    max-width: calc(100% - 36px);
    height: auto;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: flex-end;
  }

  .uw-hero__heading {
    font-size: clamp(27px, 7.5vw, 42px);
    line-height: 1.4;
    text-align: right;
  }

  .uw-hero__script {
    margin: 16px 0 10px;
    font-size: clamp(27px, 7vw, 40px);
  }

  /* スマホ版CTAを復元 */
  .uw-hero__button {
    display: inline-flex;
    margin-top: 18px;
    padding: 11px 12px;
    gap: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .uw-hero__arrow {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
    font-size: 15px;
  }

  .uw-hero__shade {
    background: linear-gradient(180deg, rgba(4,18,31,.38), rgba(4,18,31,.05) 72%);
  }

  .uw-hero__slide:first-child img {
    object-position: center center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uw-hero__slide {
    transition: none;
  }
}
