/* ============================================================
   KIREELS — V1 "PLAYABLE FEED"
   Лендинг-агентство коротких видео как бесконечная лента рилсов
   ============================================================ */

/* ---------- Fonts ---------- */
/* Unbounded — сверхжирный широкий гротеск (Druk-вайб), Inter — текст,
   Space Grotesk — для цифр-обводок (чище контур на 01–06, чем у Unbounded) */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700;800;900&family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --blue: #3d4df5;
  --blue-deep: #2a34c8;
  --blue-glow: rgba(61, 77, 245, 0.32);
  /* Лайм убран из палитры в пользу синего. --lime теперь alias синего,
     чтобы любой не пойманный вручную старый хекс всё равно был "в системе". */
  --lime: #3d4df5;
  --lime-dim: #2a34c8;

  /* СВЕТЛАЯ фирменная база: белый фон, near-black-blue текст. */
  --ink: #FFFFFF;          /* базовый фон страницы (был тёмный) */
  --ink-soft: #EEF1FF;     /* очень светлая сине-белая плашка */
  --paper: #FFFFFF;        /* чистый белый */
  --paper-2: #F3F5FF;      /* светлейшая секция */
  --paper-3: #EEF1FF;      /* чуть насыщеннее */
  --text: #0B1030;         /* основной тёмный текст (сине-чёрный) */
  --white: #0B1030;        /* alias: старый var(--white) как «цвет текста» → тёмный */
  --on-blue: #FFFFFF;      /* текст на синих плашках */

  /* «Дым» на светлом — тёмные полупрозрачные (были белые-альфа) */
  --smoke: rgba(11, 16, 48, 0.66);
  --smoke-dim: rgba(11, 16, 48, 0.42);
  --line: rgba(11, 16, 48, 0.12);

  /* мягкая сине-серая тень (не жёстко-чёрная) */
  --shadow-blue: rgba(23, 33, 92, 0.16);

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.7, 0, 0.2, 1);

  --reel-pad: clamp(20px, 4vw, 64px);
  --rail-w: 46px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none; /* заменяем кастомным ▶ */
}

/* На тач-устройствах — вернуть системный курсор */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: none; border: none; background: none; color: inherit; }

::selection { background: var(--blue); color: var(--on-blue); }

/* Film grain overlay поверх всего — на светлом фоне грубый overlay-шум
   даёт грязь, поэтому делаем его почти незаметным и в multiply, чтобы он
   лишь чуть текстурировал, а не пачкал белый. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.022;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   SCROLL-SNAP FEED — ядро
   ============================================================ */
.feed {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: none;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.reel {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  padding: var(--reel-pad);
  padding-right: calc(var(--reel-pad) + 74px); /* место под правый UI */
  isolation: isolate;
}

/* Фоновый слой рила */
.reel__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.reel__bg img, .reel__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}

/* ============================================================
   АБСТРАКТНЫЕ ФОНЫ БЕЗ ФОТО (бело-голубые)
   Клиентских стоковых ассетов нет → фоны рилов/кейсов строим из
   чистого цвета + синих блобов + точечной сетки. Только hero
   сохраняет реальное видео. Классы вешаются на .reel__bg > div.
   ============================================================ */
.abstract {
  position: absolute;
  inset: 0;
  background: var(--paper);
  overflow: hidden;
}
/* Тонкая точечная сетка поверх — «редакторская» текстура */
.abstract::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(61,77,245,0.10) 1.3px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at var(--gx, 70%) var(--gy, 26%), #000, transparent 72%);
          mask-image: radial-gradient(circle at var(--gx, 70%) var(--gy, 26%), #000, transparent 72%);
  opacity: 0.7;
}
/* Мягкие синие блобы — основной «характер» фона */
.abstract::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38vmax 38vmax at var(--bx, 78%) var(--by, 12%), rgba(61,77,245,0.16), transparent 60%),
    radial-gradient(30vmax 30vmax at var(--b2x, 12%) var(--b2y, 88%), rgba(61,77,245,0.10), transparent 62%),
    linear-gradient(180deg, #FFFFFF 0%, #F3F5FF 55%, #EEF1FF 100%);
}
/* Позиционные варианты (чтобы соседние секции не были одинаковыми) */
.abstract--a { --bx:80%; --by:10%;  --b2x:10%; --b2y:86%; --gx:74%; --gy:22%; }
.abstract--b { --bx:16%; --by:14%;  --b2x:88%; --b2y:82%; --gx:22%; --gy:20%; }
.abstract--c { --bx:82%; --by:78%;  --b2x:14%; --b2y:16%; --gx:80%; --gy:74%; }
.abstract--d { --bx:20%; --by:80%;  --b2x:84%; --b2y:16%; --gx:24%; --gy:78%; }
.abstract--e { --bx:50%; --by:6%;   --b2x:50%; --b2y:96%; --gx:50%; --gy:14%; }
/* Кольцо-акцент (полупрозрачный синий обод) — только на некоторых */
.abstract--ring::after {
  background:
    radial-gradient(38vmax 38vmax at var(--bx) var(--by), rgba(61,77,245,0.16), transparent 60%),
    radial-gradient(30vmax 30vmax at var(--b2x) var(--b2y), rgba(61,77,245,0.10), transparent 62%),
    radial-gradient(circle at 50% 46%, transparent 26%, rgba(61,77,245,0.06) 27%, transparent 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F3F5FF 55%, #EEF1FF 100%);
}

/* Абстрактный «экран рила» — заполнитель вместо фото (телефон, карточки
   кейсов). Диагональный сине-белый градиент + мягкое пятно, чтобы блок
   читался как цветной вертикальный кадр без картинки. */
.reelfill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 42% at 30% 22%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(70% 50% at 78% 84%, rgba(42,52,200,0.55), transparent 65%),
    linear-gradient(150deg, #3d4df5 0%, #2a34c8 62%, #202B9E 100%);
}
.reelfill--v2 { background:
    radial-gradient(60% 42% at 72% 20%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(70% 52% at 22% 86%, rgba(32,43,158,0.6), transparent 66%),
    linear-gradient(150deg, #5A67FF 0%, #3646E0 60%, #263192 100%); }
.reelfill--v3 { background:
    radial-gradient(55% 40% at 28% 80%, rgba(255,255,255,0.5), transparent 58%),
    radial-gradient(70% 50% at 80% 18%, rgba(42,52,200,0.55), transparent 64%),
    linear-gradient(150deg, #3d4df5 0%, #2F3CCB 64%, #1F2A94 100%); }
/* Тонкая диагональная штриховка на заполнителе — «движение» кадра */
.reelfill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 14px);
  mix-blend-mode: screen;
  opacity: 0.5;
}
/* ОСВЕТЛЯЮЩИЙ градиент (был затемняющий): на светлом дизайне фото-фоны
   под секциями шагов заливаем бело-голубой дымкой, чтобы тёмный текст
   читался поверх фото как на белом. Снизу чуть плотнее — под контент. */
.reel__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(243,245,255,0.86) 0%, rgba(243,245,255,0.72) 32%, rgba(238,241,255,0.80) 65%, rgba(238,241,255,0.94) 100%);
}
.reel__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  mix-blend-mode: multiply;
  opacity: 0.16;
}

/* ============================================================
   HELPER: гигантский капс-заголовок
   ============================================================ */
.mega {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.mega--xl { font-size: clamp(2.7rem, 12vw, 11rem); }
.mega--l  { font-size: clamp(2.2rem, 8.5vw, 7rem); }
.mega--m  { font-size: clamp(1.7rem, 5.5vw, 4rem); }

.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}
/* .txt-lime теперь синий (лайм убран). Оставляем класс, чтобы не трогать
   разметку — просто перекрашиваем в электрик-синий акцент. */
.txt-lime { color: var(--blue); }
.txt-blue { color: var(--blue); }
.italic-skew { font-style: italic; transform: skewX(-6deg); display: inline-block; }

/* ============================================================
   TAG / eyebrow
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--blue);
}
.eyebrow--dot::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(61,77,245,0.55); }
  50% { box-shadow: 0 0 0 7px rgba(61,77,245,0); }
}

/* ============================================================
   CTA buttons
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
/* Главная CTA (класс .btn--lime сохранён в разметке) теперь = сплошной
   электрик-синий с белым текстом — доминанта на светлом фоне. */
.btn--lime { background: var(--blue); color: var(--on-blue); box-shadow: 0 8px 26px -10px var(--blue-glow); }
.btn--lime:hover { transform: translateY(-3px); background: var(--blue-deep); box-shadow: 0 16px 44px -10px rgba(61,77,245,0.5); }
.btn--lime:hover svg { transform: translate(3px,-3px); }
.btn--blue { background: var(--blue); color: var(--on-blue); }
.btn--blue:hover { transform: translateY(-3px); background: var(--blue-deep); box-shadow: 0 14px 40px -8px rgba(61,77,245,0.5); }
/* Призрачная кнопка на СВЕТЛОМ: синий контур + тёмный текст. */
.btn--ghost { border: 1.6px solid rgba(61,77,245,0.5); color: var(--text); background: rgba(61,77,245,0.04); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); background: rgba(61,77,245,0.08); transform: translateY(-3px); }

