/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-ring {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.05s;
}

.hero-animate {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-animate:nth-child(1) { animation-delay: 0.1s; }
.hero-animate:nth-child(2) { animation-delay: 0.25s; }
.hero-animate:nth-child(3) { animation-delay: 0.4s; }

.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children .scroll-animate:nth-child(1) { transition-delay: 0s; }
.stagger-children .scroll-animate:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .scroll-animate:nth-child(3) { transition-delay: 0.2s; }

/* ========== FALLING FLAGS ========== */
@keyframes flagDart {
  0% {
    transform: translateY(-120px) rotate(-8deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  75% {
    transform: translateY(0) rotate(2deg);
  }
  85% {
    transform: translateY(0) rotate(-1.5deg);
  }
  92% {
    transform: translateY(0) rotate(0.8deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

.falling-flag {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: flagDart 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  transform-origin: bottom center;
}

/* Flag pole */
.falling-flag::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
}

/* Flag pennant */
.falling-flag::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 10px solid var(--flag-color);
  border-bottom: 10px solid transparent;
  border-left: 14px solid var(--flag-color);
  border-right: 0 solid transparent;
}
