/* Animations for Media River - 2025 Redesign */

/* Fade in animations for scroll reveal */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Delay animations */
[data-aos][data-aos-delay="100"] {
  transition-delay: 0.1s;
}

[data-aos][data-aos-delay="200"] {
  transition-delay: 0.2s;
}

[data-aos][data-aos-delay="300"] {
  transition-delay: 0.3s;
}

/* Text reveal animations */
.reveal-text {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.reveal-text::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  animation: reveal 1.5s cubic-bezier(0.77, 0, 0.18, 1);
  animation-fill-mode: forwards;
}

@keyframes reveal {
  0% {
    width: 100%;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}

/* Custom cursor effects */
.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

.link-hover {
  position: relative;
  overflow: hidden;
}

.link-hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-hover:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Parallax scroll effect */
.parallax {
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
}

.parallax.depth-1 {
  transform: translateY(var(--parallax-1, 0));
}

.parallax.depth-2 {
  transform: translateY(var(--parallax-2, 0));
}

.parallax.depth-3 {
  transform: translateY(var(--parallax-3, 0));
}

/* Button hover effects */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%) skew(-15deg);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-hover-effect:hover::before {
  transform: translateX(0) skew(-15deg);
}

/* Magnetic effect for buttons and interactive elements */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.75, -0.5, 0, 1.75);
}

/* Floating animations */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

.float-delay-1 {
  animation-delay: 1s;
}

.float-delay-2 {
  animation-delay: 2s;
}

/* Blur in effect */
.blur-in {
  filter: blur(10px);
  opacity: 0;
  transition: filter 0.8s ease, opacity 0.8s ease;
}

.blur-in.visible {
  filter: blur(0);
  opacity: 1;
}

/* Text scramble effect */
.scramble-text {
  display: inline-block;
  position: relative;
}

.scramble-text::before {
  content: attr(data-scramble);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: transparent;
  animation: scramble 3s infinite;
}

@keyframes scramble {
  0%, 100% {
    color: transparent;
  }
  50% {
    color: var(--text-color);
  }
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}

/* 3D tilt effect */
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.tilt-inner {
  transform: translateZ(30px);
}

/* Progress bar animation */
.progress-bar {
  height: 4px;
  background: var(--primary-color);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.5s ease;
}

.progress-bar.animate {
  transform: scaleX(1);
}

/* Typography animations */
.char-animate {
  display: inline-block;
  animation: charFadeIn 0.5s cubic-bezier(0.5, 0, 0.5, 1) both;
  animation-delay: calc(var(--char-index) * 0.04s);
}

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

/* Image reveal animation */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal img {
  transform: scale(1.2);
  transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-reveal.reveal img {
  transform: scale(1);
}

.image-reveal.reveal::after {
  transform: scaleX(0);
}

/* Reduced Motion */
@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;
  }
} 