/* ============================================================
   ZCubix · 智立方  —  全局样式 / 设计令牌 / 导航 / 通用动效
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 背景层 */
  --bg-0: #070710;
  --bg-1: #0f0f1f;
  --bg-2: #15152b;

  /* 文字 */
  --fg-0: #f5f5ff;
  --fg-1: #b8b8d4;
  --fg-2: #7a7a9a;

  /* 主色：紫蓝霓虹渐变 */
  --c-indigo: #6366f1;
  --c-violet: #8b5cf6;
  --c-pink:   #ec4899;

  /* 强调色 */
  --c-cyan:   #06b6d4;
  --c-neon:   #10ff7e;

  /* 渐变 */
  --grad-main: linear-gradient(135deg, var(--c-indigo) 0%, var(--c-violet) 50%, var(--c-pink) 100%);
  --grad-cool: linear-gradient(135deg, var(--c-cyan) 0%, var(--c-indigo) 100%);
  --grad-text: linear-gradient(120deg, #a5b4fc 0%, #c4b5fd 35%, #f9a8d4 70%, #67e8f9 100%);

  /* 玻璃 */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bd: rgba(255, 255, 255, 0.10);
  --glass-blur: 18px;

  /* 辉光 */
  --glow-violet: 0 0 40px rgba(139, 92, 246, 0.45);
  --glow-cyan:   0 0 40px rgba(6, 182, 212, 0.40);

  /* 间距 / 尺寸 */
  --nav-h: 72px;
  --maxw: 1200px;
  --radius: 18px;
  --radius-lg: 28px;

  /* 字体 */
  --font-sans: "Space Grotesk", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

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

/* 背景层：渐变 + 光斑 + 噪点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%,  rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 15%, rgba(236, 72, 153, 0.14), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(6, 182, 212, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- 通用布局 ---------- */
.container {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

section {
  position: relative;
  padding: clamp(64px, 10vw, 140px) 0;
}

.section-head {
  margin-bottom: 56px;
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
  padding: 6px 14px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.06);
  margin-bottom: 20px;
}

.section-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-cyan);
  box-shadow: 0 0 8px var(--c-cyan);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-title .accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-sub {
  margin-top: 18px;
  color: var(--fg-1);
  font-size: 1.05rem;
  max-width: 640px;
  margin-inline: auto;
}

/* ---------- 玻璃卡片通用 ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(7, 7, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--glass-bd);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, var(--maxw));
}

/* Logo：Z 字 + 立方体小标 */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 34px; height: 34px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grad-main);
  box-shadow: var(--glow-violet);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(-3deg); }
}

.logo-text span { color: var(--fg-2); font-weight: 400; }

/* 导航链接 */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 8px 16px;
  font-size: 0.95rem;
  color: var(--fg-1);
  border-radius: 100px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--grad-main);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover { color: var(--fg-0); }
.nav-links a.active { color: var(--fg-0); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 8px;
  padding: 9px 20px;
  border-radius: 100px;
  background: var(--grad-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(139, 92, 246, 0.6); }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-bd);
  background: var(--glass-bg);
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--fg-0);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 自定义光标光斑 ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  transition: opacity 0.4s var(--ease);
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(139, 92, 246, 0.65); }
.btn-ghost {
  border: 1px solid var(--glass-bd);
  background: var(--glass-bg);
  color: var(--fg-0);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--c-violet); transform: translateY(-3px); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--glass-bd);
  padding: 48px 0 36px;
  background: rgba(7, 7, 16, 0.5);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer p { color: var(--fg-2); font-size: 0.9rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--fg-1); font-size: 0.9rem; transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--c-cyan); }

/* 备案信息区 */
.footer-filing {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.filing-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-2);
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--glass-bd);
  background: var(--glass-bg);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.filing-link::before {
  content: "◆";
  font-size: 0.65rem;
  color: var(--c-cyan);
}
.filing-link:hover { color: var(--fg-0); border-color: var(--c-cyan); }

.filing-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  opacity: 0.6;
  font-style: italic;
}
.filing-pending::before {
  content: "⏳";
  font-size: 0.8rem;
  font-style: normal;
}

/* ---------- 选区 / 滚动条 ---------- */
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c-indigo), var(--c-violet));
  border-radius: 10px;
  border: 2px solid var(--bg-0);
}

/* ---------- 无障碍：尊重 reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
