/* ページ全体の共通設定（基本フォント）。
   FVや背景画像を画面幅いっぱいに表示したいので、ページ全体には max-width を付けない。
   コンテンツ幅の制限は各セクション内側の .rl-container（1080px）だけでおこなう */
.relyon-flow-page {
  width: 100%;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.9;
}

/* ---------- ヒーロー ---------- */
/* 構造（サイズ・背景・余白）は共通コンポーネント assets/css/components/rl-hero.css 側。
   ここではFLOWページ固有のタイポグラフィのみ指定する。 */

/* ヒーロータイトル「FLOW」の文字 */
.relyon-flow-page .rl-hero__title {
  font-family: "Baskerville", "Baskerville Old Face", "Libre Baskerville", "Times New Roman", serif;
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: .06em;
  color: #fff;
  margin: 0;
  line-height: 1;
}

/* ヒーローのサブテキスト「ご成婚までの流れ」（FLOWとの間は8px） */
.relyon-flow-page .rl-hero__sub {
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
  color: #fff;
  font-size: 13px;
  letter-spacing: .18em;
  margin: 8px 0 0;
}

/* セクション内側の幅を中央寄せ（companyページの.rl-containerと同じ考え方） */
.relyon-flow-page .rl-container {
  max-width: 1080px;
  margin-inline: auto;
}

@media (max-width: 1180px) {
  .relyon-flow-page .rl-container {
    width: 90%;
  }
}

/* ---------- STEP一覧 ---------- */
/* セクション全体の背景（薄い水色）と上下の余白 */
.relyon-flow-page .rl-flow-steps {
  background: linear-gradient(180deg, #fff 0%, #e9f4fb 12%, #e9f4fb 88%, #fff 100%);
  padding: 160px 0;
}

/* STEP 1件分（番号見出し＋カード） */
.relyon-flow-page .rl-flow-step {
  position: relative;
  margin-bottom: 64px;
}

.relyon-flow-page .rl-flow-step:last-child {
  margin-bottom: 0;
}

/* 各STEPのdot中心から次のSTEPのdot中心まで縦線を引く（最後のSTEPには引かない）
   num要素の高さ ≈ digit(1em)のfont-size clamp(32px, 10.29vw, 72px) なので、
   丸の中心（高さの50%）は clamp(22px, 5.145vw, 36px)。
   ※下限は22px（画面幅540px以下でnum-digitのfont-sizeを44pxに固定しているため、
     丸の中心もそれ以下には縮まらない。16pxのままだと狭い画面幅で線が丸より上にずれる）。
   bottomは「margin-bottom 64px + 次stepの丸の中心」で、次の丸の中心で線を止める */
.relyon-flow-page .rl-flow-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: clamp(22px, 5.145vw, 36px);
  bottom: calc(-64px - clamp(22px, 5.145vw, 36px));
  width: 2px;
  background: #bcdff0;
}

/* 「STEP 01」の文字（先頭に青い点）
   数字（72px）を基準サイズにして、STEP幅700pxまでは最大値、
   それ以下は画面幅に応じて少しずつ縮小する */
.relyon-flow-page .rl-flow-step__num {
  position: relative;
  margin: 0 0 24px;
  padding-left: 28px;
  font-family: "Baskerville", "Baskerville Old Face", "Libre Baskerville", "Times New Roman", serif;
  font-size: clamp(32px, 10.29vw, 72px);
  font-weight: 500;
  letter-spacing: .08em;
  color: #009DE6;
  line-height: 1;
}

.relyon-flow-page .rl-flow-step__num-label {
  font-size: 48px;
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
}

.relyon-flow-page .rl-flow-step__num-digit {
  font-size: 64px;
}

.relyon-flow-page .rl-flow-step__num::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #009DE6;
  transform: translateY(-50%);
}

/* STEPの内容カード（左：本文＋ボタン／右：写真の横並び・白背景） */
.relyon-flow-page .rl-flow-step__card {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  grid-template-areas:
    "body  photo"
    "btn   photo";
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  margin-left: 28px;
  padding: 40px;
  background: #fff;
  border-radius: 10px;
}

.relyon-flow-page .rl-flow-step__body {
  grid-area: body;
}

.relyon-flow-page .rl-flow-step__photo {
  grid-area: photo;
}

/* STEPごとの見出し（無料相談・ご入会＆書類提出など・左#00489D→右#009DE6のフェード） */
.relyon-flow-page .rl-flow-step__title {
  width: fit-content;
  margin: 0 0 16px;
  font-family: "Hina Mincho", serif;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 400;
  letter-spacing: .04em;
  background: linear-gradient(90deg, #00489D 0%, #009DE6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* STEPごとの本文 */
.relyon-flow-page .rl-flow-step__text {
  margin: 0 0 1em;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  color: #333;
}

.relyon-flow-page .rl-flow-step__text:last-of-type {
  margin-bottom: 0;
}

/* STEP01だけのボタン「無料相談はこちら」 */
.relyon-flow-page .rl-flow-step__btn {
  grid-area: btn;
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  width: 300px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  align-self: start;
  margin-top: 24px;
  padding: 10px 10px;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #00489D, #009DE6) border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
}

.relyon-flow-page .rl-flow-step__btn-text {
  text-align: center;
  font-family: "Zen Old Mincho", "Yu Mincho", serif;
  background: linear-gradient(90deg, #00489D 0%, #009DE6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.relyon-flow-page .rl-flow-step__btn-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #00489D, #009DE6) border-box;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 14px;
  color: #009DE6;
}

/* STEPの写真 */
.relyon-flow-page .rl-flow-step__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background-color: #9fb0ad;
}

/* スマホ幅では本文（＋ボタン）を上、写真を下の縦並びに切り替える */
@media (max-width: 900px) {
  .relyon-flow-page .rl-flow-step__card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "body"
      "btn"
      "photo";
    gap: 24px;
  }
}

/* 768px以下ではヒーローの文字サイズを縮める（余白は共通コンポーネント側） */
@media (max-width: 768px) {
  .relyon-flow-page .rl-hero__sub {
    font-size: 12px;
  }
}

/* 540px以下では、文字 → 写真 → ボタン（無料相談は一番下）の順に並び替える */
@media (max-width: 540px) {
  .relyon-flow-page .rl-flow-steps {
    padding: 80px 0;
  }

  .relyon-flow-page .rl-flow-step__card {
    grid-template-areas:
      "body"
      "photo"
      "btn";
    padding: 24px;
  }

  .relyon-flow-page .rl-flow-step__btn {
    width: 100%;
  }

  .relyon-flow-page .rl-flow-step__text {
    font-size: 14px;
  }

  .relyon-flow-page .rl-flow-step__num-label {
    font-size: 32px;
  }

  .relyon-flow-page .rl-flow-step__num-digit {
    font-size: 44px;
  }
}