/* =========================================================
 * style.css — 画像スタック方式 LP テンプレ（v3.2.0）
 *
 * 設計方針：
 *   - モバイル基準幅 480px を念頭にデザイン画像を受領
 *   - PC は --lp-max-width（既定 600px）に中央寄せし、両脇は
 *     --color-bg-pc の背景色で埋める。コンテンツは引き伸ばさない
 *   - 各セクションは <section class="lp-section"> + 1枚の <img>
 *   - セクション間に余白（色帯）を入れる場合は <div class="lp-spacer">
 *   - 最下部にフッター（ネイビー地）。フローティングCTAバーぶんの余白はフッター側に持たせる
 *
 * 案件カスタマイズ：
 *   :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;        /* 電話紺 */

  --color-footer-bg: #0F2B4D;        /* フッターのネイビー（section4 上端の実測値） */

  /* フローティングCTAバー：FVの「無料で参加してみる」ボタン（947×148px）を
     白いバーに載せる。高さは表示幅から算出するため固定値を持たない。 */
  --floating-cta-pad-x: 16px;        /* バー左右の余白 */
  --floating-cta-pad-y: 8px;         /* バー上下の余白 */
  --floating-cta-ratio: 0.1563;      /* CTA画像の縦横比 148 / 947 */

  /* セクション間スペーサー（.lp-spacer）の案件既定値。
     テンプレ状態では「空」（高さ0・透明）＝挟んでも何も表示されない。
     案件では納品データ／クライアント指示の実値を必ず入れる。
     例: --lp-spacer-h: 15px;  --lp-spacer-bg: #FFFFFF; */
  --lp-spacer-h:     0px;            /* 本案件はスペーサー未使用（クライアント指示） */
  --lp-spacer-bg:    transparent;
}

*, *::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バーぶんの余白は .lp-footer 側に持たせる
     （フッターのネイビーがバーの下まで続くようにするため） */
  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つ置く：
 *
 *     <section class="lp-section">…</section>
 *     <div class="lp-spacer" aria-hidden="true"></div>
 *     <section class="lp-section">…</section>
 *
 *   高さと背景色は CSS変数で指定する。
 *     - 案件全体の既定 … :root の --lp-spacer-h / --lp-spacer-bg を上書き
 *                        （HTML 側は <div class="lp-spacer" aria-hidden="true"></div> だけ）
 *     - 特定の1本だけ … その要素の style="" で上書き
 *
 *     <div class="lp-spacer"
 *          style="--lp-spacer-h:40px; --lp-spacer-bg:#F5F5F5;"
 *          aria-hidden="true"></div>
 *
 *   ※ 短縮名 --spacer-h / --spacer-bg も同じ意味で受け付ける
 *     （v3.1.x 時代の案件ブランチとの互換のため。新規案件は --lp-spacer-* を使う）。
 *
 *   テンプレ既定は「高さ0・透明」＝空。案件では必ず実値を指定すること。
 *   装飾専用の要素なので aria-hidden="true" を付け、読み上げ対象から外す。
 *   「この2枚のあいだだけ余白なし」にしたい場合は要素ごと削除する。
 * ========================================================= */
.lp-spacer {
  display: block;
  width: 100%;
  height: var(--spacer-h, var(--lp-spacer-h, 0px));
  background: var(--spacer-bg, var(--lp-spacer-bg, transparent));
  font-size: 0;
  line-height: 0;
}

/* =========================================================
 * 画像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: 9999px; }  /* 本案件：緑のピル形ボタン */
.cta-overlay[data-cta="tel"]     > img { border-radius: 18px; }    /* 角丸矩形 */

/* =========================================================
 * フッター（ネイビー地・テキストリンク＋最下部にロゴ）
 *   - 地色はデザイン画像のいちばん暗いネイビー（section4 上端の実測値）
 *   - フローティングCTAバーの高さぶんを padding-bottom に含め、
 *     ネイビーがバーの裏まで続くようにする
 * ========================================================= */
.lp-footer {
  background: var(--color-footer-bg);
  color: #ffffff;
  text-align: center;
  padding-top: 40px;
  padding-left: 24px;
  padding-right: 24px;
  /* 下余白 ＝ 通常の余白 ＋ フローティングCTAバーの実高さ ＋ セーフエリア */
  padding-bottom: calc(
    40px
    + (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)
  );
  font-size: 17px;
  line-height: 1.6;
}
.lp-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
/* 1段目：2本を横並び。狭い画面で入りきらなければ折り返す */
.lp-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 28px;
  row-gap: 18px;
}
.lp-footer__link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, .55);
  /* タップ領域を確保（WCAG の 44px 目安） */
  display: inline-block;
  padding: 6px 8px;
}
/* URL未確定で href が無いあいだは文字だけ見せる（クリック不可・下線なし） */
.lp-footer__link:not([href]) {
  text-decoration: none;
  cursor: default;
  opacity: .85;
}
.lp-footer__logo {
  display: inline-block;
  margin-top: 36px;
  line-height: 0;
}
.lp-footer__logo > img {
  display: block;
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;          /* 白プレートの角を落とす */
}

/* =========================================================
 * フローティングCTAバー（スクロールで出現）
 *
 *   初期状態では画面下に隠しておき、ビューポート高さの半分を超えて
 *   スクロールした時点で main.js が .is-visible を付与してスライドインさせる。
 *   上に戻すと再び隠れる（しきい値は main.js の REVEAL_RATIO）。
 *
 *   中身は FV画像から切り出した「無料で参加してみる」ボタン1枚（§1 の画像CTAと同じ）。
 * ========================================================= */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--lp-max-width);
  display: flex;
  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; }
}
.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;
}
