.how {
  padding-block: var(--spacing-section-block);
}

.how-heading {
  max-width: 680px;
  margin: 0 0 30px;
  text-align: left;
}

.how-heading h2 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.15;
}

.how-heading p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 15px;
}

.how-carousel {
  /* Adjust these values to tune the fade speed and image reveal delay. */
  --how-fade-duration: 550ms;
  --how-image-reveal-delay: 150ms;

  width: 100%;
  max-width: none;
  margin: 0;
}

.steps-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 32px;
}

.step-copy {
  max-width: 390px;
  transition: opacity var(--how-fade-duration) ease-in-out;
}

.step-copy.is-changing {
  opacity: 0;
}

.step-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--color-accent-gold);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.step-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.step-copy p {
  max-width: 340px;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.step-showcase {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.carousel-stage {
  position: relative;
  width: min(100%, 638px);
  margin-inline: auto;
}

.carousel-window {
  position: relative;
  width: calc(100% - 60px);
  margin-inline: auto;
  overflow: visible;
  aspect-ratio: 1300 / 1230;
}

.carousel-track {
  display: grid;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: scale(.97);
  transition: opacity var(--how-fade-duration) ease-in-out, transform var(--how-fade-duration) ease-in-out;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.device-slide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .28));
}

.carousel-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 24, 36, .78);
  color: var(--color-text-primary, #f6f7fb);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  backdrop-filter: blur(12px);
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
  transform: translateY(-50%);
}

.carousel-arrow:hover {
  background: rgba(26, 37, 52, .94);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(.94);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.carousel-arrow--previous {
  left: 0;
}

.carousel-arrow--next {
  right: 0;
}

.carousel-arrow:focus-visible,
.step-indicator:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 4px;
}

.steps-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 38px;
  margin-top: 14px;
}

.step-indicator {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.step-indicator::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(230, 237, 245, .42);
  content: '';
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.step-indicator[aria-current='step']::before {
  background: var(--color-accent-gold);
  box-shadow: 0 0 12px rgba(243, 187, 85, .44);
  transform: scale(1.3);
}

.step-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 760px) {
  .how-heading {
    margin-bottom: 10px;
  }

  .how-heading h2 {
    font-size: 29px;
  }

  .how-heading p {
    font-size: 13px;
  }

  .steps-layout {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .step-showcase {
    grid-row: 1;
  }

  .step-copy {
    grid-row: 2;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    text-align: center;
  }

  .step-kicker {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .step-copy h3 {
    margin-bottom: 7px;
    font-size: clamp(22px, 6vw, 28px);
  }

  .step-copy p {
    font-size: 14px;
  }

  .carousel-window {
    width: min(100%, calc(120% - 91px));
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .carousel-arrow--previous {
    left: -6px;
  }

  .carousel-arrow--next {
    right: -6px;
  }

  .steps-pagination {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-copy,
  .carousel-slide,
  .step-indicator::before,
  .carousel-arrow {
    transition: none;
  }
}
