/* ============================================================
   CONTRABAS — Redesign (dark / premium Creative Media Company)
   Автономна тема. Повністю перекриває старий вигляд.
   Референс: темний мінімалізм, багато повітря, червоний акцент.
   ============================================================ */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.cx {
  margin: 0;
  background: #0a0a0a;
  color: #f2f2f2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.cx.no-scroll { overflow: hidden; }

/* ---------- Loading-гейт (лише перший візит, поки немає кешу) ---------- */
.cx-gate {
  position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: #0a0a0a; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s;
}
.cx-gate.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.cx-gate__pct {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: clamp(40px, 8vw, 64px);
  color: #fff; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.cx-gate__track {
  width: min(280px, 70vw); height: 4px; border-radius: 4px; background: #1c1c1c; overflow: hidden;
}
.cx-gate__bar {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, var(--red, #e0201f), var(--red-bright, #ff3b3b));
  transition: width .12s linear;
}
.cx-gate__msg {
  font-family: 'Archivo', sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; font-size: 13px; color: #8a8a8a; margin-top: 4px;
}
.cx-gate__sub { font-size: 12px; color: #6a6a6a; text-align: center; max-width: 320px; padding: 0 20px; }
.cx img { max-width: 100%; display: block; }
.cx a { color: inherit; text-decoration: none; }
.cx ul { list-style: none; margin: 0; padding: 0; }
.cx h1, .cx h2, .cx h3, .cx h4 { margin: 0; font-weight: 800; line-height: 1.05; }
.cx p { margin: 0 0 1em; }
.cx ::selection { background: #e0201f; color: #fff; }

/* Головні змінні */
.cx {
  --bg: #0a0a0a;
  --bg-soft: #101010;
  --bg-card: #131313;
  --line: #212121;
  --line-soft: #1a1a1a;
  --txt: #f2f2f2;
  --txt-dim: #8a8a8a;
  --txt-dim2: #6a6a6a;
  --red: #e0201f;
  --red-bright: #ff3b3b;
  --maxw: 1400px;
  /* Преміальна стрілка (тонкий лінійний трейл + чіткий наконечник) — як SVG-маска.
     Використовується скрізь замість «→»: у кнопках, «дивитись роботи», «всі кейси» тощо. */
  --cx-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h14'/%3E%3Cpath d='M12.5 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* Базовий «клас-стрілка» через маску — колір береться з currentColor. */
.cx-arw, .cx-btn__arw {
  display: inline-block; width: 20px; height: 14px; flex: 0 0 auto; font-size: 0; line-height: 0;
  background-color: currentColor;
  -webkit-mask: var(--cx-arrow) no-repeat center / contain;
          mask: var(--cx-arrow) no-repeat center / contain;
}

.cx-container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* Заголовок секції (маленький підпис) */
.cx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--red); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 22px;
}
.cx-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); display: inline-block; }

/* Заголовки-плакати */
.cx-display {
  font-family: 'Archivo', 'Inter', sans-serif;
  font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 0.92;
}

/* Reveal-анімація (керує JS-ом додаючи .is-in) */
.cx-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1); }
.cx-reveal.is-in { opacity: 1; transform: none; }
.cx-reveal[data-delay="1"] { transition-delay: .08s; }
.cx-reveal[data-delay="2"] { transition-delay: .16s; }
.cx-reveal[data-delay="3"] { transition-delay: .24s; }
.cx-reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .cx-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HEADER
   ============================================================ */
