/* ========================
   FONT
======================== */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-4.1/InterVariable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ========================
   VARIABLES & RESET
======================== */
:root {
  --bg:           #080c14;
  --bg-dark:      #050810;
  --surface:      #0d1424;
  --card:         #111d30;
  --card-hover:   #162038;
  --border:       rgba(255,255,255,0.06);
  --border-accent:rgba(14,122,162,0.35);
  --accent:       #0e7aa2;
  --accent-light: #1a9ab8;
  --accent-glow:  rgba(14,122,162,0.4);
  --green:        #22c55e;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #4b6080;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --radius:       12px;
  --radius-lg:    20px;
  --ease:         0.3s ease;
  --navbar-h:     80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
section[id] { scroll-margin-top: var(--navbar-h); }
body  {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }

/* ========================
   LAYOUT
======================== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section      { padding: 100px 0; }
.section-dark { background: var(--surface); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-title {
  font-family: var(--font);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 14px;
}
.section-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
}
/* ========================
   BUTTONS
======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  transition: all var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 28px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 50px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-glass {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}
.btn-glass:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}
.btn-full { width: 100%; }

/* ========================
   NAVBAR
======================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--ease), padding var(--ease);
}
/* background/backdrop-filter вынесены в ::before, а не на сам .navbar —
   filter/backdrop-filter на предке делают его containing block для
   position:fixed потомков (.nav-links, мобильное меню), из-за чего
   оверлей раскрывался только в пределах высоты шапки, а не на весь экран */
.navbar.scrolled { padding: 12px 0; }
.navbar.scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo .logo-img { height: 20px; width: auto; }

/* Векторный логотип (assets/images/logo/) — язык переключается через JS,
   подменой src на cybercamera-white-{rus,eng}.svg */
.logo-img { display: block; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  flex: 1;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Копия переключателя языка внутри мобильного меню — на десктопе не нужна,
   там уже есть основная в .nav-right */
.nav-links-lang { display: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.nav-cta-icon { flex-shrink: 0; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  border: 1px solid #EB2227;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
  animation: nav-cta-pulse 2.4s ease-in-out infinite;
}
.nav-cta:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

/* лёгкое "живое" свечение ободка — сама рамка не мигает, светится только вокруг неё */
@keyframes nav-cta-pulse {
  0%, 100% { box-shadow: 0 0 2px 0 rgba(235,34,39,0.25); border-color: rgba(235,34,39,0.6); }
  50%      { box-shadow: 0 0 20px 3px rgba(235,34,39,0.85); border-color: #EB2227; }
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 100px;
  transition: all var(--ease);
}
.lang-btn:hover   { color: var(--text); }
.lang-btn.active  { background: var(--accent); color: #fff; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  z-index: 1100;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--ease);
}
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ========================
   HERO — VIDEO BG
======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(8,12,20,0.55) 0%, rgba(8,12,20,0.45) 60%, rgba(8,12,20,0.9) 100%),
    linear-gradient(to right, rgba(8,12,20,0.7) 0%, rgba(8,12,20,0.2) 60%);
}

.hero-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 140px 0 60px;
  min-width: 0;
}
.hero-body .container { min-width: 0; }


.hero-title {
  font-family: var(--font);
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 900;
  line-height: 1.06;
  margin-bottom: 24px;
  max-width: 820px;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
  max-width: 560px;
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color var(--ease);
}
.hero-tag:hover { color: var(--accent-light); }
.hero-tag:hover .hero-tag-hash { color: var(--accent-light); }
.hero-tag-hash { color: var(--accent-light); margin-right: 3px; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* stats bar at bottom of hero */
.hero-stats-bar {
  position: relative;
  z-index: 2;
  background: rgba(8,12,20,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.07);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 40px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--text);
}
.stat-number-accent { color: var(--accent); }
.stat-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* ========================
   ABOUT
======================== */
#about {
  position: relative;
  overflow: hidden;
}
#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  pointer-events: none;
}
#about .container {
  position: relative;
  z-index: 1;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-text .section-text { max-width: none; }

