/* ============================================
   AISLES — Animations & Micro-interactions
   ============================================ */

/* ---------- Gradient Mesh Background Animation ---------- */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Floating Animation ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

/* ---------- Glow Pulse ---------- */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
  }
}

/* ---------- Subtle Rotate ---------- */
@keyframes subtle-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Scale In ---------- */
@keyframes scale-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Shimmer Effect ---------- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ---------- Border Glow Cycle ---------- */
@keyframes border-glow {
  0%, 100% {
    border-color: rgba(0, 212, 255, 0.1);
  }
  50% {
    border-color: rgba(0, 212, 255, 0.3);
  }
}

/* ---------- Particles / Decorative Dots ---------- */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-slow 8s ease-in-out infinite;
  pointer-events: none;
}

.particle:nth-child(2) { animation-delay: -2s; opacity: 0.2; }
.particle:nth-child(3) { animation-delay: -4s; opacity: 0.15; }
.particle:nth-child(4) { animation-delay: -6s; opacity: 0.1; }

/* ---------- Interactive Hover Effects ---------- */

/* Button Press Effect */
.btn-press {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-press:active {
  transform: scale(0.97);
}

/* Card Tilt on Hover (subtle) */
.tilt-hover {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tilt-hover:hover {
  transform: translateY(-4px);
}

/* Link Underline Slide Effect */
.link-slide {
  position: relative;
  display: inline-block;
}

.link-slide::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.link-slide:hover::after {
  width: 100%;
}

/* ---------- Section Entrance Animations ---------- */

/* Fade variations with different starting positions */
.animate-fade {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade.from-bottom {
  transform: translateY(30px);
}

.animate-fade.from-left {
  transform: translateX(-30px);
}

.animate-fade.from-right {
  transform: translateX(30px);
}

.animate-fade.from-scale {
  transform: scale(0.95);
}

.animate-fade.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ---------- Counter / Number Animation ---------- */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ---------- Gradient Text Animation ---------- */
.animated-gradient-text {
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-primary)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Focus Ring (Accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Smooth Page Transitions ---------- */
.page-enter {
  animation: scale-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

  .hero-image-wrapper img {
    animation: none;
  }
}
