/* ==========================================================================
   Hero (ファーストビュー)
   ========================================================================== */
.hero {
  position: relative;
  padding-top: var(--header-height-sp);
  background-color: var(--color-main);
  overflow: hidden;
}

.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 592;
}

.hero__photos {
  position: absolute;
  inset: 0;
}

.hero__photo {
  position: absolute;
  overflow: hidden;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__photo--mansion { left: 59.93%; top: 52.51%; width: 40.07%; height: 18.77%; }
.hero__photo--house   { left: 58.87%; top: 29.67%; width: 39.99%; height: 17.58%; }
.hero__photo--sunlight{ left: 0;      top: 48.17%; width: 49.60%; height: 21.79%; }
.hero__photo--interior{ left: 0;      top: 26.04%; width: 42.36%; height: 19.70%; }
.hero__photo--living  { left: 58.39%; top: 3.21%;  width: 37.93%; height: 16.67%; }
.hero__photo--street  { left: 0;      top: 0;      width: 48.98%; height: 23.70%; }

.hero__content {
  position: absolute;
  left: 0;
  top: 16.22%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--color-base);
  padding: 0 20px;
}

.hero__copy-main {
  width: 100%;
  font-weight: 900;
  font-size: 3.6rem;
  line-height: 1.2;
  transform: translateX(10px);
}

.hero__copy-sub {
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.2;
}

.fs-lg, .fs-md, .fs-sm {
  font-size: 1em;
}

.hero__person {
  position: absolute;
  left: 5.13%;
  top: 41%;
  width: 89.88%;
  height: 32.48%;
  z-index: 2;
}

.hero__person-photo {
  position: absolute;
  left: 0;
  top: 8.94%;
  width: 49.94%;
  height: 91.06%;
}

/* SP版: 人物画像の下側を、白いキャンペーンバナー上辺と同じ水平ラインで
   まっすぐクリップするための専用ラッパー。吹き出し(.hero__bubble)は
   このクリップ対象に含めないよう、.hero__person-photo直下の別要素として
   分離している(吹き出しは人物画像の上側にはみ出す配置のため)。
   clip-pathはボックス自体のサイズを変えずに描画だけを切り取るため、
   img側のwidth/height:100%計算には影響しない(=円が歪まない)。 */
.hero__person-photo-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0.6% 0);
}

.hero__person-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero__bubble {
  position: absolute;
  left: 84.5%;
  top: -4%;
  width: 108.9%;
  aspect-ratio: 173.442 / 142.964;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8% 10%;
  box-sizing: border-box;
}

.hero__bubble-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* sp-hero-bubble.svgのパス座標(M89.4521 0 ... C89.4521,71.4814,...)から、
   しっぽを含まない円形部分の中心はviewBox幅(173.442)に対して
   89.4521 / 173.442 = 51.58% の位置にある(単純な50%центаではない)。
   PC版と同様に視覚的な見え方に合わせて約2.45%を追加調整し、
   position:absolute + transformでその円の中心に正確に中央揃えする。 */
.hero__bubble-text {
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  margin: 0;
}

.hero__bubble-catch {
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.32;
}

.hero__bubble-notice {
  margin-top: 4px;
}

.hero__bubble-notice-label {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-accent);
}

.hero__bubble-notice-main {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--color-accent);
  margin-top: 2px;
}

.hero__cta-area {
  position: absolute;
  left: 7.82%;
  top: 71.28%;
  width: 84.36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* SP版: 人物画像を背後に回り込ませるため、CTAエリア(バナー含む)を
     人物(z-index:2)より手前に表示する。 */
  z-index: 3;
}

.hero__campaign {
  background-color: var(--color-base);
  width: 100%;
  padding: 8px 23px;
  text-align: center;
}

.hero__campaign-title {
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
}

.hero__campaign-price {
  color: var(--color-blue-text);
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.2;
  white-space: nowrap;
}

.hero__campaign-price .en   { font-family: var(--font-en); font-size: 2rem; }
.hero__campaign-price .price{ font-family: var(--font-en); font-size: 2.8rem; }
.hero__campaign-price .unit { font-size: 1.6rem; }
.hero__campaign-price .label{ font-size: 1.6rem; }

.hero__cta-btn {
  position: relative;
  z-index: 0;
  display: flex;
  gap: 8px;
  width: 100%;
  height: 67px;
  background-color: var(--color-accent);
  font-size: 2.2rem;
  transition: opacity 0.2s ease;
  /* SP版: position:absolute + z-index:-1のspan/::beforeはスタッキング
     コンテキストの解釈が環境によって揺れるため(.worries__cta-btnと同じ理由で
     box-shadowに変更済み)、box-shadowで背面の濃いオレンジを直接描画する。
     box-shadowは要素自身の描画に属するため、祖先のスタッキングコンテキストの
     影響を受けず、右+下にだけ確実に見える。 */
  box-shadow: 5px 6px 0 0 var(--color-accent-dark);
}

.hero__cta-btn-deco {
  /* SP版はbox-shadowで代替するため非表示(PC版のみ従来通り表示)。
     display以外の位置・サイズ・色はPC版の表示のために保持しておく。 */
  display: none;
  position: absolute;
  left: 5px;
  top: 6px;
  width: 100%;
  height: 100%;
  background-color: var(--color-accent-dark);
  z-index: -1;
  pointer-events: none;
}

.hero__cta-btn:hover {
  opacity: 0.85;
}

.hero__cta-arrow {
  width: 17.32px;
  aspect-ratio: 17.3205 / 15;
  height: auto;
  transform: rotate(90deg);
}

