/**
 * ヒーロー — 2カラムレイアウト・右チャット・見出し周り
 * （01組み立てアニメは一旦停止。hero--title-assemble-done で即表示）
 */

/* ヒーロー2カラム — 1200px 未満は1カラム（吹き出し非表示で見出しと被らない） */
#hero .hero-layout {
  display: block;
}

#hero .hero-asks {
  display: none;
}

@media (min-width: 1200px) {
  #hero .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(1.75rem, 3vw, 2.5rem);
    align-items: center;
  }

  #hero .hero-asks {
    display: block;
    align-self: center;
  }

  #hero .hero-copy {
    padding-left: clamp(0.75rem, 2.5vw, 1.75rem);
  }
}

.hero-title-assemble {
  position: relative;
  display: block;
  margin-bottom: 2rem;
  overflow: visible;
  padding-top: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: 0.5rem;
  margin-top: -0.25rem;
}

.hero-title-assemble__heading {
  position: relative;
  z-index: 16;
  margin: 0;
}

.hero-title-assemble__heading .hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-below-title {
  position: relative;
  z-index: 10;
}

#hero.hero--title-assemble-done .hero-below-title .animate-float-up,
#hero.hero--title-assemble-skipped .hero-below-title .animate-float-up {
  animation: float-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ----- ヒーロー右 — AIで解決できそうな悩み（チャット風・無限ループ） ----- */
.hero-asks {
  position: relative;
  z-index: 10;
  opacity: 1;
}

/* チャットの窓。overflow:hidden でユーザーはスクロール不可 */
.hero-asks__feed {
  height: min(58vh, 27rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  overflow: hidden;
  overscroll-behavior: contain;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 100%);
}

.hero-asks__item {
  display: flex;
  flex: 0 0 auto;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: bottom center;
  transition:
    opacity 0.42s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-asks__item--left {
  justify-content: flex-start;
  transform-origin: bottom left;
}

.hero-asks__item--right {
  justify-content: flex-end;
  transform-origin: bottom right;
}

.hero-asks__item.is-in {
  opacity: 1;
  transform: scale(1);
}

.hero-asks__bubble {
  position: relative;
  margin: 0;
  max-width: 88%;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #334155;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(56, 136, 176, 0.12);
}

.hero-asks__item--left .hero-asks__bubble {
  border-bottom-left-radius: 4px;
}

.hero-asks__item--left .hero-asks__bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom-left-radius: 3px;
  transform: rotate(45deg);
}

.hero-asks__item--right .hero-asks__bubble {
  border-bottom-right-radius: 4px;
}

.hero-asks__item--right .hero-asks__bubble::before {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom-right-radius: 3px;
  transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .hero-asks__item {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
