/* ============================================
   唤心萌动 · 基础层（暗色）
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全局氛围光（固定在视口，随各区内容微调透明度） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42% 34% at 12% -4%, rgba(109, 114, 255, 0.16), transparent 60%),
    radial-gradient(38% 30% at 96% 30%, rgba(167, 139, 250, 0.1), transparent 60%),
    radial-gradient(36% 30% at 40% 108%, rgba(255, 138, 92, 0.07), transparent 60%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

::selection {
  background: rgba(129, 136, 255, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

/* ---------- 版心 ---------- */
.container {
  width: min(var(--container), 92vw);
  margin-inline: auto;
}

/* ---------- 页面主区 ---------- */
.page-main {
  padding-top: var(--header-h);
}

section {
  position: relative;
}

/* ---------- 标题体系 ---------- */
h1,
h2,
h3,
h4 {
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.4rem, 5vw, 3.8rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
}

.section-head.center .kicker::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
}

.section-title {
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.section-sub {
  margin-top: 0.85rem;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.9;
  max-width: 56ch;
}

.section-head.center .section-sub {
  margin-inline: auto;
}

/* ---------- 渐变文字 ---------- */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 图片兜底 ---------- */
.img-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(167, 139, 250, 0.35), transparent 55%),
    radial-gradient(120% 120% at 85% 90%, rgba(255, 138, 92, 0.22), transparent 55%),
    linear-gradient(135deg, #171b45, #0a0d24);
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 滚动进场 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal="left"] {
  transform: translateX(-36px);
}

[data-reveal="right"] {
  transform: translateX(36px);
}

[data-reveal="zoom"] {
  transform: scale(0.92);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.35s var(--ease-out);
  z-index: 90;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  color: var(--accent);
  border-color: rgba(255, 138, 92, 0.45);
}

/* ---------- 通用文本链接 ---------- */
.t-link {
  color: var(--primary);
  transition: color 0.25s;
}

.t-link:hover {
  color: var(--accent);
}
