/* ==========================================================================
   幻异阁网络科技 · 基础层
   设计变量 / 重置 / 排版 / 动画 / 工具类
   全部为本地样式，无任何远程依赖
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 色板：深空墨色 + 电光蓝 → 极光青，辅以香槟金点缀 */
  --ink:          #05070d;
  --ink-2:        #080d17;
  --surface:      #0c1220;
  --surface-2:    #111a2c;
  --surface-3:    #162034;

  --line:         rgba(255, 255, 255, .08);
  --line-2:       rgba(255, 255, 255, .16);

  --text:         #e9edf6;
  --text-2:       #b9c3d6;
  --muted:        #8b98b0;

  --brand:        #2f6bff;
  --brand-2:      #00e5c0;
  --gold:         #d9b779;

  --grad:         linear-gradient(115deg, #2f6bff 0%, #00e5c0 100%);
  --grad-rev:     linear-gradient(115deg, #00e5c0 0%, #2f6bff 100%);
  --grad-soft:    linear-gradient(115deg, rgba(47, 107, 255, .18), rgba(0, 229, 192, .10));
  --grad-gold:    linear-gradient(115deg, #f0d9a8 0%, #d9b779 45%, #b8934f 100%);

  /* 圆角 */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-sm: 0 10px 30px rgba(0, 0, 0, .28);
  --sh:    0 24px 60px rgba(0, 0, 0, .45);
  --sh-lg: 0 40px 100px rgba(0, 0, 0, .55);
  --sh-glow: 0 0 0 1px rgba(47, 107, 255, .35), 0 18px 50px rgba(47, 107, 255, .22);

  /* 布局 */
  --maxw:   1240px;
  --gutter: 24px;
  --header-h: 78px;

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 字体：仅使用系统本地字体，不加载任何远程字体 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
               "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans CJK SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-num: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI",
              "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .28s var(--ease), opacity .28s var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

::selection { background: rgba(47, 107, 255, .4); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #24314c, #1a2438);
  border-radius: var(--r-pill);
  border: 2px solid var(--ink-2);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #2f6bff, #1b4bbf); }

/* 焦点可达性 */
:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. 排版 ---------- */
.h1, .h2, .h3, .h4 {
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: #fff;
}

.h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
.h4 { font-size: 1.12rem; letter-spacing: -.01em; }

.lead {
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  color: var(--text-2);
  line-height: 1.85;
}

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; letter-spacing: .04em; }

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

/* ---------- 4. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: 1420px; }

.section {
  position: relative;
  padding: 116px 0;
}

.section--tight { padding: 80px 0; }
.section--flush-top { padding-top: 0; }

.section--alt {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(47, 107, 255, .10), transparent 65%),
    radial-gradient(760px 380px at 88% 100%, rgba(0, 229, 192, .08), transparent 62%),
    var(--ink-2);
  border-block: 1px solid var(--line);
}

.section--deep {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}

.stack > * + * { margin-top: var(--stack, 16px); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* 背景网格 */
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

/* 光斑 */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow--blue { background: rgba(47, 107, 255, .30); }
.glow--teal { background: rgba(0, 229, 192, .22); }

/* 屏幕阅读器专用 */
.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;
}

/* 跳转到主内容 */
.skip-link {
  position: absolute;
  left: 50%; top: -80px;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 14px; }

/* ---------- 5. 动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--left  { transform: translateX(-36px); }
.reveal--right { transform: translateX(36px); }
.reveal--zoom  { transform: scale(.94); }
.reveal--left.is-visible,
.reveal--right.is-visible,
.reveal--zoom.is-visible { transform: none; }

.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }
.d5 { transition-delay: .40s; }
.d6 { transition-delay: .48s; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.82); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes barGrow {
  from { transform: scaleY(.15); }
  to   { transform: scaleY(1); }
}

@keyframes dashFlow {
  to { stroke-dashoffset: -1000; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

/* 尊重用户的减少动效偏好 */
@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; }
}

/* ---------- 6. 打印 ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .to-top, .cta-band { display: none; }
}