/* Shine sweep */
.btn--lime::after, .btn--blue::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
}
.btn--lime:hover::after, .btn--blue:hover::after { left: 130%; }

/* ============================================================
   FIXED CHROME — верх, брендбар, курсор, тумблер
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--reel-pad);
  pointer-events: none;
  /* Фиксированный хром плывёт и над светлыми, и над синими инверсными
     рилами (hero/final). mix-blend-mode:difference с БЕЛЫМ хромом сам
     адаптируется: на белом читается тёмным, на синем — светлым. Никакого
     JS-переключения тем не нужно. */
  mix-blend-mode: difference;
}
.topbar > * { pointer-events: auto; }
/* На сплошных синих рилах (hero/final) difference даёt зеленоватый хром —
   там держим обычный режим смешивания, элементы уже белые по умолчанию. */
body.is-solid-blue-reel .topbar { mix-blend-mode: normal; }

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff; /* белый под difference → авто-контраст на любом риле */
}
.brand__dot {
  width: 11px; height: 11px;
  border-radius: 3px;
  /* под difference чистый blue даёт тёплый тик; берём светлый сине-белый,
     чтобы «rec»-точка оставалась заметной и на белом, и на синем */
  background: #8f9bff;
  animation: recBlink 1.4s steps(1) infinite;
}
@keyframes recBlink { 0%,60% { opacity: 1;} 61%,100%{ opacity: 0.25; } }

.topbar__right { display: flex; align-items: center; gap: 18px; }

.top-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 100px;
  border: 1.5px solid #fff; /* белый контур под difference → авто-контраст */
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}
.top-cta:hover { background: #fff; color: #000; transform: translateY(-2px); }

/* ===== БУРГЕР + МОБИЛЬНОЕ МЕНЮ =====
   Бургер живёт в фиксированном .topbar (значит, всегда закреплён сверху).
   На десктопе скрыт (там есть кнопка-CTA и левый рейл), включается ≤860px. */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 42px; height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 26px; height: 2.5px;
  border-radius: 2px;
  background: #fff; /* под difference — авто-контраст, как у бренда */
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
/* Открытое меню → крестик */
body.menu-open .burger span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
/* Пока меню открыто — хром без difference (чистый белый по синему фону меню) */
body.menu-open .topbar { mix-blend-mode: normal; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 90; /* ниже .topbar(100), чтобы бургер оставался кликабельным сверху */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 96px 30px 44px;
  background: linear-gradient(160deg, #2a34c8 0%, #3d4df5 58%, #3646E0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.menu a {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 8.5vw, 2.6rem);
  line-height: 1.16;
  color: #fff;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.38);
}
.menu .menu__cta {
  margin-top: 22px;
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--blue-deep);
  background: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  border-bottom: 0;
  box-shadow: 0 14px 30px -12px rgba(11,16,48,0.5);
}
/* На десктопе меню не участвует вовсе */
@media (min-width: 861px) { .menu { display: none; } }

/* ---------- Sound toggle ---------- */
.sound {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sound__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}
.sound__eq span {
  width: 3px;
  /* белый под difference-топбаром → адаптивный контраст на любом риле */
  background: #fff;
  border-radius: 2px;
  height: 30%;
  animation: eq 0.9s ease-in-out infinite;
}
.sound__eq span:nth-child(2){ animation-delay: 0.2s; }
.sound__eq span:nth-child(3){ animation-delay: 0.45s; }
.sound__eq span:nth-child(4){ animation-delay: 0.15s; }
@keyframes eq { 0%,100%{ height:25%;} 50%{ height:100%;} }
/* Muted state — бары застыли */
.sound.is-muted .sound__eq span { animation-play-state: paused; height: 22%; background: rgba(255,255,255,0.5); }
.sound.is-muted .sound__label::after { content: "OFF"; }
.sound__label::after { content: "ON"; }
.sound__label { color: rgba(255,255,255,0.85); }
.sound.is-muted .sound__label { color: rgba(255,255,255,0.5); }

/* ============================================================
   CUSTOM CURSOR ▶
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 44px; height: 44px;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.28s var(--ease-out), height 0.28s var(--ease-out), background 0.28s;
  display: grid;
  place-items: center;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid #fff;   /* реально белый: нужен для инверсии (mix-blend-mode: difference), var(--white) на этом лендинге давно означает тёмный текст */
  border-radius: 50%;
  transition: transform 0.28s var(--ease-out), opacity 0.28s;
}
.cursor__play {
  width: 0; height: 0;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 3px;
  transition: opacity 0.2s, transform 0.28s var(--ease-out);
}
.cursor__label {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.28s var(--ease-out);
  white-space: nowrap;
}
/* hover on interactive → раздувается, показывает label.
   Горячее состояние выходит из difference в normal и красится в бренд-синий
   с белым лейблом (было лаймовое пятно с тёмным текстом). */
