/* ============================================================
   ВТБ — кейс v2. Fira Sans + scroll-driven sticky сцены
   ============================================================ */


:root {
  --bg:     #FFFFFF;
  --ink:    #23262D;
  --muted:  #8A8C92;
  --faint:  #B6B8BE;
  --panel:  #ECECEF;
  --line:   rgba(14,14,16,0.14);
  --side:   32px;
  --frame:  min(864px, 58vw);
  --header-h: 64px;
  --pin-top:  calc(var(--header-h) + 24px);
  --disp:   'Fira Sans', sans-serif;
  --text:   'Fira Sans', sans-serif;

  /* ── Шкала отступов: единый источник для всех кейсов, авто-сжимается на мобильном ── */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 56px;
  --sp-7: 64px;
  --sp-8: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body {
  overflow-x: hidden;
  max-width: 100vw;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;            /* основной текст — 20px regular */
  line-height: 1.45;
  letter-spacing: -0.01em;
}
img, video { display: block; max-width: 100%; }

/* 32px по бокам — на всю страницу */
.v2-wrap { width: 100%; padding: 0 var(--side); }

/* ── ХЕДЕР (липкий) ── */
.v2-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--side);
  background: var(--bg);
}
.v2-header-name { font-family: var(--disp); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); }
.v2-header-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 28px; font-size: 16px; }
.v2-header-nav a { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.v2-header-nav a:hover { color: var(--ink); }

/* ── Identity (avatar + имя) и кнопки CV/Telegram в хедере ── */
.v2-header-identity, .v2-header-actions {
  display: flex; align-items: center; gap: 10px;
}
.v2-header-identity { text-decoration: none; color: inherit; }
.v2-header-actions { gap: 8px; }
.v2-header-avatar { width: 32px; height: 32px; border-radius: 50%; display: block; flex-shrink: 0; background: url('../images/avatar-new.png') center 0% / 200% auto no-repeat; }

/* ── На главной: identity/кнопки скрыты, пока не проскроллили хиро ── */
.v2-header--home .v2-header-identity,
.v2-header--home .v2-header-actions {
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.v2-header--home.v2-header--scrolled .v2-header-identity,
.v2-header--home.v2-header--scrolled .v2-header-actions {
  opacity: 1; transform: none; pointer-events: auto;
}

/* ── Кнопки ── */
.h-btn {
  font-family: var(--disp); font-weight: 600; font-size: 18px;
  padding: 14px 28px; border-radius: 16px; white-space: nowrap;
  transition: opacity 0.18s ease; display: inline-block; text-decoration: none;
}
.h-btn:hover { opacity: 0.75; }
.h-btn--outline { background: #EEEEF2; color: var(--ink); border: none; }
.h-btn--dark { background: var(--ink); color: #fff; border: none; }
.h-btn--sm { font-size: 14px; padding: 8px 16px; border-radius: 10px; }

/* ── Футер (единый для всех страниц) ── */
.h-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--side) var(--sp-4); margin-top: var(--sp-8); flex-wrap: wrap; gap: var(--sp-3); }
.h-footer-links { display: flex; gap: 4px; }
.h-footer-link { display: inline-flex; align-items: center; gap: 8px; background: #EEEEF2; border-radius: 16px; padding: 16px 24px 16px 12px; text-decoration: none; color: inherit; transition: opacity 0.15s; }
.h-footer-link:hover { opacity: 0.8; }
.h-footer-icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: #D8D8DC; }
.h-footer-link-name { font-family: var(--disp); font-size: 16px; font-weight: 500; color: var(--ink); }
.h-footer-copy { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; font-weight: 400; color: var(--muted); }

/* ── ТЕГ (хиро кейса) ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 100px;
  font-family: var(--disp); font-size: 16px; font-weight: 400;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (max-width: 860px) {
  /* Сжатая шкала отступов — наследуется автоматически всеми компонентами ниже, без ручных правок под каждый кейс */
  :root {
    --sp-1: 6px;
    --sp-2: 12px;
    --sp-3: 16px;
    --sp-4: 20px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 36px;
    --sp-8: 40px;
  }

  .v2-header-nav { gap: 18px; font-size: 14px; }
  .v2-header-actions { display: none; }
}

@media (max-width: 480px) {
  .v2-header-name { display: none; }
}

/* ── ТИПО-ШКАЛА: h1 72/72, h2 56/56, h3 24/24 — всё Semibold ── */
.v2-h1, .v2-hero h1 { font-family: var(--disp); font-weight: 600; font-size: 72px; line-height: 72px; letter-spacing: -0.03em; }
.v2-h, .v2-step-title  { font-family: var(--disp); font-weight: 600; font-size: 56px; line-height: 56px; letter-spacing: -0.02em; }
.v2-h3, .v2-cap-title, .v2-sms-cap { font-family: var(--disp); font-weight: 600; font-size: 24px; line-height: 24px; letter-spacing: -0.01em; }

/* ── HERO ───────────────────────────────────────────────── */
.v2-hero { padding-top: clamp(60px, 12vh, 140px); padding-bottom: 48px; text-align: center; }
.v2-hero h1 { max-width: none; margin: 0; }
.v2-hero p { margin: 24px auto 0; max-width: 46ch; color: var(--ink); font-size: 24px; }   /* hero — 24px regular */
.v2-hero-cover {
  margin-top: 48px;
  height: 640px;
  border-radius: 24px;
  background: linear-gradient(105deg, #050B2E 0%, #1B2FB5 55%, #2C6BFF 100%);
  position: relative;
  overflow: hidden;
}
.v2-hero-screens {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 0%);   /* приподнято к нижнему краю без захода под него */
  width: min(1040px, 80%);
  height: auto;
  display: block;
}

/* ── CASE INTRO: CONTEXT / SOLUTION (лейбл слева, контент справа) ── */
.v2-case-intro { padding-top: var(--sp-7); padding-bottom: var(--sp-7); display: flex; flex-direction: column; gap: clamp(72px, 12vh, 140px); margin-bottom: 164px; }
.v2-beat { display: grid; grid-template-columns: minmax(0, 1fr) var(--frame); gap: clamp(32px, 5vw, 80px); align-items: start; }
.v2-beat-label { font-family: var(--disp); font-weight: 600; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.v2-beat-heading { font-family: var(--disp); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.v2-beat-title { font-family: var(--disp); font-weight: 600; font-size: 56px; line-height: 56px; letter-spacing: -0.02em; color: var(--ink); }
.v2-beat-meta { display: flex; flex-wrap: wrap; gap: 0 56px; margin-top: 32px; }
.v2-beat-meta-col { display: flex; flex-direction: column; gap: 0; }
.v2-beat-meta-label { font-size: 20px; color: var(--muted); }
.v2-beat-meta-val { font-size: 20px; color: var(--ink); }
.v2-beat-challenge { font-family: var(--disp); font-weight: 600; font-size: 24px; line-height: 24px; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 16px; }
.v2-beat-body { font-size: 20px; line-height: 1.5; color: var(--ink); max-width: 60ch; }
.v2-beat-meta + .v2-beat-body { margin-top: 40px; }
.v2-beat-body p { margin-bottom: 16px; }
.v2-beat-body p:last-child { margin-bottom: 0; }
.v2-results-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 40px; }
.v2-results-stat { background: var(--panel); border-radius: 16px; padding: 24px 20px; }
.v2-results-stat-value { font-family: var(--disp); font-weight: 600; font-size: 48px; line-height: 1; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 8px; }
.v2-results-stat-label { font-size: 16px; line-height: 1.3; color: var(--ink); }
@media (max-width: 860px) {
  .v2-beat { grid-template-columns: 1fr; gap: 16px; }
  .v2-beat-title { font-size: 32px; line-height: 32px; }
  .v2-beat-body { font-size: 18px; }
  .v2-results-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .v2-results-stat { padding: 16px; }
  .v2-results-stat-value { font-size: 32px; }
  .v2-beat-meta { gap: 16px 32px; margin-top: 24px; }
  .v2-beat-meta-label, .v2-beat-meta-val { font-size: 16px; }
}

/* ── ТЕГИ БЫЛО / СТАЛО внутри фрейма ───────────────────── */
.v2-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--disp); font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 100px; pointer-events: none;
  line-height: 1;
}
.v2-badge--bylo { background: #000; color: #fff; }
.v2-badge--stalo { background: #32C665; color: #fff; }
/* контейнер фрейма должен быть relative */
.v2-sms-stage { position: relative; }

/* ── БЫЛО / СТАЛО СЛАЙДЕР ───────────────────────────────── */
.v2-slider { position: relative; width: 100%; overflow: hidden; border-radius: 20px; user-select: none; cursor: ew-resize; margin-top: 32px; }
.v2-slider-after { display: block; width: 100%; height: auto; display: block; }
.v2-slider-before { position: absolute; inset: 0; overflow: hidden; width: 20%; }
.v2-slider-before img { position: absolute; top: 0; left: 0; width: var(--slider-full-w); height: 100%; object-fit: cover; }
.v2-slider-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: 20%; transform: translateX(-50%); pointer-events: none; }
.v2-slider-handle::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.v2-slider-handle::after { content: '◂ ▸'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 11px; color: var(--ink); letter-spacing: -1px; pointer-events: none; }
.v2-slider-label { position: absolute; font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; backdrop-filter: blur(8px); pointer-events: none; }
.v2-slider-label--after { top: 16px; right: 16px; background: rgba(255,255,255,0.9); color: var(--ink); }
.v2-slider-label--before { top: 16px; left: 16px; background: rgba(0,0,0,0.45); color: #fff; }

/* ── STACKED BLOCK (заголовок + большая картинка) ───────── */
.v2-block { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
.v2-block .v2-h { max-width: 50%; }
.v2-block-desc { margin-top: 18px; max-width: 80%; color: var(--ink); font-size: 20px; line-height: 24px; }
.v2-block-desc--half { max-width: 50%; }
.v2-block-visual { margin-top: var(--sp-4); border-radius: 20px; background: var(--panel); aspect-ratio: 16 / 9; overflow: hidden; }
.v2-block-visual img, .v2-block-visual video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-block-visual--data { aspect-ratio: auto; height: 760px; }
.v2-block-visual--sm { padding: 64px; box-sizing: border-box; }
.v2-block-visual--sm img, .v2-block-visual--sm video { object-fit: contain; }

/* ── FULL-WIDTH RECTANGLE (+ опц. подпись в правой колонке) ── */
.v2-fullbar {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--frame);
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: 24px;
}
.v2-fullbar-inner { grid-column: 1 / -1; border-radius: 20px; background: var(--panel); aspect-ratio: 21 / 9; overflow: hidden; }
.v2-fullbar-inner img { width: 100%; height: 100%; object-fit: cover; }
.v2-fullbar-cap { grid-column: 2; }
.v2-fullbar-cap .v2-block-desc { margin-top: 10px; }

/* ── STICKY SCROLL SCENE ────────────────────────────────── */
.v2-scene { position: relative; }
.v2-stage { position: sticky; top: var(--pin-top); height: calc(100vh - var(--pin-top)); display: flex; align-items: center; }
.v2-stage-inner {
  width: 100%;
  padding: 0 var(--side);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--frame);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

/* левая колонка — только h2 + текст 20px (переключается) */
.v2-stage-text { position: relative; }
.v2-steps { position: relative; min-height: clamp(180px, 26vh, 260px); }
.v2-step { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; pointer-events: none; }
.v2-step.is-active { opacity: 1; transform: none; }
.v2-step-body { margin-top: 20px; color: var(--ink); font-size: 20px; max-width: 40ch; }

/* правая колонка — кадр 864px + (ниже) h3 + текст 20px + индикаторы */
.v2-stage-right { display: flex; flex-direction: column; }
.v2-stage-visual { position: relative; width: 100%; border-radius: 22px; background: var(--panel); aspect-ratio: 4 / 3; max-height: 640px; overflow: hidden; }
.v2-frame { position: absolute; inset: 0; opacity: 0; transform: scale(1.02); transition: opacity 0.55s ease, transform 0.7s ease; display: flex; align-items: center; justify-content: center; }
.v2-frame.is-active { opacity: 1; transform: none; }
.v2-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-frame video { width: 284px; height: auto; max-height: 100%; display: block; border-radius: 28px; }

/* подпись под кадром — h3 + текст 20px (переключается) */
.v2-caps { display: grid; margin-top: 24px; }
.v2-cap { grid-area: 1 / 1; opacity: 0; transition: opacity 0.45s ease; pointer-events: none; }
.v2-cap.is-active { opacity: 1; pointer-events: auto; }
.v2-cap-text { margin-top: 10px; color: var(--ink); font-size: 20px; line-height: 24px; max-width: 80%; }
.v2-cap-result { margin-top: 0; margin-bottom: 14px; font-family: var(--disp); font-weight: 600; font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
/* h3-подписи под фреймами — 80% ширины фрейма над ними */
.v2-cap-result, .v2-sms-cap, .v2-row-cap .v2-h3, .v2-fullbar-cap .v2-h3 { max-width: 80%; }

/* индикаторы убраны */
.v2-dots, .v2-launch-rail { display: none; }
.v2-dots-off { display: flex; gap: 8px; margin-top: 24px; }
.v2-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background 0.3s ease; }
.v2-dot.is-active { background: var(--ink); }

/* ── БЛОК «Продуктовые запуски»: сквозная линейка индикаторов ── */
.v2-launch { position: relative; }
.v2-launch-rail { position: sticky; top: 0; height: 0; z-index: 20; pointer-events: none; }
.v2-launch-rail .v2-dots {
  position: absolute;
  top: calc(100vh - 72px);
  width: 100%;
  padding: 0 var(--side);
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── СМС: текст залипает, кадры Было/Стало обычным скроллом, 864px ── */
.v2-sms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--frame);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.v2-sms-text { position: sticky; top: var(--pin-top); height: calc(100vh - var(--pin-top)); display: flex; flex-direction: column; justify-content: center; }
.v2-sms-frames { display: flex; flex-direction: column; gap: var(--sp-6); padding: 14vh 0; }
.v2-sms-figure { margin: 0; }
.v2-sms-figure img, .v2-sms-ph { width: 100%; border-radius: 22px; background: var(--panel); aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.v2-sms-stage { width: 100%; border-radius: 22px; background: var(--panel); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.v2-sms-stage video { width: 284px; height: auto; max-height: 90%; display: block; border-radius: 28px; }
.v2-sms-cap { margin-top: 24px; color: var(--ink); }
.v2-sms-cap-text { margin-top: 10px; color: var(--ink); font-size: 20px; line-height: 24px; max-width: 80%; }

/* ── СТАТИЧНЫЙ РЯД: текст слева / фрейм 864 справа (вне анимации) ── */
.v2-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--frame);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-top: 56px;
}
.v2-row-text { align-self: center; }
.v2-row-visual { display: flex; flex-direction: column; }
.v2-row-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.v2-row-frame video, .v2-row-frame img { width: 284px; height: auto; max-height: 90%; display: block; border-radius: 28px; }
.v2-row-cap { margin-top: 24px; }
.v2-row-cap .v2-block-desc { margin-top: 10px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .v2-h1, .v2-hero h1 { font-size: 40px; line-height: 40px; }
  .v2-h, .v2-step-title { font-size: 32px; line-height: 32px; }
  .v2-h3, .v2-cap-title, .v2-sms-cap { font-size: 20px; line-height: 20px; }
  body { font-size: 18px; }
  .v2-hero p { font-size: 20px; }

  .v2-stage { position: static; height: auto; padding: 40px 0; }
  .v2-stage-inner { grid-template-columns: 1fr; gap: 24px; }
  .v2-steps { position: static; min-height: 0; }
  .v2-step { position: static; opacity: 1; transform: none; margin-bottom: 12px; }
  .v2-caps { position: static; min-height: 0; }
  .v2-cap { position: static; opacity: 1; }
  .v2-frame { position: static; opacity: 1; transform: none; margin-bottom: 10px; }
  .v2-stage-visual { aspect-ratio: 4 / 3; }
  .v2-dots { display: none; }

  .v2-fullbar-inner { aspect-ratio: 16 / 9; }
  .v2-sms { grid-template-columns: 1fr; gap: 20px; padding-top: var(--sp-7); }
  .v2-sms-text { position: static; height: auto; }
  .v2-sms-frames { padding: 0; gap: 24px; }
  .v2-launch-rail { display: none; }
  .v2-row { grid-template-columns: 1fr; gap: 24px; padding-top: var(--sp-7); }
  .v2-fullbar { grid-template-columns: 1fr; }
  .v2-fullbar-cap { grid-column: 1; }
  .v2-block .v2-h { max-width: 100%; }
  .v2-block-desc, .v2-block-desc--half { max-width: 100%; }
  .v2-block-visual--data { height: 253px; }
  .v2-block-visual--sm { padding: 24px; }
  .v2-hero-cover { height: 360px; }
  .v2-cap-result, .v2-sms-cap, .v2-row-cap .v2-h3, .v2-fullbar-cap .v2-h3, .v2-sms-cap-text { max-width: 100%; }
}

@media (max-width: 480px) {
  :root { --side: 20px; }
  .v2-h1, .v2-hero h1 { font-size: 32px; line-height: 32px; }
  .v2-h, .v2-step-title { font-size: 26px; line-height: 1.15; }
  body { font-size: 16px; }
  .v2-results-stats { grid-template-columns: 1fr; }
}