.about-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-image {
  width: 120%;
  max-width: 120%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}

/* ========================
   SHOWCASE
======================== */
#showcase {
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

#showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  pointer-events: none;
  z-index: 0;
}

.showcase-nav {
  position: absolute;
  left: max(40px, calc((100vw - 1200px) / 2 + 40px));
  right: max(40px, calc((100vw - 1200px) / 2 + 40px));
  bottom: 40px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.showcase-sticky {
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--navbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.showcase-cam-img {
  position: absolute;
  left: 62%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 74vh;
  width: auto;
  max-width: none;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 30px 80px rgba(0,0,0,0.8));
}

.showcase-cam-glow {
  position: absolute;
  left: 62%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 55vw;
  height: 55vw;
  background: radial-gradient(ellipse at center, rgba(14,122,162,0.2) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.showcase-sticky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 36%, transparent 55%),
              linear-gradient(to left,  var(--bg) 0%,  transparent 38%);
  pointer-events: none;
  z-index: 2;
}

.showcase-text-col {
  position: absolute;
  left: max(40px, calc((100vw - 1200px) / 2 + 40px));
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 260px;
  z-index: 3;
}

/* Не привязана к конкретному слайду, поэтому вынесена из .showcase-feature —
   стоит в общей навигации, слева от стрелок, а не под текстом (см. .showcase-nav-right) */
.showcase-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.showcase-feature {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.showcase-feature.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.showcase-title {
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 18px;
}

.showcase-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
}

.showcase-heading {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 720px;
  text-align: center;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  z-index: 4;
}


/* Laptop — чуть теснее */
@media (max-width: 1200px) {
  .showcase-text-col { width: 300px; }
  .showcase-cam-img  { height: 64vh; left: 63%; }
}

/* Планшет — камера меньше, текст уже */
@media (max-width: 1024px) {
  .showcase-text-col { width: 260px; left: 32px; }
  .showcase-cam-img  { height: 56vh; left: 64%; }
  .showcase-title    { font-size: 22px; }
  .showcase-desc     { font-size: 15px; }
}

/* Мобилка — переключатель вверху, камера по центру, текст снизу */
@media (max-width: 768px) {
  /* На мобильном фикс-высота 100vh у .showcase-sticky работает непредсказуемо
     (адресная строка браузера меняет реальную видимую высоту), из-за чего
     абсолютно спозиционированные картинка/текст/навигация то накладываются
     друг на друга, то обрезаются. Вместо этого — обычная вёрстка в потоке:
     заголовок → картинка → текст → навигация, друг под другом. */
  .showcase-sticky {
    height: auto;
    display: block;
    padding: 88px 24px 32px;
    overflow: visible;
  }
  .showcase-sticky::after { display: none; }
  .showcase-cam-glow { display: none; }

  .showcase-heading {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0 0 28px;
  }

  .showcase-cam-img {
    position: static;
    display: block;
    width: 82vw;
    max-width: 340px;
    height: auto;
    margin: 0 auto 48px;
    transform: none;
  }

  .showcase-text-col {
    position: static;
    width: auto;
    height: auto;
    min-height: 180px;
    margin-bottom: 28px;
    top: auto;
    transform: none;
  }

  .showcase-feature {
    position: static;
    inset: auto;
    opacity: 0;
    transform: none;
    display: none;
    pointer-events: none;
  }
  .showcase-feature.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .showcase-title { font-size: 20px; margin-bottom: 10px; }
  .showcase-desc  { font-size: 14px; line-height: 1.6; }

  .showcase-nav {
    position: static;
    flex-wrap: wrap;
    row-gap: 14px;
  }
  .showcase-nav .ss-arr { width: 36px; height: 36px; }
  .showcase-nav-right { flex: 1 1 100%; justify-content: space-between; gap: 10px; }
  /* .btn задаёт white-space:nowrap — вместе с min-width:auto у флекс-детей
     это не даёт кнопке сжаться и толкает всю строку за пределы экрана */
  .showcase-cta { padding: 8px 14px; font-size: 12px; white-space: normal; min-width: 0; text-align: center; }
}

/* ========================
   HOW IT WORKS
======================== */
#how {
  position: relative;
  overflow: hidden;
}