.cursor.is-hot { width: 84px; height: 84px; mix-blend-mode: normal; }
.cursor.is-hot .cursor__ring { background: var(--blue); border-color: var(--blue); }
.cursor.is-hot .cursor__play { opacity: 0; }
.cursor.is-hot .cursor__label { opacity: 1; transform: scale(1); color: var(--on-blue); }
/* pressed */
.cursor.is-down .cursor__ring { transform: scale(0.82); }

/* ============================================================
   LEFT PROGRESS RAIL (сегменты сторис)
   ============================================================ */
.rail {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
}
.rail__seg {
  width: 3px;
  height: 30px;
  border-radius: 3px;
  background: rgba(11,16,48,0.16); /* тёмно-альфа трек — виден на белом */
  overflow: hidden;
  position: relative;
  cursor: none;
  transition: height 0.4s var(--ease-out);
}
.rail__seg::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: var(--fill, 0%);
  background: var(--blue);
  transition: height 0.2s linear;
}
.rail__seg.is-active { height: 46px; }
.rail__seg.is-active::after { box-shadow: 0 0 10px var(--blue-glow); }
.rail__idx {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  color: var(--smoke-dim);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

/* ============================================================
   RIGHT TIKTOK-UI (декор)
   ============================================================ */
.tiktok {
  position: fixed;
  right: 16px;
  bottom: 118px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.tt-avatar {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid #fff; /* белое кольцо вокруг синего аватара — видно на белом за счёт синей заливки */
  background: var(--blue);
  color: var(--on-blue);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 6px 18px -8px var(--blue-glow), 0 0 0 1px rgba(11,16,48,0.06);
  padding: 0;
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.tt-avatar:hover { transform: scale(1.06); }
.tt-avatar__plus {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%) scale(1);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-blue);
  display: grid; place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff; /* белая обводка «+», чтобы читался поверх фото */
  opacity: 1;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
/* Кольцо-пульс — играет один раз в момент «подписки» */
.tt-avatar__ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  opacity: 0;
  pointer-events: none;
}
/* Клик по аватарке = «подписка»: плюсик меняется на галочку (текст меняет JS),
   значок пружинит, аватарка подпрыгивает, кольцо расходится пульсом */
.tt-avatar.is-followed { animation: followPop 0.4s var(--ease-out); }
.tt-avatar.is-followed .tt-avatar__plus { animation: checkPop 0.35s var(--ease-out); }
.tt-avatar.is-followed .tt-avatar__ring { animation: followRing 0.6s var(--ease-out); }
@keyframes followPop { 0%{ transform: scale(1); } 45%{ transform: scale(1.16); } 100%{ transform: scale(1); } }
@keyframes followRing { 0%{ opacity: 0.9; transform: scale(1); } 100%{ opacity: 0; transform: scale(1.65); } }
@keyframes checkPop { 0%{ transform: translateX(-50%) scale(0.4); } 55%{ transform: translateX(-50%) scale(1.25); } 100%{ transform: translateX(-50%) scale(1); } }
.tt-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.tt-action__ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  /* тёмно-сине-альфа фрост-кружок — виден на белом (был белый-альфа) */
  background: rgba(11,16,48,0.06);
  border: 1px solid rgba(11,16,48,0.10);
  backdrop-filter: blur(8px);
  color: var(--text);
  display: grid; place-items: center;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.tt-action__ico svg { width: 22px; height: 22px; }
.tt-action:hover .tt-action__ico { transform: scale(1.14); background: rgba(61,77,245,0.12); }
.tt-action.is-liked .tt-action__ico { background: var(--blue); border-color: transparent; }
.tt-action.is-liked .tt-action__ico svg { fill: var(--on-blue); stroke: var(--on-blue); }
.tt-action.is-liked .tt-action__ico { animation: pop 0.4s var(--ease-out); }
@keyframes pop { 0%{transform:scale(0.8);} 60%{transform:scale(1.25);} 100%{transform:scale(1);} }
.tt-action__num { font-size: 0.72rem; font-weight: 700; color: var(--text); text-shadow: 0 1px 3px rgba(255,255,255,0.6); }

/* Крутящаяся пластинка музыки */
.tt-disc {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), #8f9bff, var(--blue));
  display: grid; place-items: center;
  animation: spin 4.5s linear infinite;
  border: 3px solid #fff; /* белый ободок винила на светлом фоне */
  box-shadow: 0 4px 14px -6px var(--blue-glow), 0 0 0 1px rgba(11,16,48,0.08);
}
.tt-disc__hole { width: 13px; height: 13px; border-radius: 50%; background: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   KINETIC KARAOKE SUBTITLES
   ============================================================ */
.karaoke {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-size: clamp(1.05rem, 2.6vw, 2rem);
  max-width: 20ch;
  /* Плашка автосабов — СВЕТЛОЕ стекло на белом дизайне (была тёмная).
     Тёмные слова на белой полупрозрачной подложке читаются над любым кадром. */
  padding: 11px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 16, 48, 0.08);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 12px 34px -14px var(--shadow-blue);
}
.karaoke--left  { left: var(--reel-pad); bottom: 100px; text-align: left; }
.karaoke--right { right: calc(var(--reel-pad) + 74px); bottom: 118px; text-align: right; max-width: 16ch; }
/* Автосабы-караоке убраны совсем: полупрозрачная плашка наезжала на телефон,
   стек кейсов и do-карточки на десятке рилов и мешала читать контент. */
.karaoke { display: none !important; }
/* Медиа/аудио на странице больше нет → тумблер звука убираем (мёртвый контрол). */
.sound { display: none !important; }
/* На узких экранах правые сабы налезли бы на текст шага → прячем,
   левые оставляем но опускаем ниже панели TikTok. */
