/* Фоновое видео во весь экран, под всем контентом */
#bgVideoRoot {
  position: fixed;
  inset: 0;
  z-index: 0; /* контент сверху */
  pointer-events: none; /* видео не перехватывает клики */
  overflow: hidden;
}

/* Само видео — ярче, чётче и ближе визуально */
#bgVideoRoot video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) translateZ(0);
  object-fit: cover;
  filter: brightness(1.35) contrast(1.25) saturate(1.35);
  will-change: transform;
  backface-visibility: hidden;
}

/* Затемнение — мягкое, чтобы фон не был мрачным */
#bgDim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.15), rgba(0,0,0,.55) 60%),
    linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.45));
}

/* Контент поверх видео */
header, main, nav {
  position: relative;
  z-index: 1;
}

/* Если у пользователя включено «уменьшить анимацию» */
@media (prefers-reduced-motion: reduce) {
  #bgVideoRoot video { display: none; }
  #bgDim { background: #0a0a0a; }
}
