/* ============================================================
   dooo design · index.html 首页轮播
   整页锁定一屏（无滚动条）：导航 + 轮播(占剩余高度, cover 居中裁切)
   + 底部信息区。手机端与电脑端均不超出当前窗口。
   切换时双层交叉溶解并叠加缓慢推拉
   ============================================================ */

/* 主图舞台：活动层 relative 撑高，待入层 absolute 覆盖于同一起点 */
#heroStage { isolation: isolate; width: 100%; }
.hero-wrap { width: 100%; }

/* 主图：全宽铺满，高度填满剩余空间，居中裁切 */
.hero-layer {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center center;
  will-change: opacity, transform;
  transition: opacity .8s cubic-bezier(.4,0,.2,1),
              transform 1.4s cubic-bezier(.22,.61,.36,1);
  transform: scale(1.02);
}
.hero-layer-active { opacity: 1; transform: scale(1); }

/* 切换中：旧图缓慢推远淡出，新图从轻微放大状态收束淡入 */
#heroStage.is-switching #heroImage {
  opacity: 0;
  transform: scale(1.045);
}
#heroStage.is-switching #heroImageNext {
  opacity: 1;
  transform: scale(1);
}

/* 项目标题：向上立体翻转切换 */
.title-flip {
  display: inline-block;
  transform-origin: bottom center;
  backface-visibility: hidden;
}
.title-flip.animate {
  animation: flipInUp .55s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes flipInUp {
  0%   { transform: perspective(600px) rotateX(90deg); opacity: 0; }
  100% { transform: perspective(600px) rotateX(0deg);  opacity: 1; }
}

/* 指示器横条宽度过渡（选中变长） */
.ind-bar { transition: width .4s cubic-bezier(.22,.61,.36,1), background-color .3s ease; }

/* 缩略图遮罩过渡 */
.thumb-mask { transition: opacity .4s ease; }

/* ============================================================
   整屏锁定（全部断点）：body 100dvh 无滚动，纵向 flex 排列
   导航(固定浮层) → 轮播(吃掉剩余高度) → 底部信息区(贴底)
   ============================================================ */
body.index-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.index-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 大图区域：吃掉 main 内全部剩余高度，高度不超过底部标题/缩略图 */
.index-main .hero-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0;
}
#heroStage { height: 100%; }

/* 底部信息区：贴底、随 flex 布局排列（不脱离文档流） */
.index-footer {
  flex-shrink: 0;
  position: relative;
  background: #fff;
}

/* 手机端（<640px）：hero 顶部留出固定导航的高度，底部与标题留空隙 */
@media (max-width: 639px) {
  .index-main .hero-wrap {
    padding-top: 5.5rem;
    padding-bottom: 2rem;
  }
}

/* 平板（640–1023px）：轮播与底部信息区之间留空 */
@media (min-width: 640px) and (max-width: 1023px) {
  .index-main .hero-wrap {
    padding-bottom: 2.5rem;
  }
}

/* PC端（≥1024px）：轮播图按剩余高度完整显示、宽度不超出上下区域容器，
   右侧切换指示器收进容器内，并与底部标题/缩略图之间留出空隙 */
@media (min-width: 1024px) {
  .index-main .hero-layer {
    object-fit: contain;
  }
  .index-main .hero-wrap {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    padding-bottom: 3.5rem;
  }
  #heroStage {
    max-width: 1420px;
    margin-left: auto;
    margin-right: auto;
  }
  /* 指示器置于容器右侧边缘：刚好越过内容区一点，与容器边留 16px 空隙 */
  #indicators {
    right: calc(max(0px, (100vw - 1500px) / 2) + 1rem);
  }
}