@media (max-width: 860px) {
  .karaoke--right { display: none; }
  .karaoke--left { bottom: 108px; font-size: clamp(1rem, 4.5vw, 1.5rem); max-width: 15ch; }
}
.karaoke .kw {
  /* Тёмные слова на светлой стеклянной плашке (были белые на тёмной).
     Мягкая светлая обводка тенью — не тонут ни над каким кадром. */
  color: rgba(11, 16, 48, 0.72);
  transition: color 0.16s ease, text-shadow 0.16s ease, transform 0.16s var(--ease-out);
  display: inline-block;
  /* .kw — inline-block, поэтому хвостовой пробел в тексте схлопывается и
     слова слипались ("ПОЛНЫЙЦИКЛ"). Явный правый отступ гарантирует зазор. */
  margin-right: 0.3em;
  padding: 0 1px;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.7),
    0 2px 10px rgba(255,255,255,0.5);
}
.karaoke .kw.on {
  color: var(--blue);
  transform: translateY(-1px);
  text-shadow:
    0 0 8px rgba(255,255,255,0.9),
    0 0 20px rgba(61, 77, 245, 0.35);
}
.karaoke .kw.on.blue {
  color: var(--on-blue);
  background: var(--blue);
  border-radius: 5px;
  padding: 0 4px;
  text-shadow: 0 1px 3px rgba(11,16,48,0.35);
}

/* ============================================================
   COUNT-UP big number
   ============================================================ */
.bignum {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.bignum--hero { font-size: clamp(3.4rem, 15vw, 13rem); }
.bignum--case { font-size: clamp(2.8rem, 11vw, 8.5rem); }
.bignum .suffix { font-size: 0.42em; vertical-align: baseline; -webkit-text-stroke: 0; }

/* ============================================================
   REEL LAYOUTS (per-type)
   ============================================================ */
.reel__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* HERO */
#hero { align-items: stretch; }
.hero__wrap { justify-content: center; }
.hero__kicker { margin-bottom: 22px; }
.hero__h1 {
  margin-bottom: 8px;
  /* Светлая обводка тенью — тёмный H1 читается на светлом hero-видео,
     мягкий белый гало отделяет буквы от пёстрого кадра. */
  text-shadow: 0 1px 2px rgba(255,255,255,0.7), 0 6px 30px rgba(255,255,255,0.5);
  /* Собственный размер hero-H1 (не общий .mega--xl): более пологий slope,
     чтобы длинное «ПРОЛИСТАТЬ» помещалось в узкую колонку рила (справа
     зарезервировано место под TikTok-UI) на всех ширинах и не обрезалось. */
  font-size: clamp(2.15rem, 8.3vw, 8.5rem);
  letter-spacing: -0.035em; /* чуть плотнее — широкий Unbounded экономит ширину */
  line-height: 1.12;
}
/* .line клипует вертикально (маска reveal-слайда). Чтобы длинное слово не
   резалось по горизонтали, разрешаем горизонтальный перенос как страховку. */
.hero__h1 .line { display: block; overflow: hidden; }
.hero__h1 .line > span { display: inline-block; will-change: transform; max-width: 100%; overflow-wrap: break-word; }
.hero__h1 .txt-lime { text-shadow: 0 1px 2px rgba(255,255,255,0.7), 0 0 26px rgba(61,77,245,0.25); }
.hero__sub {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  color: var(--smoke);
  max-width: 34ch;
  margin: 26px 0 34px;
  font-weight: 500;
  line-height: 1.4;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
/* Стикеры-теги — только мобильная карточка hero (см. медиа-запрос ниже) */
.hero__tags { display: none; }
.hero__scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--smoke);
  z-index: 5;
}
.hero__mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--smoke);
  border-radius: 12px;
  position: relative;
}
.hero__mouse::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 6px;
  border-radius: 3px;
  background: var(--blue);
  animation: mousewheel 1.6s var(--ease-out) infinite;
}
@keyframes mousewheel { 0%{opacity:1;transform:translate(-50%,0);} 70%{opacity:0;transform:translate(-50%,12px);} 100%{opacity:0;} }

/* Floating hero stat chips */
.chip-float {
  position: absolute;
  z-index: 3;
  padding: 12px 18px;
  border-radius: 16px;
  /* белое стекло-карточка на светлом hero (было прозрачно-белое на тёмном) */
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(11,16,48,0.08);
  box-shadow: 0 14px 34px -16px var(--shadow-blue);
  backdrop-filter: blur(10px);
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 8px;
  will-change: transform;
}
.chip-float .n { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--blue); font-variant-numeric: tabular-nums; }
.chip-float .t { font-size: 0.75rem; color: var(--smoke); white-space: nowrap; }
/* Фиксированная ширина под финальный текст — плашки абсолютно позиционированы
   (не флекс-айтемы), поэтому width держится жёстко: пока считаются цифры,
   контент внутри не меняет размер самой плашки, и она не «едет». */
.chip-a { top: 18%; right: 8%; width: 262px; }
.chip-b { top: 40%; right: 20%; width: 252px; }
.chip-c { bottom: 10%; right: 6%; width: 210px; }
@media (max-width: 860px){ .chip-float{ display:none; } }
.hero__stats { display: contents; }

/* SECTION label (что делаем / как работаем) */
.reel-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: auto;
  padding-top: 40px;
}
.section-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--smoke-dim);
  letter-spacing: 0.1em;
}

/* --- WHY IT WORKS (video) --- */
.why-inner { justify-content: center; gap: 28px; }
/* Заголовок этого блока меньше обычного .mega--l (7rem) — иначе на
   типичных ноутбучных экранах он вместе с видео не помещался в 100vh
   и плеер обрезался снизу через overflow:hidden секции. */
.why-inner .mega--l { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.video-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px -24px var(--shadow-blue);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- WHAT WE DO grid --- */
.dowrap { justify-content: center; gap: 28px; }
.do-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.do-card {
  padding: 26px 22px;
  border-radius: 22px;
  border: 1px solid rgba(11,16,48,0.09);
  background: var(--paper); /* белая карточка на светлой секции */
  box-shadow: 0 14px 34px -20px var(--shadow-blue);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s var(--ease-out), background 0.4s, border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
  overflow: hidden;
  position: relative;
}
.do-card:hover { transform: translateY(-8px); background: var(--paper); border-color: rgba(61,77,245,0.45); box-shadow: 0 22px 46px -22px var(--blue-glow); }
.do-card__ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue);
  color: var(--on-blue);
  display: grid; place-items: center;
  margin-bottom: 20px;
}
/* чётные иконки — светло-синяя плитка с синим значком (вместо лайма) */
.do-card:nth-child(even) .do-card__ico { background: var(--paper-3); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(61,77,245,0.25); }
.do-card__ico svg { width: 26px; height: 26px; }
.do-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; margin-bottom: 8px; color: var(--text); }
.do-card p { font-size: 0.88rem; color: var(--smoke); line-height: 1.45; }
.do-card__ghost {
  position: absolute;
  right: -10px; bottom: -30px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 7rem;
  color: rgba(61,77,245,0.06); /* призрачная цифра — еле-синяя на белом */
  line-height: 1;
  pointer-events: none;
}

