﻿/* ========================================
   cybernetik — Animations
   Keyframes, scroll-triggered, utilities
   ======================================== */

/* --- Keyframes --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px hsla(250, 85%, 60%, 0.3); }
  50% { box-shadow: 0 0 40px hsla(250, 85%, 60%, 0.6); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(10px, -15px) scale(1.02); }
  50% { transform: translate(-5px, -25px) scale(0.98); }
  75% { transform: translate(-15px, -10px) scale(1.01); }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* --- Animation Utility Classes --- */
.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-glowPulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* --- Scroll-Triggered Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stagger Delays --- */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* --- Hero Background Glows --- */
.hero-glow-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(250, 85%, 60%, 0.15) 0%, transparent 70%);
  top: -20%;
  left: -10%;
  animation: floatSlow 8s ease-in-out infinite, pulseSlow 6s ease-in-out infinite;
  pointer-events: none;
  filter: blur(40px);
}

.hero-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(340, 85%, 60%, 0.12) 0%, transparent 70%);
  bottom: -15%;
  right: -5%;
  animation: floatSlow 10s ease-in-out infinite reverse, pulseSlow 8s ease-in-out infinite 1s;
  pointer-events: none;
  filter: blur(40px);
}

.hero-glow-3 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(190, 90%, 50%, 0.1) 0%, transparent 70%);
  top: 40%;
  right: 20%;
  animation: floatSlow 12s ease-in-out infinite 2s, pulseSlow 10s ease-in-out infinite;
  pointer-events: none;
  filter: blur(40px);
}

/* --- Gradient Animation --- */
.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* --- Particle Canvas --- */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Shimmer Loading Effect --- */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-surface-light) 0%,
    var(--bg-glass) 50%,
    var(--bg-surface-light) 100%
  );
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* --- Hover Lift Utility --- */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* --- Link Underline Animation --- */
.link-animated {
  position: relative;
  display: inline-block;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

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

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-glow-1,
  .hero-glow-2,
  .hero-glow-3 {
    animation: none;
  }

  .animate-float,
  .animate-pulse,
  .animate-glowPulse {
    animation: none;
  }

  .gradient-animate {
    animation: none;
  }
}


