/*
  動きの共通設定(全ページ共通)。
  - 文章はHTMLに最初から入れたまま、見た目だけを動かす(AI・検索エンジンの読み取りに影響しない)。
  - .js クラスは motion.js が付ける。JSが動かない環境では、すべて通常表示のまま。
  - 動きを減らす設定(prefers-reduced-motion)の端末では、動かさない。
*/

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: 84px; }

/* ---- スクロールで現れる ---- */
.js .fe-head, .js .sv-band,
.js .ps-head, .js .ps-step, .js .ps-arrow, .js .ps-cta,
.js .fa-head, .js .fa-item,
.js .line-card,
.js .nl-card, .js .cl-faq-item, .js .cl-cta {
  opacity: 0;
  translate: 0 30px;
  transition: opacity .85s cubic-bezier(.2, .65, .2, 1), translate .85s cubic-bezier(.2, .65, .2, 1);
  transition-delay: var(--rd, 0ms);
}
.js .is-in { opacity: 1 !important; translate: 0 0 !important; }

/* ---- トップの入場の動き ---- */
@keyframes lbRise {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes lbSpin { to { rotate: 360deg; } }

.js .hero-tag, .js .hero-headline, .js .hero-lead, .js .hero-actions { animation: lbRise 1s cubic-bezier(.2, .65, .2, 1) both; }
.js .hero-tag { animation-delay: .05s; display: inline-block; }
.js .hero-headline { animation-delay: .18s; }
.js .hero-lead { animation-delay: .34s; }
.js .hero-actions { animation-delay: .5s; }

/* ---- 回転バッジ(丸いボタン) ---- */
.spin-badge {
  position: relative; display: inline-grid; place-items: center;
  width: 124px; height: 124px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 18px 38px -18px rgba(23, 51, 29, .5);
  transition: transform .3s ease, background .25s ease;
}
.spin-badge:hover { transform: scale(1.06); background: var(--accent-2); }
.spin-badge svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spin-badge .spin-ring { transform-origin: 60px 60px; animation: lbSpin 18s linear infinite; }
.spin-badge text { font-family: var(--font-jp); font-size: 9.6px; font-weight: 800; letter-spacing: .04em; fill: currentColor; }
@media (max-width: 780px) { .spin-badge { width: 96px; height: 96px; } }

/* ---- 右端の固定ボタン ---- */
.lb-float {
  position: fixed; right: 18px; bottom: 22px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; pointer-events: none; translate: 0 14px;
  transition: opacity .35s ease, translate .35s ease;
}
.lb-float.is-show { opacity: 1; pointer-events: auto; translate: 0 0; }
.lb-fab {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid transparent; cursor: pointer; padding: 0;
  box-shadow: 0 14px 30px -14px rgba(23, 51, 29, .45);
  transition: transform .22s ease, background .22s ease;
}
.lb-fab:hover { transform: translateY(-2px) scale(1.05); }
.lb-fab svg { width: 22px; height: 22px; }
.lb-fab-line { background: #06c755; color: #fff; }
.lb-fab-mail { background: var(--accent); color: var(--accent-ink); }
.lb-fab-top { background: var(--surface); color: var(--ink-2); border-color: var(--line); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .22s ease; }
.lb-float.is-far .lb-fab-top { opacity: 1; pointer-events: auto; }
@media (max-width: 820px) {
  .lb-float { right: 12px; bottom: 14px; gap: 8px; }
  .lb-fab { width: 46px; height: 46px; }
  .lb-fab-mail { display: none; }
}

/* ---- ヘッダー(下に進むと小さくなる。トップ以外のページ用) ---- */
.nav { transition: height .3s ease, padding .3s ease, background .3s ease; }
.nav.scrolled { height: 76px; }

/* ---- 動きを減らす設定 ---- */
@media (prefers-reduced-motion: reduce) {
  .js .fe-head, .js .sv-band, .js .ps-head, .js .ps-step, .js .ps-arrow, .js .ps-cta,
  .js .fa-head, .js .fa-item, .js .line-card, .js .nl-card, .js .cl-faq-item, .js .cl-cta {
    opacity: 1 !important; translate: none !important; transition: none !important;
  }
  .js .hero-tag, .js .hero-headline, .js .hero-lead, .js .hero-actions { animation: none !important; }
  .spin-badge .spin-ring { animation: none; }
  .lb-float { transition: none; }
}
