/* ============================================================
   hero.css — 首屏 3D 森林场景样式
   trees.center · 种亿棵树
   ============================================================ */

/* --- 设计令牌 --- */
:root {
  --c-deep-green:  #0a1f0a;
  --c-forest:      #1a4a1a;
  --c-emerald:     #2d8a4e;
  --c-gold:        #c9a84c;
  --c-night:       #0a0e2a;
  --c-neon-green:  #4ade80;
  --font-cn:       'Noto Serif SC', 'Songti SC', serif;
  --font-en:       'Playfair Display', 'Georgia', serif;
}

/* --- 全屏容器 --- */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--c-deep-green);
}

/* --- Three.js 画布容器 --- */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#hero-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* --- 内容叠加层 --- */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  pointer-events: none;         /* 让鼠标事件穿透到画布 */
}

.hero-content > * {
  pointer-events: auto;         /* 文字本身可交互 */
}

/* --- 中文主标题 --- */
.hero-title-cn {
  font-family: var(--font-cn);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-shadow:
    0 0 40px rgba(74, 222, 128, .35),
    0 0 80px rgba(74, 222, 128, .15),
    0 2px 4px rgba(0, 0, 0, .6);
  animation: titleBreathe 4s ease-in-out infinite;
  margin-bottom: 0.3em;
}

@keyframes titleBreathe {
  0%, 100% {
    text-shadow:
      0 0 40px rgba(74, 222, 128, .35),
      0 0 80px rgba(74, 222, 128, .15),
      0 2px 4px rgba(0, 0, 0, .6);
  }
  50% {
    text-shadow:
      0 0 60px rgba(74, 222, 128, .55),
      0 0 120px rgba(74, 222, 128, .25),
      0 2px 4px rgba(0, 0, 0, .6);
  }
}

/* --- 英文副标题 --- */
.hero-title-en {
  font-family: var(--font-en);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, .7);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5em;
}

/* --- 副标语 --- */
.hero-subtitle {
  font-family: var(--font-cn);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--c-neon-green);
  opacity: .85;
  letter-spacing: 0.08em;
  margin-top: 0.5em;
}

/* --- 底部滚动引导 --- */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, .5);
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: hintFade 2.5s ease-in-out infinite;
}

.scroll-hint-arrow {
  width: 1px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.scroll-hint-arrow::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--c-neon-green));
  animation: arrowSlide 2s ease-in-out infinite;
}

@keyframes arrowSlide {
  0%   { top: -100%; }
  50%  { top: 0; }
  100% { top: 100%; }
}

@keyframes hintFade {
  0%, 100% { opacity: .4; }
  50%      { opacity: .8; }
}

/* --- 覆盖渐变（底部淡出） --- */
.hero-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30vh;
  background: linear-gradient(to bottom, transparent, var(--c-deep-green));
  z-index: 5;
  pointer-events: none;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .hero-title-cn {
    letter-spacing: 0.06em;
  }

  .hero-title-en {
    letter-spacing: 0.12em;
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  }

  .scroll-hint {
    bottom: 1.2rem;
  }
}

@media (max-width: 480px) {
  #hero {
    min-height: 100svh;          /* 小视口高度 */
  }

  .hero-content {
    padding: 1rem;
  }
}
