/*
 * Home carousel supplement: first-paint state and embedded-banner crops.
 * Each artwork keeps its own responsive crop; ordinary slides do not receive the
 * embedded-banner classes and continue to use the standard carousel rules.
 */

/*
 * 轮播区在拿到接口数据前保持完全空白：不显示静态占位、旧图或任何叠加文字。
 * 隐藏属性同时写在 index.html 的首屏标记里，样式表一生效就生效，不依赖脚本执行时机。
 *
 * 这里必须用 opacity，不能用 visibility：visibility 会被子元素重新声明为 visible 而"穿透"。
 * .home-slide.is-active 就写了 visibility: visible，所以父级设 visibility: hidden
 * 根本盖不住当前这张图——这正是之前"旧图仍然可见"的真正原因。
 * opacity 不继承、也无法被子元素覆盖，能可靠隐藏整棵子树；舞台本身有固定高度，不产生布局跳动。
 */
.home-carousel[data-home-slide-pending] .home-slide-stage {
  opacity: 0;
  /* 安全网：若 js/home-carousel.js 未加载或执行失败，隐藏属性不会被移除。
     这里用一段延迟动画兜底，最多 8 秒后自动放出舞台，避免轮播区域永久隐藏。 */
  animation: home-slide-pending-reveal 0.01s linear 8s forwards;
}

@keyframes home-slide-pending-reveal {
  to { opacity: 1; }
}

@media (min-width: 769px) {
  .home-slide--embedded-banner--png .home-slide-picture img {
    object-position: left center;
  }

  .home-slide--embedded-banner--jpg .home-slide-picture img {
    object-position: center;
  }
}
