/* Slide 03 (alternative approaches) entrance motion. Runs only while #competition.competition-run is present
   (set when the slide is in view and the intro is closed). Transforms and opacity only, no size or layout change.
   Rows animate as whole units; the three cells of a row appear together. */

@keyframes comp-title-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes comp-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes comp-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* One-off, very subtle lift of the AutoCert column; the background returns to its original colour. */
@keyframes comp-accent {
  0% { background-color: rgba(142, 219, 200, 0.1); }
  100% { background-color: transparent; }
}

#competition.competition-run .competition-content h2 {
  animation: comp-title-in 0.6s cubic-bezier(0.22, 0.8, 0.26, 1) both;
}

#competition.competition-run .competition-table tbody tr {
  animation: comp-row-in 0.42s ease-out both;
}
#competition.competition-run .competition-table tbody tr:nth-child(1) { animation-delay: 0.15s; }
#competition.competition-run .competition-table tbody tr:nth-child(2) { animation-delay: 0.26s; }
#competition.competition-run .competition-table tbody tr:nth-child(3) { animation-delay: 0.37s; }
#competition.competition-run .competition-table tbody tr:nth-child(4) { animation-delay: 0.48s; }
#competition.competition-run .competition-table tbody tr:nth-child(5) { animation-delay: 0.59s; }

@media (min-width: 641px) {
  #competition.competition-run .competition-table td[data-label="AutoCert"] {
    animation: comp-accent 1.4s ease-out 1.1s both;
  }
}

#competition.competition-run .competition-intro {
  animation: comp-fade 0.6s ease-out 1s both;
}

@media (prefers-reduced-motion: reduce) {
  #competition.competition-run,
  #competition.competition-run * {
    animation: none !important;
  }
}
