/* =====================================================================
   WOLTOKYO POP — MOTION（ローダー・ヒーロー演出・キラキラ・スクロール演出）
   ===================================================================== */

:root { --bounce: cubic-bezier(0.34, 1.56, 0.64, 1); --elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); }

/* ---------- オープニングローダー ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2.2px) 0 0 / 24px 24px,
    linear-gradient(170deg, var(--coral-deep), var(--coral) 50%, var(--pink));
  color: var(--white);
  transition: clip-path 0.9s cubic-bezier(0.83, 0, 0.17, 1);
  clip-path: circle(150% at 50% 50%);
}
.loader.is-done { clip-path: circle(0% at 50% 50%); pointer-events: none; }
.loader-burst { position: absolute; width: min(520px, 90vw); color: var(--mint); animation: loaderSpin 6s linear infinite, popIn 0.7s var(--bounce) both; }
.loader-word {
  position: relative;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 0.9;
  text-align: center;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink);
}
.loader-word span { display: inline-block; animation: letterJump 0.9s var(--bounce) both; animation-delay: calc(var(--i) * 0.06s); }
.loader-word small { display: block; margin-top: 14px; font-size: 0.22em; letter-spacing: 0.4em; -webkit-text-stroke: 0; text-shadow: none; animation: fadeUp 0.6s 0.7s both; }
@keyframes loaderSpin { to { rotate: 360deg; } }
@keyframes letterJump {
  0% { opacity: 0; transform: translateY(80px) scale(0.4) rotate(-20deg); }
  60% { opacity: 1; transform: translateY(-14px) scale(1.1) rotate(6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes popIn { from { opacity: 0; scale: 0; } to { opacity: 1; scale: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.is-loading { overflow: hidden; }
.loader[hidden] { display: none; }

/* ---------- ヒーロー登場 ---------- */
.hero .hero-burst { scale: 0; transition: scale 1.2s var(--bounce) 0.1s; }
.hero .hero-photo { opacity: 0; scale: 0.3; rotate: -25deg; transition: opacity 0.5s, scale 0.9s var(--bounce), rotate 0.9s var(--bounce); }
.hero .hero-photo:nth-child(1) { transition-delay: 0.35s; }
.hero .hero-photo:nth-child(2) { transition-delay: 0.15s; rotate: 30deg; }
.hero .hero-photo:nth-child(3) { transition-delay: 0.25s; rotate: -30deg; }
.hero-title .ch { display: inline-block; opacity: 0; transform: translateY(70px) scale(0.3) rotate(-15deg); }
.hero-sub { opacity: 0; transform: translateY(20px) scale(0.8); transition: 0.6s var(--bounce) 1.4s; }
.hero .sticker { scale: 0; transition: scale 0.7s var(--elastic); }
.hero .sticker:nth-child(1) { transition-delay: 1.5s; }
.hero .sticker:nth-child(2) { transition-delay: 1.65s; }
.hero .sticker:nth-child(3) { transition-delay: 1.8s; }

body.is-ready .hero .hero-burst { scale: 1; }
body.is-ready .hero .hero-photo { opacity: 1; scale: 1; rotate: 0deg; }
body.is-ready .hero-title .ch { animation: letterJump 0.8s var(--bounce) both; animation-delay: calc(0.6s + var(--i) * 0.05s); }
body.is-ready .hero-sub { opacity: 1; transform: none; }
body.is-ready .hero .sticker { scale: 1; }

/* ステッカーはゆらゆら・ホバーでくるっ */
.hero .sticker > span { display: block; animation: wobble 3.2s ease-in-out infinite; }
.hero .sticker:nth-child(2) > span { animation-delay: -1s; }
.hero .sticker:nth-child(3) > span { animation-delay: -2s; }
.hero .sticker { pointer-events: auto; cursor: default; }
@media (hover: hover) and (pointer: fine) { .hero .sticker:hover > span { animation: spinOnce 0.7s var(--bounce); } }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-6px); } }
@keyframes spinOnce { to { transform: rotate(360deg) scale(1.1); } }

