html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  font-family: inherit;
}
.timeline__step {
  position: relative;
  padding: clamp(4px, 2vw, 6px) 0;
  margin-bottom: clamp(10px, 6vw, 26px);
}
.timeline__step:last-of-type {
  margin-bottom: 0;
}
.timeline__dot {
  position: absolute;
  left: -28px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff7e6;
  opacity: 0.28;
  transform: scale(1);
}
@supports (animation-timeline: view()) {
  .timeline__dot {
    animation: dot-light 600ms ease-out both;
    animation-timeline: view();
    animation-range: entry 30% cover 60%;
  }
}
@supports not (animation-timeline: view()) {
  .timeline__dot {
    opacity: 1;
  }
}
.timeline__line {
  position: absolute;
  left: -23px;
  top: 8px;
  width: 2px;
  height: calc(100% - 16px);
  background: #fff7e6;
  transform: scaleY(0);
  transform-origin: top;
}
@supports (animation-timeline: scroll()) {
  .timeline__line {
    animation: line-draw linear both;
    animation-timeline: scroll(root);
    animation-range: 0 200px;
  }
}
@supports not (animation-timeline: scroll()) {
  .timeline__line {
    transform: scaleY(1);
  }
}

@keyframes dot-light {
  from {
    opacity: 0.28;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.3);
  }
}
@keyframes line-draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.timeline.is-demo .timeline__line {
  animation: line-draw-loop 2s ease-in-out infinite;
}

.timeline.is-demo .timeline__step:nth-child(1) .timeline__dot {
  animation: dot-loop 2s ease-out infinite;
  animation-delay: 0ms;
}

.timeline.is-demo .timeline__step:nth-child(2) .timeline__dot {
  animation: dot-loop 2s ease-out infinite;
  animation-delay: 160ms;
}

.timeline.is-demo .timeline__step:nth-child(3) .timeline__dot {
  animation: dot-loop 2s ease-out infinite;
  animation-delay: 320ms;
}

@keyframes line-draw-loop {
  0% {
    transform: scaleY(0);
  }
  60% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
  }
}
@keyframes dot-loop {
  0% {
    opacity: 0.28;
    transform: scale(1);
  }
  15% {
    opacity: 1;
    transform: scale(1.3);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
  85% {
    opacity: 0.28;
    transform: scale(1);
  }
  100% {
    opacity: 0.28;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .timeline__line, .timeline.is-demo .timeline__line {
    animation: none !important;
    transform: scaleY(1);
  }
  .timeline__dot, .timeline.is-demo .timeline__step .timeline__dot {
    animation: none !important;
    opacity: 1;
    transform: scale(1);
  }
}
