/* hero-fallback.css
 * 独立补丁：首页背景视频在无法播放时用同一帧静态封面，避免纯黑。
 * 不改打包后的大 CSS。若以后有源码，应把规则迁回英雄区样式。
 */

.new-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background-color: #050505;
  background-image: url("/media/hero-profile-poster.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(0.32) contrast(1.16) brightness(0.56);
}

.hero-static-cover {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.32) contrast(1.16) brightness(0.56);
  pointer-events: none;
  display: block;
}

/* 未开播或失败时藏起可能是黑帧的 video 盒，露出封面；播放中再显示视频 */
.new-hero:not(.is-hero-playing) > video.hero-film {
  visibility: hidden;
}

.new-hero.is-hero-playing > video.hero-film {
  visibility: visible;
}

.new-hero.is-hero-playing .hero-static-cover {
  z-index: -4;
}

/* 尊重减少动态效果：不播放；覆盖原样式里把视频和氛围层一起 display:none、只剩纯黑的问题 */
@media (prefers-reduced-motion: reduce) {
  .new-hero::before,
  .hero-static-cover {
    display: block !important;
    visibility: visible !important;
  }

  .new-hero > video.hero-film {
    display: none !important;
  }

  .new-hero.is-hero-blocked:not(.is-hero-reduced)::after {
    content: none;
  }
}

/* 自动播放被拦时的轻提示，不挡标题、不抢点击 */
.new-hero.is-hero-blocked:not(.is-hero-reduced)::after {
  content: "轻触播放";
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  color: rgba(245, 244, 240, 0.55);
  font: 600 10px/1 var(--mono, ui-monospace, monospace);
  letter-spacing: 0.12em;
  pointer-events: none;
}