/* Акцент справа — зеркально к #analytics, где он слева */
#how::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  pointer-events: none;
  z-index: 0;
}

#how .container { position: relative; z-index: 1; }

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 12px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.how-step {
  display: flex;
  flex-direction: column;
  background: #0b1824;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  /* эти карточки — цель якорных ссылок (хэштеги в hero), а не <section> —
     общее правило section[id]{scroll-margin-top} их не покрывает */
  scroll-margin-top: var(--navbar-h);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              border-color 0.3s,
              box-shadow 0.35s;
}

/* .how-steps в селекторе — не для красоты: без него специфичность равна
   .fade-in.visible (тоже два класса), и transform: translateY(0) оттуда
   перебивает подъём карточки, потому что объявлен позже в файле */
.how-steps .how-step:hover {
  transform: translateY(-8px);
  border-color: rgba(14,122,162,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,122,162,0.15);
}

.how-step-visual {
  line-height: 0;
  overflow: hidden;
  aspect-ratio: 5 / 3;
}

.how-step-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 15px 15px 0 0;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}

.how-steps .how-step:hover .how-step-visual img {
  transform: scale(1.05);
}

.how-step-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.how-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
}

.how-step-headline {
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: pre-line;
  margin: 0;
}

.how-step-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 900px) {
  .how-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .how-step {
    flex-direction: row;
    align-items: stretch;
  }
  .how-step-visual {
    flex: 0 0 180px;
    overflow: hidden;
  }
  .how-step-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px 0 0 15px;
  }
  .how-step-body {
    padding: 20px 20px 24px;
    gap: 8px;
  }
}

@media (max-width: 540px) {
  .how-step {
    flex-direction: column;
  }
  .how-step-visual {
    flex: none;
    aspect-ratio: unset;
  }
  .how-step-visual img {
    border-radius: 15px 15px 0 0;
    object-fit: unset;
    height: auto;
  }
}

/* ========================
   ANALYTICS
======================== */
#analytics {
  position: relative;
  overflow: hidden;
}

/* Акцент слева — зеркально к #showcase, где он справа (секции теперь соседние) */
#analytics::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  pointer-events: none;
  z-index: 0;
}

#analytics .container { position: relative; z-index: 1; }

.analytics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: stretch;
}

.analytics-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.analytics-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

.analytics-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.analytics-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-cta {
  display: flex;
  width: fit-content;
  margin: 0 auto;
}

.analytics-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.analytics-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}

.analytics-feature strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.analytics-feature p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

.analytics-visual {
  position: relative;
}

/* --- Dashboard --- */
.analytics-dashboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.db-row-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.db-heatmap {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.3s, box-shadow 0.35s;
}
.db-heatmap:hover {
  transform: translateY(-8px);
  border-color: rgba(14,122,162,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,122,162,0.15);
}

.db-heatmap svg { width: 100%; height: 100%; display: block; }

.db-heat-zone, .db-heat-dot {
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
}

.db-stats-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 16px;
  flex: 1;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.3s, box-shadow 0.35s;
}
.db-stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(14,122,162,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,122,162,0.15);
}

.db-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 5px;
}

.db-stat-value {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}

.db-stat-value span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
}

.db-bar-wrap {
  margin-top: 8px;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}

.db-bar {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 3.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.db-chart-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.3s, box-shadow 0.35s;
}
.db-chart-card:hover {
  transform: translateY(-8px);
  border-color: rgba(14,122,162,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,122,162,0.15);
}

.db-chart-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 12px;
}

.db-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
}