/* マウス・スクロールで写真が動く（視差） */
.hero-photos { transform: translate3d(calc(var(--mx, 0) * 26px), calc(var(--my, 0) * 18px + var(--sy, 0) * 0.25px), 0); transition: transform 0.25s ease-out; }
.hero-photo:nth-child(2) { margin-left: calc(var(--mx, 0) * -14px); }
.hero-photo:nth-child(3) { margin-right: calc(var(--mx, 0) * -14px); }
@media (hover: hover) and (pointer: fine) { .hero-photo:hover { z-index: 5; } }
.hero-photo img { transition: transform 0.6s var(--ease); }
@media (hover: hover) and (pointer: fine) { .hero-photo:hover img { transform: scale(1.08); } }
.hero-copy { transform: translate(-50%, calc(var(--sy, 0) * -0.15px)); }

/* 雲はゆっくり流れる */
.clouds { background-size: 1440px 100%; background-repeat: repeat-x; animation: cloudFlow 60s linear infinite; }
@keyframes cloudFlow { to { background-position: 1440px 0; } }

/* ---------- キラキラ ---------- */
.sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.sparkles i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 22px);
  height: var(--s, 22px);
  background: var(--c, #fff);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0c.7 6.4 5.6 11.3 12 12-6.4.7-11.3 5.6-12 12-.7-6.4-5.6-11.3-12-12C6.4 11.3 11.3 6.4 12 0z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0c.7 6.4 5.6 11.3 12 12-6.4.7-11.3 5.6-12 12-.7-6.4-5.6-11.3-12-12C6.4 11.3 11.3 6.4 12 0z"/></svg>') center / contain no-repeat;
  animation: twinkle var(--t, 2.6s) ease-in-out infinite, floaty calc(var(--t, 2.6s) * 3) ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes twinkle { 0%, 100% { scale: 0.2; opacity: 0.2; rotate: 0deg; } 50% { scale: 1; opacity: 1; rotate: 90deg; } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -18px; } }
.band > .sparkles, .statement > .sparkles { z-index: 0; }
.band > .wrap, .band > .carousel { position: relative; z-index: 1; }

/* カーソルのキラキラ（ヒーロー上） */
.trail {
  position: fixed;
  z-index: 90;
  width: 16px;
  height: 16px;
  pointer-events: none;
  background: var(--c, var(--lemon));
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0c.7 6.4 5.6 11.3 12 12-6.4.7-11.3 5.6-12 12-.7-6.4-5.6-11.3-12-12C6.4 11.3 11.3 6.4 12 0z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0c.7 6.4 5.6 11.3 12 12-6.4.7-11.3 5.6-12 12-.7-6.4-5.6-11.3-12-12C6.4 11.3 11.3 6.4 12 0z"/></svg>') center / contain no-repeat;
  animation: trail 0.9s ease-out forwards;
}
@keyframes trail { from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.2) rotate(180deg); } }

/* ---------- 見出し・ラベル ---------- */
.headline::before, .headline::after { animation: sparkSpin 4s linear infinite; }
.headline::after { animation-direction: reverse; }
@keyframes sparkSpin { 0% { rotate: 0deg; scale: 1; } 50% { scale: 1.35; } 100% { rotate: 360deg; scale: 1; } }
.headline .ch { display: inline-block; }
.reveal.is-in .headline .ch, .sec-head.is-in .headline .ch { animation: charHop 0.7s var(--bounce) both; animation-delay: calc(var(--i) * 0.04s); }
@keyframes charHop { 0% { transform: translateY(30px) scale(0.5); opacity: 0; } 70% { transform: translateY(-8px) scale(1.1); opacity: 1; } 100% { transform: none; opacity: 1; } }
.sec-head .pill-label { animation: pillFloat 3s ease-in-out infinite; }
@keyframes pillFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

