.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  margin-inline: calc(var(--space-page-x) * -1);
  padding: 96px var(--space-page-x) 72px;
  background: var(--color-blue-80);
  color: #ffffff;
}

.stage__title {
  max-width: 735px;
  color: #ffffff;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.03em;
  text-align: center;
}

.stage__title span {
  color: var(--color-blue-40);
}

.stage__dots {
  display: none;
}

.stage__lead {
  max-width: 735px;
  margin-top: 32px;
  color: var(--color-blue-40);
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.stage__device {
  position: relative;
  width: min(644px, 100%);
  aspect-ratio: 644 / 392;
  margin-top: 41px;
  margin-bottom: 66px;
}

.stage__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.stage__shot.is-on {
  opacity: 1;
}

.stage__phone {
  display: none;
}

.stage__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(1472px, 100%);
  margin-top: auto;
}

.stage__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.stage__bar {
  display: block;
  width: 100%;
  height: 2px;
  margin-bottom: 32px;
  background: #d9d9d9;
  overflow: hidden;
}

.stage__bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left center;
}

.stage__step.is-on .stage__bar i {
  animation: stage-bar 4.2s linear forwards;
}

@keyframes stage-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.stage__name {
  color: #ffffff;
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

.stage__text {
  max-width: 420px;
  margin-top: 16px;
  color: var(--color-blue-40);
  font-size: 18px;
  line-height: 28px;
}

.stage__step.is-on .stage__text {
  color: #ffffff;
}

@media (max-width: 900px) {
  .stage {
    min-height: 0;
    padding: 48px 0 32px;
  }

  .stage__title,
  .stage__lead {
    max-width: none;
    padding-inline: 24px;
  }

  .stage__title {
    font-size: 28px;
    line-height: 36px;
  }

  .stage__lead {
    margin-top: 16px;
    font-size: 16px;
    line-height: 24px;
  }

  .stage__device {
    width: min(254px, 70vw);
    aspect-ratio: 916 / 1956;
    margin-top: 32px;
    margin-bottom: 28px;
  }

  .stage__shot {
    display: none;
  }

  .stage__phone {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
  }

  .stage__phone.is-on {
    opacity: 1;
  }

  .stage__steps {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-top: 0;
    padding-inline: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .stage__steps::-webkit-scrollbar {
    display: none;
  }

  .stage__step {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .stage__text {
    font-size: 16px;
    line-height: 24px;
  }

  .stage__dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
  }

  .stage__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgb(255 255 255 / 35%);
    cursor: pointer;
  }

  .stage__dot.is-on {
    width: 48px;
    background: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage__step.is-on .stage__bar i {
    animation: none;
    transform: scaleX(1);
  }
}