.db-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.db-bar-track {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 48px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.db-bar-fill {
  width: 100%;
  border-radius: 4px;
  height: 0;
  transition: height 3s cubic-bezier(0.22, 1, 0.36, 1);
}

.db-bar-time {
  font-size: 8px;
  color: rgba(255,255,255,0.2);
}

.db-players-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.db-player-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.3s, box-shadow 0.35s;
}

.db-player-card:hover {
  transform: translateY(-8px);
  border-color: rgba(14,122,162,0.5);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,122,162,0.15);
}

.db-player-num {
  font-size: 16px;
  font-weight: 900;
  color: rgba(255,255,255,0.12);
}

.db-player-name {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}

.db-player-stat {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}

.db-player-rating {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.db-rdot {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
}

.db-rdot.active { background: #00b4d8; }
.db-rdot.mid    { background: #6cb82a; }

@media (max-width: 900px) {
  .analytics-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .analytics-visual {
    display: none;
  }
  /* На одну колонку .analytics-text больше не растягивается по высоте
     дашборда, поэтому space-between схлопывается и кнопка липнет к тексту */
  .analytics-text {
    justify-content: flex-start;
    gap: 32px;
  }
  /* Длинный текст кнопки почти впритык заполняет всю ширину блока,
     из-за чего она визуально "едет" дальше вправо, чем перенесённый
     по словам параграф над ней — уменьшаем, чтобы оставался отступ */
  .analytics-cta {
    font-size: 14px;
    padding: 14px 22px;
  }
  /* Гарантированный запас справа — иначе на некоторых ширинах перенос
     слов случайно подгоняет строку почти впритык к краю экрана */
  .analytics-title,
  .analytics-lead,
  .analytics-feature {
    max-width: 94%;
  }
}

@media (max-width: 640px) {
  /* .db-row-top и .db-players-row рассчитаны на 2-3 колонки без мобильной
     версии — на узком экране это выталкивает контент за пределы экрана */
  .db-row-top {
    grid-template-columns: 1fr;
  }
  .db-players-row {
    grid-template-columns: 1fr;
  }
  /* Без соседа в ряду align-items:stretch больше не задаёт высоту —
     без этого высота считается из ширины по пропорциям viewBox (2:3)
     и диаграмма раздувается на весь экран */
  .db-heatmap {
    aspect-ratio: 2 / 3;
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ========================
   CLIENTS + SUCCESS STORIES
   (shared wrap so the accent gradient runs
   continuously across both, no seam at the join)
======================== */
.clients-stories-wrap {
  position: relative;
  background: var(--surface);
  overflow: hidden;
}
/* Акцент слева — зеркально к #solutions (справа), который идёт перед этим блоком */
.clients-stories-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  pointer-events: none;
}
.clients-stories-wrap .container,
.clients-stories-wrap .ss-progress {
  position: relative;
  z-index: 1;
}
#clients {
  padding: 100px 0 40px;
  background: transparent;
}
.clients-label {
  text-align: center;
  font-family: var(--font);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 64px;
}
.clients-more {
  text-align: center;
  margin-top: 56px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
}
.clients-marquee {
  overflow: hidden;
  width: 100%;
  cursor: pointer;
  filter: brightness(0) invert(1);
}
.clients-track {
  display: flex;
  align-items: center;
  gap: 96px;
  width: max-content;
  will-change: transform;
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.client-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
}
.client-logo img {
  height: 64px;
  width: auto;
  max-width: 200px;
  opacity: 0.45;
  transition: opacity 0.25s;
}
.client-logo img:hover { opacity: 0.85; }

/* ========================
   DEMO (активное бенто)
======================== */
#demo {
  position: relative;
  overflow: hidden;
}

/* Акцент слева — чтобы чередоваться с соседями #how и #solutions (оба справа) */
#demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  mask-image: linear-gradient(82deg, black 36%, transparent 58%);
  pointer-events: none;
  z-index: 0;
}

#demo .container { position: relative; z-index: 1; }

.demo-bento {
  display: flex;
  gap: 14px;
  height: 520px;
  margin-top: 56px;
}

.demo-card {
  position: relative;
  flex: 0 1 96px;
  min-width: 96px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #0a1220;
  overflow: hidden;
  cursor: pointer;
  transition: flex-grow 0.55s cubic-bezier(0.22,1,0.36,1),
              flex-basis 0.55s cubic-bezier(0.22,1,0.36,1),
              border-color var(--ease);
}

.demo-card.active {
  flex: 1 1 auto;
  border-color: var(--border-accent);
}

.demo-card:hover { border-color: var(--border-accent); }

/* Карточка-ссылка на архив — всегда свёрнута, но подсвечивается при наведении */
.demo-card--link {
  background: linear-gradient(165deg, #0e1c2e 0%, #0a1220 100%);
  transition: border-color var(--ease), background var(--ease);
}
.demo-card--link:hover {
  background: linear-gradient(165deg, #12243a 0%, #0d1828 100%);
}
/* Стеклянная капсула — та же формула, что у .demo-play-btn / .btn-glass.
   Размер и высота — те же, что у .demo-card-ball в остальных карточках,
   чтобы весь ряд читался на одном уровне. Не по центру карточки: подпись
   вертикальная и прижата к низу, по центру стрелка упиралась бы в неё. */
.demo-card-arrow {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform var(--ease), background var(--ease);
}
.demo-card--link:hover .demo-card-arrow {
  transform: translateX(-50%) translateX(3px);
  background: rgba(255,255,255,0.22);
}

.demo-card-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #0d1b2c 0%, #060d16 100%);
}

/* Фото-превью свёрнутой карточки. Заливает контейнер целиком через object-fit —
   подходит и под узкую вертикальную полосу (96×520), и под мобильную
   горизонтальную (см. .demo-bento в адаптиве), кроп по центру любой формы. */
.demo-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Мяч/шайба — отдельная PNG-наклейка поверх фактуры, а не часть общего фото.
   Так предмет не зависит от обрезки object-fit и виден при любой ширине карточки.
   z-index намеренно не задаём: явный z-index:1 у iframe (ниже) при раскрытии
   карточки перекрывает любой auto-элемент независимо от порядка в разметке —
   ролик сам корректно спрячет мяч под собой, когда начнётся видео. */
.demo-card-ball {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.55));
  pointer-events: none;
  /* задержка по той же причине, что у .demo-card-vtitle — не проявляться,
     пока карточка ещё сжимается обратно */
  transition: opacity var(--ease) 0.35s;
}
/* при раскрытии карточки мяч уступает место кнопке play, чтобы не спорить с ней */
.demo-card.active .demo-card-ball { opacity: 0; transition-delay: 0s; }

