/* =========================================================
   AGG 安全网关 · 玻璃拟态渐变设计系统 site-glass.css
   风格：Glassmorphism —— 深空紫底 + 极光渐变光斑 +
   毛玻璃卡片 + 彩虹渐变标题 + 浮动微光
   供 index / pricing / faq / help / Log 全部五页使用。
   ========================================================= */
:root {
  /* ---------- 色板（深空极光） ---------- */
  --bg: #0a0618;
  --bg-soft: #100a24;
  --surface: rgba(255, 255, 255, .06);
  --surface-2: rgba(255, 255, 255, .09);
  --glass-grad: linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045));
  --ink: #f4f2ff;
  --ink-2: #bdb7dd;
  --ink-3: #8b85ad;
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(255, 255, 255, .24);

  --brand: #67e8f9;
  --brand-2: #a78bfa;
  --brand-3: #f0abfc;
  --brand-hover: #a5f3fc;
  --brand-grad: linear-gradient(92deg, #22d3ee, #818cf8 52%, #e879f9);
  --brand-grad-text: linear-gradient(92deg, #67e8f9 5%, #a5b4fc 48%, #f0abfc 95%);
  --brand-soft: rgba(103, 232, 249, .10);
  --brand-glow: rgba(129, 140, 248, .30);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .12);
  --warn: #fcd34d;
  --warn-soft: rgba(251, 191, 36, .10);
  --warn-line: rgba(251, 191, 36, .30);
  --danger: #fda4af;
  --danger-soft: rgba(244, 114, 182, .12);

  /* ---------- 字体 ---------- */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "SFMono-Regular", Consolas,
    "Liberation Mono", Menlo, monospace;

  /* ---------- 圆角 ---------- */
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 18px;
  --r-xl: 24px;
  --r-pill: 980px;

  /* ---------- 阴影 / 光晕 ---------- */
  --shadow-card: 0 8px 30px rgba(3, 0, 20, .45);
  --shadow-lift: 0 24px 60px rgba(3, 0, 20, .55);
  --glow-brand: 0 0 0 1px rgba(167, 139, 250, .35), 0 10px 44px rgba(129, 140, 248, .25);
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, .14);

  /* ---------- 布局 ---------- */
  --nav-h: 58px;
  --max: 1120px;

  /* ---------- 动效 ---------- */
  --ease: cubic-bezier(.32, .72, 0, 1);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- 极光背景（固定层，全局共享） ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(52vw 40vw at 12% -8%, rgba(124, 58, 237, .34), transparent 62%),
    radial-gradient(44vw 36vw at 88% 6%, rgba(34, 211, 238, .20), transparent 64%),
    radial-gradient(48vw 42vw at 78% 88%, rgba(232, 121, 249, .20), transparent 66%),
    radial-gradient(40vw 34vw at 8% 82%, rgba(59, 130, 246, .22), transparent 64%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(80vw 60vh at 50% 0, #000 20%, transparent 80%);
  mask-image: radial-gradient(80vw 60vh at 50% 0, #000 20%, transparent 80%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: rgba(167, 139, 250, .4); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- 毛玻璃通用材质 ---------- */
.glass, .panel {
  background: var(--glass-grad);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card), var(--inset-hi);
}

/* ---------- 顶部导航（浮动玻璃胶囊） ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: rgba(16, 10, 36, .55);
  backdrop-filter: saturate(170%) blur(22px);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px; gap: 16px;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-grad);
  box-shadow: 0 3px 16px var(--brand-glow), var(--inset-hi);
}
.logo-text { line-height: 1.2; font-size: 14.5px; letter-spacing: -.01em; }
.logo small { display: block; font-size: 9.5px; font-weight: 500; color: var(--ink-3); letter-spacing: .13em; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a:not(.btn) {
  padding: 7px 13px; border-radius: var(--r-pill); font-size: 13.5px;
  color: rgba(244, 242, 255, .66);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.nav-links a.on {
  color: var(--ink); font-weight: 600;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav .btn { margin-left: 10px; padding: 8px 17px; font-size: 13px; }

/* ---------- 汉堡按钮 ---------- */
.nav-toggle {
  display: none; width: 38px; height: 38px; flex: none;
  border: 0; border-radius: var(--r-pill); background: transparent;
  cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.6px; border-radius: 2px;
  background: var(--ink);
  transition: top .3s var(--ease), transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 18.5px; }
.nav-toggle span:nth-child(3) { top: 24px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 18.5px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 18.5px; transform: rotate(-45deg); }

/* ---------- 移动端抽屉 ---------- */
.drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 49;
  background: rgba(16, 10, 36, .9);
  backdrop-filter: saturate(170%) blur(24px);
  -webkit-backdrop-filter: saturate(170%) blur(24px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px 20px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(-12px); visibility: hidden;
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
body.nav-open .drawer { opacity: 1; transform: none; visibility: visible; }
.drawer a:not(.btn) {
  padding: 13px 4px; font-size: 16px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line); letter-spacing: -.01em;
}
.drawer a:not(.btn):last-of-type:not(.btn) { border-bottom: 0; }
.drawer a.on {
  background: var(--brand-grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.drawer .btn { margin-top: 14px; padding: 12px; }

/* ---------- 按钮（渐变玻璃） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 24px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease),
    background .25s var(--ease), filter .25s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--brand-grad); color: #120826;
  box-shadow: 0 6px 26px rgba(129, 140, 248, .38), var(--inset-hi);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 8px 34px rgba(167, 139, 250, .5), var(--inset-hi); }
.btn-outline {
  background: rgba(255, 255, 255, .05); color: var(--ink); border-color: var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-outline:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .1); }
.btn-ghost {
  background: var(--glass-grad); color: var(--ink); border-color: var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.link-more { color: var(--brand); font-weight: 500; transition: color .2s var(--ease); }
.link-more:hover { color: var(--brand-hover); text-decoration: underline; }
.link-more::after { content: " ›"; }

/* ---------- 子页面页头（极光 + 渐变标题） ---------- */
.pagehead {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 84px) 0 60px;
}
.pagehead::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 30% -80px, rgba(124, 58, 237, .30), transparent 70%),
    radial-gradient(520px 280px at 75% -60px, rgba(34, 211, 238, .18), transparent 70%);
}
.ph-inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.pagehead .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.pagehead .crumb a { transition: color .2s var(--ease); }
.pagehead .crumb a:hover { color: var(--brand); }
.pagehead h1 {
  font-size: clamp(34px, 4.8vw, 52px); font-weight: 700;
  letter-spacing: -.028em; line-height: 1.08;
  background: linear-gradient(120deg, #fff 20%, #c7d2fe 60%, #f0abfc 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pagehead p { margin-top: 16px; color: var(--ink-2); font-size: 17px; line-height: 1.55; max-width: 640px; }

/* ---------- 区块标题 ---------- */
.sec-head { max-width: 680px; margin-bottom: 48px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-tag {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--brand-grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sec-head h2 {
  margin: 10px 0 12px; font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.14; font-weight: 700; letter-spacing: -.024em;
}
.sec-head p { color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 30px 0;
}
.foot {
  display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; align-items: center;
  color: var(--ink-3); font-size: 12.5px;
}
.foot a { transition: color .2s var(--ease); }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--ink-2); }

/* ---------- 滚动进入动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 无障碍降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .drawer, .nav-toggle span, .btn { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #100a24; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .drawer { background: #100a24; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .glass, .panel { backdrop-filter: none; -webkit-backdrop-filter: none; background: #171029; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 620px) {
  .logo small { display: none; }
  .wrap, .ph-inner { padding: 0 20px; }
  .btn { padding: 10px 20px; }
}
