/* ===================================================================
   ヒーロー（モック準拠 / TOP改修 19・2026-09-09）
   出典: Figma Make src/App.tsx L381-448 の実測値
   ・写真3枚を5秒ごとにクロスフェード（opacity / 1s ease-in-out）
   ・オーバーレイは無し。キャッチは各行に白帯を敷いてコントラストを確保
   ・画像の明暗（data-dark）で本文の文字色を切り替える（transition 0.8s）
   ・下部に進捗バー3本。再生中の1本が5秒でscaleX(0→1)
   ⚠️ モックのヒーローには CTA・バッジ・チップが無い（kim 判断で撤去）
   =================================================================== */
.gw-hero2 {
  position: relative;
  overflow: hidden;
  min-height: clamp(228px, 38vw, 460px);
  background: #e9e7e4; /* 画像読み込み前の下地 */
}

/* ---- 親コンテナの余白を殺す ----
   ⚠️ これも旧 hero.css の `:has(.gw-hero-cards){padding:0}` に頼っていた分の引き継ぎ。
   ヒーローの外側は Blocksy の .ct-container-full[data-vertical-spacing] が上下50px、
   その内側の GenerateBlocks コンテナが左右15px+下15px を持っている。
   カード撤去でその打ち消しが消え、ヒーロー上に50pxの空きが出た（2026-09-09）。
   ヒーローはヘッダー直下に密着させるのが正。 */
[data-vertical-spacing]:has(.gw-hero2),
:has(> .gw-hero2) {
  padding: 0 !important;
}

/* TOPのアンカーリンク（#adviser-list 等）をなめらかに。旧 hero.css からの引き継ぎ */
html:has(.gw-hero2) { scroll-behavior: smooth; }

/* ---- フルブリード（SP/PC共通・モック準拠） ----
   親が .is-layout-constrained（Blocksy）や GenerateBlocks のコンテナで
   width / margin / padding を効かせてくるので !important で上書きする。
   ⚠️ SPの全幅は以前 hero.css の `:has(> .gw-hero-cards){padding:0}` に
   ぶら下がって成立していた。タブバー・カード撤去でその足場が消えたので、
   ここで自前で全幅にしている（2026-09-09）。 */
.gw-hero2 {
  /* 100vw はスクロールバー幅を含むので、その分だけ JS が --gwh-sb に入れて差し引く。
     JS が動かない/値が古い場合でも誤差はスクロールバー幅（0〜15px程度）に収まる。 */
  --gwh-bleed: calc(100vw - var(--gwh-sb, 0px));
  width: var(--gwh-bleed) !important;
  max-width: var(--gwh-bleed) !important;
  margin-left: calc(50% - var(--gwh-bleed) / 2) !important;
  margin-right: calc(50% - var(--gwh-bleed) / 2) !important;
}

/* ---- 背景スライド ---- */
.gw-hero2__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}
.gw-hero2__img.is-active { opacity: 1; }

/* SP/PCで別ファイル（モックと同じ） */
.gw-hero2__img--pc { display: none; }
@media (min-width: 768px) {
  .gw-hero2__img--sp { display: none; }
  .gw-hero2__img--pc { display: block; }
}

/* ---- テキスト ---- */
.gw-hero2__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 228px;
  padding: 0 12px 0 24px;
  color: #1e1e1e;
  transition: color 0.8s;
}
.gw-hero2.is-dark .gw-hero2__inner { color: #fff; }

@media (min-width: 768px) {
  .gw-hero2__inner {
    max-width: 1152px;
    margin: 0 auto;
    min-height: clamp(260px, 38vw, 460px);
    padding: clamp(32px, 5vw, 60px) clamp(20px, 4vw, 48px) clamp(32px, 5vw, 60px) clamp(40px, 7vw, 80px);
  }
}

/* ハッシュタグ行 */
.gw-hero2__hash {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin: 0 0 12px;
  color: inherit;
}
@media (min-width: 768px) {
  .gw-hero2__hash { font-size: 17px; margin-bottom: 18px; }
}

/* キャッチ。⚠️ 色は白帯の上に載るので画像の明暗にかかわらず #1e1e1e 固定 */
.gw-hero2__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 2px;
  color: #1e1e1e;
}
.gw-hero2__title span {
  display: inline-block;
  background: #fff;
  padding: 2px 10px;
}
@media (min-width: 768px) {
  .gw-hero2__title {
    gap: 8px;
    margin-bottom: 22px;
    font-size: clamp(22px, 3.5vw, 42px);
    letter-spacing: 4px;
  }
  .gw-hero2__title span { padding: 4px 16px; }
}

/* リード文 */
.gw-hero2__lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: inherit;
}
.gw-hero2__lead--pc { display: none; }
@media (min-width: 768px) {
  .gw-hero2__lead--sp { display: none; }
  .gw-hero2__lead--pc {
    display: block;
    font-size: clamp(12px, 1.3vw, 15px);
    line-height: 1.85;
    max-width: 440px;
  }
}

/* ---- 進捗バー ---- */
.gw-hero2__bars {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 6px;
}
.gw-hero2__bar {
  position: relative;
  width: 48px;
  height: 2px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  cursor: pointer;
}
.gw-hero2__bar > span {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.gw-hero2__bar.is-done > span { transform: scaleX(1); }
.gw-hero2__bar.is-active > span { animation: gw-hero2-progress var(--gw-hero2-dur, 5s) linear forwards; }

@keyframes gw-hero2-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .gw-hero2__img { transition: none; }
  .gw-hero2__bar.is-active > span { animation: none; transform: scaleX(1); }
}