/* Кнопка play — по центру карточки, только пока видео ещё не запущено.
   У свёрнутой карточки скрыта; после клика JS прячет её отдельно
   (mountVideo/unmountVideo), т.к. класс active остаётся и когда ролик уже играет. */
/* Стеклянная кнопка — та же формула, что у .btn-glass / .nav-cta:
   полупрозрачная заливка + размытие того, что под ней, а не рисунок. */
.demo-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
}
/* треугольник чуть смещён вправо от геометрического центра, чтобы визуально
   казаться центрированным — так делают на любой play-кнопке */
.demo-play-btn svg { margin-left: 4px; }
.demo-card.active .demo-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.demo-card.active .demo-play-btn:hover {
  background: rgba(255,255,255,0.22);
}
/* видео уже монтируется/играет — кнопка не нужна поверх плеера */
.demo-card.active.demo-card--playing .demo-play-btn {
  opacity: 0;
  pointer-events: none;
}

/* Затемнение снизу — иначе белая подпись и номер карточки теряются
   на светлых участках фото. У раскрытой карточки не мешает — там
   поверх фото встаёт video-iframe и полностью его перекрывает. */
.demo-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,6,12,0.85) 0%, rgba(3,6,12,0.25) 45%, rgba(3,6,12,0.35) 100%);
  pointer-events: none;
}

