@charset "UTF-8";
/* =========================================================
   建て替えページ（page-rebuilding.php）専用スタイル
   ※ functions.php が assets/css/ 内のCSSを自動で読み込みます
     （filemtime() によるバージョン番号付きで読み込むため、
       このファイルを差し替えるとキャッシュも自動で切り替わります）
   ※ style.css（共通）のあとに読み込まれます
   ※ ページタイトル帯・パンくずは style.css の
     全ページ共通パーツ（.page-hero / .breadcrumb）を使用しています
   ※ 全ページでこのCSSが読み込まれるため、クラス名は
     必ず reb- で始め、他ページに影響しないようにしています

   ■ 目次
     1. ページ共通の変数・見出し・本文
     2. メインビジュアル（背景写真＋ロゴ＋白いパネル）
     3. 選ばれる理由（写真と文章が左右交互）
     4. 自由設計の住まい「Re!Fine」（写真＋ロゴ＋価格パネル）
     5. 建て替え完了までの流れ（背景写真＋STEP一覧）
     6. タブレット（768〜1024px）
     7. SP（〜767px）
========================================================= */


/* =========================================================
   1. ページ共通の変数・見出し・本文
========================================================= */
.l-rebuilding {
  --reb-accent: #73b1d4;          /* 見出し下線の水色部分 */
  --reb-line: #e6e6e6;            /* 見出し下線のグレー部分 */
  --reb-dark: #282828;            /* 面積ラベル・ボタンの黒 */
  --reb-panel: #e8e8e8;           /* 価格パネルのグレー */
  --reb-flow-line: #939393;       /* STEP一覧の枠線 */
  --reb-flow-divider: #7a7a7a;    /* STEP番号と本文の間の縦線 */
  --reb-white-panel: rgba(255, 255, 255, .9); /* 写真に重なる白いパネル */
}

/* --- 共通インナー（style.css の --container: 1200px に合わせる） --- */
.reb-inner {
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- 「1要素＝PCでの1行」の行（PCでは1行ずつ改行する） --- */
.reb-line {
  display: block;
}

/* かぎ括弧で囲んだ語句は途中で改行しない（PHP の $reb_lines が付与） */
.reb-nowrap {
  white-space: nowrap;
}

/* --- セクション見出し（明朝・中央） --- */
.reb-title {
  color: var(--color-text);
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .15em;
  text-indent: .15em; /* letter-spacing ぶんのズレを打ち消して中央に揃える */
  text-align: center;
}

/* --- セクション見出し直下のリード（中央） --- */
.reb-lead {
  margin-top: 28px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 2;
  letter-spacing: .14em;
  text-indent: .14em;
  text-align: center;
}

/* --- 左寄せの小見出し（下線：左の水色＋全幅のグレー） --- */
.reb-heading {
  position: relative;
  padding-bottom: 13px;
  color: var(--color-text);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .14em;
  border-bottom: 2px solid var(--reb-line);
}

.reb-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px; /* 罫線に重ねる */
  width: 217px;
  max-width: 40%;
  height: 2px;
  background-color: var(--reb-accent);
}

/* --- 本文（小さめ・両端揃え） --- */
.reb-text {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 2.1;
  letter-spacing: .23em;
  text-align: justify;
}

/* --- 見出し・キャッチコピーは文節の切れ目で折り返す
   （非対応ブラウザでは通常の折り返し） --- */
.reb-title,
.reb-heading,
.reb-mv__catch,
.reb-refine__message {
  word-break: auto-phrase;
}


/* =========================================================
   2. メインビジュアル

   背景写真（rebuilding_mv_pc.jpg / rebuilding_mv_sp.jpg）を全幅で敷き、
   その上にロゴ（rebuilding_logo.svg）と白いパネルを重ねています。
   画像はPHP側の <picture> で出し分けています
   （〜767px：rebuilding_mv_sp.jpg ／ 768px〜：rebuilding_mv_pc.jpg）
========================================================= */
.reb-mv {
  position: relative;
  isolation: isolate; /* 背景写真（z-index: -1）をこのセクション内に閉じ込める */
  margin-top: 64px;
}

.reb-mv__bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
}

.reb-mv__bg-img {
  display: block;
  width: 100%;
  height: auto;
}

.reb-mv__inner {
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 78px 20px 0;
}

/* --- ロゴ（House Rebuilding ／ 建て替え） --- */
.reb-mv__logo {
  width: 474px;
  max-width: 100%;
  margin: 0 auto;
}

.reb-mv__logo-img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- 白いパネル --- */
.reb-mv__panel {
  margin-top: 114px;
  padding: 66px 40px 54px;
  background-color: var(--reb-white-panel);
  text-align: center;
}

.reb-mv__catch {
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .1em;
  text-indent: .1em;
}

