/* ============================================================
   bormantov.ru V2 — страница кейса.
   Подключается после styles.css, v2.css, hero-v2.css, pages-v2.css.
   Hero — та же колода Product Showcase C (16 с, 4 карточки),
   но в карточках настоящие экраны проекта вместо типографики.
   Ниже hero — разделы на тонких линиях и строгой сетке P0.
   ============================================================ */

/* ---------- Hero ---------- */
.cv2-hero .deck-card__screen {
  display: block;
  padding: 0;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.22);
  background: #050816;
}

.cv2-hero .deck-card__screen::before { display: none; }

.cv2-hero .deck-card__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* Светлые интерфейсы не должны спорить с H1: лёгкое затемнение экрана */
.cv2-hero .deck-card__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0) 55%, rgba(3, 7, 18, 0.35) 100%);
  pointer-events: none;
}

.cv2-hero .deck-card__name { font-size: 20px; }

/* Поле за текстом: левая часть сцены уходит в фон, чтобы H1 читался на любых экранах */
.cv2-hero .pv2-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #050816 0%, rgba(5, 8, 22, 0.92) 34%, rgba(5, 8, 22, 0.35) 52%, rgba(5, 8, 22, 0) 64%);
}

.cv2-crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
  color: #94a3b8;
}

.cv2-crumbs a { color: #cbd5e1; text-decoration: none; }
.cv2-crumbs a:hover { color: #5eead4; }

.cv2-hero .hv2__title { font-size: clamp(36px, 3.5vw, 52px); }

.cv2-hero__status { margin-top: 18px; }

@media (max-width: 899px) {
  .cv2-hero .pv2-stage::after {
    background: linear-gradient(180deg, rgba(5, 8, 22, 0.2) 0%, rgba(5, 8, 22, 0.86) 46%, #050816 78%);
  }
}

@media (max-width: 699px) {
  .cv2-hero .deck-card__screen img { filter: brightness(0.55) saturate(0.8); }
}

/* ---------- Паспорт ---------- */
.cv2-passport {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-passport > div {
  padding: 26px 28px 28px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-passport > div + div { padding-left: 28px; border-left: 1px solid rgba(148, 163, 184, 0.12); }
.cv2-passport > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }

.cv2-passport dt {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5eead4;
}

.cv2-passport dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #e2e8f0;
}

.cv2-passport .prow__stack { margin-top: 2px; }

/* ---------- Сценарий ---------- */
.cv2-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  counter-reset: cstep;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-steps li {
  position: relative;
  padding: 30px 22px 0 0;
  counter-increment: cstep;
}

.cv2-steps li::before {
  content: counter(cstep, decimal-leading-zero);
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  padding-top: 10px;
  border-top: 2px solid #2dd4bf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2dd4bf;
}

.cv2-steps h3 {
  margin: 18px 0 10px;
  font-size: 18px;
  color: #f8fafc;
}

.cv2-steps p {
  font-size: 14.5px;
  line-height: 1.6;
  color: #aab8c8;
}

.cv2-flow { margin-bottom: 40px; }

/* ---------- Что реализовано ---------- */
.cv2-feats { border-top: 1px solid rgba(148, 163, 184, 0.18); }

.cv2-feat {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr);
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-feat h3 {
  font-size: 22px;
  color: #f8fafc;
}

.cv2-feat h3 span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #2dd4bf;
}

.cv2-feat ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
}

.cv2-feat li {
  position: relative;
  padding-left: 18px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #cbd5e1;
}

.cv2-feat li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: #2dd4bf;
}

/* ---------- Экраны ---------- */
.cv2-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 24px;
}

.cv2-shot { margin: 0; grid-column: span 3; }
.cv2-shot--lead { grid-column: span 6; }
.cv2-shot--phone { grid-column: span 2; }
.cv2-shot--wide { grid-column: span 4; }

.cv2-shot__frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #050816;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.cv2-shot__frame::before {
  content: '';
  display: block;
  height: 26px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 16px 13px, rgba(148, 163, 184, 0.4) 3.5px, transparent 4px),
    radial-gradient(circle at 30px 13px, rgba(148, 163, 184, 0.4) 3.5px, transparent 4px),
    radial-gradient(circle at 44px 13px, rgba(148, 163, 184, 0.4) 3.5px, transparent 4px),
    rgba(15, 23, 42, 0.9);
}

.cv2-shot--phone .cv2-shot__frame {
  max-width: 300px;
  margin: 0 auto;
  border-radius: 30px;
  padding: 10px;
  background: #0b1220;
}

.cv2-shot--phone .cv2-shot__frame::before { display: none; }
.cv2-shot--phone img { border-radius: 22px; }

.cv2-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.cv2-shot figcaption {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #aab8c8;
}

.cv2-shot figcaption b {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #2dd4bf;
  padding-top: 2px;
}

/* ---------- Проверенные результаты ---------- */
.cv2-results { border-top: 1px solid rgba(148, 163, 184, 0.18); }

