/* ============================================================
   base.css  全局基础：极淡网格 + Hero 几何背景 / 排版 / 容器 / 动效降级
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 极淡细网格底纹（编辑式，不抢戏） */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
}

/* 极淡噪点，增加纸面质感（非常弱） */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: .015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 排版：紧凑、负字距、冷峻 */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
h1 { font-size: 42px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 容器 */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* 通用工具 */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* 自定义光标光晕（信号蓝，极淡、小） */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 320px; height: 320px;
  margin: -160px 0 0 -160px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  pointer-events: none; z-index: 9998; opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }

/* 滚动入场（轻盈：淡入 + 小上移） */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: translateY(0);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

/* reduced-motion：关闭非必要动效 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
