/* ===== Phone mockup + hotspots ===== */

.mockup {
  position: relative;
  width: 100%;
  /* Скриншоты обрезаны точно по силуэту телефона (прозрачный фон вокруг),
     поэтому у контейнера больше нет своего фона/скругления/обрезки —
     иначе под скруглённым телефоном была бы видна лишняя прямоугольная
     подложка. Тень отбрасывает сама картинка (filter: drop-shadow),
     повторяя силуэт телефона, а не прямоугольник контейнера. */
  /* aspect-ratio is set inline per step via JS to match each screenshot exactly */
}

.mockup-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.mockup-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55));
  transition: opacity var(--dur-base) var(--ease);
}

.mockup-img.is-transitioning {
  opacity: 0.4;
}

/* Сама кнопка hotspot невидима — своей рамки/заливки/кружка у неё больше
   нет, потому что кликабельную зону на скриншотах уже показывает дизайн
   самого экрана (см. шаги 1, 6, 7). Кликабельность обозначает только
   пульсирующая анимация (::before), а не статичная фигура. */
.hotspot {
  position: absolute;
  border-radius: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Сбрасываем нативный вид <button> (в большинстве браузеров у кнопки по
     умолчанию есть свой фон/рамка) — иначе вместо прозрачной кликабельной
     зоны был бы виден сплошной прямоугольник поверх скриншота. */
  padding: 0;
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
}

.hotspot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(0, 205, 155, 0.5);
  animation: hotspot-pulse 1.8s ease-out infinite;
  pointer-events: none;
}

.hotspot:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@keyframes hotspot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 205, 155, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 205, 155, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 205, 155, 0);
  }
}

.hotspot.is-tapped {
  animation: hotspot-tap 260ms var(--ease);
}

@keyframes hotspot-tap {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.mockup-done {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 32px;
  border-radius: 34px;
  background: rgba(17, 19, 24, 0.86);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
}

.mockup-done[data-visible='true'] {
  opacity: 1;
  pointer-events: auto;
}

.mockup-done-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-accent);
}

.mockup-done-badge svg {
  width: 28px;
  height: 28px;
}

.mockup-done-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.mockup-done-text {
  font-size: 14px;
  color: var(--text-72);
  max-width: 30ch;
}

/* Кнопка внутри оверлея завершения — не переиспользует .btn (тот рассчитан
   на полноразмерные контексты с nowrap), а подогнана под тесный мокап
   телефона: компактнее и с переносом текста на 2 строки при нехватке
   ширины. */
.mockup-done-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-family: var(--font);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}

.mockup-done-cta:hover {
  filter: brightness(1.06);
}

.mockup-done-cta:active {
  transform: scale(0.97);
}

@media (min-width: 900px) {
  .mockup-done-cta {
    font-size: 14px;
    padding: 12px 22px;
  }
}

/* ===== Step panel (text side) ===== */

.step-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.step-progress-count {
  font-size: 14px;
  color: var(--text-45);
  white-space: nowrap;
}

.step-dots {
  display: flex;
  gap: 6px;
  flex: 1;
}

.step-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border-strong);
  transition: background var(--dur-base) var(--ease);
}

.step-dot[data-state='done'],
.step-dot[data-state='current'] {
  background: var(--accent);
}

.step-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-72);
}

.step-title {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  padding-top: 3px;
}

.step-text {
  font-size: 16px;
  color: var(--text-72);
  line-height: 1.45;
  margin-bottom: 10px;
}

@media (min-width: 900px) {
  .step-text {
    margin-bottom: 22px;
  }
}

/* Пример кода — только у шага активации (id=4 из steps.js). Подтягиваем
   отрицательным отступом ближе к step-text выше, чтобы не съедать лишнюю
   высоту на мобильном (важно для «один экран без скролла»). */
.step-example {
  margin-top: -8px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-45);
}

.step-example-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-72);
  letter-spacing: 0.02em;
}

.step-nav {
  display: flex;
  gap: 10px;
}

.step-cta {
  margin-top: 22px;
}