/* Пятая карточка — не превью конкретного матча, а ссылка на весь каталог.
   Топим её фото сильнее, чтобы она читалась спокойнее четырёх ярких соседок. */
.demo-card--link .demo-card-media::after {
  background: rgba(3,6,12,0.72);
}

.demo-card-media iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Вертикальная подпись — только у свёрнутых карточек */
.demo-card-vtitle {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  margin: 0 auto;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  width: max-content;
  max-height: calc(100% - 90px);
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  /* задержка перед проявлением — иначе текст становится виден раньше, чем
     карточка успевает сжаться обратно (0.55s), и «гуляет» вместе с шириной,
     т.к. центрируется через margin:auto по текущей, ещё не устоявшейся ширине */
  transition: opacity var(--ease) 0.35s;
}

.demo-card.active .demo-card-vtitle { opacity: 0; pointer-events: none; transition-delay: 0s; }

/* Содержимое раскрытой карточки */
.demo-card-body {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
  pointer-events: none;
}

.demo-card.active .demo-card-body { opacity: 1; }

.demo-live {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 100px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: demo-pulse 1.6s ease-in-out infinite;
}

@keyframes demo-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.demo-card-info h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.demo-card-info p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========================
   SOLUTIONS
======================== */
#solutions {
  position: relative;
  overflow: hidden;
}

/* Акцент справа — зеркально к #demo, где он слева */
#solutions::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d2a40 0%, #091e30 100%);
  -webkit-mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  mask-image: linear-gradient(82deg, transparent 42%, black 64%);
  pointer-events: none;
  z-index: 0;
}

#solutions .container { position: relative; z-index: 1; }

.solutions-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 44px;
}

.solutions-tab-sep {
  color: var(--text-dim);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 300;
  user-select: none;
  opacity: 0.5;
}

.solutions-tab {
  background: none;
  border: none;
  padding: 0 0 6px;
  font-family: var(--font);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.25s;
}

.solutions-tab:hover { color: var(--text-muted); }

.solutions-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.solutions-panel {
  display: flex;
  align-items: stretch;
  gap: 48px;
}

.solutions-illustration {
  flex: 0 0 320px;
  min-height: 240px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
}

.solutions-illustration img { width: 100%; height: 100%; object-fit: cover; display: block; }

.solutions-content { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.solutions-title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

.solutions-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
}

.solutions-highlight {
  color: #00b4d8;
  font-weight: 800;
}

@media (max-width: 720px) {
  .solutions-panel { flex-direction: column; gap: 24px; }
  /* min-height — это не явная высота, img height:100% от неё не резолвится:
     без соседа, растягивающего блок на десктопе, картинка падает к своей
     естественной пропорции и не дотягивается до низа рамки */
  .solutions-illustration {
    flex: none;
    max-width: 320px;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;
    margin: 0 auto;
  }
}

/* ========================
   SUCCESS STORIES
======================== */
.ss-section {
  background: transparent;
  padding: 40px 0 64px;
}
.ss-header {
  text-align: center;
  margin-bottom: 0;
}
.ss-heading {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900; letter-spacing: -0.8px;
  padding-bottom: 40px;
}
.ss-progress {
  height: 2px;
  background: var(--border);
  overflow: hidden;
}
.ss-progress-fill {
  height: 100%; background: #00b4d8;
  width: 0; transition: width 0.1s linear;
}
.ss-slider {
  position: relative; height: 560px; overflow: hidden;
  margin-top: 32px;
}
.ss-slide {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  opacity: 0; transition: opacity 0.6s ease;
  pointer-events: none;
}
.ss-slide.active { opacity: 1; pointer-events: auto; }

