/* ============================================
   Animation Definitions
   ============================================ */

/* Staggered Fade-In for Title Lines */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Title lines animation - starts hidden */
.title-line {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animation delays will be set by JavaScript for flexibility */
/* Default fallback delays if JS doesn't load */
.title-line:nth-child(1) {
  animation-delay: 0.2s;
}

.title-line:nth-child(2) {
  animation-delay: 0.5s;
}

/* ============================================
   Content Fade-In (Sequential)
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.credits {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1s;
}

.description {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1.2s;
}

.event-card {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1.5s;
}

/* ============================================
   Expand/Collapse Animation
   ============================================ */

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

.description-content.expanded .full-text {
  animation: expandContent 0.4s ease-out;
}

/* Smooth transition for description height */
.description-content {
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

/* ============================================
   Button Hover Animations
   ============================================ */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ============================================
   Footer Fade-In
   ============================================ */

.footer {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 1.6s;
}

/* ============================================
   Reduced Motion Preferences
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .title-line,
  .credits,
  .description,
  .event-card,
  .footer {
    opacity: 1 !important;
    animation: none !important;
  }

  .btn::before {
    display: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Focus Animations
   ============================================ */

@keyframes focusPulse {
  0%, 100% {
    outline-offset: 2px;
  }
  50% {
    outline-offset: 4px;
  }
}

.btn:focus-visible,
.expand-btn:focus-visible,
.footer-link:focus-visible {
  animation: focusPulse 1.5s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  .btn:focus-visible,
  .expand-btn:focus-visible,
  .footer-link:focus-visible {
    animation: none;
  }
}
