/* ========================================
   PRISM SANGRE - Animations Stylesheet
   ======================================== */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Rainbow gradient shift animation for hero section */
@keyframes rainbow-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Gradient shift for mission section background */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Prismatic glow effect for buttons */
@keyframes prism-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  }
  33% {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  }
  66% {
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
  }
}

/* Pulse animation for active color buttons */
@keyframes pulse {
  0%, 100% {
    transform: scale(1.15);
    box-shadow: 0 0 40px rgba(245, 169, 184, 0.6);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 60px rgba(245, 169, 184, 0.8);
  }
}

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

/* Shimmer effect for text */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Rotate animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */

/* Base state for sections before they animate in */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Active state when section is in viewport */
section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero section should always be visible */
.hero-section {
  opacity: 1;
  transform: none;
}

/* ========================================
   STAGGERED ANIMATIONS FOR GRIDS
   ======================================== */

/* Mission cards stagger effect */
.mission-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.mission-section.animate-in .mission-card {
  opacity: 1;
  transform: translateY(0);
}

.mission-section.animate-in .mission-card:nth-child(1) {
  transition-delay: 0.1s;
}

.mission-section.animate-in .mission-card:nth-child(2) {
  transition-delay: 0.2s;
}

.mission-section.animate-in .mission-card:nth-child(3) {
  transition-delay: 0.3s;
}

.mission-section.animate-in .mission-card:nth-child(4) {
  transition-delay: 0.4s;
}

.mission-section.animate-in .mission-card:nth-child(5) {
  transition-delay: 0.5s;
}

.mission-section.animate-in .mission-card:nth-child(6) {
  transition-delay: 0.6s;
}

/* Social links stagger effect */
.social-link {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.social-section.animate-in .social-link {
  opacity: 1;
  transform: scale(1);
}

.social-section.animate-in .social-link:nth-child(1) {
  transition-delay: 0.1s;
}

.social-section.animate-in .social-link:nth-child(2) {
  transition-delay: 0.2s;
}

.social-section.animate-in .social-link:nth-child(3) {
  transition-delay: 0.3s;
}

.social-section.animate-in .social-link:nth-child(4) {
  transition-delay: 0.4s;
}

.social-section.animate-in .social-link:nth-child(5) {
  transition-delay: 0.5s;
}

/* ========================================
   HOVER ANIMATIONS
   ======================================== */

/* Button hover glow effect */
.cta-button.primary:hover {
  animation: prism-glow 2s ease infinite;
}

/* Card lift on hover */
.mission-card,
.meaning-item,
.social-link {
  transition: all 0.3s ease;
}

/* Album art zoom effect is in main CSS */

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Spinner for loading states */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--trans-pink);
  animation: spin 1s linear infinite;
}

/* ========================================
   TEXT ANIMATIONS
   ======================================== */

/* Gradient text animation */
.gradient-text-animated {
  background: linear-gradient(
    90deg,
    #FF0000, #FF7F00, #FFFF00, #00FF00,
    #0000FF, #4B0082, #9400D3
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ========================================
   INTERACTIVE ELEMENT ANIMATIONS
   ======================================== */

/* Color button active state pulse */
.color-btn.active {
  animation: pulse 1.5s ease infinite;
}

/* Newsletter form submit animation */
@keyframes submit-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
}

.newsletter-form button:active {
  animation: submit-pulse 0.3s ease;
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

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

  /* Keep essential animations but make them instant */
  section,
  .mission-card,
  .social-link {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Disable background animations */
  .hero-section {
    animation: none;
  }

  .mission-section {
    animation: none;
  }
}

/* ========================================
   ENTRANCE ANIMATIONS FOR CONTENT
   ======================================== */

/* Fade in content on page load */
.fade-in-on-load {
  animation: fadeIn 1s ease forwards;
}

/* Slide up content on page load */
.slide-up-on-load {
  animation: slideUp 0.8s ease forwards;
}

/* Scale in content on page load */
.scale-in-on-load {
  animation: scaleIn 0.8s ease forwards;
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */

/* Prism light refraction effect */
@keyframes prism-refract {
  0%, 100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(360deg);
  }
}

.prism-effect {
  animation: prism-refract 10s linear infinite;
}

/* Rainbow border animation */
@keyframes rainbow-border {
  0% {
    border-color: #FF0000;
  }
  14% {
    border-color: #FF7F00;
  }
  28% {
    border-color: #FFFF00;
  }
  42% {
    border-color: #00FF00;
  }
  57% {
    border-color: #0000FF;
  }
  71% {
    border-color: #4B0082;
  }
  85% {
    border-color: #9400D3;
  }
  100% {
    border-color: #FF0000;
  }
}

.rainbow-border-animated {
  animation: rainbow-border 3s linear infinite;
}

/* ========================================
   UTILITY ANIMATION CLASSES
   ======================================== */

/* Delay classes for staggered animations */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Duration classes */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.6s; }
.duration-slow { animation-duration: 1s; }

/* Play state classes */
.animation-paused { animation-play-state: paused; }
.animation-running { animation-play-state: running; }