.cx-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease, padding .4s ease;
  border-bottom: 1px solid transparent;
}
.cx-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 32px;
  display: flex; align-items: center; justify-content: space-between;
  transition: padding .4s ease;
}
.cx-header.is-stuck {
  background: rgba(10,10,10,.82); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.cx-header.is-stuck .cx-header__inner { padding-top: 16px; padding-bottom: 16px; }

/* Поки хедер прозорий (над hero-фото) — під текстом додаємо тінь, щоб читалось.
   Коли хедер «прилипає» (має власний фон) — тінь прибираємо. */
.cx-header .cx-nav a,
.cx-header .cx-lang,
.cx-header .cx-header__right .cx-btn { text-shadow: 0 1px 10px rgba(0,0,0,.85), 0 1px 3px rgba(0,0,0,.7); transition: color .25s, text-shadow .4s ease; }
.cx-header.is-stuck .cx-nav a,
.cx-header.is-stuck .cx-lang,
.cx-header.is-stuck .cx-header__right .cx-btn { text-shadow: none; }

.cx-logo { display: inline-flex; align-items: center; white-space: nowrap; position: relative; }
.cx-logo::before {
  content: ""; position: absolute; inset: -16px -22px; z-index: -1; border-radius: 50%;
  background: rgba(0,0,0,.72); filter: blur(16px);
  opacity: 1; transition: opacity .4s ease;
}
.cx-header.is-stuck .cx-logo::before { opacity: 0; }
.cx-logo img { height: 64px; width: auto; display: block; transition: height .4s ease, filter .4s ease; filter: drop-shadow(0 2px 8px rgba(0,0,0,.7)); }
.cx-header.is-stuck .cx-logo img { height: 50px; filter: none; }

.cx-nav { display: flex; align-items: center; gap: 38px; position: relative; }
.cx-nav::before {
  content: ""; position: absolute; inset: -18px -26px; z-index: -1; border-radius: 50%;
  background: rgba(0,0,0,.68); filter: blur(18px);
  opacity: 1; transition: opacity .4s ease;
}
.cx-header.is-stuck .cx-nav::before { opacity: 0; }
.cx-nav a {
  position: relative; font-size: 13px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--txt-dim); transition: color .25s;
}
.cx-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--red); transition: width .3s ease;
}
.cx-nav a:hover, .cx-nav a.is-active { color: #fff; }
.cx-nav a:hover::after, .cx-nav a.is-active::after { width: 100%; }

.cx-header__right { display: flex; align-items: center; gap: 22px; }
.cx-header__right .cx-btn { position: relative; }
.cx-header__right .cx-btn::before {
  content: ""; position: absolute; inset: -14px -20px; z-index: -1; border-radius: 50%;
  background: rgba(0,0,0,.65); filter: blur(16px);
  opacity: 1; transition: opacity .4s ease;
}
.cx-header.is-stuck .cx-header__right .cx-btn::before { opacity: 0; }

/* Перемикач мов */
.cx-lang { display: flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 1px; position: relative; }
.cx-lang::before {
  content: ""; position: absolute; inset: -13px -20px; z-index: -1; border-radius: 50%;
  background: rgba(0,0,0,.92); filter: blur(13px);
  opacity: 1; transition: opacity .4s ease;
}
.cx-header.is-stuck .cx-lang::before { opacity: 0; }
.cx-lang a { color: var(--txt-dim2); padding: 4px 6px; transition: color .2s; text-transform: uppercase; }
.cx-lang a.is-active { color: #fff; }
.cx-lang a:hover { color: var(--red); }
.cx-lang span { color: #333; }

/* Кнопка */
.cx-btn {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: transparent; border: 1px solid #3a3a3a;
  padding: 15px 26px; border-radius: 2px; transition: border-color .3s, background .3s, color .3s, transform .15s;
}
.cx-btn:hover { border-color: var(--red); background: var(--red); }
.cx-btn:active { transform: translateY(1px); }
.cx-btn .cx-btn__arw { transition: transform .3s; }
.cx-btn:hover .cx-btn__arw { transform: translateX(4px); }
.cx-btn--solid { background: var(--red); border-color: var(--red); }
.cx-btn--solid:hover { background: var(--red-bright); border-color: var(--red-bright); }
.cx-btn--lg { padding: 19px 40px; font-size: 13px; }

/* Бургер */
.cx-burger { display: none; width: 30px; height: 22px; position: relative; background: none; border: 0; cursor: pointer; padding: 0; }
.cx-burger span { position: absolute; left: 0; height: 2px; width: 100%; background: #fff; transition: transform .35s, opacity .25s, top .35s; }
.cx-burger span:nth-child(1) { top: 0; }
.cx-burger span:nth-child(2) { top: 10px; }
.cx-burger span:nth-child(3) { top: 20px; }
.cx-burger.is-open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.cx-burger.is-open span:nth-child(2) { opacity: 0; }
.cx-burger.is-open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* Мобільне меню — панель-шухляда, що виїжджає СПРАВА (як модальне вікно).
   z-index нижчий за хедер (900) — щоб бургер лишався зверху й перетворювався на «×». */
.cx-mobile {
  position: fixed; inset: 0; z-index: 850; background: rgba(0,0,0,0);
  -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  visibility: hidden; opacity: 0; transition: opacity .35s ease, visibility .35s, background .35s, backdrop-filter .35s;
}
.cx-mobile.is-open { visibility: visible; opacity: 1; background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cx-mobile__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(84vw, 360px);
  background: linear-gradient(180deg, #151515 0%, #0c0c0c 100%); border-left: 1px solid #262626;
  box-shadow: -30px 0 90px rgba(0,0,0,.6);
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 96px 34px 44px;
  transform: translateX(100%); transition: transform .42s cubic-bezier(.16,.8,.24,1);
  overflow-y: auto;
}
.cx-mobile.is-open .cx-mobile__panel { transform: translateX(0); }
.cx-mobile__panel a { font-family: 'Archivo', sans-serif; font-size: clamp(24px, 6.4vw, 30px); font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--txt-dim); padding: 10px 0;
  transition: color .25s, transform .25s; }
.cx-mobile__panel a:hover, .cx-mobile__panel a:active { color: #fff; transform: translateX(6px); }
.cx-mobile__panel .cx-btn { margin-top: 22px; justify-content: center; width: 100%; }
.cx-mobile__lang { display: flex; gap: 18px; margin-top: 26px; }
.cx-mobile__lang a { font-size: 15px; letter-spacing: 2px; padding: 0; }

/* ============================================================
   HERO — вміщується у висоту екрана
   ============================================================ */
/* Висота hero НЕ прив'язана до vh/svh/dvh — ці одиниці по-різному (і не завжди
   стабільно) підтримуються вбудованими браузерами (напр. Telegram in-app),
   де власна «шторка» додатка теж згортається/розгортається при скролі й
   перераховує vh в реальному часі — через що фон hero візуально «стрибав»/
   масштабувався (в звичайному Safari/Chrome цього не було). Замість цього JS
   один раз на завантаженні фіксує реальну висоту екрана в --cx-vh (px), і
   більше НЕ перераховує її під час скролу — висота лишається сталою завжди,
   незалежно від браузера. 100vh — лише фолбек, поки JS ще не встиг спрацювати. */
.cx-hero { position: relative; height: 100vh; height: var(--cx-vh, 100vh); min-height: 600px; display: flex; align-items: center; overflow: hidden; padding: 110px 0 84px; }
.cx-hero__media { position: absolute; inset: 0; z-index: 0; }
.cx-hero__media video, .cx-hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* Затемнення hero вимкнено на прохання — тіні додаватимемо точково пізніше.
.cx-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,8,8,.86) 0%, rgba(8,8,8,.56) 44%, rgba(8,8,8,.22) 74%, rgba(8,8,8,.45) 100%),
    linear-gradient(0deg, rgba(8,8,8,.82) 0%, rgba(8,8,8,.18) 46%, rgba(8,8,8,.58) 100%);
}
.cx-hero__media::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.38) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
*/
.cx-hero__inner { position: relative; z-index: 2; width: 100%; height: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; display: flex; justify-content: flex-start; align-items: center; gap: 40px; }
.cx-hero__main { max-width: 660px; position: relative; }
/* Пляма затемнення за текстом hero — розмита овальна пляма для читабельності. */
.cx-hero__main::before {
  content: ""; position: absolute; z-index: -1; inset: -30px -60px -30px -60px; border-radius: 50%;
  background: rgba(0,0,0,.68); filter: blur(36px);
  pointer-events: none;
}
/* Додаткова, сильніша пляма затемнення саме під eyebrow «Ми створюємо увагу». */
.cx-hero .cx-eyebrow { position: relative; z-index: 0; }
.cx-hero .cx-eyebrow::after {
  content: ""; position: absolute; z-index: -1; inset: -12px -30px -12px -22px; border-radius: 50%;
  background: rgba(0,0,0,.75); filter: blur(16px); pointer-events: none;
}
.cx-hero__title { font-size: clamp(26px, 3.6vw, 52px); color: #fff; margin-bottom: 24px; }
.cx-hero__title .accent, .cx-section-title .accent { color: var(--red); }
.cx-hero__lead { font-size: clamp(13px, 1.1vw, 15px); color: rgba(228,228,228,.6); max-width: 480px; margin-bottom: 32px; line-height: 1.5; }
.cx-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* Список напрямків — в правому нижньому куті hero, з підкладкою для читабельності. */
.cx-hero__list { position: absolute; right: 0; bottom: 20px; padding: 6px 16px; margin: 0; }
.cx-hero__list::before {
  content: ""; position: absolute; inset: -26px -40px -26px -50px; z-index: -1; border-radius: 50%;
  background: rgba(4,4,4,.72); filter: blur(30px);
}
.cx-hero__list li { border-top: 1px solid rgba(255,255,255,.16); }
.cx-hero__list li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.cx-hero__list li a {
  display: flex; align-items: center; justify-content: flex-end; gap: 22px;
  padding: 12px 0; font-size: 12px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: #e2e2e2;
  transform: translateX(0); transition: color .25s, transform .3s ease;
}
.cx-hero__list li .num { color: var(--red); font-weight: 700; font-size: 12px; letter-spacing: 1px; min-width: 24px; text-align: right; }
.cx-hero__list li a:hover { color: #fff; transform: translateX(-10px); }

/* Скрол-індикатор */
.cx-hero__scroll { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--txt-dim); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.cx-hero__scroll .bar { width: 1px; height: 40px; background: linear-gradient(var(--red), transparent); animation: cxScroll 2s ease-in-out infinite; }
@keyframes cxScroll { 0%,100%{ transform: scaleY(.4); opacity:.4; transform-origin: top; } 50%{ transform: scaleY(1); opacity:1; transform-origin: top; } }

/* ============================================================
   SECTIONS generic
   ============================================================ */
.cx-section { padding: 120px 0; position: relative; }
.cx-section--tight { padding: 90px 0; }
.cx-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 60px; }
.cx-section-title { font-family: 'Archivo', sans-serif; font-weight: 900; text-transform: uppercase; font-size: clamp(20px, 1.8vw, 26px); color: #fff; letter-spacing: -0.01em; line-height: 1.1; }

/* ============================================================
   SERVICES
   ============================================================ */
.cx-services { border-top: 1px solid var(--line); }
/* Ліворуч — вступ (eyebrow + заголовок), праворуч — сітка карток, що адаптується
   під будь-яку кількість (auto-fill), тому додавання/видалення послуг не ламає ряд. */
.cx-services__grid { display: grid; grid-template-columns: 0.8fr 2.2fr; gap: 50px; align-items: start; }
.cx-services__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 40px 36px; }
.cx-service { position: relative; display: flex; flex-direction: column; }
.cx-service__ico {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 3px; color: var(--red); margin-bottom: 26px;
  transition: border-color .3s, background .3s, transform .3s;
}
.cx-service__ico svg { width: 24px; height: 24px; }
.cx-service__tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 12px; max-width: 100%; overflow-wrap: anywhere; }
.cx-service h3 { font-size: 20px; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 14px;
  max-width: 100%; overflow-wrap: anywhere; }
/* Опис: довгий текст (навіть без пробілів) переноситься і обрізається до 5 рядків,
   щоб картка не «розпливалась» по сусідніх блоках. */
.cx-service p { color: var(--txt-dim); font-size: 15px; line-height: 1.7; margin-bottom: 22px;
  max-width: 100%; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.cx-service__more { position: relative; display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #cfcfcf; transition: color .25s, gap .25s, transform .3s ease; margin-top: auto; padding-top: 20px; padding-bottom: 6px; transform: translateX(0); }
.cx-service__more::after {
  content: ""; display: inline-block; width: 17px; height: 12px; flex: 0 0 auto;
  background-color: var(--red);
  -webkit-mask: var(--cx-arrow) no-repeat center / contain;
          mask: var(--cx-arrow) no-repeat center / contain;
  transition: transform .25s;
}
.cx-service__more::before {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 16px;
  background: var(--red); transition: width .3s ease;
}
.cx-service__more:hover { color: #fff; transform: translateX(6px); }
.cx-service__more:hover::after { transform: translateX(5px); }
.cx-service__more:hover::before { width: 28px; }

/* ============================================================
   PORTFOLIO / SELECTED WORK
   ============================================================ */
.cx-work { border-top: 1px solid var(--line); }
.cx-work__nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-filter {
  background: none; border: 0; cursor: pointer; font-family: inherit; color: var(--txt-dim);
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 8px 14px; border-radius: 2px; position: relative; transition: color .25s;
}
.cx-filter::after { content:""; position:absolute; left:14px; right:14px; bottom:2px; height:2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.cx-filter:hover { color: #fff; }
.cx-filter.is-active { color: #fff; }
.cx-filter.is-active::after { transform: scaleX(1); }

.cx-viewall { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #cfcfcf; transition: color .25s, gap .25s; }
.cx-viewall::after {
  content: ""; display: inline-block; width: 17px; height: 12px; flex: 0 0 auto;
  background-color: var(--red);
  -webkit-mask: var(--cx-arrow) no-repeat center / contain;
          mask: var(--cx-arrow) no-repeat center / contain;
  transition: transform .25s;
}
.cx-viewall:hover { color:#fff; } .cx-viewall:hover::after { transform: translateX(5px); }

/* Сітка робіт */
.cx-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px 22px; }
.cx-tile { cursor: pointer; opacity: 0; transform: translateY(24px); animation: cxTileIn .6s cubic-bezier(.16,.8,.24,1) forwards; }
@keyframes cxTileIn { to { opacity: 1; transform: none; } }
.cx-tile__media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #000; border-radius: 3px; }
.cx-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.16,.8,.24,1), filter .5s; filter: grayscale(.25) brightness(.9); }
.cx-tile:hover .cx-tile__media img { transform: scale(1.06); filter: grayscale(0) brightness(1); }
.cx-tile__media::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 55%); opacity:.7; transition: opacity .4s; }
.cx-tile:hover .cx-tile__media::after { opacity: 1; }
.cx-tile__play {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.8); transition: opacity .35s, transform .35s, background .3s;
}
.cx-tile__play svg { width: 14px; height: 14px; fill: #fff; margin-left: 2px; }
.cx-tile:hover .cx-tile__play { opacity: 1; transform: scale(1); }
.cx-tile:hover .cx-tile__play { background: var(--red); }
.cx-tile__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 2px 0; }
.cx-tile__name { font-size: 16px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .4px; line-height: 1.2; }
.cx-tile__cat { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt-dim); margin-top: 6px; }
.cx-tile__watch { flex: 0 0 auto; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--txt-dim2); white-space: nowrap; transition: color .25s; }
.cx-tile:hover .cx-tile__watch { color: var(--red); }
.cx-tile.is-hidden { display: none; }

/* ============================================================
   ABOUT / STORY + STATS
   ============================================================ */
.cx-about { border-top: 1px solid var(--line); }
.cx-about__head { margin-bottom: 50px; }
.cx-about__head .cx-eyebrow { margin-bottom: 16px; }
.cx-about__grid { display: grid; grid-template-columns: 1.15fr 1.15fr 0.5fr; gap: 60px; align-items: center; }
.cx-about__img { position: relative; max-width: 480px; width: 100%; overflow: hidden; border-radius: 4px; }
.cx-about__img img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.05); }
.cx-about__img::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 120px rgba(0,0,0,.6); }
.cx-about__body h2 { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; font-size: clamp(28px,3.4vw,44px); color:#fff; margin-bottom: 26px; line-height: 1; }
.cx-about__body p { color: var(--txt-dim); font-size: 15px; line-height: 1.8; margin-bottom: 18px; }
.cx-about__body p strong { color: #e8e8e8; }
.cx-stats { display: flex; flex-direction: column; gap: 36px; }
.cx-stat__num { font-family:'Archivo',sans-serif; font-weight: 900; font-size: clamp(26px, 2.6vw, 38px); color:#fff; line-height: 1; }
.cx-stat__num .plus { color: var(--red); }
.cx-stat__label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--txt-dim); margin-top: 8px; }

/* Стрічка логотипів клієнтів */
.cx-clients { border-top: 1px solid var(--line); padding: 70px 0; overflow: hidden; }
.cx-clients__title { text-align: center; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--txt-dim2); margin-bottom: 40px; }
.cx-marquee { position: relative; display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
/* Безшовна стрічка: у треку дві однакові копії логотипів (клонує JS).
   Кожен логотип має ОДНАКОВИЙ trailing-відступ (margin-right), тому ширина
   першої копії точно дорівнює половині треку → translateX(-50%) без стрибка.
   Використовуємо gap НЕ можна (дає асиметрію на стику копій). */
.cx-marquee__track { display: flex; align-items: center; width: max-content;
  animation: cxMarquee 45s linear infinite; will-change: transform; }
.cx-marquee__track.is-ready { /* активний стан після клонування */ }
.cx-clients:hover .cx-marquee__track { animation-play-state: paused; }
/* Логотипи без підкладки — прямо на темному тлі секції, у своїх кольорах. */
.cx-marquee__logo {
  flex: 0 0 auto; height: 60px; margin-right: 64px; display: flex; align-items: center; justify-content: center;
  transition: transform .3s, opacity .3s; opacity: .92;
}
.cx-marquee__logo:hover { transform: translateY(-3px); opacity: 1; }
.cx-marquee__logo img { height: 46px; width: auto; max-width: 160px; object-fit: contain; display: block; }
@keyframes cxMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   CTA
   ============================================================ */
.cx-cta { border-top: 1px solid var(--line); padding: 130px 0; }
.cx-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.cx-cta__title { font-family:'Archivo',sans-serif; font-weight:900; text-transform:uppercase; font-size: clamp(34px, 5.2vw, 76px); color:#fff; line-height: .98; }
.cx-cta__title .accent { color: var(--red); }
.cx-cta__text { color: var(--txt-dim); font-size: 16px; max-width: 420px; margin-top: 22px; }

/* ============================================================
   CONTACT
   ============================================================ */
.cx-contact { border-top: 1px solid var(--line); }
.cx-contact__grid { display: block; }

/* CTA-блок розтягнутий на всю ширину: текст ліворуч, кнопка праворуч —
   контакти (телефон/email/адреса/соцмережі) не дублюємо тут, вони є у футері. */
.cx-contact__cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cx-contact__text { max-width: 620px; }
.cx-contact__cta .cx-eyebrow { margin-bottom: 16px; }
.cx-contact__cta .cx-section-title { margin-bottom: 22px; }
.cx-contact__hint { color: var(--txt-dim); font-size: 16px; line-height: 1.7; max-width: 440px; margin: 0; }
.cx-contact__cta .cx-btn { flex: 0 0 auto; }

/* Поля лишаються для форми в модалці «Обговорити» */
.cx-field { position: relative; margin-bottom: 26px; }
.cx-field label { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--txt-dim); margin-bottom: 10px; }
.cx-field input, .cx-field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid #2a2a2a; color: #fff;
  font-family: inherit; font-size: 16px; padding: 12px 0; outline: none; transition: border-color .3s;
}
.cx-field input:focus, .cx-field textarea:focus { border-bottom-color: var(--red); }
.cx-field textarea { resize: vertical; min-height: 120px; }
.cx-form__actions { display: flex; align-items: center; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.cx-form__status { font-size: 14px; }
.cx-form__status.ok { color: #4caf50; } .cx-form__status.err { color: #ff5c5c; } .cx-form__status.load { color: #d0a24a; }

/* Права колонка: телефон / email / офіс / соцмережі — картка з тонкою рамкою */
.cx-contact__info { background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; padding: 40px; }
.cx-contact__block { margin-bottom: 30px; }
.cx-contact__block:last-of-type { margin-bottom: 0; }
.cx-contact__block h4 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.cx-contact__block a, .cx-contact__block p { display: block; color: #dcdcdc; font-size: 16px; margin: 0 0 6px; transition: color .25s; }
.cx-contact__block a:hover { color: var(--red); }
.cx-contact__block span { color: var(--txt-dim); }
.cx-socials { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.cx-socials a { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #cfcfcf; transition: all .25s; }
.cx-socials a:hover { border-color: var(--red); background: var(--red); color: #fff; transform: translateY(-3px); }
.cx-socials svg { width: 17px; height: 17px; fill: currentColor; }

/* ============================================================
   FOOTER
   ============================================================ */
.cx-footer { border-top: 1px solid var(--line); padding: 70px 0 40px; }
.cx-footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 50px; align-items: start; }
.cx-footer__logo { display: inline-block; }
.cx-footer__logo img { height: 56px; width: auto; display: block; }
.cx-footer__tagline { color: var(--txt-dim); font-size: 14px; line-height: 1.6; margin: 22px 0 0; }
.cx-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.cx-footer__col { display: flex; flex-direction: column; gap: 7px; }
.cx-footer__col b { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; margin-bottom: 6px; }
.cx-footer__col a, .cx-footer__col span { color: #cfcfcf; font-size: 15px; transition: color .25s; }
.cx-footer__col span { color: var(--txt-dim); }
.cx-footer__col a:hover { color: var(--red); }
.cx-footer__social { display: flex; align-items: center; gap: 10px; }
.cx-footer__social svg { width: 16px; height: 16px; flex: 0 0 auto; fill: currentColor; }
.cx-footer__social-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-footer__handle { background: none; border: none; padding: 0; margin: 0; font: inherit; font-size: 12px; color: var(--txt-dim2); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; transition: color .25s; }
.cx-footer__handle:hover { color: var(--red); }
.cx-footer__handle.is-copied { color: var(--red); text-decoration: none; }
.cx-footer__bottom { border-top: 1px solid var(--line-soft); margin-top: 50px; padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--txt-dim2); letter-spacing: .5px; }

/* Кнопка «нагору» — преміальна: скляний темний круг із тонкою рамкою,
   червона стрілка; на hover заливається червоним. */
.cx-top { position: fixed; right: 26px; bottom: 26px; z-index: 800; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(16,16,16,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14); color: var(--red);
  display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, visibility .3s, transform .3s, background .3s, border-color .3s, color .3s; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.cx-top.is-show { opacity: 1; visibility: visible; transform: none; }
.cx-top:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-4px); box-shadow: 0 16px 38px rgba(224,32,31,.32); }
.cx-top:active { transform: translateY(-1px); }
.cx-top svg { width: 20px; height: 20px; }

/* ============================================================
   LEAD MODAL (кнопка «Обговорити»)
   ============================================================ */
.cx-lead { position: fixed; inset: 0; z-index: 950; display: none; }
.cx-lead.is-open { display: block; }
.cx-lead__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(6px); animation: cxFade .25s ease; }
/* max-height/margin — від --cx-vh (JS, зафіксовані px), а НЕ від vh: у Safari на
   iPhone (і в деяких in-app браузерах) vh рахується від «великої» висоти екрана
   (нібито панель адреси схована), яка більша за реально видиму, коли панель ще
   показана. Через це max-height:86vh робив вікно ВИЩИМ за екран, а кнопка
   «Надіслати» опинялася нижче видимої області без жодного способу до неї
   докрутити (сам .cx-lead зовні не скролиться — position:fixed). */
.cx-lead__box { position: relative; max-width: 860px; width: calc(100% - 48px);
  margin: calc(var(--cx-vh, 100vh) * 0.07) auto 40px;
  max-height: calc(var(--cx-vh, 100vh) * 0.86); overflow-y: auto;
  background: linear-gradient(180deg, #161616 0%, #101010 100%); border: 1px solid #2a2a2a; border-radius: 12px;
  padding: 52px 56px 48px; box-shadow: 0 50px 120px rgba(0,0,0,.75); animation: cxPop .32s cubic-bezier(.2,.8,.2,1); }
@keyframes cxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cxPop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.cx-lead__x { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.05); border: 1px solid #2a2a2a; color: #aaa; font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: color .2s, background .2s, border-color .2s; }
.cx-lead__x:hover { color: #fff; background: var(--red); border-color: var(--red); }
.cx-lead__box .cx-eyebrow { margin-bottom: 16px; }
.cx-lead__title { font-family: 'Archivo', sans-serif; font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 42px); color: #fff; line-height: 1.02; margin-bottom: 14px; }
.cx-lead__sub { color: var(--txt-dim); font-size: 16px; line-height: 1.65; margin-bottom: 34px; max-width: 620px; }
/* дві колонки у широкій модалці */
.cx-lead__box .cx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.cx-lead__box .cx-field:nth-child(3) { grid-column: 1 / -1; }
.cx-lead__box .cx-form__actions { grid-column: 1 / -1; }
.cx-lead__box .cx-field textarea { min-height: 96px; }
/* Екран «Дякуємо» після успішної відправки — не закривається сам, користувач
   закриває вручну (хрестик/фон/Escape/кнопка «Закрити»). */
.cx-lead__thanks { text-align: center; padding: 20px 0 4px; animation: cxPop .32s cubic-bezier(.2,.8,.2,1); }
.cx-lead__thanks .cx-lead__title { margin-bottom: 10px; }
.cx-lead__thanks .cx-lead__sub { margin: 0 auto 30px; }
.cx-lead__thanks .cx-btn { margin: 0 auto; }
.cx-lead__thanksIco {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  background: rgba(224,32,31,.12); border: 1px solid var(--red);
  color: var(--red); font-size: 30px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
/* стильний скрол у модалці */
.cx-lead__box { scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
.cx-lead__box::-webkit-scrollbar { width: 10px; }
.cx-lead__box::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.cx-lead__box::-webkit-scrollbar-thumb { background: #333; border-radius: 8px; border: 2px solid #121212; }
.cx-lead__box::-webkit-scrollbar-thumb:hover { background: var(--red); }
@media (max-width: 620px) {
  .cx-lead__box .cx-form { grid-template-columns: 1fr; }
  .cx-lead__box { padding: 40px 24px 32px; }
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1080px) {
  .cx-services__grid { grid-template-columns: 1fr; gap: 32px; }
  .cx-services__cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .cx-grid { grid-template-columns: repeat(3, 1fr); }
  .cx-about__grid { grid-template-columns: 1fr 1fr; }
  .cx-about__img { grid-row: span 1; }
  .cx-stats { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .cx-footer__top { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 900px) {
  .cx-nav, .cx-header__right .cx-btn, .cx-lang { display: none; }
  .cx-burger { display: block; }
  .cx-hero__list { display: none; }
  .cx-hero__inner { justify-content: flex-start; }
  /* Коли відкрито мобільне меню — ховаємо лого за панеллю (лишається тільки бургер→×). */
  .cx-logo { transition: opacity .25s ease, visibility .25s; }
  body.cx-menu-open .cx-logo { opacity: 0; visibility: hidden; pointer-events: none; }
  /* Збільшене лого — лише для ПК (правило вище); на телефоні/планшеті лишаємо як було. */
  .cx-logo img { height: 40px; }
  .cx-header.is-stuck .cx-logo img { height: 32px; }
}
@media (max-width: 760px) {
  .cx-container, .cx-header__inner, .cx-hero__inner { padding-left: 22px; padding-right: 22px; }
  .cx-section { padding: 76px 0; }
  .cx-services__cards { grid-template-columns: 1fr; gap: 32px; }
  .cx-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .cx-about__grid { grid-template-columns: 1fr; gap: 40px; }
  .cx-about__img { max-width: 420px; }
  .cx-about__head { margin-bottom: 34px; }
  .cx-stats { flex-wrap: wrap; gap: 26px; }
  .cx-stat { flex: 1 1 40%; }
  /* --- Телефон: мітка секції (Що ми робимо / Про нас / Контакти) лишається
     ЛІВОРУЧ як є (не чіпаємо .cx-eyebrow, щоб не ламати її червону смужку),
     а заголовок, опис і кнопка — ПО ЦЕНТРУ. --- */
  .cx-services__intro { text-align: left; }
  .cx-services__intro .cx-section-title { text-align: center; }
  .cx-service { align-items: center; text-align: center; }
  .cx-service__more { margin-left: auto; margin-right: auto; }
  .cx-about__head { text-align: left; }
  .cx-about__head .cx-section-title { text-align: center; }
  .cx-about__img { margin-left: auto; margin-right: auto; }
  .cx-about__body { text-align: center; }
  .cx-stats { justify-content: center; text-align: center; }
  .cx-stat { text-align: center; }
  /* Контакти */
  .cx-contact__cta { flex-direction: column; align-items: stretch; gap: 24px; }
  .cx-contact__text { max-width: none; text-align: left; }
  .cx-contact__text .cx-section-title { text-align: center; }
  .cx-contact__hint { max-width: none; text-align: center; }
  .cx-contact__cta .cx-btn { align-self: center; }
  .cx-cta { padding: 90px 0; }
  .cx-cta__inner { flex-direction: column; align-items: flex-start; gap: 30px; }
  .cx-footer__cols { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
  .cx-hero__title { font-size: clamp(30px, 8vw, 44px); letter-spacing: -0.01em; margin-bottom: 20px; }
  .cx-hero__lead { font-size: 15px; }
  .cx-lead__box { padding: 38px 26px 32px; margin: calc(var(--cx-vh, 100vh) * 0.05) auto 30px; }
}
@media (max-width: 480px) {
  .cx-grid { grid-template-columns: 1fr; }
  .cx-hero { padding-top: 92px; }
  .cx-hero__title { font-size: 27px; letter-spacing: -0.02em; line-height: 1.02; }
  .cx-hero__lead { font-size: 14.5px; margin-bottom: 26px; }
  .cx-hero__actions { width: 100%; }
  .cx-hero__actions .cx-btn { flex: 1 1 auto; justify-content: center; }
  .cx-footer__cols { grid-template-columns: 1fr; }
  .cx-footer__bottom { flex-direction: column; }
}
/* дуже вузькі екрани — гарантуємо, що довге слово «ВІДЕОПРОДАКШН» вміщується */
@media (max-width: 360px) {
  .cx-hero__title { font-size: 24px; }
}
