/* ============================================
   GIANNI PACE GIOIELLI - Animations
   ============================================ */

/* ============================================
   Keyframe Animations
   ============================================ */

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Scroll Mouse Animation */
@keyframes scrollMouse {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

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

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
  }
  50% {
    box-shadow: 0 0 30px 10px rgba(212, 175, 55, 0.2);
  }
}

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

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

/* Particle Float */
@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Particle Drift */
@keyframes particleDrift {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}

/* Slide Zoom */
@keyframes slideZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

/* Text Reveal */
@keyframes textReveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* Line Expand */
@keyframes lineExpand {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

/* Bounce Subtle */
@keyframes bounceSubtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ============================================
   Particle Styles
   ============================================ */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: particleFloat linear infinite;
}

.particle:nth-child(odd) {
  animation-name: particleFloat, particleDrift;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
}

/* Particle variations */
.particle.small {
  width: 2px;
  height: 2px;
  opacity: 0.4;
}

.particle.medium {
  width: 4px;
  height: 4px;
  opacity: 0.6;
}

.particle.large {
  width: 6px;
  height: 6px;
  opacity: 0.3;
}

/* ============================================
   Animation Utility Classes
   ============================================ */
.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 1s ease forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 1s ease forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 1s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease forwards;
}

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

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ============================================
   Slideshow Transitions
   ============================================ */
.hero-slide {
  transition: opacity 1.5s ease-in-out;
}

.hero-slide img {
  animation: slideZoom 8s ease-out forwards;
}

.hero-slide.active img {
  animation: slideZoom 8s ease-out forwards;
}

/* ============================================
   Hover Animations
   ============================================ */
.hover-lift {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-scale {
  transition: transform 0.4s ease;
}

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

.hover-glow {
  transition: box-shadow 0.4s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* ============================================
   Loading Animation
   ============================================ */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 30px;
  animation: fadeIn 1s ease;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 576px) {
  .loader-logo {
    font-size: 1rem;
    letter-spacing: 0.05em;
  }
  
  .loader-content {
    max-width: 250px;
    padding: 0 20px;
  }
}

.loader-bar {
  width: 200px;
  height: 1px;
  background: var(--black-lighter);
  position: relative;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: shimmer 1.5s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  background-size: 200% 100%;
}

/* ============================================
   Page Transition
   ============================================ */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.page-transition.active {
  transform: translateY(0);
}

/* ============================================
   Scroll Reveal Variations
   ============================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Reveal */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-reveal.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-reveal.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-reveal.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-reveal.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-reveal.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-reveal.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-reveal.visible > * {
  opacity: 1;
  transform: translateY(0);
}
