/* ============================================================
   animations.css — polysounds by sound-archive
   Scroll animations, transitions, keyframes
   ============================================================ */

/* ============================================================
   Scroll-reveal animations (IntersectionObserver)
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate][data-delay="100"] { transition-delay: 100ms; }
[data-animate][data-delay="200"] { transition-delay: 200ms; }
[data-animate][data-delay="300"] { transition-delay: 300ms; }
[data-animate][data-delay="400"] { transition-delay: 400ms; }
[data-animate][data-delay="500"] { transition-delay: 500ms; }
[data-animate][data-delay="600"] { transition-delay: 600ms; }

/* ============================================================
   Hero load animation (CSS, runs on page load)
   ============================================================ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.hero__content > * {
  animation: heroFadeUp 0.7s ease forwards;
  opacity: 0;
}
.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.22s; }
.hero__content > *:nth-child(3) { animation-delay: 0.36s; }
.hero__content > *:nth-child(4) { animation-delay: 0.5s; }
.hero__content > *:nth-child(5) { animation-delay: 0.64s; }

.hero__visual {
  animation: heroFadeIn 1s ease 0.4s forwards;
  opacity: 0;
}

/* ============================================================
   Pulse dot (hero eyebrow)
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 6px rgba(37,99,235,0); }
}

.hero__pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 2.5s infinite;
  flex-shrink: 0;
}

/* ============================================================
   Tab panel slide-in
   ============================================================ */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.services__panel.active {
  animation: slideIn 0.3s ease forwards;
}

.solution__pillars-section.active {
  animation: slideIn 0.3s ease forwards;
}

/* ============================================================
   Accordion open animation
   ============================================================ */
details[open] .accordion__content {
  animation: slideIn 0.25s ease forwards;
}

/* ============================================================
   Hover lift on cards
   ============================================================ */
.problem__card,
.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.problem__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   Shimmer logo animation
   ============================================================ */
@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.6; }
}

.hero__logo-item {
  animation: shimmer 3s ease infinite;
}
.hero__logo-item:nth-child(2) { animation-delay: 0.5s; }
.hero__logo-item:nth-child(3) { animation-delay: 1s; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__content > * {
    animation: none;
    opacity: 1;
  }

  .hero__visual {
    animation: none;
    opacity: 1;
  }
}