/* --- STEPS · «Как работаем» — 6 шагов на одном экране (без телефонов) ---
   3×2 сетка блоков с крупным outline-номером. Секция растёт естественно,
   если 6 блоков не влезают в 100vh (читаемость важнее одного экрана). */
.steps-reel { height: auto; min-height: 100vh; min-height: 100dvh; }
.steps-reel .reel__inner { justify-content: center; }
.steps-inner { gap: clamp(18px, 3.2vh, 40px); padding: 18px 0; }
.steps-head { display: flex; flex-direction: column; gap: 14px; }
.steps-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.steps-title em { font-style: normal; color: var(--blue); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
}
.step-block {
  position: relative;
  padding: clamp(18px, 2vw, 28px) clamp(16px, 1.8vw, 26px);
  border-radius: 20px;
  border: 1px solid rgba(11,16,48,0.09);
  background: var(--paper);           /* белая карточка на светлой секции */
  box-shadow: 0 14px 34px -20px var(--shadow-blue);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.4s var(--ease-out), background 0.4s, border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
}
.step-block:hover {
  transform: translateY(-8px);
  border-color: rgba(61,77,245,0.45);
  box-shadow: 0 22px 46px -22px var(--blue-glow);
}
.step-block__num {
  font-family: 'Space Grotesk', sans-serif;   /* у Unbounded контуры цифр 1/4/6 наложены друг на друга — обводка ломалась */
  font-weight: 700;
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 2px var(--blue);   /* outline-номер в бренд-синем */
  margin-bottom: 2px;
}
.step-block:nth-child(even) .step-block__num { -webkit-text-stroke: 2px var(--blue-deep); }
.step-block h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}
.step-block p {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  color: var(--smoke);
  line-height: 1.45;
}

/* --- CASES --- */
.case-reel .reel__inner { justify-content: center; }
.case-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
  width: 100%;
}
.case-info { display: flex; flex-direction: column; gap: 20px; }
.case-client {
  display: flex; align-items: center; gap: 14px;
}
.case-logo {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--on-blue); /* буква логотипа белая на синем квадрате */
  background: var(--blue);
  box-shadow: 0 8px 20px -10px var(--blue-glow);
}
.case-logo__icon { width: 26px; height: 26px; }
.case-client__meta .n { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; color: var(--text); }
.case-client__meta .c { font-size: 0.85rem; color: var(--smoke); }
.case-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem,3.5vw,2.6rem); text-transform: uppercase; line-height: 0.98; }
.case-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 4px;
}
.metric {
  padding: 18px;
  border-radius: 18px;
  background: var(--paper); /* белая карточка-метрика */
  border: 1px solid rgba(11,16,48,0.09);
  box-shadow: 0 12px 30px -20px var(--shadow-blue);
}
.metric .m-n { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.metric .m-l { font-size: 0.78rem; color: var(--smoke); margin-top: 6px; line-height: 1.3; }
/* Синяя инверсная метрика — ключевая цифра кейса белым на электрик-синем */
.metric--blue .m-n { color: var(--on-blue); }
.metric--blue { background: var(--blue); border-color: transparent; box-shadow: 0 14px 32px -14px var(--blue-glow); }
.metric--blue .m-l { color: rgba(255,255,255,0.82); }

.case-tops { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.case-top {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(11,16,48,0.14);
  background: var(--paper);
  font-size: 0.8rem;
  color: var(--smoke);
}
.case-top b { font-family: var(--font-display); color: var(--text); font-size: 0.95rem; }

/* Вертикальный 9:16 стек кейса */
.reel-stack {
  position: relative;
  height: min(72vh, 560px);
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.reel-card {
  position: absolute;
  width: min(240px, 62vw);
  aspect-ratio: 9/16;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(11,16,48,0.10);
  /* мягкая сине-серая тень вместо жёстко-чёрной */
  box-shadow: 0 34px 70px -28px rgba(23,33,92,0.5);
  background: var(--ink-soft);
  will-change: transform;
}
.reel-card img, .reel-card video { width: 100%; height: 100%; object-fit: cover; }
.reel-card__grad { position: absolute; inset: 0; mix-blend-mode: soft-light; opacity: 0.5; }
/* Нижний скрим карточки-рила оставляем тёмным: подпись лежит на ФОТО,
   как настоящие сабы на видео → белый текст читается. */
.reel-card__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(6,9,26,0.82) 100%); }
.reel-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 11px;
  border-radius: 100px;
  /* бренд-синий чип со счётчиком просмотров, белый текст — акцент на фото */
  background: var(--blue);
  backdrop-filter: blur(6px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--on-blue);
  display: flex; align-items: center; gap: 5px;
  box-shadow: 0 6px 16px -8px var(--blue-glow);
}
.reel-card__cap { position: absolute; bottom: 14px; left: 14px; right: 14px; }
/* Подписи на фото-карточке — светлые (лежат на тёмном нижнем скриме). */
.reel-card__cap .big { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 0.9; color: #fff; }
.reel-card__cap .big.txt-lime { color: #dfe4ff; }
.reel-card__cap .small { font-size: 0.72rem; color: rgba(255,255,255,0.78); margin-top: 4px; }
/* fan-out позиции */
.reel-card.c1 { transform: translateX(-46%) rotate(-9deg) translateY(18px); z-index: 1; }
.reel-card.c2 { transform: translateX(0) rotate(0deg); z-index: 3; }
.reel-card.c3 { transform: translateX(46%) rotate(9deg) translateY(18px); z-index: 2; }
/* Правая карточка сдвинута далеко вправо — бейдж с просмотрами уходит за край, переносим его на правый край карточки */
.reel-card.c3 .reel-card__badge { left: auto; right: 12px; }

/* Кейс «Синергия» — карточки под фото-скриншоты, не под длинное видео 9:16 */
#case2 .reel-card { aspect-ratio: 4/5; }
/* В веб-версии скриншоты кейса «Синергия» крупнее остальных кейсов */
@media (min-width: 861px) {
  #case2 .reel-card { width: 300px; }
}

/* Кейс YudaevSchool — фото шапки профиля Instagram, только для веб-версии (на мобиле скрыто) */
#cases .ig-header { display: none; }
@media (min-width: 861px) {
  #cases .ig-header {
    display: block;
    position: absolute;
    right: -12%;
    top: 62%;
    bottom: auto;
    width: 54%;
    margin: 0;
    transform: rotate(-4deg);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(11,16,48,0.10);
    box-shadow: 0 20px 46px -22px rgba(23,33,92,0.45);
    z-index: 5;
  }
  #cases .ig-header img { display: block; width: 100%; height: auto; }
}

/* --- BACKSTAGE · бэкстейджи со съёмок --- */
#backstage .reel__inner { justify-content: center; }
.bts-title { font-size: clamp(1.7rem, 4.4vw, 3.4rem); }
.bts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: min(880px, 92vw);
  margin: 30px auto 48px;
}
@media (min-width: 901px) {
  .bts-grid { gap: 20px; max-width: min(1180px, 94vw); }
}
.bts-item {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(11,16,48,0.10);
  box-shadow: 0 24px 60px -28px var(--shadow-blue);
}
.bts-item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bts-item--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef1ff, #f8f9ff);
  border: 1px dashed rgba(61,77,245,0.35);
  box-shadow: none;
}
.bts-item--empty span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--blue);
  opacity: 0.55;
}
@media (max-width: 900px) {
  .bts-grid { grid-template-columns: repeat(2, 1fr); max-width: 460px; }
}

