/* =========================================================
 * style.css — 画像スタック方式 LP テンプレ（v3.1.0 既定）
 *
 * 設計方針：
 *   - モバイル基準幅 480px を念頭にデザイン画像を受領
 *   - PC は --lp-max-width（既定 600px）に中央寄せし、両脇は
 *     --color-bg-pc の背景色で埋める。コンテンツは引き伸ばさない
 *   - 各セクションは <section class="lp-section"> + 1枚の <img>
 *   - フローティングCTAバーとの重なり回避に padding-bottom を確保
 *
 * 案件カスタマイズ：
 *   :root の CSS 変数を上書きすれば最大幅・PC背景色を調整できる
 * ========================================================= */

:root {
  --lp-max-width:    600px;          /* PC時の表示幅。案件で上書き可 */
  --color-bg-pc:     #E3E8EE;        /* PC両脇の背景色。案件で上書き */
  --color-bg-page:   #ffffff;        /* コンテンツ領域の背景 */

  --color-line:      #06C755;        /* LINE緑 */
  --color-reserve:   #1E6FFF;        /* 予約青 */
  --color-tel:       #0F2A44;        /* 電話紺 */

  /* フローティングCTAバー：FV画像から切り出したボタン（819×103px）を
     バー幅いっぱいに置く。高さは表示幅から算出するため固定値を持たない。 */
  --floating-cta-pad-x: 12px;        /* バー左右の余白 */
  --floating-cta-pad-y: 8px;         /* バー上下の余白 */
  --floating-cta-ratio: 0.1258;      /* ボタン画像の縦横比 103 / 819 */

  /* セクション間スペーサーの案件指定値（本案件：白 / 10px）。
     箇所ごとに変えたい場合のみ、その要素の style="" で個別に上書きする。 */
  --lp-spacer-h:     10px;           /* スペーサーの高さ */
  --lp-spacer-bg:    #FFFFFF;        /* スペーサーの背景色 */
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg-pc);
  color: #1f2937;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

/* スマホ版コンテンツ領域（PC時はこれが中央寄せされ、両脇は body の背景色） */
.lp {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  background: var(--color-bg-page);
  /* フローティングCTAバーの高さぶんを確保して重なりを避ける。
     バー高さ ＝ ボタン表示幅 × 縦横比 ＋ 上下パディング ＋ セーフエリア */
  padding-bottom: calc(
    (min(100vw, var(--lp-max-width)) - var(--floating-cta-pad-x) * 2) * var(--floating-cta-ratio)
    + var(--floating-cta-pad-y) * 2
    + env(safe-area-inset-bottom)
  );
  overflow: hidden;                       /* 画像CTAのはみ出し防止 */
}

/* セクション：1セクション = 1枚の画像 */
.lp-section {
  position: relative;       /* 画像CTAを %座標で重ねるための基準 */
  font-size: 0;             /* インライン要素の隙間を消す */
  line-height: 0;
}
.lp-section > img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================
 * セクション間スペーサー（画像と画像の間に挟む色付きの余白）
 *
 *   画像スタック方式では、隣り合うセクション画像を「べた付き」で
 *   縦に並べる。あいだに余白や区切りの色帯を入れたい場合は、
 *   セクションとセクションのあいだにこの要素を1つ置く：
 *
 *     <div class="lp-spacer" aria-hidden="true"></div>
 *
 *   高さと背景色は CSS変数で指定する。
 *     - 案件全体の既定を決める  … :root で --lp-spacer-h / --lp-spacer-bg を上書き
 *     - 個別の箇所だけ変える    … その要素の style="" で上書き
 *
 *     <div class="lp-spacer"
 *          style="--lp-spacer-h:40px; --lp-spacer-bg:#F5F5F5;"
 *          aria-hidden="true"></div>
 *
 *   本案件の指定は「白 #FFFFFF / 高さ 10px」（:root で一括指定済み）。
 *   装飾専用の要素なので aria-hidden="true" を付け、読み上げ対象から外す。
 * ========================================================= */
.lp-spacer {
  width: 100%;
  height: var(--lp-spacer-h, 0px);
  background: var(--lp-spacer-bg, transparent);
}

/* =========================================================
 * 画像CTA オーバーレイ（<a><img></a> を画像上に絶対配置）
 *   - left/top/width は HTML 側で style="" で個別指定（%座標）
 *   - hover効果は付けない（halo 防止の鉄則）
 *   - 矩形クロップに残る背景色の角を border-radius でクリップ
 * ========================================================= */
.cta-overlay {
  position: absolute;
  display: block;
  cursor: pointer;
  /* line-height: 0 は親で設定済み */
}
.cta-overlay > img {
  display: block;
  width: 100%;
  height: auto;
}
.cta-overlay[data-cta="line"]    > img { border-radius: 9999px; }   /* ピル形 */
.cta-overlay[data-cta="reserve"] > img { border-radius: 14px; }    /* 角丸矩形 */
.cta-overlay[data-cta="tel"]     > img { border-radius: 18px; }    /* 角丸矩形 */

/* =========================================================
 * フローティングCTAバー（スクロールで出現）
 *
 *   初期状態では画面下に隠しておき、ビューポート高さの半分を超えて
 *   スクロールした時点で main.js が .is-visible を付与してスライドインさせる。
 *   上に戻すと再び隠れる（しきい値は main.js の REVEAL_RATIO）。
 *
 *   中身は FV画像から切り出したCTAボタン1つ（案件仕様）。
 * ========================================================= */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--lp-max-width);
  /* flex + flex:1 にすることで、未使用CTA（main.js が display:none にする）が
     あっても、残ったボタンだけでバー全幅を等分できる */
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  font-family: inherit;
  /* 初期は画面外（下）に退避。translateX(-50%) の中央寄せと兼用するため
     translate() の第2引数で出し入れする */
  transform: translate(-50%, 100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
  background: #ffffff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .12);
  padding: var(--floating-cta-pad-y) var(--floating-cta-pad-x);
  /* iPhone セーフエリア（padding-bottom に加算する） */
  padding-bottom: calc(var(--floating-cta-pad-y) + env(safe-area-inset-bottom));
}
.floating-cta.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}
/* 視差効果を抑える設定の環境ではアニメーションさせない */
@media (prefers-reduced-motion: reduce) {
  .floating-cta { transition: none; }
}
/* FV画像から切り出したCTAボタンをそのまま置く。
   バーの地色は FV のボタン周辺と同じ白。上端にだけ薄い影を落として
   本文からの浮きを作る（左右・下は画面端なので影は不要）。 */
.floating-cta__link {
  flex: 1 1 auto;
  display: block;
  line-height: 0;
  text-decoration: none;
  /* hover効果は付けない（halo防止の鉄則） */
}
.floating-cta__img {
  display: block;
  width: 100%;
  height: auto;
  /* 矩形クロップの四隅に残る白をピル形にクリップする */
  border-radius: 9999px;
}

/* =========================================================
 * スクリーンリーダー専用テキスト（厳密一致テキストの正本）
 * ========================================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