.reb-mv__text {
  margin-top: 35px;
  font-size: 2rem;
  font-weight: 500;
  line-height: 2.1;
  letter-spacing: .38em;
  text-indent: .38em;
}


/* =========================================================
   3. 選ばれる理由（写真と文章が左右交互）
========================================================= */
.reb-reason {
  margin-top: 77px;
}

.reb-reason__list {
  margin-top: 50px;
}

/* 文章（1fr）＋ 写真（598px）。--reverse は写真を左に置く */
.reb-reason__item {
  display: grid;
  grid-template-columns: 1fr 598px;
  align-items: start;
  gap: 0 24px;
}

.reb-reason__item + .reb-reason__item {
  margin-top: 40px;
}

.reb-reason__item--reverse {
  grid-template-columns: 598px 1fr;
}

.reb-reason__item--reverse .reb-reason__img {
  grid-row: 1;
  grid-column: 1;
}

.reb-reason__item--reverse .reb-reason__body {
  grid-column: 2;
}

.reb-reason__text {
  margin-top: 30px;
  padding-right: 40px;
}

.reb-reason__img img {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================================
   4. 自由設計の住まい「Re!Fine」
========================================================= */
.reb-refine {
  margin-top: 122px;
}

/* --- 写真＋ロゴ（ロゴは写真の中央に重ねる） --- */
.reb-refine__visual {
  position: relative;
  margin-top: 57px;
}

.reb-refine__photo {
  display: block;
  width: 100%;
  height: auto;
}

.reb-refine__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 515px;
  max-width: 43%;
  height: auto;
  transform: translate(-50%, -52%);
}

/* --- 価格パネル（グレー＋白い楕円模様） --- */
.reb-refine__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 中身の幅で列が広がらないように minmax(0, …) */
  gap: 0 40px;
  padding: 46px 42px 57px;
  background-color: var(--reb-panel);
  background-image: url("../images/rebuilding/white_oval_vertical.png");
  background-repeat: repeat;
  background-position: center top;
  background-size: 418px auto;
}

/* 左：延床面積 ＋ 価格 ＋ 注釈 */
.reb-refine__area {
  display: flex;
  align-items: center;
  gap: 0 28px;
  padding-bottom: 25px;
  border-bottom: 1px solid #5a5a5a;
}

.reb-refine__area-label {
  flex-shrink: 0;
  width: 162px;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 60px; /* ラベルの高さ */
  letter-spacing: .1em;
  text-indent: .1em;
  text-align: center;
  background-color: var(--reb-dark);
}

.reb-refine__area-value {
  font-size: 4rem;
  line-height: 1.2;
  letter-spacing: .06em;
}

.reb-refine__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 18px;
  line-height: 1;
}

.reb-refine__price-num {
  font-size: 8.4rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.reb-refine__price-unit {
  margin-left: 6px;
  font-size: 4rem;
  font-weight: 500;
}

.reb-refine__price-tax {
  margin-left: 8px;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: .1em;
}

/* 注釈（「※」のぶんだけ2行目以降を字下げする） */
.reb-refine__note {
  margin-top: 30px;
  padding: 0 0 0 calc(1em + 8px);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .14em;
  text-indent: -1em;
}

/* PCでは1行ずつ block になるため、字下げを打ち消すのは2行目以降だけにする */
.reb-refine__note .reb-line + .reb-line {
  text-indent: 0;
}

/* 右：メッセージ ＋ ボタン */
.reb-refine__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reb-refine__message {
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .1em;
  text-indent: .1em;
  text-align: center;
}

/* 「自由設計について」ボタン（リンク先：/style-works/） */
.reb-refine__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0 18px;
  width: 462px;
  max-width: 100%;
  min-height: 85px;
  margin-top: 45px;
  padding: 10px 20px;
  color: #fff;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .08em;
  text-decoration: none;
  background-color: var(--reb-dark);
  transition: opacity .3s;
}

/* 右向きの三角 */
.reb-refine__btn::before {
  content: "";
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
}

.reb-refine__btn:hover {
  opacity: .75;
}


/* =========================================================
   5. 建て替え完了までの流れ

   全幅の背景写真（reb_flow_bg.jpg）の下部に STEP 一覧を重ねています。
   重なり量は写真の高さ（画面幅×1387/2409）に合わせて vw で指定します。
   STEP の区切り線には、次のSTEPを指す「V字」を入れています。
========================================================= */
.reb-flow {
  margin-top: 112px;
  margin-bottom: 64px;
}

.reb-flow__bg {
  margin-top: 31px;
}

.reb-flow__bg-img {
  display: block;
  width: 100%;
  height: auto;
}

.reb-flow__list {
  position: relative;
  margin-top: max(-5.75vw, -110px); /* 1600px幅で -92px */
  background-color: #fff;
  border: 2px solid var(--reb-flow-line);
}

