/**
 * - prefers-reduced-motion + html.reduce-motion: animasyonları durdur / minimize et
 * - Mobil (max-width: 768px): animasyonları DURDURMAZ; yavaşlatır, filter/blur azaltır (GPU)
 * layout/style.css ve sayfa CSS'lerinden SONRA yüklenir.
 */

/* ---- Erişilebilirlik: işletim sistemi “hareketi azalt” ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Düşük çekirdek / düşük RAM / veri tasarrufu (JS: html.reduce-motion) ---- */
html.reduce-motion {
  scroll-behavior: auto;
}

html.reduce-motion .grid-bg,
html.reduce-motion .voltage-cables-bg .cable-flow,
html.reduce-motion .hero-voltage-cables .cable-flow,
html.reduce-motion .hero-bg-lines .line,
html.reduce-motion .wire,
html.reduce-motion .connector,
html.reduce-motion .floating-orb,
html.reduce-motion .floating-shapes .shape,
html.reduce-motion .logo-icon:not(.has-image),
html.reduce-motion .screen-scan,
html.reduce-motion .btn-glow,
html.reduce-motion .btn-shine,
html.reduce-motion .scroll-dot,
html.reduce-motion .ind-card .ind-icon,
html.reduce-motion .step-arrow,
html.reduce-motion .benefit-item .benefit-num,
html.reduce-motion .product-checks .check-icon,
html.reduce-motion .faq-cables .cable-flow,
html.reduce-motion .product-cables .cable-flow,
html.reduce-motion .error-cable-svg .cable-flow {
  animation: none !important;
}

html.reduce-motion .voltage-cables-bg .cable-flow,
html.reduce-motion .hero-voltage-cables .cable-flow,
html.reduce-motion .faq-cables .cable-flow,
html.reduce-motion .product-cables .cable-flow,
html.reduce-motion .error-cable-svg .cable-flow {
  filter: none !important;
  stroke-dashoffset: 0 !important;
}

html.reduce-motion .floating-orb {
  opacity: 0.25 !important;
}

html.reduce-motion .header {
  backdrop-filter: none !important;
}

html.reduce-motion .hero-title .word,
html.reduce-motion .hero-badge,
html.reduce-motion .hero-sub,
html.reduce-motion .hero-inner .animate-in {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

html.reduce-motion .animate-block,
html.reduce-motion .section-head,
html.reduce-motion .error-404-glitch,
html.reduce-motion .error-404-glitch::after {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

html.reduce-motion .animate-block.visible,
html.reduce-motion .product-hero-title,
html.reduce-motion .product-hero-desc,
html.reduce-motion .product-breadcrumb,
html.reduce-motion .product-media-hero,
html.reduce-motion .product-gallery,
html.reduce-motion .product-detail-nav,
html.reduce-motion .detail-block,
html.reduce-motion .product-cta-inner,
html.reduce-motion .faq-animate,
html.reduce-motion .faq-item,
html.reduce-motion .faq-cta-inner {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

html.reduce-motion .feat-card,
html.reduce-motion .ind-card,
html.reduce-motion .benefit-item,
html.reduce-motion .animate-card,
html.reduce-motion .step-box {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ---- Mobil: animasyonları durdurma — yavaşlat + maliyetli efektleri azalt ---- */
@media (max-width: 768px) {
  .grid-bg {
    animation-duration: 48s !important;
  }

  .voltage-cables-bg .cable-flow,
  .hero-voltage-cables .cable-flow {
    filter: none !important;
    animation-duration: 5.5s !important;
  }

  .faq-cables .cable-flow,
  .product-cables .cable-flow,
  .error-cable-svg .cable-flow {
    filter: none !important;
    animation-duration: 6s !important;
  }

  .hero-bg-lines .line {
    animation-duration: 9s !important;
  }

  .hero-bg-lines .line-5 {
    animation-duration: 7s !important;
  }

  .wire {
    animation-duration: 3.5s !important;
  }

  .connector {
    animation-duration: 3.5s !important;
  }

  .floating-orb {
    opacity: 0.2 !important;
    filter: blur(48px) !important;
    animation-duration: 24s !important;
  }

  .floating-shapes .shape {
    animation-duration: 16s !important;
  }

  .logo-icon:not(.has-image) {
    animation-duration: 4.5s !important;
  }

  .screen-scan {
    animation-duration: 4.5s !important;
  }

  .btn-glow {
    animation-duration: 4s !important;
  }

  .btn-shine {
    animation-duration: 4s !important;
  }

  .scroll-dot {
    animation-duration: 2.8s !important;
  }

  .hero-title .word {
    animation-duration: 0.55s !important;
  }

  .ind-card .ind-icon {
    animation-duration: 6.5s !important;
  }

  .step-arrow {
    animation-duration: 2.2s !important;
  }

  .benefit-item .benefit-num {
    animation-duration: 3s !important;
  }

  .product-checks .check-icon {
    animation-duration: 0.45s !important;
  }

  .error-404-glitch {
    animation-duration: 4.5s !important;
  }

  .error-404-glitch::after {
    animation-duration: 6s !important;
  }

  .header {
    backdrop-filter: blur(14px) !important;
  }

  .animate-block,
  .section-head,
  .feat-card,
  .ind-card,
  .benefit-item,
  .product-animate,
  .faq-animate {
    transition-duration: 0.55s !important;
  }

  .contact-meta li {
    transition-duration: 0.25s !important;
  }
}
