@charset "UTF-8";

/* =====================================================================
   映心動 Webサイト - アニメーション定義
   TCD ISSUE のアニメーション挙動を再現
   ===================================================================== */

/* ----------------------------------------------------------------------
   InView (スクロール表示時アニメーション)
   IntersectionObserver で .inview クラスに .is-active を付与
   ---------------------------------------------------------------------- */

/* 共通設定 */
.inview {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.inview.is-active {
  opacity: 1;
}

/* フェードイン（上から） */
.inview.fade-in-up {
  transform: translateY(40px);
}

.inview.fade-in-up.is-active {
  transform: translateY(0);
}

/* フェードイン（下から） */
.inview.fade-in-down {
  transform: translateY(-40px);
}

.inview.fade-in-down.is-active {
  transform: translateY(0);
}

/* フェードイン（左から） */
.inview.fade-in-left {
  transform: translateX(-40px);
}

.inview.fade-in-left.is-active {
  transform: translateX(0);
}

/* フェードイン（右から） */
.inview.fade-in-right {
  transform: translateX(40px);
}

.inview.fade-in-right.is-active {
  transform: translateX(0);
}

/* スケールイン */
.inview.scale-in {
  transform: scale(0.9);
}

.inview.scale-in.is-active {
  transform: scale(1);
}


/* ----------------------------------------------------------------------
   遅延アニメーション（item クラス: 300ms間隔で順次表示）
   TCD ISSUEの .item クラスを再現
   ---------------------------------------------------------------------- */
.inview .item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.inview.is-active .item {
  opacity: 1;
  transform: translateY(0);
}

/* 遅延設定 */
.inview.is-active .item:nth-child(1) { transition-delay: 0s; }
.inview.is-active .item:nth-child(2) { transition-delay: 0.3s; }
.inview.is-active .item:nth-child(3) { transition-delay: 0.6s; }
.inview.is-active .item:nth-child(4) { transition-delay: 0.9s; }
.inview.is-active .item:nth-child(5) { transition-delay: 1.2s; }
.inview.is-active .item:nth-child(6) { transition-delay: 1.5s; }
.inview.is-active .item:nth-child(7) { transition-delay: 1.8s; }
.inview.is-active .item:nth-child(8) { transition-delay: 2.1s; }
.inview.is-active .item:nth-child(9) { transition-delay: 2.4s; }
.inview.is-active .item:nth-child(10) { transition-delay: 2.7s; }
.inview.is-active .item:nth-child(11) { transition-delay: 3.0s; }
.inview.is-active .item:nth-child(12) { transition-delay: 3.3s; }

/* DNAグリッドは12個あるので、80ms間隔で素早く表示 */
.inview.dna-grid.is-active .item:nth-child(1)  { transition-delay: 0s; }
.inview.dna-grid.is-active .item:nth-child(2)  { transition-delay: 0.06s; }
.inview.dna-grid.is-active .item:nth-child(3)  { transition-delay: 0.12s; }
.inview.dna-grid.is-active .item:nth-child(4)  { transition-delay: 0.18s; }
.inview.dna-grid.is-active .item:nth-child(5)  { transition-delay: 0.24s; }
.inview.dna-grid.is-active .item:nth-child(6)  { transition-delay: 0.30s; }
.inview.dna-grid.is-active .item:nth-child(7)  { transition-delay: 0.36s; }
.inview.dna-grid.is-active .item:nth-child(8)  { transition-delay: 0.42s; }
.inview.dna-grid.is-active .item:nth-child(9)  { transition-delay: 0.48s; }
.inview.dna-grid.is-active .item:nth-child(10) { transition-delay: 0.54s; }
.inview.dna-grid.is-active .item:nth-child(11) { transition-delay: 0.60s; }
.inview.dna-grid.is-active .item:nth-child(12) { transition-delay: 0.66s; }


/* ----------------------------------------------------------------------
   キャッチコピー文字アニメーション（80ms間隔で文字が順次表示）
   ---------------------------------------------------------------------- */
.catch-animate .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

.catch-animate.is-active .char {
  animation: charReveal 0.5s ease forwards;
}

/* 各文字の遅延 */
.catch-animate.is-active .char:nth-child(1) { animation-delay: 0ms; }
.catch-animate.is-active .char:nth-child(2) { animation-delay: 80ms; }
.catch-animate.is-active .char:nth-child(3) { animation-delay: 160ms; }
.catch-animate.is-active .char:nth-child(4) { animation-delay: 240ms; }
.catch-animate.is-active .char:nth-child(5) { animation-delay: 320ms; }
.catch-animate.is-active .char:nth-child(6) { animation-delay: 400ms; }
.catch-animate.is-active .char:nth-child(7) { animation-delay: 480ms; }
.catch-animate.is-active .char:nth-child(8) { animation-delay: 560ms; }
.catch-animate.is-active .char:nth-child(9) { animation-delay: 640ms; }
.catch-animate.is-active .char:nth-child(10) { animation-delay: 720ms; }
.catch-animate.is-active .char:nth-child(11) { animation-delay: 800ms; }
.catch-animate.is-active .char:nth-child(12) { animation-delay: 880ms; }
.catch-animate.is-active .char:nth-child(13) { animation-delay: 960ms; }
.catch-animate.is-active .char:nth-child(14) { animation-delay: 1040ms; }
.catch-animate.is-active .char:nth-child(15) { animation-delay: 1120ms; }

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ----------------------------------------------------------------------
   共通キーフレーム
   ---------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}


/* ----------------------------------------------------------------------
   背景画像のホバーアニメーション
   ---------------------------------------------------------------------- */
.animate-background .image_wrap img,
.animate-background .footer-banner-bg img {
  transition: transform 0.6s ease;
}

.animate-background:hover .image_wrap img,
.animate-background:hover .footer-banner-bg img {
  transform: scale(1.05);
}


/* ----------------------------------------------------------------------
   Scroll Content Section - Active State Animations
   ---------------------------------------------------------------------- */
.scroll-content-section .content .item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-content-section.active .content .item {
  opacity: 1;
  transform: translateY(0);
}

.scroll-content-section.active .content .item:nth-child(1) { transition-delay: 0s; }
.scroll-content-section.active .content .item:nth-child(2) { transition-delay: 0.3s; }
.scroll-content-section.active .content .item:nth-child(3) { transition-delay: 0.6s; }
.scroll-content-section.active .content .item:nth-child(4) { transition-delay: 0.9s; }
.scroll-content-section.active .content .item:nth-child(5) { transition-delay: 1.2s; }

/* Background fade-in for scroll sections */
.scroll-content-section .bg_image {
  opacity: 0;
  transition: opacity 1s ease;
}

.scroll-content-section.active .bg_image {
  opacity: 1;
}


/* ----------------------------------------------------------------------
   Mouse Stalker (PC Only)
   ---------------------------------------------------------------------- */
.mouse-stalker {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-dark);
  pointer-events: none;
  z-index: 9998;
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, border-color 0.3s ease;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.mouse-stalker.hover {
  width: 60px;
  height: 60px;
  border-color: var(--color-white);
}


/* ----------------------------------------------------------------------
   Page Transition
   ---------------------------------------------------------------------- */
.page-transition {
  animation: pageIn 0.6s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ----------------------------------------------------------------------
   Reduced Motion Support
   ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .inview {
    opacity: 1;
    transform: none;
  }

  .inview .item {
    opacity: 1;
    transform: none;
  }

  .catch-animate .char {
    opacity: 1;
    transform: none;
  }
}
