/* 電気代訴求の新要素と、LPの動き。
   動きは prefers-reduced-motion: no-preference のときだけ付ける。
   スクロール連動の出現は lp.js が <html> に .js-motion を付けたときだけ効く（JSが無ければ最初から表示）。 */

/* ---------- FV: 実例の一言 ---------- */
.fv__proof { margin: 4px auto 14px; padding: 12px 16px; max-width: 26em; border: 2px solid #e6ad61; border-radius: 12px; background: #fff; color: var(--navy-deep); font-size: 17px; font-weight: 700; line-height: 1.6; box-shadow: 0 6px 18px #e35a0014; }
.fv__proof strong { color: var(--cta-dark); font-size: 1.2em; }
.fv__proof sup { font-size: 11px; color: var(--muted); }
.fv__num { display: inline-block; padding: 0 .12em; color: var(--cta-dark); font-size: 1.45em; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(transparent 60%, var(--highlight) 60%); }

/* ---------- 料金表: 最も高い段階を強調 ---------- */
.tbl--rate tr.is-peak th, .tbl--rate tr.is-peak td { background: #fff6ec; color: var(--cta-dark); }

/* ---------- 実例: 導入前 → 導入後 ---------- */
.case-bill { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 22px 0 8px; }
.case-bill__col { padding: 16px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f3f5f7; text-align: center; }
.case-bill__col > span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.case-bill__col strong { display: block; margin-top: 4px; color: var(--navy-deep); font-size: 20px; }
.case-bill__col--after { border: 2px solid var(--cta-dark); background: #fff7f2; }
.case-bill__col--after strong { color: var(--cta-dark); font-size: 30px; font-weight: 900; }
.case-bill__arrow { color: var(--cta-dark); font-size: 28px; font-weight: 900; }

/* ---------- 目安表 ---------- */
.tbl--estimate td { font-weight: 700; }
.tbl--estimate td:nth-child(2) { color: var(--cta-dark); }

@media (max-width: 560px) {
  .fv__proof { font-size: 15px; padding: 10px 12px; }
  .case-bill__col strong { font-size: 16px; }
  .case-bill__col--after strong { font-size: 24px; }
}

/* ================= 動き ================= */
@media (prefers-reduced-motion: no-preference) {

  /* スクロールで下からふわっと出す */
  .js-motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  .js-motion .reveal.is-in { opacity: 1; transform: none; }

  /* マーカーを左から引く */
  .js-motion mark, .js-motion .fv__head em, .js-motion .fv__num {
    background-repeat: no-repeat; background-size: 0% 100%;
    transition: background-size .9s cubic-bezier(.3,.7,.2,1) .15s;
  }
  .js-motion mark.is-in, .js-motion .fv__head em.is-in, .js-motion .fv__num.is-in { background-size: 100% 100%; }

  /* FVの「月900円台」: 読み込み後に弾む */
  .fv__num { animation: num-pop .7s cubic-bezier(.3,1.6,.5,1) .5s both; }
  @keyframes num-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  .fv__proof { animation: proof-in .6s ease .25s both; }
  @keyframes proof-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* CTA: 光が横切る + 矢印が前に出る */
  .btn--cta { position: relative; overflow: hidden; }
  .btn--cta::after {
    content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, #ffffff59, transparent);
    transform: skewX(-20deg); animation: cta-shine 3.6s ease-in-out infinite; pointer-events: none;
  }
  @keyframes cta-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
  .btn--cta > span[aria-hidden="true"]:last-child { display: inline-block; animation: cta-nudge 1.8s ease-in-out infinite; }
  @keyframes cta-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(5px); } 90% { transform: translateX(0); } }

  /* 「▼」が下へ誘う */
  .story-turn::after { animation: arrow-bob 1.6s ease-in-out infinite; }
  @keyframes arrow-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

  /* 料金表の最高段階を一度だけ光らせる */
  .js-motion .tbl--rate tr.is-peak.is-in td, .js-motion .tbl--rate tr.is-peak.is-in th { animation: peak-flash 1.2s ease .3s 2; }
  @keyframes peak-flash { 50% { background: #ffd9a8; } }

  /* 実例: 矢印が流れ、導入後が弾む */
  .case-bill__arrow { animation: arrow-flow 1.4s ease-in-out infinite; }
  @keyframes arrow-flow { 0%, 100% { transform: translateX(-3px); opacity: .6; } 50% { transform: translateX(3px); opacity: 1; } }
  .js-motion .case-bill__col--after.is-in { animation: after-pop .7s cubic-bezier(.3,1.5,.5,1) .35s both; }
  @keyframes after-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }

  /* 追従CTAは下からせり上がる */
  .sticky:not([hidden]) { animation: sticky-up .35s ease-out both; }
  @keyframes sticky-up { from { transform: translateY(100%); } to { transform: none; } }
}
