/* ============================================================
   hero.css — 首屏：透过一扇窗，看天空
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050506;
  isolation: isolate;
}

/* ---------- 背景影像 ---------- */

.hero__media {
  position: absolute;
  inset: -6% 0 -6% 0;
  z-index: 0;
  will-change: transform;
}

.hero__img,
.hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.14);
  filter: saturate(0.82) contrast(1.06) brightness(0.78);
  animation: heroIn 2.6s var(--ease) 0.15s forwards;
  transition: opacity 1.2s var(--ease-soft);
}

/* 视频 ↔ 图片轮播切换用 */
.hero__img.is-off {
  animation: none;
  opacity: 0;
}

/* 首屏备用图：常驻隐藏，只在视频播完时淡入，不能盖住视频 */
.hero__media [data-hero-still] {
  animation: none;
  opacity: 0;
  transform: scale(1.02);
}

@keyframes heroIn {
  to { opacity: 1; transform: scale(1.02); }
}

/* 柔光 + 暗角，让文字永远压得住 */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 30%, rgba(255, 236, 205, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.24) 34%, rgba(0, 0, 0, 0.62) 78%, #000 100%);
}

/* ---------- 窗框 ---------- */

.hero__frame {
  position: absolute;
  inset: clamp(26px, 4.4vw, 62px);
  /* 顶边必须落在导航下方，避免固定导航把边框上沿遮住 */
  top: calc(var(--nav-h) + clamp(14px, 2vw, 22px));
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  opacity: 0;
  animation: frameIn 1.8s var(--ease) 0.55s forwards;
}

@keyframes frameIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: none; }
}

/* ---------- 内容 ---------- */

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-inline: var(--gutter);
  padding-bottom: 4vh;
  max-width: 1180px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: rgba(245, 245, 247, 0.62);
  margin-bottom: clamp(28px, 4.6vh, 52px);
}

.hero__kicker i {
  display: block;
  width: 34px;
  height: 1px;
  background: rgba(245, 245, 247, 0.42);
}

.hero__title {
  font-size: clamp(40px, 6.2vw, 92px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.015em;
  color: #fff;
  text-shadow: 0 2px 60px rgba(0, 0, 0, 0.35);
}

.hero__title .line-mask > span {
  padding-bottom: 0.06em;
  animation: heroLineUp 1.25s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 130ms + 0.4s);
}

@keyframes heroLineUp {
  to { transform: none; }
}

.hero__title .dot {
  color: var(--accent);
  font-weight: 300;
  padding: 0 0.16em;
}

.hero__sub {
  margin: clamp(26px, 4.2vh, 46px) auto 0;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: rgba(245, 245, 247, 0.6);
  max-width: 30ch;
}

/* 宽屏时副标题保持一行，窄屏自动换行 */
@media (min-width: 900px) {
  .hero__sub {
    max-width: none;
    white-space: nowrap;
  }
}

.hero__actions {
  margin-top: clamp(30px, 4.6vh, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 底部提示 ---------- */

.hero__foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(245, 245, 247, 0.42);
  text-transform: uppercase;
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 4;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(245, 245, 247, 0.4);
}

.hero__scroll i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  position: relative;
  overflow: hidden;
}

.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(-100%);
  animation: scrollRun 2.4s var(--ease-soft) infinite;
}

@keyframes scrollRun {
  0% { transform: translateY(-100%); opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@media (max-width: 820px) {
  .hero__frame { inset: calc(var(--nav-h) + 10px) 16px 16px; }
  .hero__foot { display: none; }
  .hero__scroll { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .hero__scroll i { height: 32px; }
  .hero__content { padding-bottom: 8vh; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__img,
  .hero__frame { animation: none; opacity: 1; transform: none; }
  .hero__scroll i::after { animation: none; }
  .hero__title .line-mask > span { animation: none; transform: none; }
  .hero__kicker,
  .hero__sub,
  .hero__actions { opacity: 1 !important; transform: none !important; animation: none !important; }
}
