/* ============================================================
   スクロール・FPS 最適化（見た目は極力維持）
   html.perf-touch … js/performance.js がスマホ等で付与
   ============================================================ */

/* --- 全端末：軽量フェード・影・blur 無効 --- */
.fade-in {
  transform: none;
}

.fade-in.is-visible {
  transform: none;
}

.site-header.is-scrolled,
body.subpage .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-grain {
  display: none;
}

.hero-scroll-line {
  animation: none;
}

.btn-simulator {
  animation: none;
}

/* --- モバイル共通 --- */
@media (max-width: 767px) {
  :root {
    --shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    --shadow-orange: 0 3px 14px rgba(255, 107, 0, 0.24);
  }

  .service-card:hover,
  .achievement-item:hover,
  .roadmap-step:hover,
  .social-link--instagram:hover {
    transform: none;
    box-shadow: none;
  }

  .img-hover img {
    transition: none;
  }

  .img-hover:hover img {
    transform: none;
  }

  .contact-simulator-cta {
    box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.25), 0 4px 16px var(--color-orange-glow);
  }

  .contact-fab-toggle {
    box-shadow: 0 3px 12px var(--color-orange-glow);
  }

  .stat-card:hover {
    background: var(--color-black-card);
  }
}

/* --- タッチ端末（JSクラス）--- */
html.perf-touch .site-header {
  transition: background 0.15s ease;
}

html.perf-touch .hero-video-wrap {
  transform: translateZ(0);
  isolation: isolate;
}

@media (max-width: 767px) {
  .hero-video,
  .hero-video-wrap .hero-video {
    display: block;
    visibility: visible;
    opacity: 1;
  }
}

html.perf-touch .section {
  contain-intrinsic-size: auto 380px;
}

html.perf-touch .img-hover img {
  transition: none;
}

html.perf-touch .img-hover:hover img {
  transform: none;
  filter: none;
  opacity: 1;
}

html.perf-touch .service-card:hover,
html.perf-touch .achievement-item:hover {
  transform: none;
  box-shadow: none;
}

html.perf-touch .btn-primary:hover,
html.perf-touch .btn-outline:hover,
html.perf-touch .btn-simulator:hover {
  transform: none;
}

/* デスクトップのみホバー拡大 */
@media (hover: hover) and (pointer: fine) {
  .img-hover img {
    transition: transform 0.3s ease, opacity 0.25s ease;
  }

  .img-hover:hover img {
    transform: scale(1.03);
    opacity: 0.94;
  }
}

/* アニメーション軽減設定 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .section {
    content-visibility: visible;
  }
}
