/* ==========================================================================
   MECZONETTS MOTION & PARALLAX ENGINE
   Transform-based 3-layer parallax, entrance reveals, and micro-interactions
   ========================================================================== */

/* 3-Layer Scroll Parallax Transforms */
.parallax-viewport {
  position: relative;
  overflow: hidden;
}

[data-parallax-depth="1"] {
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-y, 0px) * 0.22), 0);
}

[data-parallax-depth="2"] {
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-y, 0px) * 0.1), 0);
}

[data-parallax-depth="3"] {
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-y, 0px) * 0.03), 0);
}

/* Scroll-triggered reveal classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay utilities */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* SVG Stroke Dashoffset Animation */
.svg-draw-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.svg-draw-path.drawn {
  stroke-dashoffset: 0;
}

/* Magnetic Button Hover Effect */
.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Smooth Pulse */
@keyframes signalPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(23, 48, 242, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(23, 48, 242, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(23, 48, 242, 0); }
}

.signal-pulse {
  animation: signalPulse 2.4s infinite;
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  [data-parallax-depth="1"],
  [data-parallax-depth="2"],
  [data-parallax-depth="3"] {
    transform: none !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .svg-draw-path {
    stroke-dashoffset: 0 !important;
  }

  .signal-pulse {
    animation: none !important;
  }
}
