/* ==========================================================================
   splash.css — 全屏引导页海报 / Ken Burns / 遮罩 / 文字层 / 进度 / 跳过
   ========================================================================== */

.splash {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  background: var(--c-dark);
  color: #fff;
}
.splash__stage { position: absolute; inset: 0; }

/* Swiper 容器铺满（基础位移样式见 vendor/swiper.min.css） */
.splash .swiper,
.splash .swiper-wrapper,
.splash .swiper-slide { width: 100%; height: 100%; }
.splash .swiper-slide { position: relative; overflow: hidden; }

/* 背景图层：可放 img 或 picture>source+img */
.splash__bg,
.splash .swiper-slide > img,
.splash .swiper-slide > picture img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.splash__parallax { will-change: transform; }

/* Ken Burns：scale 1 → 1.08，8s 线性 */
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.kenburns {
  animation: kenburns 8s linear both;
  transform-origin: center center;
}

/* 渐变遮罩，保证文字可读 */
.splash__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, .06) 34%, rgba(0, 0, 0, .58) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, 0) 68%);
  pointer-events: none;
}

/* 文案层 */
.splash__content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(20px, 8vw, 120px);
  transform: translateY(-50%);
  width: min(720px, 82%);
  text-align: left;
}
.splash__title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7.5vw, 6.4rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
/* 字符拆分（splash.js 注入 .char） */
.splash__title .char {
  display: inline-block;
  white-space: pre;
  will-change: transform, opacity;
}
.splash__title .char--space { width: .32em; }
.splash__subtitle {
  margin-top: clamp(16px, 2.4vw, 28px);
  font-size: clamp(.95rem, 1.7vw, 1.4rem);
  font-weight: 300;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .9);
}
.splash__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 48px);
}
.splash__actions .btn--ghost {
  border-color: rgba(255, 255, 255, .85);
  color: #fff;
}
.splash__actions .btn--ghost:hover { color: var(--c-primary); }

/* 进度指示：当前页 / 总数 + 细线进度条 */
.splash__progress {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 8vw, 120px);
  bottom: clamp(24px, 5vh, 46px);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .72rem;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .82);
}
.splash__progress-num { font-variant-numeric: tabular-nums; }
.splash__progress-num .cur { color: #fff; font-size: .95rem; }
.splash__progress-line {
  position: relative;
  width: clamp(72px, 12vw, 140px);
  height: 1px;
  background: rgba(255, 255, 255, .32);
  overflow: hidden;
}
.splash__progress-fill {
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .6s var(--ease-out);
}

/* 跳过按钮 */
.splash__skip {
  position: absolute;
  z-index: 4;
  top: clamp(18px, 3.2vw, 34px);
  right: clamp(20px, 5vw, 64px);
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
  font-size: .66rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.splash__skip:hover { background: #fff; color: var(--c-primary); }

/* 引导页整体淡出（进入时由 JS 添加 .is-leaving） */
.splash.is-leaving {
  opacity: 0;
  transition: opacity .6s var(--ease-out);
  pointer-events: none;
}

/* 指示点定位微调（覆盖 swiper.min.css 默认位置） */
.splash .swiper-pagination {
  bottom: clamp(26px, 5vh, 48px) !important;
  left: auto !important;
  right: clamp(20px, 5vw, 64px);
  width: auto !important;
}
.splash .swiper-pagination-bullet { background: #fff; opacity: .4; }
.splash .swiper-pagination-bullet-active { opacity: 1; background: var(--c-accent); }

/* ================= 移动端：竖版、禁用 Ken Burns 与视差 ================= */
@media (max-width: 767px) {
  .splash__content {
    top: auto;
    bottom: 22%;
    left: 24px;
    width: calc(100% - 48px);
    transform: none;
  }
  .splash__title { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .splash__subtitle { letter-spacing: .14em; }
  .splash__overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .12) 30%, rgba(0, 0, 0, .7) 100%);
  }
  .kenburns { animation: none !important; }
  .splash__parallax { transform: none !important; }
  .splash__progress { bottom: 18px; }
  .splash .swiper-pagination { bottom: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .kenburns { animation: none !important; }
  .splash__parallax { transform: none !important; }
}
