/* LPの文字の動き（メイン画像の文字・料金表示）。
   読み込んだページだけで動く。文字は最初から見える状態で始め（透明から出さない）、表示速度（LCP）を遅らせない。
   端末で「視差効果を減らす」を選んでいる人には動かさない。 */
@media (prefers-reduced-motion: no-preference) {
  /* メイン画像の文字：下から順に入る */
  .rw-mvcopy .rw-mvcopy__lead,
  .rw-mvcopy .rw-mvcopy__title,
  .rw-mvcopy .rw-mvcopy__en,
  .rw-mvcopy .rw-mvcopy__name,
  .rw-mvcopy .rw-mvcopy__box {
    animation: rw-rise .7s cubic-bezier(.2, .7, .2, 1) both;
  }
  .rw-mvcopy .rw-mvcopy__title { animation-delay: .12s; }
  .rw-mvcopy .rw-mvcopy__en { animation-delay: .24s; }
  .rw-mvcopy .rw-mvcopy__name { animation-delay: .32s; }
  .rw-mvcopy .rw-mvcopy__box { animation-delay: .45s; }

  /* 赤い箱：光が横切る（くり返し） */
  .rw-mvcopy .rw-mvcopy__box { overflow: hidden; }
  .rw-mvcopy .rw-mvcopy__box::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .45) 50%, transparent 100%);
    transform: translateX(-150%) skewX(-18deg);
    will-change: transform;
    animation: rw-shine 4s ease-in-out 1.4s infinite;
    pointer-events: none;
  }

  /* 「最大80%割引」：一定間隔で弾む */
  .rw-mvcopy .rw-mvcopy__off {
    display: inline-block;
    transform-origin: 50% 70%;
    animation: rw-pop 4s ease-in-out 1.2s infinite;
  }

  /* 料金：見えたら蛍光ペンが引かれ、2.9が弾み、「法人限定」が揺れる */
  .rw-price .rw-price__mark {
    background: linear-gradient(transparent 62%, #fff277 62%) no-repeat 0 0 / 100% 100%;
  }
  .rw-motion-ready .rw-price .rw-price__mark { background-repeat: no-repeat; }
  .rw-motion-ready .rw-price:not(.is-in) .rw-price__mark { background-size: 0% 100%; }
  .rw-motion-ready .rw-price.is-in .rw-price__mark { background-size: 100% 100%; transition: background-size .9s cubic-bezier(.2, .7, .2, 1) .2s; }
  .rw-price .rw-price__num { display: inline-block; transform-origin: 50% 80%; }
  .rw-price.is-in .rw-price__num { animation: rw-pop 3.6s ease-in-out .9s infinite; }
  .rw-price.is-in .rw-price__badge { animation: rw-wiggle 3.6s ease-in-out .6s infinite; }
}

@keyframes rw-rise {
  from { transform: translateY(14px); opacity: .35; }
  to { transform: none; opacity: 1; }
}
/* 位置（left）ではなくtransformで動かす。毎フレームの再レイアウトを起こさない（2026-12-03 表示速度） */
@keyframes rw-shine {
  0% { transform: translateX(-150%) skewX(-18deg); }
  35%, 100% { transform: translateX(325%) skewX(-18deg); }
}
@keyframes rw-pop {
  0%, 70%, 100% { transform: scale(1); }
  78% { transform: scale(1.08); }
  86% { transform: scale(.98); }
  93% { transform: scale(1.03); }
}
@keyframes rw-wiggle {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(-8deg) scale(1.05); }
  88% { transform: rotate(6deg) scale(1.05); }
  92% { transform: rotate(-3deg); }
}
