/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered fade-in animations */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.fade-in-stagger.visible > *:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.fade-in-stagger.visible > *:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.fade-in-stagger.visible > *:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.fade-in-stagger.visible > *:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

/* Slide animations */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

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

/* Scale animations */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

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

/* 3D card tilt effect */
.card-3d {
  transform-style: preserve-3d;
  transition: transform var(--transition-fast);
}

.card-3d:hover {
  transform: rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* Parallax effect */
[data-parallax] {
  transition: transform var(--transition-slow);
}

/* Hero title animation */
@keyframes heroTitleReveal {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-title {
  animation: heroTitleReveal 1s ease-out;
}

/* Hero subtitle animation */
@keyframes heroSubtitleReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  animation: heroSubtitleReveal 1s ease-out 0.3s both;
}

/* Hero description animation */
@keyframes heroDescriptionReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-description {
  animation: heroDescriptionReveal 1s ease-out 0.6s both;
}

/* Hero CTA animation */
@keyframes heroCtaReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-cta {
  animation: heroCtaReveal 1s ease-out 0.9s both;
}

/* Particle animation */
@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* Quality meter animation */
@keyframes meterFill {
  0% {
    width: 0;
  }
  100% {
    width: var(--meter-width);
  }
}

.meter-fill {
  animation: meterFill 2s ease-out;
}

/* Timeline animation */
@keyframes timelineItemReveal {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline-item {
  animation: timelineItemReveal 0.8s ease-out;
}

.timeline-item:nth-child(even) {
  animation: timelineItemReveal 0.8s ease-out;
  animation-direction: reverse;
}

/* Moon phase animation */
@keyframes moonPhaseCycle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.moon-phase {
  animation: moonPhaseCycle 20s linear infinite;
}

/* Accordion animation */
@keyframes accordionOpen {
  0% {
    max-height: 0;
    opacity: 0;
  }
  100% {
    max-height: 500px;
    opacity: 1;
  }
}

@keyframes accordionClose {
  0% {
    max-height: 500px;
    opacity: 1;
  }
  100% {
    max-height: 0;
    opacity: 0;
  }
}

.accordion-content {
  animation: accordionClose var(--transition-medium) ease-out;
}

.accordion-header[aria-expanded="true"] + .accordion-content {
  animation: accordionOpen var(--transition-medium) ease-out;
}

/* Form field animation */
@keyframes fieldFocus {
  0% {
    border-color: var(--border-color);
    box-shadow: none;
  }
  100% {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  }
}

.form-group input:focus,
.form-group textarea:focus {
  animation: fieldFocus var(--transition-fast) ease-out;
}

/* Error animation */
@keyframes fieldError {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

.form-group input.error,
.form-group textarea.error {
  animation: fieldError 0.3s ease-out;
}

/* Success animation */
@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.form-feedback.success {
  animation: successPulse 0.5s ease-out;
}

/* Button hover animation */
@keyframes buttonHover {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-2px);
  }
}

.hero-cta:hover,
.submit-btn:hover {
  animation: buttonHover var(--transition-fast) ease-out;
}

/* Navigation link animation */
@keyframes navLinkHover {
  0% {
    color: var(--text-primary);
    background: transparent;
  }
  100% {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
  }
}

.nav-link:hover {
  animation: navLinkHover var(--transition-fast) ease-out;
}

/* Card hover animation */
@keyframes cardHover {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

.about-card:hover {
  animation: cardHover var(--transition-medium) ease-out;
}

/* Image zoom animation */
@keyframes imageZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.about-card:hover .card-image img {
  animation: imageZoom var(--transition-slow) ease-out;
}

/* Quality card shimmer animation */
@keyframes qualityCardShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.quality-card::before {
  animation: qualityCardShimmer var(--transition-slow) ease-out;
}

.quality-card:hover::before {
  animation: qualityCardShimmer var(--transition-slow) ease-out;
}

/* Loading spinner animation */
@keyframes spinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.loading::after {
  animation: spinner 1s linear infinite;
}

/* Fade in animation for sections */
@keyframes sectionFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-section] {
  animation: sectionFadeIn 0.8s ease-out;
}

/* Scroll indicator animation */
@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(-10px);
  }
  60% {
    transform: rotate(45deg) translateY(-5px);
  }
}

.scroll-arrow {
  animation: scrollBounce 2s infinite;
}

/* Gradient text animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.section-title {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Info item animation */
@keyframes infoItemHover {
  0% {
    border-color: var(--border-color);
    transform: translateY(0);
  }
  100% {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
  }
}

.info-item:hover {
  animation: infoItemHover var(--transition-fast) ease-out;
}

/* Responsive animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High performance animations */
@media (prefers-reduced-motion: no-preference) {
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in {
    will-change: opacity, transform;
  }
  
  .card-3d {
    will-change: transform;
  }
  
  [data-parallax] {
    will-change: transform;
  }
}

/* Animation utilities */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

.animate-delay-5 {
  animation-delay: 0.5s;
}

/* Custom easing */
.ease-bounce {
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ease-smooth {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Performance optimization */
.animate-performance {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}