/* --- OFFER / WHY US --- */
.offer-reel .reel__inner { justify-content: center; }
.offer-head { text-align: left; margin-bottom: 34px; }
.offer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 14px;
}
.offer-cell {
  border-radius: 22px;
  border: 1px solid rgba(11,16,48,0.09);
  background: var(--paper); /* белая карточка */
  box-shadow: 0 14px 34px -22px var(--shadow-blue);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
}
.offer-cell:hover { transform: translateY(-6px); border-color: rgba(61,77,245,0.4); box-shadow: 0 22px 46px -24px var(--blue-glow); }
.offer-cell .oc-n { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem,4vw,3.2rem); line-height: 0.9; color: var(--blue); font-variant-numeric: tabular-nums; }
.offer-cell .oc-t { font-size: 0.9rem; color: var(--smoke); margin-top: 10px; line-height: 1.4; }
.offer-cell .oc-h { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; color: var(--text); }
.oc-span-2 { grid-column: span 2; }
.oc-span-3 { grid-column: span 3; }
/* Синяя инверсная плитка — белым на электрик-синем */
.oc-blue { background: var(--blue); border-color: transparent; box-shadow: 0 16px 36px -18px var(--blue-glow); }
.oc-blue .oc-n, .oc-blue .oc-h { color: var(--on-blue); }
.oc-blue .oc-t { color: rgba(255,255,255,0.82); }
/* Бывшая лаймовая плитка → глубокий синий (тональное разнообразие без лайма) */
.oc-lime { background: var(--blue-deep); border-color: transparent; color: var(--on-blue); box-shadow: 0 16px 36px -18px rgba(42,52,200,0.4); }
.oc-lime .oc-n, .oc-lime .oc-h { color: var(--on-blue); }
.oc-lime .oc-t { color: rgba(255,255,255,0.82); }

