/* トップ main-visual スプリットヒーロー（index 専用） */

.main-visual.main-visual--hero-split {
  background: #fff;
  padding: 0;
  overflow: hidden;
  position: relative;
  height: auto;
  min-height: 0;
}

.main-visual.main-visual--hero-split .main-visual-slider,
.main-visual.main-visual--hero-split .swiper-wrapper {
  height: auto;
}

.main-visual.main-visual--hero-split .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.mv-hero-slide {
  padding: clamp(40px, 6vw, 80px) 0;
}

.mv-hero-slide__inner {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* 画像 60% / テキスト列 40%（見出しのみ左へはみ出して画像上に重なる） */
.mv-hero-slide__grid {
  display: grid;
  grid-template-columns: 6fr 4fr;
  grid-template-rows: auto;
  gap: 0;
  align-items: stretch;
  position: relative;
  min-height: clamp(380px, 46vh, 640px);
}

.mv-hero-slide__media {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  margin: 0;
  z-index: 1;
  align-self: stretch;
}

.mv-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: max(clamp(380px, 46vh, 640px), 100%);
  object-fit: cover;
  object-position: center left;
  border-radius: 0;
  box-shadow: none;
}

.mv-hero-slide__body {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: clamp(12px, 2vw, 24px) clamp(22px, 4vw, 52px) clamp(12px, 2vw, 24px) clamp(6px, 1.2vw, 14px);
  box-sizing: border-box;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

.mv-hero-slide__body .mv-hero__cards {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

/* リード・本文は右40%内（画像の上には載せない） */
.mv-hero-slide__body .mv-hero__lead,
.mv-hero-slide__body .mv-hero__text {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  text-shadow: none;
}

.mv-hero__title {
  margin: 0 0 0.35em;
  font-size: clamp(2.35rem, 6.5vw, 4.35rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #111;
}

.mv-hero__accent-orange {
  color: #e65100;
}

/* PC では1行。1024px 以下で Your 前に改行 */
.mv-hero__title-br {
  display: none;
}

.mv-hero__title--overlap {
  position: relative;
  z-index: 3;
  /* 右端をテキスト列の右に固定し、長い見出しは左へ（画像側へ）伸びる */
  width: fit-content;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0.3em;
  text-align: left;
  /* 折り返さず1行にして画像へはみ出す幅を確保（狭い画面用の改行は 1024px 以下で解除） */
  white-space: nowrap;
  text-shadow:
    3px 3px 0 #fff,
    -3px -3px 0 #fff,
    3px -3px 0 #fff,
    -3px 3px 0 #fff,
    0 4px 0 #fff,
    0 -4px 0 #fff,
    4px 0 0 #fff,
    -4px 0 0 #fff;
}

.mv-hero__lead {
  margin: 0 0 0.85em;
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
  color: #333;
}

.mv-hero__highlight {
  padding: 0 0.06em;
  background: none;
  transition: background 0.4s ease;
}

/* タイプライター完了後（JS が .mv-tw-complete を付与） */
.main-visual--hero-split .mv-hero-slide__body.mv-tw-complete .mv-hero__highlight {
  background: linear-gradient(transparent 62%, #ffeb3b 62%, #ffeb3b 92%, transparent 92%);
}

.mv-hero__text {
  margin: 0 0 1.25em;
  font-size: clamp(0.875rem, 1.5vw, 0.95rem);
  line-height: 1.75;
  color: #555;
}

.mv-hero__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.5vw, 12px);
}

.mv-hero__card {
  margin: 0;
  padding: clamp(12px, 2vw, 18px) clamp(10px, 1.5vw, 14px);
  font-size: clamp(0.8rem, 1.35vw, 0.95rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  box-sizing: border-box;
  backface-visibility: hidden;
}

.mv-hero__card--teal {
  background: #229ab7;
}

.mv-hero__card--navy {
  background: #353d5f;
}

/* カード：animation ではなく transition（再実行時の点滅を抑える） */
.main-visual--hero-split .mv-hero-slide__body:not(.mv-tw-cards-in) .mv-hero__card {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 0.2s ease, transform 0.2s ease;
  transition-delay: 0s;
}

.main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card:nth-child(1) {
  transition-delay: 0.04s;
}

.main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card:nth-child(2) {
  transition-delay: 0.12s;
}

.main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card:nth-child(3) {
  transition-delay: 0.2s;
}

.main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card:nth-child(4) {
  transition-delay: 0.28s;
}

/* タイプライター表示（js/mv-hero-typewriter.js が .mv-tw-ch に --on を付与） */
.main-visual--hero-split .mv-anim {
  opacity: 1;
  transform: none;
  animation: none;
}

.main-visual--hero-split .mv-tw-ch {
  opacity: 0;
  transition: opacity 0.07s ease;
}

.main-visual--hero-split .mv-tw-ch--on {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .main-visual--hero-split .mv-tw-ch {
    opacity: 1;
    transition: none;
  }

  .main-visual--hero-split .mv-hero-slide__body:not(.mv-tw-cards-in) .mv-hero__card,
  .main-visual--hero-split .mv-hero-slide__body.mv-tw-cards-in .mv-hero__card {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}

/* タブレット縦・スマホ：縦積み（画像上／テキスト下）。iPad 縦(768〜1024px)もここに含める */
@media screen and (max-width: 1024px) {
  .mv-hero-slide__grid {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0;
  }

  .mv-hero-slide__media {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px 0 0;
    z-index: 1;
  }

  .mv-hero__img {
    min-height: 0;
    height: auto;
    aspect-ratio: 1280 / 600;
    border-radius: 0;
    box-shadow: none;
  }

  .mv-hero-slide__body {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-top: 20px;
    text-align: left;
    padding-left: clamp(16px, 4vw, 24px);
    padding-right: clamp(20px, 5vw, 36px);
  }

  .mv-hero__title--overlap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-shadow: none;
    white-space: normal;
  }

  .main-visual--hero-split .mv-hero__title {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .mv-hero__cards {
    gap: 10px;
  }

  .mv-hero__title-br {
    display: block;
  }
}

@media screen and (max-width: 575px) {
  .main-visual.main-visual--hero-split {
    height: auto;
    min-height: 0;
    padding: 50px 0 0;
  }

  .mv-hero-slide {
    padding: 16px 0 24px;
  }

  .mv-hero__card {
    font-size: 0.78rem;
    padding: 11px 8px;
  }
}
