/**
 * About — ASC360 journey timeline stepper.
 * Upcoming milestone cards are fully hidden until their turn (no empty shells).
 */

.asc-story .timeline-stepper {
  position: relative;
}

.asc-story .timeline-stepper__fill {
  pointer-events: none;
  position: absolute;
  z-index: 0;
  left: 13px;
  top: 10px;
  width: 2px;
  height: 0%;
  border-radius: 2px;
  background: linear-gradient(180deg, #ff8a47 0%, var(--brand) 100%);
  box-shadow: 0 0 12px rgba(255, 106, 26, 0.45);
  transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.asc-story .timeline-stepper .timeline__item {
  position: relative;
  z-index: 1;
}

/* Upcoming — entire card gone until its turn */
.asc-story .timeline-stepper .timeline__item:not(.is-revealed) {
  display: none;
}

.asc-story .timeline-stepper .timeline__item.is-revealed {
  display: block;
  animation: story-timeline-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes story-timeline-card-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Copy only on the active step; past steps keep year chip only */
.asc-story .timeline-stepper .timeline__copy {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  visibility: hidden;
  transition:
    max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    margin-top 0.45s ease,
    visibility 0s linear 0.55s;
}

.asc-story .timeline-stepper:not(.timeline-stepper--waiting) .timeline__item.is-active .timeline__copy {
  max-height: 320px;
  opacity: 1;
  margin-top: var(--s-3) !important;
  visibility: visible;
  transition:
    max-height 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease 0.08s,
    margin-top 0.45s ease 0.05s,
    visibility 0s;
}

.asc-story .timeline-stepper .timeline__item.is-complete .timeline__copy {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  visibility: hidden;
}

.asc-story .timeline-stepper .timeline__item.is-active.is-copy-in .timeline__copy {
  animation: story-timeline-copy-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes story-timeline-copy-in {
  from {
    opacity: 0.94;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.asc-story .timeline-stepper .timeline__item.is-active {
  background: rgba(255, 106, 26, 0.1);
  border-color: rgba(255, 106, 26, 0.45);
}

.asc-story .timeline-stepper .timeline__item.is-active::before {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.28), 0 0 16px rgba(255, 106, 26, 0.35);
}

.asc-story .timeline-stepper .timeline__item.is-active .timeline__year {
  background: var(--brand);
  border-color: var(--brand);
}

.asc-story .timeline-stepper .timeline__item.is-complete {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.asc-story .timeline-stepper .timeline__item.is-complete::before {
  background: #1a3552;
  border-color: rgba(255, 106, 26, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.12);
}

.asc-story .timeline-stepper .timeline__year {
  cursor: default;
  transition: background-color 0.9s ease, border-color 0.9s ease;
}

.asc-story .timeline-stepper.timeline-stepper--playing .timeline__item.is-revealed:hover {
  transform: none;
}

@media (min-width: 900px) {
  .asc-story .timeline-stepper__fill {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asc-story .timeline-stepper__fill {
    transition: none !important;
  }
  .asc-story .timeline-stepper .timeline__item.is-revealed {
    animation: none !important;
  }
  .asc-story .timeline-stepper .timeline__item.is-copy-in .timeline__copy {
    animation: none !important;
  }
}