@media (min-width: 768px) {
  .hero {
    padding-top: var(--header-height-pc);
  }

  /* stage = ファーストビュー全体(1440x824)。写真エリアだけでなく人物・CTAの
     はみ出し分まで含めた高さを基準にすることで、Figmaの絶対座標を
     そのまま%換算できるようにする */
  .hero__stage {
    max-width: 1440px;
    margin: 0 auto;
    aspect-ratio: 1440 / 824;
  }

  .hero__photo--mansion { left: 66.11%; top: 44.30%; width: 33.89%; height: 42.11%; }
  .hero__photo--house   { left: 38.54%; top: 48.42%; width: 25.97%; height: 30.34%; }
  .hero__photo--sunlight{ left: 0;      top: 48.42%; width: 36.04%; height: 41.99%; }
  .hero__photo--interior{ left: 72.36%; top: 7.28%;  width: 27.64%; height: 34.10%; }
  .hero__photo--living  { left: 38.54%; top: 0;      width: 25.97%; height: 30.22%; }
  .hero__photo--street  { left: 0;      top: 0;      width: 31.18%; height: 36.41%; }

  .hero__content {
    left: 50%;
    top: 29.49%;
    transform: translateX(-50%);
    width: 1046px;
    max-width: calc(100% - 40px);
    gap: 7px;
    padding: 0;
  }

  .hero__copy-main {
    font-size: 7.2rem;
    white-space: nowrap;
    transform: none;
  }

  .hero__copy-sub {
    width: 663px;
    max-width: 100%;
    margin: 0 auto;
    font-size: 4.8rem;
    white-space: nowrap;
  }

  .fs-md { font-size: 0.889em; }
  .fs-sm { font-size: 0.944em; }
  .hero__copy-sub .fs-md { font-size: 0.9167em; }

  br.sp-only {
    display: none;
  }

  .hero__person {
    left: 0;
    top: auto;
    bottom: -40px;
    width: 558px;
    max-width: 38.78%;
    aspect-ratio: 558.469 / 380.212;
    height: auto;
  }

  .hero__person-photo {
    position: absolute;
    left: 0;
    top: 5.26%;
    width: 64.5%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-top: 0;
  }

  .hero__person-photo-clip {
    /* PC版はSP版のバナー基準クリップを適用しない(従来通り円全体を表示) */
    overflow: visible;
    clip-path: none;
  }

  .hero__bubble {
    left: 86.9%;
    top: -12.5%;
    width: 68.15%;
    aspect-ratio: 245.469 / 205;
    padding: 0;
  }

  /* hero-bubble.svg のパス座標(M126.734 0 ... C126.734 205)から、
     しっぽを含まない円形部分の中心は viewBox幅(245.469)に対して
     126.734 / 245.469 = 51.63% の位置にある(単純な50%центаではない)。
     さらに視覚的な見え方に合わせて+6px相当(約2.45%)を微調整。
     position:relative(吹き出し本体) + position:absolute(テキスト)で
     その円の中心に対してtranslateXで正確に中央揃えする。 */
  .hero__bubble-text {
    position: absolute;
    left: 54.08%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    margin: 0;
  }

  .hero__bubble-catch {
    font-size: 1.4rem;
    line-height: 1.32;
  }

  .hero__bubble-notice {
    margin-top: 6px;
  }

  .hero__bubble-notice-label {
    font-size: 1.6rem;
    margin-bottom: -7px;
  }

  .hero__bubble-notice-main {
    font-size: 2.4rem;
    margin-top: 0;
    white-space: nowrap;
  }

  .hero__cta-area {
    left: 50%;
    right: auto;
    top: 81.67%;
    bottom: auto;
    transform: translateX(-50%);
    width: 1046px;
    max-width: calc(100% - 40px);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    /* PC版はSP用のz-index変更を打ち消し、従来通りの重なりに戻す */
    z-index: auto;
    flex-wrap: wrap;
  }

  .hero__campaign {
    width: 475px;
    height: 101px;
    padding: 14px 26px 13px 29px;
  }

  .hero__campaign-title { font-size: 2.2rem; white-space: nowrap; }
  .hero__campaign-price { white-space: nowrap; }
  .hero__campaign-price .en    { font-size: 3rem; }
  .hero__campaign-price .price { font-size: 3.8rem; }
  .hero__campaign-price .unit  { font-size: 2.4rem; }
  .hero__campaign-price .label { font-size: 2.6rem; }

  .hero__cta-btn {
    width: 417px;
    height: 101px;
    font-size: 3.2rem;
    gap: 12px;
    /* PC版はSP用box-shadowを打ち消し、従来通りspanで装飾を描画する */
    box-shadow: none;
    /* 自身の背景色は::afterに任せるため透過にする。CSSの仕様上、負のz-indexの
       子要素(.hero__cta-btn-deco)は要素自身の背景色より手前に描画されるため、
       このままでは.hero__cta-btn-deco(濃いオレンジ)が前面に出てしまっていた。
       ::afterに薄いオレンジを描画し、deco(オフセットあり)の上に重ねることで
       「薄いオレンジが前面、濃いオレンジは右下にだけ覗く」構造にする。 */
    background-color: transparent;
  }

  .hero__cta-btn::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent);
    z-index: -1;
  }

  .hero__cta-btn-deco {
    display: block;
    left: 8px;
    top: 8px;
  }

  .hero__cta-arrow {
    width: 27.66px;
    height: 23.28px;
    transform: rotate(90deg);
  }

  .hero__person-img {
    border-radius: 0;
  }
}