.ss-photo {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.ss-photo-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.ss-photo-bg svg { width: 100%; height: 100%; }
.ss-photo-logo-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ss-photo-logo-ghost {
  position: absolute;
  width: 160%; max-width: none;
  opacity: 0.05;
  filter: brightness(0) invert(1);
  transform: rotate(-6deg);
}
.ss-photo-logo-main {
  position: relative;
  width: 46%;
  max-height: 34%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.ss-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, transparent 60%);
}

.ss-content {
  padding: 0 0 40px 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  align-self: stretch;
}
.ss-client {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.ss-client-logo {
  width: 120px; height: 120px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.ss-client-logo img {
  width: 100%; height: 100%; object-fit: contain; padding: 14px;
  filter: brightness(0) invert(1) opacity(0.85);
}
.ss-client-name { font-size: 24px; font-weight: 700; }
.ss-client-type { font-size: 17px; color: var(--text-dim); margin-top: 4px; }

.ss-quote {
  font-size: 18px; font-weight: 600;
  line-height: 1.6; letter-spacing: -0.3px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  position: relative; padding-left: 20px;
}
.ss-quote::before {
  content: '';
  position: absolute; left: 0; top: 4px;
  width: 3px; height: calc(100% - 8px);
  background: #00b4d8; border-radius: 2px;
}

.ss-stats { display: flex; gap: 28px; }
.ss-stat-num {
  font-size: 32px; font-weight: 900;
  letter-spacing: -1.5px; line-height: 1;
}
.ss-stat-num span { color: #00b4d8; }
.ss-stat-lbl {
  font-size: 11px; color: var(--text-dim);
  font-weight: 600; letter-spacing: 0.5px;
  margin-top: 4px; text-transform: uppercase;
}
.ss-author { font-size: 15px; color: var(--text-muted); font-style: italic; }
.ss-author strong { color: var(--text-muted); font-style: normal; }

.ss-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 0;
}
.ss-dots { display: flex; gap: 8px; }
.ss-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.35); border: none;
  cursor: pointer; padding: 0; transition: all 0.3s;
}
.ss-dot.active { background: #00b4d8; width: 24px; border-radius: 3px; }
.ss-arrows { display: flex; gap: 8px; }
.ss-arr {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-light); border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}
.ss-arr:hover { background: #22b4d4; box-shadow: 0 0 32px var(--accent-glow); }

@media (max-width: 768px) {
  .ss-slider { height: auto; }
  .ss-slide  { position: relative; grid-template-columns: 1fr; }
  .ss-slide:not(.active) { display: none; }
  .ss-photo  { height: 220px; }
  /* .ss-content больше не растянут по высоте фото (grid стал в 1 колонку),
     поэтому justify-content: space-between схлопывается — автор цитаты
     липнет прямо к цифрам статистики под ним */
  .ss-content {
    padding: 28px 0;
    justify-content: flex-start;
    gap: 20px;
    min-height: 260px;
  }
  .ss-header  { padding: 0; }
  .ss-nav     { padding: 20px 0 48px; }
  .ss-client  { margin-bottom: 0; }
  .ss-quote   { font-size: 15px; margin-bottom: 0; }
  .ss-stat-num { font-size: 24px; }
}

/* ========================
   CONTACT
======================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}
.contact-info .section-text { max-width: none; }
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
.contact-item {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.contact-item a { color: var(--accent-light); }
.contact-item a:hover { text-decoration: underline; }
/* Все иконки — в одинаковой квадратной ячейке, вписаны по contain.
   viewBox каждого файла подрезан под сам рисунок, иначе знаки
   с разным полем внутри артборда выглядят разнокалиберными. */
.contact-social-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  opacity: 0.7;
  transition: opacity var(--ease);
}
.contact-item:hover .contact-social-icon { opacity: 1; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  resize: none;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-textarea { min-height: 110px; }
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.form-checkbox a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}
.form-checkbox a:hover { color: var(--accent-light); }
.form-checkbox input {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: #22c55e;
}
.form-success.visible { display: flex; }

