/*
 * Лендинг «Добавить продукты в список покупок голосом»
 * (landings/AI-powered_voice_shopping_list.html) в стилях главной.
 *
 * Основа — styles/home.css (шапка в hero, панели, start-card, подвал)
 * и styles/journey-live.css (телефоны, карточки товаров, шторка голоса).
 * Здесь только то, чего нет на главной:
 *   .vl-heading-lead      — абзац под заголовком секции
 *   .vs-live              — блок «Как работает»: один телефон и 4 шага
 *   .vc-*                 — «Примеры голосовых команд» с живым разбором фразы
 *   .vk-*                 — «Чем отличается»: заметка против списка
 * Сценарии — scripts/voice-landing-live.js.
 */

.vl-heading-lead {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.journey + .journey,
.journey + .more-tools,
.more-tools + .journey {
  margin-top: 18px;
}

/* ---------- «Как работает»: один телефон, шаги справа ---------- */

.vs-live {
  padding: 28px 64px 72px;
}

.vl-steps .journey-step h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.vl-steps .journey-step h3 b {
  display: inline-grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  transform: translateY(-2px);
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.vl-steps .journey-step.is-active h3 b {
  background: var(--blue-600);
  color: #ffffff;
}

.vl-steps .journey-step p {
  padding-left: 36px;
}

.vl-steps-layout > .journey-steps {
  gap: 18px;
}

/* Оверлей «Помощник разбирает фразу» — как AppBlockingProgressOverlay */
.vs-parsing {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vs-parsing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 270px;
  padding: 26px 20px 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vs-parsing-card strong {
  font-size: 17px;
  font-weight: 650;
}

.vs-parsing-card small {
  color: var(--jl-muted);
  font-size: 13px;
}

.vs-spinner {
  width: 34px;
  height: 34px;
  border: 3.5px solid rgba(0, 122, 255, 0.16);
  border-top-color: var(--jl-blue);
  border-radius: 50%;
}

.vs-live.is-parsing .vs-parsing {
  opacity: 1;
}

.vs-live.is-parsing .vs-parsing-card {
  transform: none;
}

.vs-live.is-parsing .vs-spinner {
  animation: vs-spin 0.8s linear infinite;
}

@keyframes vs-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- «Примеры голосовых команд» ---------- */

.vc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.vc-card {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(47, 107, 255, 0.11);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}

.vc-card.is-active {
  border-color: rgba(47, 107, 255, 0.24);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 50px rgba(28, 39, 70, 0.1);
}

.vc-phrase {
  margin: 12px 0 10px;
  font-family: "Onest", "Inter", sans-serif;
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 660;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.vc-copy p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

/* Запись экрана Flutter и статичный кадр имеют одинаковые границы. */
.vl-app-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-width: 0;
  margin: 0;
  padding: clamp(12px, 2vw, 24px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 207, 74, 0.14), transparent 14rem),
    linear-gradient(145deg, #f8faff, #eef3ff);
}

.vl-app-screen {
  position: relative;
  width: min(100%, 352px);
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(34, 58, 103, 0.1), 0 10px 24px rgba(31, 62, 127, 0.09);
}

.vl-app-screen img,
.vl-app-screen video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 25;
}

.vl-app-screen video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.vl-app-screen.is-playing video {
  opacity: 1;
}

/* ---------- «Чем отличается»: заметка против списка ---------- */

.vl-compare-phrase {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.vl-compare-phrase .ri-rec {
  max-width: 100%;
  box-shadow: 0 16px 30px rgba(16, 39, 105, 0.14);
}

.vl-compare-phrase .ri-wave {
  flex: 0 0 auto;
  width: 58px;
}

.vl-compare-phrase b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vl-compare.is-typing .vl-compare-phrase b::after,
.vl-compare.is-typing .vk-note p::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  background: #007aff;
  content: "";
  vertical-align: -2px;
  animation: jl-caret 1s steps(1) infinite;
}

.vl-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.vk-card {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 26px;
  padding: 30px;
  border: 1px solid rgba(47, 107, 255, 0.11);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
}

.vk-card-list {
  border-color: rgba(47, 107, 255, 0.22);
  background:
    radial-gradient(circle at 100% 100%, rgba(47, 107, 255, 0.1), transparent 18rem),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 50px rgba(28, 39, 70, 0.08);
}

.vk-copy h3 {
  margin: 12px 0 10px;
  font-family: "Onest", "Inter", sans-serif;
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 660;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.vk-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.vk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.vk-tags li {
  padding: 6px 9px;
  border: 1px solid rgba(47, 107, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.vk-tags li.is-accent {
  border-color: transparent;
  background: var(--blue-600);
  color: #ffffff;
}

.vk-demo {
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 207, 74, 0.14), transparent 14rem),
    linear-gradient(145deg, #f8faff 0%, #eef3ff 100%);
}

.vk-card-plain .vk-demo {
  background: linear-gradient(145deg, #f7f6f2 0%, #efede6 100%);
}

/* Заметка обычного помощника — один блок текста */
.vk-note {
  width: min(100%, 340px);
  justify-self: center;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffbe9, #fff6d6);
  box-shadow:
    0 0 0 1px rgba(224, 190, 62, 0.28),
    0 14px 28px rgba(80, 60, 0, 0.08);
  transform: rotate(-1.5deg);
}

.vk-note small {
  display: flex;
  justify-content: space-between;
  color: #a88a2c;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vk-note p {
  min-height: 66px;
  margin: 10px 0 12px;
  color: #3b3424;
  font-size: 15px;
  line-height: 1.4;
}

.vk-note-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vk-note-foot span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(168, 138, 44, 0.12);
  color: #8b6f1c;
  font-size: 10px;
  font-weight: 600;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1280px) {
  .vs-live {
    padding: 24px 48px 66px;
  }
}

@media (max-width: 1080px) {
  .vl-steps-layout > .vs-live {
    --jl-s: 0.56;
  }

  .vl-steps-layout > .journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .vc-grid,
  .vl-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vl-steps-layout > .vs-live {
    --jl-s: 0.52;
  }

  .vl-steps-layout > .journey-steps {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 580px) {
  .vl-steps-layout > .vs-live {
    --jl-s: 0.56;
    justify-self: stretch;
    margin-right: -10px;
    margin-left: -10px;
    padding: 16px 8px 64px;
    border-radius: 24px;
  }

  /* Один телефон — плашка записи остаётся под ним, а не сбоку */
  .vs-live .jl-command {
    bottom: -48px;
    left: 50%;
    transform: translate(-50%, 7px) scale(0.96);
  }

  .vs-live.is-speaking .jl-command {
    transform: translate(-50%, 0);
  }

  .vl-steps .journey-step p {
    padding-left: 0;
  }

  .vc-grid,
  .vl-compare-grid {
    margin-inline: -12px;
  }

  .vc-card,
  .vk-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .vl-app-demo {
    margin-inline: -8px;
    padding: 0;
    background: transparent;
  }

  .vl-compare-phrase {
    margin-top: 30px;
  }

  .vl-compare-phrase .ri-wave {
    display: none;
  }

  .vl-heading-lead {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-live *,
  .vc-card *,
  .vl-compare * {
    animation: none !important;
    transition: none !important;
  }
}
