/* ==========================================
   STUDIO VITALITE - ANIMATIONS & EFFECTS
   Dynamic & Energetic Animation Library
   ========================================== */

/* ==========================================
   SCROLL ANIMATIONS (AOS Integration)
   ========================================== */
[data-aos] {
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-up"] {
  transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-right"] {
  transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
}

/* ==========================================
   DYNAMIC BACKGROUND PATTERNS
   ========================================== */
.animated-bg {
  position: relative;
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
  z-index: -1;
}

@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

/* ==========================================
   FLOATING ELEMENTS
   ========================================== */
.floating-element {
  animation: float 3s ease-in-out infinite;
}

.floating-element:nth-child(2n) {
  animation-delay: -1s;
  animation-duration: 4s;
}

.floating-element:nth-child(3n) {
  animation-delay: -2s;
  animation-duration: 5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ==========================================
   PULSE & GLOW EFFECTS
   ========================================== */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
  }
}

.pulse-scale {
  animation: pulseScale 2s ease-in-out infinite;
}

@keyframes pulseScale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ==========================================
   HOVER ANIMATIONS
   ========================================== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-bounce {
  transition: transform 0.3s ease;
}

.hover-bounce:hover {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  80% {
    transform: translateY(-10px);
  }
}

/* ==========================================
   TEXT ANIMATIONS
   ========================================== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent-gold);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--accent-gold);
  }
}

.gradient-text {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ==========================================
   LOADING & PROGRESS ANIMATIONS
   ========================================== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(212, 175, 55, 0.3);
  border-top: 4px solid var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 2px;
  animation: progressFill 2s ease-out;
}

@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* ==========================================
   PARTICLE EFFECTS
   ========================================== */
.particle-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 8s linear infinite;
}

.particle:nth-child(2n) {
  animation-delay: -2s;
  background: rgba(212, 175, 55, 0.4);
}

.particle:nth-child(3n) {
  animation-delay: -4s;
  width: 2px;
  height: 2px;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) translateX(100px);
    opacity: 0;
  }
}

/* ==========================================
   SCROLL INDICATOR
   ========================================== */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--white);
  animation: bounceVertical 2s infinite;
}

.scroll-text {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.scroll-arrow {
  font-size: 1.2rem;
}

@keyframes bounceVertical {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ==========================================
   MODAL ANIMATIONS
   ========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: modalFadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: modalSlideIn 0.4s ease;
  box-shadow: var(--shadow-heavy);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ==========================================
   INTERACTIVE ELEMENTS
   ========================================== */
.interactive-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.interactive-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.interactive-card:active {
  transform: translateY(-2px) scale(0.98);
}

/* ==========================================
   MORPHING SHAPES
   ========================================== */
.morphing-shape {
  width: 100px;
  height: 100px;
  background: var(--gradient-gold);
  border-radius: 50%;
  animation: morphShape 4s ease-in-out infinite;
}

@keyframes morphShape {
  0%, 100% {
    border-radius: 50%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(90deg);
  }
  50% {
    border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    transform: rotate(270deg);
  }
}

/* ==========================================
   ENERGY WAVES
   ========================================== */
.energy-waves {
  position: relative;
}

.energy-waves::before,
.energy-waves::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: energyWave 3s ease-out infinite;
}

.energy-waves::after {
  animation-delay: 1.5s;
}

@keyframes energyWave {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-indicator {
    animation: none;
  }
  
  .floating-element {
    animation: none;
  }
  
  .pulse-glow,
  .pulse-scale {
    animation: none;
  }
}
