/* =========================================================
   鮨塚交流会 LP2 — 動き（motion.css）
   ・スクロールして画面に入った部分が、ふわっと現れる
   ・図（当日の流れの線、3つの魅力の数字、チェックマーク、下線）が描かれる
   ・申込みボタンを押すと、紙吹雪と画面切り替えの演出が出る
   使い方：<html> に anim（動きを使う印）が付いているときだけ動く。
   「動きを減らす」設定の人には anim が付かないので、何も動かない。
   ✏️ 速さを変えるときは、下の :root の秒数を変える
   ========================================================= */

:root {
  --reveal-time: .8s;                                 /* 現れるまでの時間 */
  --ease-out: cubic-bezier(.2, .7, .2, 1);           /* なめらかに止まる */
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);       /* 少し行き過ぎて戻る（ポンッ） */
}

/* ---------- ページ上の読み進み具合のバー ---------- */
.scroll-progress {
  position: fixed;
  z-index: 160;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ffc94d, #e8782f 50%, var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- スクロールで現れる（js/motion.js が reveal と is-in を付ける） ---------- */
/* transform ではなく translate・scale・rotate を使う（写真の傾きなど、もとの形を崩さないため） */
html.anim .reveal {
  opacity: 0;
  transition:
    opacity var(--reveal-time) ease,
    translate var(--reveal-time) var(--ease-out),
    scale var(--reveal-time) var(--ease-out),
    rotate var(--reveal-time) var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.anim .reveal--up    { translate: 0 32px; }
html.anim .reveal--left  { translate: -48px 0; }
html.anim .reveal--right { translate: 48px 0; }
html.anim .reveal--zoom  { scale: .92; }
html.anim .reveal--pop   { scale: .5; transition-timing-function: ease, var(--ease-pop), var(--ease-pop), var(--ease-pop); }
html.anim .reveal--drop  { translate: 0 -40px; rotate: -8deg; transition-timing-function: ease, var(--ease-pop), var(--ease-pop), var(--ease-pop); }
html.anim .reveal--tilt  { rotate: -12deg; scale: .7; transition-timing-function: ease, var(--ease-pop), var(--ease-pop), var(--ease-pop); }
html.anim .reveal.is-in  { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }

/* ---------- キャッチコピーの「生まれる」の下線を、左から引く ---------- */
html.anim h1 em::before { scale: 0 1; transform-origin: left; transition: scale 1s var(--ease-out) .7s; }
html.anim h1.is-in em::before { scale: 1 1; }

/* ---------- 3つの魅力：イラストがふわふわ浮かぶ・数字が1→2→3と数える ---------- */
html.anim .features li.is-in .illust { animation: illust-float 3.6s ease-in-out calc(var(--d, 0s) + 1s) infinite; }
@keyframes illust-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
.count-pop { display: inline-block; animation: count-pop .28s var(--ease-pop); }
@keyframes count-pop {
  from { scale: 1.7; }
  to { scale: 1; }
}

/* ---------- こんな方におすすめ：チェックマークがポンッと付く ---------- */
html.anim .checklist li::before { scale: 0; transition: scale .45s var(--ease-pop) calc(var(--d, 0s) + .35s); }
html.anim .checklist li.is-in::before { scale: 1; }

/* ---------- 当日の流れ：番号が順に現れ、番号どうしを結ぶ線が伸びる ---------- */
.steps { position: relative; }
.steps li { position: relative; z-index: 1; }
@media (min-width: 1024px) {
  /* パソコン：番号の高さに横線（1の中心から3の中心まで） */
  .steps::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 14px;
    left: calc(100% / 6);
    right: calc(100% / 6);
    height: 3px;
    background: repeating-linear-gradient(90deg, #e8a27a 0 8px, transparent 8px 14px);
    transform-origin: left;
  }
  html.anim .steps::before { scale: 0 1; transition: scale 1.4s var(--ease-out) .5s; }
  html.anim .steps.is-in::before { scale: 1 1; }
}
@media (max-width: 767px) {
  /* スマホ：番号と番号のあいだに短い縦線 */
  .steps li + li::before {
    content: "";
    width: 3px;
    height: 18px;
    margin-bottom: 2px;
    background: repeating-linear-gradient(180deg, #e8a27a 0 5px, transparent 5px 9px);
    transform-origin: top;
  }
  html.anim .steps li + li::before { scale: 1 0; transition: scale .5s var(--ease-out) var(--d, 0s); }
  html.anim .steps li.is-in + li.is-in::before { scale: 1 1; }
}
/* 番号が出たあと、一度だけ光の輪が広がる */
html.anim .steps li.is-in .step { animation: step-ring 1s ease-out calc(var(--d, 0s) + .5s) 1 both; }
@keyframes step-ring {
  0% { box-shadow: 0 0 0 0 #b83d1666; }
  100% { box-shadow: 0 0 0 16px #b83d1600; }
}

/* ---------- 写真の帯は、現れたあとも流れ続ける（style.css の動き） ---------- */

/* ---------- 下の帯のボタン：ときどき光が走る ---------- */
html.anim .entry-bar__btn { position: relative; overflow: hidden; }
html.anim .entry-bar__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, #ffffff66 50%, transparent 70%);
  translate: -120% 0;
  animation: btn-shine 4.5s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes btn-shine {
  0%, 70% { translate: -120% 0; }
  100% { translate: 120% 0; }
}

/* =========================================================
   申込みボタンを押したときの演出（js/motion.js が作る）
   ① ボタンがぷにっと縮む → ② 押した所から波紋と紙吹雪・鮨 → ③ 紺の円が広がって画面を覆い、
   「申込フォームを開きます」とキャラが出る → ④ フォームを開く
   ========================================================= */
.is-pressed { animation: btn-press .45s var(--ease-pop); }
@keyframes btn-press {
  0% { scale: 1; }
  30% { scale: .88 1.08; }
  60% { scale: 1.08 .94; }
  100% { scale: 1; }
}

.entry-fx { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }

.entry-fx__ring {
  position: absolute;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #ffc94d;
  border-radius: 50%;
  animation: fx-ring .7s ease-out forwards;
}
.entry-fx__ring--2 { border-color: #fff; animation-delay: .12s; }
@keyframes fx-ring {
  from { scale: .2; opacity: 1; }
  to { scale: 7; opacity: 0; }
}

.entry-fx__bit {
  position: absolute;
  width: 10px;
  height: 14px;
  margin: -7px 0 0 -5px;
  border-radius: 2px;
  background: var(--c, #e8782f);
  animation: fx-fly var(--t, .9s) cubic-bezier(.15, .7, .3, 1) forwards;
}
.entry-fx__bit--sushi { width: auto; height: auto; background: none; font-size: 26px; line-height: 1; }
@keyframes fx-fly {
  0% { translate: 0 0; rotate: 0deg; scale: .4; opacity: 1; }
  70% { opacity: 1; }
  100% { translate: var(--tx) var(--ty); rotate: var(--r); scale: 1; opacity: 0; }
}

.entry-fx__wipe {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--navy);   /* キャラのGIFの背景と同じ紺（色が違うと四角く見えるため1色にする） */
  color: #fff;
  text-align: center;
  clip-path: circle(0 at var(--x) var(--y));
  animation: fx-wipe .6s cubic-bezier(.7, 0, .3, 1) .25s forwards;
}
@keyframes fx-wipe {
  to { clip-path: circle(150% at var(--x) var(--y)); }
}
.entry-fx__gif { width: 120px; height: auto; animation: fx-bounce .7s var(--ease-pop) .45s both; }
@keyframes fx-bounce {
  from { translate: 0 40px; scale: .5; opacity: 0; }
  to { translate: 0 0; scale: 1; opacity: 1; }
}
.entry-fx__text { margin: 0; color: #fff; font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; letter-spacing: .08em; animation: fx-bounce .6s var(--ease-pop) .55s both; }
.entry-fx__dots { display: flex; gap: 8px; }
.entry-fx__dots i { width: 9px; height: 9px; border-radius: 50%; background: #ffc94d; animation: fx-dot .9s ease-in-out infinite; }
.entry-fx__dots i:nth-child(2) { animation-delay: .15s; }
.entry-fx__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes fx-dot {
  0%, 100% { translate: 0 0; opacity: .5; }
  50% { translate: 0 -8px; opacity: 1; }
}
.entry-fx.is-leaving { animation: fx-leave .5s ease forwards; }
@keyframes fx-leave { to { opacity: 0; } }
