/* =========================================================================
   base.css —— 底座
   -------------------------------------------------------------------------
   重置、文档排版、.wrap、区块背景与整屏高度、入场动画、
   文字层级（.eyebrow/.h-display/.lead/.statement/.prose）、
   减少动态效果支持。
   ========================================================================= */

/* ==================== 重置 ==================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ==================== 平滑滚动与锚点定位 ====================
   点导航时平滑滑过去，并让目标区块正好顶到顶栏下方。

   偏移量 = 顶栏高度（--topbar-h）。

   为什么不再用「视口高度百分比」：
     区块高度现在已经是「一屏 − 顶栏」（见 --section-min），
     只要锚点偏移量同样取顶栏高度，点导航后就是标准的一屏一区块，
     上下相邻区块一点边都不会露出来。
     偏移量比顶栏大或小，都会露出相邻区块的一条边。
   ==================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-h);
}

/* ⚠️ 不要再给 [id] 加 scroll-margin-top：
   它和 html 的 scroll-padding-top 是**相加**关系（不是二选一的兜底），
   两边都写会得到两倍偏移量，点导航就会停在区块上方一段距离，
   把上一个区块的尾部露出来。只保留上面这一处。 */

body {
  font-family: var(--font);
  font-size: var(--fs-base);      /* 流式：随视口缩放 */
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== 区块背景 ====================
   原来只有 --bg 和 --bg-1 两个纯色交替，区块之间是硬切一刀。
   现在每个区块用「渐变 + 氛围色晕」，边界平滑过渡，
   整页从上到下有一条色彩流动感。

   色晕用 radial-gradient 的极低透明度叠加，
   只做氛围，不抢内容。想更淡就把 .xx 那个系数调小。
   ================================================= */
.section {
  /* 一屏一个区块：屏幕高，区块就跟着高；
     内容比一屏高时自动长高，不会裁切（min-height 而非 height） */
  min-height: var(--section-min);
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 内容在区块内垂直居中 */

  padding: var(--gap-section) 0;
  position: relative;
  /* 默认：从上一区块的底色平滑过渡进来，再平滑过渡出去 */
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg) 55%, var(--bg) 100%);
}

/* 交替区块：反向的渐变，形成明暗节奏 */
.section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 45%, var(--bg-1) 100%);
}

/* 氛围色晕：给不同区块一点不同的色彩倾向
   （紫 --accent / 青 --accent-2），透明度压得很低，只做层次 */
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% 0%, rgba(124, 92, 255, .10), transparent 65%),
    radial-gradient(760px 420px at 88% 100%, rgba(0, 212, 255, .07), transparent 68%);
}

.section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 440px at 90% 6%, rgba(124, 92, 255, .07), transparent 66%),
    radial-gradient(700px 400px at 6% 96%, rgba(0, 212, 255, .05), transparent 68%);
}

/* 内容要压在色晕之上 */
.section > .wrap { position: relative; z-index: 1; }

/* ==================== 入场动画 ==================== */
/* 只动 opacity + transform，性能最好 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }

/* 依次延迟，做出错落感 */
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }
.reveal[data-delay="4"] { transition-delay: .36s; }

/* ==================== 文字层级 ==================== */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--gap-sm);
}

.h-display {
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: var(--gap-md);
}

/* 渐变文字 —— 游戏官网的灵魂 */
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.h-section {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: var(--gap-sm);
}

.h-card { font-size: var(--fs-card); margin-bottom: var(--gap-sm); }

.lead {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--text-2);
  max-width: 660px;
}

.muted { color: var(--text-3); font-size: var(--fs-sm); }

.section-head { margin-bottom: var(--gap-lg); }
.section-head.center { text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ==================== 大字陈述 ==================== */
.statement {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  max-width: 900px;
}

/* ==================== 长正文（故事） ====================
   单栏 + 限制行宽：中文长段落一行 25-30 字最好读，
   所以这里不用整幅页宽，压到 720px。 */
.prose { max-width: 720px; }
.prose p {
  color: var(--text-2);
  font-size: var(--fs-base);
  line-height: 1.95;
}
.prose p + p { margin-top: var(--gap-md); }

/* ==================== 减少动态效果 ==================== */
/* 系统开启「减少动画」后，全部动画与过渡自动关闭 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
