/* ============================================
   404 AFFILIATE main page — minimal overlay v8
   - Подменяем PNG hero на animated GIF (через JS, для фона)
   - GIF играет автоматически в любом браузере (нативно как картинка)
   - Typewriter caret — как раньше
   ============================================ */

/* Hero — плавный fade-to-black снизу (скрывает резкий край картинки) */
section#hero {
  position: relative !important;
}
/* Фон: cover, голова видна сверху, обрезаются края слева/справа а не голова */
section#hero div[style*="background-image"] {
  background-size: cover !important;
  background-position: center 25% !important;
  background-repeat: no-repeat !important;
}
section#hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 35%, rgba(0,0,0,0.85) 75%, #000 100%);
  pointer-events: none;
  z-index: 1;
}
/* Hero контент (тексты, кнопки) выше градиента */
section#hero > div:not([style*="background-image"]) {
  position: relative;
  z-index: 2;
}

/* Mobile: средний zoom — фигура видна крупно, но не обрезается */
@media (max-width: 768px) {
  section#hero div[style*="background-image"] {
    background-size: 264% auto !important;
    background-position: 42% 14% !important;
    background-repeat: no-repeat !important;
  }
  /* Bottom fade на мобиле сильнее — больше места под текст */
  section#hero::after {
    height: 60%;
    background: linear-gradient(180deg,
      transparent 0%,
      rgba(0,0,0,0.30) 25%,
      rgba(0,0,0,0.65) 55%,
      rgba(0,0,0,0.92) 80%,
      #000 100%);
  }
}

/* Typewriter caret */
.dt-tw-hidden { visibility: hidden; }
.dt-tw-caret {
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  margin-left: 0.06em;
  background: #00ECFF;
  vertical-align: text-bottom;
  box-shadow: 0 0 8px rgba(0, 236, 255, 0.6);
  animation: dt-tw-blink 0.7s steps(1) infinite;
}
@keyframes dt-tw-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
