/* ===============================================================
   hero-effects.css — 动态背景效果 (Ken Burns + 金色光点)
   灵感来源: game-poster-site.netlify.app
   纯 CSS 实现，零 JS 依赖
   =============================================================== */

/* ── 1. Ken Burns 背景层：缓慢推拉巡游 ── */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* 底层纹理：模拟画布 / 纸张颗粒感 */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(168, 133, 61, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 60%, rgba(168, 133, 61, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 30%, rgba(201, 180, 136, 0.04) 0%, transparent 70%);
  animation: heroDrift 34s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* 叠加层：暗角 + 深度感 */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(23, 19, 12, 0.7) 100%);
  pointer-events: none;
}

@keyframes heroDrift {
  0% {
    transform: scale(1.06) translate(-1%, -0.5%);
  }
  50% {
    transform: scale(1.1) translate(0.5%, 1%);
  }
  100% {
    transform: scale(1.04) translate(1%, -1%);
  }
}


/* ── 2. 金色浮动光点 ── */
.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__particle {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 180, 136, 0.9) 0%,
    rgba(168, 133, 61, 0.5) 35%,
    rgba(168, 133, 61, 0.1) 60%,
    transparent 78%
  );
  box-shadow:
    0 0 6px 1px rgba(168, 133, 61, 0.5),
    0 0 20px 4px rgba(168, 133, 61, 0.15);
  opacity: 0;
  animation: particleDrift linear infinite;
  will-change: transform, opacity;
}

/* 不同粒子的大小、位置、速度 —— 制造随机感 */
.hero__particle:nth-child(1)  { left: 8%;   width: 4px;  height: 4px;  animation-duration: 11s; animation-delay: 0s; }
.hero__particle:nth-child(2)  { left: 18%;  width: 3px;  height: 3px;  animation-duration: 14s; animation-delay: 2s; }
.hero__particle:nth-child(3)  { left: 28%;  width: 5px;  height: 5px;  animation-duration: 10s; animation-delay: 4s; }
.hero__particle:nth-child(4)  { left: 38%;  width: 2px;  height: 2px;  animation-duration: 16s; animation-delay: 1s; }
.hero__particle:nth-child(5)  { left: 48%;  width: 4px;  height: 4px;  animation-duration: 12s; animation-delay: 5s; }
.hero__particle:nth-child(6)  { left: 58%;  width: 3px;  height: 3px;  animation-duration: 15s; animation-delay: 3s; }
.hero__particle:nth-child(7)  { left: 68%;  width: 6px;  height: 6px;  animation-duration: 13s; animation-delay: 0s; }
.hero__particle:nth-child(8)  { left: 75%;  width: 2px;  height: 2px;  animation-duration: 17s; animation-delay: 6s; }
.hero__particle:nth-child(9)  { left: 85%;  width: 4px;  height: 4px;  animation-duration: 11s; animation-delay: 2.5s; }
.hero__particle:nth-child(10) { left: 92%;  width: 3px;  height: 3px;  animation-duration: 14s; animation-delay: 4.5s; }
.hero__particle:nth-child(11) { left: 5%;   width: 2px;  height: 2px;  animation-duration: 18s; animation-delay: 7s; }
.hero__particle:nth-child(12) { left: 95%;  width: 5px;  height: 5px;  animation-duration: 12s; animation-delay: 8s; }

@keyframes particleDrift {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  40% {
    opacity: 0.5;
  }
  70% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-120vh) translateX(30px);
    opacity: 0;
  }
}


/* ── 3. 滚动指示器金色扫描线（已有 scrollPulse，增强之） ── */
/* 原 hero.css 中 .hero__scroll-line 已有 pulse，
   这里添加一个向上扫描的光标效果 */
.hero__scroll::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: linear-gradient(transparent, var(--gold));
  animation: cueScan 2.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes cueScan {
  0%   { top: 0; opacity: 0; }
  30%  { opacity: 1; }
  80%  { opacity: 0; }
  100% { top: 48px; opacity: 0; }
}


/* ── 响应式：移动端减少粒子 ── */
@media (max-width: 768px) {
  .hero__particle:nth-child(n+8) {
    display: none;
  }

  .hero__bg::before {
    animation-duration: 24s; /* 移动端稍加快，省电 */
  }
}

/* ── 尊重 prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero__bg::before,
  .hero__particle,
  .hero__scroll::after {
    animation: none !important;
  }
}