.reb-flow__item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 126px;
  padding: 21px 40px 21px 0;
}

.reb-flow__item + .reb-flow__item {
  border-top: 2px solid var(--reb-flow-line);
}

/* 区切り線のV字（区切り線の中央を白で消してから、V字を描く） */
.reb-flow__item + .reb-flow__item::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 86px;
  height: 28px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 28'%3E%3Cpolyline points='0,1 43,27 86,1' fill='none' stroke='%23939393' stroke-width='2'/%3E%3C/svg%3E") no-repeat center top / 100% 100%,
    linear-gradient(#fff, #fff) no-repeat center top / 100% 2px;
  transform: translateX(-50%);
}

/* 最後のSTEPは少し低い */
.reb-flow__item:last-child {
  min-height: 112px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* STEP番号（右に縦線） */
.reb-flow__num {
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  width: 227px;
  padding-left: 45px;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .12em;
  white-space: nowrap;
}

.reb-flow__num::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 84px;
  background-color: var(--reb-flow-divider);
  transform: translateY(-50%);
}

.reb-flow__text {
  padding-left: 33px;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .2em;
}


/* =========================================================
   6. タブレット（768〜1024px）
      レイアウトはPCのまま、文字サイズ・余白を詰める
========================================================= */
@media screen and (min-width: 768px) and (max-width: 1024px) {

  .reb-title {
    font-size: 2.6rem;
    letter-spacing: .1em;
    text-indent: .1em;
  }

  .reb-heading {
    font-size: 2rem;
    letter-spacing: .06em;
  }

  .reb-text {
    font-size: 1.4rem;
    letter-spacing: .1em;
  }

  /* --- メインビジュアル --- */
  .reb-mv__inner {
    padding-top: 50px;
  }

  .reb-mv__logo {
    width: 400px;
  }

  .reb-mv__panel {
    margin-top: 60px;
    padding: 48px 30px 44px;
  }

  .reb-mv__catch {
    font-size: 2.3rem;
    letter-spacing: .06em;
    text-indent: .06em;
  }

  .reb-mv__text {
    margin-top: 26px;
    font-size: 1.6rem;
    letter-spacing: .16em;
    text-indent: .16em;
  }

  /* --- 選ばれる理由（写真を 46% に縮める） --- */
  .reb-reason__item {
    grid-template-columns: 1fr 46%;
  }

  .reb-reason__item--reverse {
    grid-template-columns: 46% 1fr;
  }

  .reb-reason__text {
    margin-top: 20px;
    padding-right: 0;
  }

  /* --- Re!Fine --- */
  .reb-refine__panel {
    gap: 0 24px;
    padding: 36px 28px 44px;
  }

  .reb-refine__area {
    gap: 0 16px;
  }

  .reb-refine__area-label {
    width: 120px;
    font-size: 1.8rem;
    line-height: 48px;
  }

  .reb-refine__area-value {
    font-size: 3rem;
  }

  .reb-refine__price-num {
    font-size: 6rem;
  }

  .reb-refine__price-unit {
    font-size: 2.8rem;
  }

  .reb-refine__price-tax {
    font-size: 1.6rem;
  }

  .reb-refine__note {
    padding-right: 0;
    font-size: 1.5rem;
    letter-spacing: .06em;
  }

  .reb-refine__message {
    font-size: 2.1rem;
    letter-spacing: .06em;
    text-indent: .06em;
  }

  .reb-refine__btn {
    min-height: 70px;
    margin-top: 32px;
    font-size: 2.2rem;
  }

  /* --- 流れ --- */
  .reb-flow__item {
    min-height: 110px;
    padding-right: 24px;
  }

  .reb-flow__num {
    width: 180px;
    padding-left: 28px;
    font-size: 2.8rem;
  }

  .reb-flow__num::after {
    height: 70px;
  }

  .reb-flow__text {
    padding-left: 24px;
    font-size: 1.7rem;
    letter-spacing: .06em;
  }
}