.cv2-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-result__value {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #f8fafc;
}

.cv2-result__what { font-size: 16px; line-height: 1.55; color: #cbd5e1; }
.cv2-result__src { font-size: 12.5px; line-height: 1.5; color: #64748b; }

/* ---------- Подробно + границы ---------- */
.cv2-long p {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.75;
  color: #cbd5e1;
}

.cv2-limits {
  margin-top: 36px;
  padding: 24px 26px;
  border-left: 2px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.45);
}

.cv2-limits h3 {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cv2-limits li {
  font-size: 14.5px;
  line-height: 1.6;
  color: #aab8c8;
}

.cv2-limits li + li { margin-top: 6px; }

/* ---------- Соседние кейсы ---------- */
.cv2-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cv2-pager a {
  display: block;
  padding: 28px 0;
  text-decoration: none;
  color: #f8fafc;
}

.cv2-pager a + a { text-align: right; border-left: 1px solid rgba(148, 163, 184, 0.12); padding-left: 24px; }
.cv2-pager span { display: block; margin-bottom: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #94a3b8; }
.cv2-pager b { font-size: 22px; letter-spacing: -0.02em; }
.cv2-pager a:hover b { color: #5eead4; }

/* ---------- Адаптивность ---------- */
@media (max-width: 1099px) {
  .cv2-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
  .cv2-feat ul { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  .cv2-passport { grid-template-columns: 1fr 1fr; }
  .cv2-passport > div:nth-child(n) { padding-left: 0; border-left: 0; padding-right: 16px; }
  .cv2-passport > div:nth-child(2n) { padding-left: 20px; border-left: 1px solid rgba(148, 163, 184, 0.12); }
  .cv2-feat { grid-template-columns: 1fr; gap: 16px; }
  .cv2-shot, .cv2-shot--wide { grid-column: span 6; }
  .cv2-shot--phone { grid-column: span 3; }
  .cv2-result { grid-template-columns: 1fr 1.6fr; }
  .cv2-result__src { grid-column: 2; }
}

@media (max-width: 699px) {
  .cv2-passport { grid-template-columns: 1fr; }
  .cv2-passport > div:nth-child(n) { padding: 20px 0; border-left: 0; }
  .cv2-steps { grid-template-columns: 1fr; row-gap: 28px; }
  .cv2-steps li { padding-top: 26px; }
  .cv2-shot--phone { grid-column: span 6; }
  .cv2-result { grid-template-columns: 1fr; gap: 6px; }
  .cv2-result__src { grid-column: auto; }
  .cv2-pager { grid-template-columns: 1fr; }
  .cv2-pager a + a { text-align: left; border-left: 0; padding-left: 0; border-top: 1px solid rgba(148, 163, 184, 0.12); }
}

@media (prefers-reduced-motion: reduce) {
}

/* Колода кейса: экран занимает всю карточку под шапкой */
.cv2-hero .deck-card { grid-template-rows: auto auto 1fr; }

/* Текстовая колонка уже колоды: H1 не заходит на экран передней карточки */
.cv2-hero .hv2__content { max-width: 540px; }
.cv2-hero .hv2__title { font-size: clamp(34px, 3.3vw, 50px); }

@media (min-width: 1200px) {
  .cv2-hero .deck { width: min(46vw, 680px); right: 2%; }
}

@media (max-width: 699px) {
  .cv2-hero .hv2__title { font-size: clamp(28px, 8.4vw, 34px); }
}

/* Зона текста: задние карточки читаются только как силуэты */
@media (min-width: 900px) {
  .cv2-hero .pv2-stage::after {
    background: linear-gradient(90deg, #050816 0%, rgba(5, 8, 22, 0.96) 40%, rgba(5, 8, 22, 0.82) 48%, rgba(5, 8, 22, 0.3) 56%, rgba(5, 8, 22, 0) 64%);
  }
}

/* Галерея: ведущий кадр → два → три (два экрана и телефон) */
.cv2-shot--third { grid-column: span 2; }
.cv2-gallery { align-items: start; }

@media (max-width: 899px) {
  .cv2-shot--third { grid-column: span 3; }
}

@media (max-width: 699px) {
  .cv2-shot--third { grid-column: span 6; }
}

/* ---------- Демо-ссылка (финальная интеграция) ---------- */
.cv2-demo-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}

.cv2-demo-link {
  display: inline-block;
  margin-bottom: 4px;
  font-weight: 700;
  color: #5eead4;
  text-decoration: none;
}

.cv2-demo-link:hover { text-decoration: underline; }

.cv2-demo-cap {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #94a3b8;
}

.cv2-pager { margin-top: 64px; }

.cv2-passport > div { min-width: 0; overflow-wrap: anywhere; }

/* Телефон и планшет: текст экранов колоды не должен читаться сквозь лид и кнопки */
@media (max-width: 899px) {
  .cv2-hero .deck-card__screen img { filter: brightness(0.4) saturate(0.7); }
}