/* ========================
   FOOTER
======================== */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 52px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo .logo-img { height: 18px; width: auto; }
.footer-tagline { font-size: 13px; color: var(--text-dim); max-width: 220px; line-height: 1.5; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

/* ========================
   FADE-IN
======================== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
  .about-grid             { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6,8,16,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 1050;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 22px; font-weight: 700; color: var(--text); }
  .burger { display: flex; }

  /* На мобильном переключатель языка не влезает в шапку рядом с
     "Прямой эфир" и бургером — прячем его там и дублируем внутри
     открывающегося меню (.lang-btn общий для обеих копий в JS) */
  .nav-right > .lang-switcher { display: none; }
  .nav-links-lang { display: block; margin-top: 12px; }

  /* Иконки больше нет — просто немного ужимаем текстовую кнопку,
     чтобы она уместилась рядом с языками и бургером */
  .nav-cta { padding: 7px 12px; font-size: 12px; }

  /* Логотип на десктопе рендерится ~200px шириной — на узких телефонах
     вместе с gap:40px (наследие раскладки с ссылками меню) это выталкивает
     кнопку/бургер за край экрана. Сжимаем и то, и другое. */
  .nav-container { gap: 12px; padding: 0 16px; }
  .nav-logo .logo-img { height: 16px; }

  .hero-title {
    font-size: clamp(32px,8vw,56px);
    white-space: pre-line;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  .hero-actions { flex-direction: column; }
  .hero-stats { grid-template-columns: repeat(2,1fr); }
  .stat-item  { padding: 18px 20px; }
  /* Сетка 2×2 вместо ряда из 4 — рамка справа нужна только у левого
     столбца (1,3), а не у последнего элемента по DOM-порядку */
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.06); }

  .about-grid            { grid-template-columns: 1fr; }
  .contact-grid          { grid-template-columns: 1fr; gap: 48px; }
  .form-row              { grid-template-columns: 1fr; }

  /* Бенто раскладываем в колонку — узкие вертикальные карточки на телефоне нечитаемы */
  .demo-bento { flex-direction: column; height: auto; margin-top: 36px; }
  .demo-card  { flex: 0 0 88px; min-width: 0; }
  .demo-card.active { flex: 0 0 300px; }
  .demo-card-vtitle {
    writing-mode: horizontal-tb;
    transform: none;
    bottom: auto; top: 50%;
    margin-top: -10px;
    text-align: center;
    max-height: none;
    width: auto;
    padding: 0 20px;
  }
  .demo-card-info h3 { font-size: 19px; }
  /* подпись здесь по центру, а не снизу — нижний градиент её не накроет, нужен ровный тон */
  .demo-card-media::after { background: rgba(3,6,12,0.55); }
  /* карточка низкая (88px), а подпись уже стоит по центру — мячу там негде поместиться */
  .demo-card-ball { display: none; }
  /* на мобильных карточка горизонтальная — стрелку вправо, иначе она легла бы на подпись */
  .demo-card-arrow {
    top: 50%; left: auto; right: 16px;
    width: 44px; height: 44px;
    transform: translateY(-50%);
  }
  .demo-card--link:hover .demo-card-arrow { transform: translateY(-50%) translateX(3px); }

  .footer-top    { flex-direction: column; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2,1fr); }
}

/* ========================
   VIDEO MODAL
======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  position: relative;
  width: min(900px, 92vw);
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}
.modal-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}
.modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: #fff; }

/* ========================
   COOKIE
======================== */
.cookie-bar {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  margin: 0 auto;
  max-width: 1112px;
  /* выше контента и навбара, но ниже мобильного меню (1050) и модалки (9999) */
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.cookie-bar[hidden] { display: none; }
.cookie-bar.visible { opacity: 1; transform: translateY(0); }

.cookie-bar-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.cookie-bar-text a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}
.cookie-bar-text a:hover { color: var(--accent-light); }
.cookie-bar-btn {
  flex-shrink: 0;
  padding: 11px 26px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .cookie-bar {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
  }
  .cookie-bar-text { font-size: 13px; }
}