/* =========================================================
   7. SP（〜767px）
      1カラムに組み替え、文字サイズ・余白を詰める
========================================================= */
@media screen and (max-width: 767px) {

  /* SPでは「1要素＝PCでの1行」を画面幅に合わせて自然に折り返す */
  .reb-line {
    display: inline;
  }

  .reb-title {
    font-size: 2rem;
    line-height: 1.6;
    letter-spacing: .04em;
    text-indent: .04em;
  }

  /* 2行の見出しはSPでも1行ずつ改行する（行の区切りが意味の区切りのため） */
  .reb-title--2line .reb-line,
  .reb-heading .reb-line {
    display: block;
  }

  .reb-lead {
    margin-top: 16px;
    font-size: 1.4rem;
    line-height: 1.9;
    letter-spacing: .06em;
    text-indent: 0;
    text-align: left;
  }

  .reb-heading {
    padding-bottom: 10px;
    font-size: 1.8rem;
    line-height: 1.6;
    letter-spacing: .06em;
  }

  .reb-heading::after {
    width: 110px;
  }

  .reb-text {
    font-size: 1.4rem;
    line-height: 1.9;
    letter-spacing: .06em;
  }

  /* --- メインビジュアル
     SP用画像は2棟を縦に並べた縦長の写真（1601×2706px）で、上端まで家が写っています。
     ロゴが屋根に重なって読みにくくならないよう、SPではロゴを写真の上の白地に置き、
     写真（高さ＝画面幅×2706/1601 ≒ 169vw）の下から約2割の位置にパネルを重ねます --- */
  .reb-mv {
    margin-top: 32px;
  }

  .reb-mv__bg {
    top: 150px; /* ロゴ（上余白28px＋高さ約96px）の下 */
  }

  .reb-mv__inner {
    padding-top: 28px;
  }

  .reb-mv__logo {
    width: 300px;
  }

  .reb-mv__panel {
    margin-top: calc(26px + 135vw); /* 150px − ロゴ下端124px ＋ 写真の高さの8割 */
    padding: 30px 20px 32px;
  }

  .reb-mv__catch {
    font-size: 1.7rem;
    line-height: 1.8;
    letter-spacing: .04em;
    text-indent: 0;
  }

  /* キャッチコピーは1文ずつ改行したままにする */
  .reb-mv__catch .reb-line {
    display: block;
  }

  .reb-mv__text {
    margin-top: 18px;
    font-size: 1.4rem;
    line-height: 2;
    letter-spacing: .06em;
    text-indent: 0;
    text-align: justify;
  }

  /* --- 選ばれる理由（見出し → 本文 → 写真 の縦積み） --- */
  .reb-reason {
    margin-top: 64px;
  }

  .reb-reason__list {
    margin-top: 32px;
  }

  .reb-reason__item,
  .reb-reason__item--reverse {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reb-reason__item--reverse .reb-reason__img,
  .reb-reason__item--reverse .reb-reason__body {
    grid-row: auto;
    grid-column: auto;
  }

  .reb-reason__item + .reb-reason__item {
    margin-top: 48px;
  }

  .reb-reason__text {
    margin-top: 16px;
    padding-right: 0;
  }

  /* --- Re!Fine（価格パネルは縦積み） --- */
  .reb-refine {
    margin-top: 72px;
  }

  .reb-refine__visual {
    margin-top: 28px;
  }

  .reb-refine__logo {
    max-width: 62%;
  }

  .reb-refine__panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 28px 20px 32px;
    background-size: 280px auto;
  }

  .reb-refine__area {
    gap: 0 14px;
    padding-bottom: 16px;
  }

  .reb-refine__area-label {
    width: 96px;
    font-size: 1.5rem;
    line-height: 38px;
  }

  .reb-refine__area-value {
    font-size: 2.6rem;
  }

  .reb-refine__price {
    margin-top: 14px;
  }

  .reb-refine__price-num {
    font-size: 5.2rem;
  }

  .reb-refine__price-unit {
    font-size: 2.6rem;
  }

  .reb-refine__price-tax {
    font-size: 1.4rem;
  }

  .reb-refine__note {
    margin-top: 16px;
    padding-right: 0;
    font-size: 1.3rem;
    letter-spacing: .04em;
  }

  .reb-refine__message {
    font-size: 1.9rem;
    letter-spacing: .06em;
    text-indent: .06em;
  }

  /* メッセージはSPでも1行ずつ改行する */
  .reb-refine__message .reb-line {
    display: block;
  }

  .reb-refine__btn {
    min-height: 60px;
    margin-top: 24px;
    font-size: 1.8rem;
  }

  /* --- 流れ（STEP番号を上、本文を下に） --- */
  .reb-flow {
    margin-top: 72px;
    margin-bottom: 60px;
  }

  .reb-flow__bg {
    margin-top: 24px;
  }

  .reb-flow__list {
    margin-top: -10vw;
  }

  .reb-flow__item,
  .reb-flow__item:last-child {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 24px 18px 20px;
  }

  .reb-flow__item + .reb-flow__item::before {
    width: 56px;
    height: 18px;
  }

  .reb-flow__num {
    width: auto;
    padding: 0 0 8px;
    font-size: 2.4rem;
  }

  /* 縦線は番号の下の短い横線にする */
  .reb-flow__num::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
    transform: none;
  }

  .reb-flow__text {
    margin-top: 10px;
    padding-left: 0;
    font-size: 1.5rem;
    letter-spacing: .04em;
  }
}