/* --- FINAL CTA (инверсная СИНЯЯ секция → весь текст белый) --- */
#final { align-items: center; text-align: center; }
.final__wrap { justify-content: center; align-items: center; text-align: center; width: 100%; }
.final__big { margin: 14px 0 26px; color: #fff; }
.final__sub { font-size: clamp(1rem, 1.8vw, 1.3rem); color: rgba(255,255,255,0.86); max-width: 40ch; margin: 0 auto 34px; line-height: 1.5; }
.final__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.final__tg {
  margin-top: 30px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.final__tg a { color: #fff; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.5); }

/* Инверсные оверрайды внутри синего #final: eyebrow, акценты и кнопки → белые */
#final .eyebrow { color: #fff; }
#final .eyebrow::before { background: #fff; }
#final .final__big .txt-lime { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,0.18); }
/* Главная CTA на синем фоне становится БЕЛОЙ с синим текстом (инверсия) */
#final .btn--lime { background: #fff; color: var(--blue); box-shadow: 0 12px 30px -10px rgba(0,0,0,0.28); }
#final .btn--lime:hover { background: #eef1ff; color: var(--blue-deep); box-shadow: 0 18px 44px -12px rgba(0,0,0,0.34); }
#final .btn--lime::after { background: linear-gradient(100deg, transparent, rgba(61,77,245,0.18), transparent); }
/* Призрачная кнопка на синем → белый контур + белый текст */
#final .btn--ghost { border-color: rgba(255,255,255,0.6); color: #fff; background: rgba(255,255,255,0.06); }
#final .btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.14); }

/* Footer mini */
/* Футер лежит в синем #final → светлый текст */
.foot {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 var(--reel-pad);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  z-index: 5;
}
.foot__row { display: flex; justify-content: space-between; align-items: center; }
.foot__socials { display: flex; gap: 16px; }
.foot__socials a { transition: color 0.3s; }
.foot__legal { font-size: 0.58rem; color: rgba(255,255,255,0.4); text-align: center; }
.foot__socials a:hover { color: #fff; }

/* ============================================================
   MARQUEE (бегущая строка цифр) — фиксированная внизу hero
   ============================================================ */
.marquee {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 4;
  overflow: hidden;
  /* ИНВЕРСНАЯ синяя полоса цифр — сплошной электрик-синий, белый текст.
     Фирменный акцент внизу hero (была тёмная стеклянная строка). */
  border-top: 1.5px solid rgba(255,255,255,0.22);
  border-bottom: none;
  background: linear-gradient(90deg, #2a34c8, #3d4df5 55%, #3646E0);
  box-shadow: 0 -10px 30px -12px var(--blue-glow);
  padding: 14px 0;
  display: none; /* включаем только на определённых рилах через модификатор */
}
.marquee--on { display: block; }

/* Низ hero: маркиза внизу → scroll-индикатор и караоке поднимаем над ней,
   индикатор уводим правее центра, чтобы не спорить с караоке слева. */
#hero .hero__scroll { bottom: 74px; left: auto; right: 8%; transform: none; }
#hero .karaoke--left { bottom: 74px; }
@media (max-width: 860px) {
  #hero .hero__scroll { display: none; } /* на мобиле места нет — прячем */
  /* На мобиле hero-караоке дублирует H1 и грузит низ → скрываем.
     Смысл "невозможно пролистать" уже несут H1 и eyebrow. */
  #hero .karaoke { display: none; }
}
.marquee__track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: marq 22s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: #fff; /* белый текст на синей полосе */
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.marquee__track b { color: rgba(255,255,255,0.55); } /* точки-разделители — приглушённо-белые */
.marquee__track em { color: #C8D0FF; font-style: normal; } /* акцент ×6 — светлый перивинкл */
@keyframes marq { to { transform: translateX(-50%); } }

/* Логотипы клиентов маркиза */
.logos-marq {
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logos-marq__track {
  display: flex;
  gap: 54px;
  animation: marq 28s linear infinite;
  align-items: center;
  white-space: nowrap;
}
.logos-marq__track .lg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: rgba(11,16,48,0.30); /* приглушённо-тёмные лого-имена на светлом */
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

/* ============================================================
   REVEAL animation utility (JS-driven)
   ============================================================ */
.rv {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reel.in-view .rv { opacity: 1; transform: none; }
/* Страховка: когда JS помечает рил .rv-done (после времени reveal),
   контент гарантированно виден без опоры на opacity-transition
   (в некоторых вебвью/при заморозке композитора transition залипает). */
.reel.rv-done .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
.reel.in-view .rv-1 { transition-delay: 0.05s; }
.reel.in-view .rv-2 { transition-delay: 0.14s; }
.reel.in-view .rv-3 { transition-delay: 0.23s; }
.reel.in-view .rv-4 { transition-delay: 0.32s; }
.reel.in-view .rv-5 { transition-delay: 0.41s; }
.reel.in-view .rv-6 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .do-grid { grid-template-columns: repeat(2, 1fr); }
  .offer-grid { grid-template-columns: repeat(4, 1fr); }
  .oc-span-3 { grid-column: span 2; }
}

@media (max-width: 860px) {
  .reel {
    padding-right: var(--reel-pad);
    padding-bottom: 96px;
  }
  .case-grid { grid-template-columns: 1fr; gap: 4px; }
  .reel-stack { height: 390px; order: -1; }
  .reel-card { width: 195px; }
  .case-metrics { grid-template-columns: repeat(2,1fr); }
  .tiktok { bottom: 88px; right: 10px; gap: 16px; transform: scale(0.86); transform-origin: bottom right; }
  .rail { left: 10px; gap: 6px; }
  .rail__seg { height: 22px; }
  .rail__seg.is-active { height: 34px; }
  .rail__idx { display: none; }
  .topbar { padding: 16px var(--reel-pad); }
  .top-cta { display: none; }
  .burger { display: inline-flex; }
  .hero__sub { max-width: none; }
  .foot { font-size: 0.62rem; }
  .foot__socials { gap: 10px; }
}

@media (max-width: 620px) {
  .do-grid { grid-template-columns: 1fr; }
  .do-card { min-height: auto; }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .oc-span-2, .oc-span-3 { grid-column: span 2; }
  .case-metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 14px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .marquee__track span { font-size: 0.85rem; }
  .brand { font-size: 1.1rem; }
  /* H1 чуть мельче, чтобы длинное "ЗАПОМИНАЮТ" не резалось за краем.
     Целимся в .hero__h1 (совпадает с новым десктоп-правилом), чуть плотнее. */
  #hero .hero__h1, #hero .mega--xl { font-size: clamp(1.6rem, 7.6vw, 2.7rem); letter-spacing: -0.045em; line-height: 1.28; }
}

/* ---------- Touch-устройства: кастомный курсор бесполезен и мешает ---------- */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}

/* ---------- ПЛАНШЕТ/ТЕЛЕФОН ≤768: убираем декоративный фикс-хром, ----------
   релаксируем скролл-снап и разрешаем секциям расти, чтобы контент не
   обрезался и снап не "запирал" на высоких экранах (шаги в один столбец). */
@media (max-width: 768px) {
  /* Декор, налезающий на контент на узком экране, — прочь */
  .cursor { display: none; }
  .rail { display: none; }
  .tiktok { display: none; }

  /* Первый экран (hero) на мобиле: раньше всё лепилось одной кучкой по
     центру, а сверху/снизу оставалась пустота. Теперь заголовок держится
     у верха, а кнопки + статистика прижаты к низу экрана — контент
     растянут на весь экран, а не собран в комок посередине. */
  .hero__wrap { justify-content: flex-start; padding-top: 6vh; }
  .hero__actions { margin-top: auto; padding-top: 32px; }

  /* Плавающие карточки статистики → компактная строка под кнопками */
  .hero__stats { display: flex; gap: 8px; width: 100%; margin-top: 22px; }
  .chip-float {
    display: flex;
    position: static;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px clamp(8px, 2.6vw, 12px);
  }
  /* Резиновый размер цифры: подстраивается под ширину экрана вместо переноса
     "₽"/суффикса на вторую строку на узких телефонах. Суффикс ("млн ₽")
     мельче самой цифры — чтобы вся строка гарантированно помещалась
     внутри плашки с отступами, не вылезая за края. */
  .chip-float .n { font-size: clamp(0.8rem, 4.4vw, 1.05rem); white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
  .chip-float .n .suffix { font-size: 0.72em; }
  .chip-float .t { font-size: 0.64rem; line-height: 1.25; }
  /* Нижние плашки-статистику показываем сразу на своём месте (только мягкое
     проявление, без «выезда» снизу). Иначе на загрузке, пока бегут цифры,
     плашки стоят ниже и подпрыгивают вверх к концу счёта. */
  #hero .chip-float { transform: none; }

  /* На мобильных снап убран совсем — обычный плавный скролл без "переключения" секций */
  .feed { scroll-snap-type: none; }
  .reel {
    scroll-snap-stop: normal;
    height: auto;
    min-height: 100dvh;
    padding-right: var(--reel-pad); /* место под TikTok-UI больше не нужно */
    padding-bottom: 84px;
  }
  /* Внутренние секции обнимают контент, а не занимают целый экран каждая:
     раньше между блоками зиял пустой экран (особенно перед видео «почему
     наш контент работает»). Hero (#hero) не трогаем — он остаётся во весь экран. */
  .reel:not(#hero) {
    min-height: auto;
    padding-top: 58px;
    padding-bottom: 58px;
  }
  /* Стык блоков «Как работаем» → «Почему наш контент работает»: убираем
     двойной воздух (низ #steps + верх #why). Пишем через .reel#id, чтобы
     специфичность перебила правило .reel:not(#hero) выше. */
  .reel#steps { padding-bottom: 44px; }
  .reel#why { padding-top: 10px; }
  /* Последний блок (контакт/финал) снова во весь экран */
  .reel#final { min-height: 100dvh; }

  /* «Как мы работаем»: на мобиле цифры залитые, без контурной обводки */
  #steps .step-block__num { color: var(--blue); -webkit-text-stroke: 0; }
  #steps .step-block:nth-child(even) .step-block__num { color: var(--blue-deep); -webkit-text-stroke: 0; }

  /* Мультиколоночные сетки → один столбец */
  .do-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; gap: 4px; }
  .case-metrics { grid-template-columns: repeat(2, 1fr); }
  /* Резиновая цифра в плашках кейсов (например «45 млн ₽» у YudaevSchool):
     суффикс мельче цифры, строка не переносится и не вылезает за карточку. */
  .metric .m-n { font-size: clamp(1.05rem, 5.2vw, 1.7rem); white-space: nowrap; overflow: hidden; max-width: 100%; }
  .metric .m-n .suffix { font-size: 0.7em; }
  .reel-stack { height: 390px; order: -1; }
  .reel-card { width: 195px; }

  .steps-inner { padding: 10px 0; }
  .do-card { min-height: auto; }
  .hero__sub { max-width: none; }
}

/* ---------- Кейс «Синергия» ≤860: скриншоты крупнее и ближе к тексту (только мобилка) ---------- */
@media (max-width: 860px) {
  #case2 .case-grid { gap: 0px; }
  #case2 .reel-stack { height: 350px; margin-bottom: -18px; }
  #case2 .reel-card { width: 200px; }
}

/* ---------- HERO ≤768: креативная карточка вместо плоского фона ----------
   Раньше на мобиле hero был просто светлым фоном на весь экран. Теперь
   контент собран в закруглённую карточку с фирменным синим градиентом
   (тот же приём, что и в .reelfill) — контраст с белыми секциями ниже.
   Все правила через #hero, чтобы не задеть остальные секции/десктоп. */
@media (max-width: 768px) {
  #hero .hero__wrap {
    justify-content: flex-start;
    margin-top: 1.5vh;
    padding: 30px 24px 26px;
    border-radius: 30px;
    background:
      radial-gradient(60% 42% at 30% 18%, rgba(255,255,255,0.22), transparent 60%),
      radial-gradient(70% 50% at 82% 90%, rgba(255,255,255,0.10), transparent 65%),
      linear-gradient(150deg, #3d4df5 0%, #2a34c8 62%, #202B9E 100%);
    box-shadow: 0 30px 70px -28px rgba(23,33,92,0.55);
  }

  /* Наклонные плашки-стикеры над заголовком — тот самый «креатив» */
  #hero .hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 16px;
  }
  #hero .hero__tags span {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blue-deep);
    background: #fff;
    padding: 6px 14px;
    border-radius: 100px;
    box-shadow: 0 6px 14px -6px rgba(11,16,48,0.35);
  }
  #hero .hero__tags span:nth-child(1) { transform: rotate(-4deg); }
  #hero .hero__tags span:nth-child(2) { transform: rotate(3deg); }
  #hero .hero__tags span:nth-child(3) { transform: rotate(-2deg); }

  #hero .hero__kicker {
    color: #fff;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 7px 14px 7px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
    /* Резиновый размер + буквенный интервал, чтобы «Агентство коротких
       видео» гарантированно оставалось в одну строку на любых телефонах. */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    font-size: clamp(0.56rem, 2.9vw, 0.72rem);
    letter-spacing: 0.14em;
  }
  #hero .hero__kicker::before { background: #fff; animation: none; box-shadow: none; }
  /* «· онлайн» в шапке прячем на мобиле — оставляем короткое «Агентство коротких видео» */
  #hero .hero__kicker-online { display: none; }

  #hero .hero__h1 { color: #fff; text-shadow: none; }
  #hero .hero__h1 .txt-lime {
    color: #fff;
    text-shadow: none;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-color: rgba(255,255,255,0.45);
    text-underline-offset: 4px;
  }

  #hero .hero__sub { color: rgba(255,255,255,0.86); }

  /* Кнопки — в столбик на всю ширину, каждая в одну строку */
  #hero .hero__actions { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; }
  #hero .hero__actions .btn { flex: none; width: 100%; white-space: nowrap; }
  #hero .btn--lime { background: #fff; color: var(--blue-deep); box-shadow: 0 12px 28px -10px rgba(11,16,48,0.4); }
  #hero .btn--ghost { border-color: rgba(255,255,255,0.5); color: #fff; background: rgba(255,255,255,0.08); }

  #hero .chip-float { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22); }
  #hero .chip-float .n { color: #fff; }
  #hero .chip-float .t { color: rgba(255,255,255,0.72); }
}

/* ---------- ТЕЛЕФОН ≤480: плотнее паддинги и типографика ---------- */
@media (max-width: 480px) {
  :root { --reel-pad: 18px; }
  .reel { padding-top: 82px; padding-bottom: 78px; }
  .topbar { padding: 14px var(--reel-pad); }

  .steps-inner { padding: 6px 0; }
  .steps-title { font-size: clamp(1.5rem, 8vw, 2.2rem); }
  .step-block { padding: 16px; gap: 8px; }
  .step-block__num { font-size: 2.1rem; }

  .do-card { padding: 20px 18px; }
  .do-card h3 { font-size: 1.05rem; }
  .case-metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 12px; }
  .reel-card { width: 172px; }
  #case2 .reel-card { width: 176px; }

  #hero .hero__h1, #hero .mega--xl { font-size: clamp(1.4rem, 7.6vw, 2.4rem); line-height: 1.28; }
  .hero__sub { font-size: 1rem; margin: 20px 0 26px; }
  .hero__stats { gap: 6px; margin-top: 18px; }
  .chip-float { padding: 10px clamp(6px, 2.4vw, 10px); }
  .chip-float .n { font-size: clamp(0.72rem, 4.8vw, 0.95rem); white-space: nowrap; }
  .chip-float .t { font-size: 0.6rem; }
  .final__big { font-size: clamp(2.4rem, 15vw, 4.4rem); }
  .btn { padding: 15px 24px; font-size: 0.92rem; }
}

/* Короткие по высоте экраны (лендскейп) — не даём контенту резаться */
@media (max-height: 620px) and (min-width: 861px) {
  .reel { padding-top: 70px; }
  .do-card { min-height: auto; padding: 18px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .feed { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  .marquee__track, .logos-marq__track { animation: none; }
  .reel__bg img, .reel__bg video { transform: scale(1.02); }
  .tt-disc { animation: none; }
  .sound__eq span { animation: none; height: 60%; }
}
