/* ============================================================
   Reseek 官网 · 基础样式与视觉母题工具类
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* —— 全局坐标网格背景（精密图纸母题） —— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 120% 100% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 120% 100% at 50% 0%, #000 30%, transparent 90%);
}

/* —— 颗粒噪点层（质感） —— */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

/* —— 通用容器 —— */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  position: relative;
  padding-block: var(--sp-section);
  scroll-margin-top: 80px; /* 锚点跳转时避开固定导航遮挡 */
}

/* —— 排版基础 —— */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--text); }
::selection { background: var(--cyan); color: var(--void); }

/* ============================================================
   视觉母题工具类（全站复用）
   ============================================================ */

/* —— 刻度标注 tick：[ 01 / PAIN POINTS ] —— */
.tick {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.tick::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}
.tick .idx { color: var(--cyan); }

/* —— 切角面板（仪表面板质感） —— */
.clip-corner {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

/* —— 辉光边框 —— */
.glow-border {
  box-shadow: 0 0 0 1px var(--line), 0 0 40px -12px var(--cyan-glow);
}

/* —— section 标题装饰：等宽小标 + 大标题 —— */
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  margin-top: 1.2rem;
  max-width: 20ch;
}

/* —— 滚动渐入（由 main.js 加 .is-visible 触发） —— */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

/* —— 通用按钮（CTA） —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9em 1.6em;
  border: 1px solid var(--line-bright);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-primary {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan-soft), 0 0 30px -10px var(--cyan-glow);
}
.btn-primary:hover {
  background: var(--cyan);
  color: var(--void);
  box-shadow: 0 0 40px -8px var(--cyan-glow);
}

/* —— 大号描边装饰数字 —— */
.ghost-num {
  font-family: var(--font-display);
  font-size: var(--fs-num);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-bright);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

/* —— 无障碍 & 动效偏好 —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
