/* Hero — 白幕加载后 → 长卷滚动展开 → 诗雨 */

@import url('https://fonts.googleapis.com/css2?family=LXGW+WenKai:wght@400&family=Noto+Sans+SC:wght@100;200;700&family=Noto+Serif+SC:wght@100;200;300;400;700;900&display=swap');

.chapter[data-chapter-id="01-intro"] {
  padding: 0;
  min-height: auto;
  background: transparent;
}

.chapter[data-chapter-id="01-intro"] .chapter__inner {
  width: 100%;
  max-width: none;
}

.chapter[data-chapter-id="01-intro"] .chapter__content {
  display: block;
}

.hero {
  --hero-ink: #2a2a2a;
  --hero-ink-soft: #3a3a3a;
  --hero-ink-faint: #5c5c5c;
  --hero-serif: 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --hero-cn: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
  --hero-edge: clamp(1.5rem, 4.6vw, 3.8rem);
  background: transparent;
  color: var(--hero-ink);
}

.hero__scroll-track {
  position: relative;
  background: transparent;
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: visible;
  background: transparent;
}

/* —— 长卷：灰白 + 纱幕 + 滚动位移 —— */
.hero__figure-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 1;
}

.hero__figure-wrap--revealed {
  opacity: 1;
}

.hero__figure-inner {
  will-change: transform;
  transform-origin: 50% 0;
}

.hero__figure {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%) contrast(1.04) brightness(1.06);
  opacity: 0.32;
  image-rendering: auto;
}

/* —— 第一页：居中标题 + 滚动提示 —— */
.hero__page1 {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.hero__page1--revealed {
  opacity: 1;
}

.hero__title-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: max-content;
  max-width: 94vw;
  text-align: center;
  opacity: 1;
}

.hero__title {
  display: block;
  margin: 0;
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
  font-weight: 300;
  font-synthesis: none;
  font-size: clamp(1.48rem, 3.15vw, 2.18rem);
  letter-spacing: 0.18em;
  line-height: 1.35;
  color: rgba(78, 78, 78, 0.74);
  text-align: center;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.hero__scroll-hint {
  position: absolute;
  bottom: clamp(1.35rem, 4.5vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, transparent, rgba(10, 10, 10, 0.96));
}

.hero__scroll-label {
  font-family: var(--hero-cn);
  font-size: clamp(0.72rem, 1.6vw, 0.82rem);
  font-weight: 100;
  font-synthesis: none;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: rgba(10, 10, 10, 0.96);
  -webkit-font-smoothing: antialiased;
}

/* —— 英文标语：全宽磨砂条，先于图画下移被滚走 —— */
.hero__captions {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 1;
}

.hero__captions--revealed {
  opacity: 1;
}

.hero__caption {
  position: absolute;
  margin: 0;
  font-family: var(--hero-serif);
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.55;
  white-space: nowrap;
}

.hero__caption-text {
  display: block;
}

.hero__caption--long {
  left: 0;
  right: 0;
  top: calc(50% - 4.85rem);
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.82rem 1.2rem;
  font-size: clamp(0.58rem, 1.05vw, 0.74rem);
  color: rgba(28, 28, 28, 0.88);
}

.hero__caption--short {
  left: 50%;
  top: calc(50% + 2.55rem);
  bottom: auto;
  width: max-content;
  padding: 0.42rem 0.95rem;
  font-size: clamp(0.52rem, 0.9vw, 0.66rem);
  letter-spacing: 0.2em;
  color: rgba(28, 28, 28, 0.8);
}

/* —— 第二页：诗雨 —— */
.hero__page2 {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  opacity: 0;
  visibility: hidden;
}

.hero__rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
}

@media (max-width: 767px) {
  .hero {
    --hero-edge: clamp(0.85rem, 4.2vw, 1.5rem);
  }

  .hero__title {
    font-size: clamp(1.08rem, 4.8vw, 1.38rem);
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .hero__caption {
    letter-spacing: 0.1em;
  }

  .hero__scroll-label {
    font-size: clamp(0.68rem, 3.2vw, 0.76rem);
  }

  .hero__caption--long {
    top: calc(50% - 4.1rem);
    padding: 0.7rem 0.8rem;
  }

  .hero__caption--short {
    top: calc(50% + 2.15rem);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__scroll-hint {
    animation: hero-scroll-float 3.4s ease-in-out infinite;
  }
}

@keyframes hero-scroll-float {
  0%,
  100% {
    opacity: 0.78;
    transform: translateX(-50%) translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(6px);
  }
}