/* ---------- スクロール出現（はずむ） ---------- */
.reveal { opacity: 0; transform: translateY(60px) scale(0.92); transition: opacity 0.7s var(--ease), transform 0.9s var(--bounce); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.arch-card.reveal { transform: translateY(90px) rotate(var(--tilt-in, -6deg)) scale(0.85); }
.arch-card.reveal:nth-child(even) { --tilt-in: 6deg; }
.arch-card.reveal.is-in { transform: none; }
.glass.reveal { transform: translateY(50px) scale(0.6); }
.glass.reveal.is-in { transform: none; }
.news-row.reveal { transform: translateX(-60px); }
.news-row.reveal:nth-child(even) { transform: translateX(60px); }
.news-row.reveal.is-in { transform: none; }

/* アーチカード：ホバーでふわっと揺れる */
@media (hover: hover) and (pointer: fine) { .arch-card:hover::before, .arch-card:hover::after { animation: sparkSpin 1.2s linear infinite; } }
@media (hover: hover) and (pointer: fine) { article.arch-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 14px 0 var(--ink); } }
.arch-card .arch-name { transition: transform 0.4s var(--bounce); }
@media (hover: hover) and (pointer: fine) { .arch-card:hover .arch-name { transform: scale(1.08) rotate(-2deg); } }

/* ガラスカード */
.glass { transition: transform 0.4s var(--bounce), background 0.3s; }
@media (hover: hover) and (pointer: fine) { .glass:hover { transform: translateY(-8px) rotate(-1.5deg); background: rgba(255, 255, 255, 0.26); } }
@media (hover: hover) and (pointer: fine) { .glass:hover .glass-num { animation: jelly 0.6s var(--bounce); } }
@keyframes jelly { 30% { transform: scale(1.25, 0.75); } 50% { transform: scale(0.85, 1.15); } 70% { transform: scale(1.05, 0.95); } 100% { transform: none; } }

/* ボタン：ホバーでぷるん */
@media (hover: hover) and (pointer: fine) { .btn:hover { animation: jelly 0.55s var(--bounce); } }
.btn--coral { position: relative; overflow: hidden; }
.btn--coral::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ステートメント */
.statement-logo { animation: logoFloat 4s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 0 rgba(255, 236, 79, 0)); } 50% { transform: translateY(-12px) rotate(2deg); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 24px rgba(255, 236, 79, 0.7)); } }
.statement p .line { display: inline-block; opacity: 0; transform: translateY(24px); transition: 0.7s var(--ease); transition-delay: calc(0.15s * var(--i)); }
.statement .is-in p .line { opacity: 1; transform: none; }
.statement-bg img { scale: 1.15; transition: scale 0.1s linear; scale: calc(1.15 - var(--p, 0) * 0.15); }

/* 写真バナー：ズームイン */
.photo-banner > img { scale: 1.25; transition: scale 1.6s var(--ease); }
.photo-banner.is-in > img { scale: 1; }
.photo-banner h2 { opacity: 0; transform: translateY(40px); transition: 0.9s var(--bounce) 0.4s; }
.photo-banner.is-in h2 { opacity: 1; transform: none; }

/* フッターのロゴ */
.site-foot .wordmark { display: inline-block; transition: transform 0.3s; }
@media (hover: hover) and (pointer: fine) { .site-foot .wordmark:hover { animation: jelly 0.7s var(--bounce); } }

/* ドックのボタンは呼吸 */
.dock.is-show .btn--coral { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.04; } }

/* 予約CTA：大きなハートがふわふわ */
.cta { position: relative; overflow: hidden; }
.cta .wrap { position: relative; z-index: 1; }

/* 「視差効果を減らす」設定：大きな移動だけ止める */
@media (prefers-reduced-motion: reduce) {
  .hero-photos, .hero-copy { transform: none !important; }
  .hero-copy { transform: translateX(-50%) !important; }
  .trail { display: none; }
}
