/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}



/* Metric counter animation */
.metric__value {
  transition: color var(--transition-base);
}

/* Bar fill delay for stagger */
.benchmark-card:nth-child(1) .benchmark-card__bar-fill { transition-delay: 0ms; }
.benchmark-card:nth-child(2) .benchmark-card__bar-fill { transition-delay: 100ms; }
.benchmark-card:nth-child(3) .benchmark-card__bar-fill { transition-delay: 200ms; }
.benchmark-card:nth-child(4) .benchmark-card__bar-fill { transition-delay: 300ms; }
.benchmark-card:nth-child(5) .benchmark-card__bar-fill { transition-delay: 400ms; }
.benchmark-card:nth-child(6) .benchmark-card__bar-fill { transition-delay: 500ms; }

/* Timeline segment animation */
.timeline__segment {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.timeline.is-visible .timeline__segment {
  opacity: 1;
  transform: scaleX(1);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline.is-visible .timeline__segment:nth-child(1) { transition-delay: 0ms; }
.timeline.is-visible .timeline__segment:nth-child(2) { transition-delay: 120ms; }
.timeline.is-visible .timeline__segment:nth-child(3) { transition-delay: 240ms; }
.timeline.is-visible .timeline__segment:nth-child(4) { transition-delay: 360ms; }
.timeline.is-visible .timeline__segment:nth-child(5) { transition-delay: 480ms; }

/* Section heading line animation */
.section__header h2 {
  position: relative;
}

.section__header h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-monarch);
  margin-top: var(--space-md);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section__header.is-visible h2::after {
  width: 60px;
}
