/* How it works: the App Store preview video beside the three steps, which light up in
   step with the video's beats (assets/js/player.js). */
.how { padding-block: 64px 96px; }

.how-body {
  display: grid;
  justify-items: center;
  gap: 40px;
  margin-top: 48px;
}

.player { display: grid; justify-items: center; gap: 14px; }
/* The preview cut down to its phone (the steps carry its captions), so no part of the
   video's own cream meets the page's: browsers decode it a shade off. The radius is the
   phone outline's outer corner, so the clip lands on the ink. */
.player-video {
  width: min(300px, 74vw);
  height: auto;
  aspect-ratio: 640 / 1356;
  border-radius: 12.32% / 5.82%;
}

.player-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color .15s ease;
}
.player-toggle:hover { color: var(--ink); }
.player-toggle .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.player-toggle .icon-play,
.player-toggle[data-playing="true"] .icon-pause { display: block; }
.player-toggle .icon-pause,
.player-toggle[data-playing="true"] .icon-play { display: none; }

.steps { list-style: none; display: grid; gap: 4px; width: 100%; max-width: 520px; }

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  width: 100%;
  padding: 16px 0;
  text-align: left;
  opacity: 0.38;
  transition: opacity .3s ease;
}
.step:hover { opacity: 0.7; }
.step.is-active { opacity: 1; }

.step-num {
  grid-row: span 3;
  padding-top: 0.3em;
  color: var(--orange-text);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step-title { font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.step-text { margin-top: 6px; color: var(--muted); }

.step-bar {
  position: relative;
  height: 2px;
  margin-top: 16px;
  border-radius: 1px;
  background: var(--line);
  overflow: hidden;
  opacity: 0;
  transition: opacity .3s ease;
}
.step-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}
.step.is-active .step-bar { opacity: 1; }

@media (min-width: 960px) {
  .how-body {
    grid-template-columns: auto minmax(0, 460px);
    justify-content: center;
    align-items: center;
    column-gap: clamp(56px, 8vw, 120px);
    margin-top: 64px;
  }
  .player-video { width: 300px; }
}
