/* ============================================================
   Agent-Z 主页样式
   ============================================================ */

:root {
  --bg: #0a0e17;
  --bg-alt: #0f1524;
  --bg-card: #131a2c;
  --border: #1e2740;
  --text: #e6eaf2;
  --text-dim: #93a0bd;
  --text-muted: #5b6a8c;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --accent-3: #22d3a7;
  --danger: #ff5d6c;
  --warning: #ffc55c;
  --success: #22d3a7;
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1100px;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

img { max-width: 100%; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 14, 23, 0.95);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-links .nav-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 8px 18px;
  border-radius: 999px;
}

.nav-links .nav-cta:hover { opacity: 0.9; color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(79, 140, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 40% at 85% 65%, rgba(124, 92, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 35% at 12% 75%, rgba(34, 211, 167, 0.08), transparent 70%),
    linear-gradient(180deg, #0a0e17 0%, #0c1120 55%, #0a0e17 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 140, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 140, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 24px;
  margin-bottom: 24px;
  box-shadow: 0 0 60px rgba(79, 140, 255, 0.35);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-title {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #8fb4ff 70%, #b39dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-tagline {
  margin-top: 18px;
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--text);
}

.hero-desc {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text-dim);
  max-width: 560px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 30px rgba(79, 140, 255, 0.35);
}

.btn-primary:hover { box-shadow: 0 12px 40px rgba(79, 140, 255, 0.5); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover { border-color: var(--accent); }

.btn-sm { padding: 10px 22px; font-size: 14px; }

/* ============================================================
   终端
   ============================================================ */
.terminal {
  width: min(680px, 100%);
  margin: 56px auto 0;
  text-align: left;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(79, 140, 255, 0.06);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: var(--danger); }
.dot-yellow { background: var(--warning); }
.dot-green { background: var(--success); }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
}

.terminal-body .line { color: #c9d4ea; }

.terminal-body .prompt { color: var(--success); margin-right: 8px; }

.terminal-body .muted { color: var(--text-dim); }

.terminal-body .dim { opacity: 0.75; }

.terminal-body .cmt { color: var(--text-muted); }

.terminal-sm { margin: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }

.typing { color: var(--text-dim); }

.typing::after {
  content: "▋";
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   通用 Section
   ============================================================ */
.section { padding: 96px 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 56px;
  color: var(--text-dim);
  font-size: 16px;
}

/* ============================================================
   特性卡片
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.feature-icon { font-size: 34px; margin-bottom: 14px; }

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p { color: var(--text-dim); font-size: 14.5px; }

/* ============================================================
   架构图
   ============================================================ */
.arch-diagram {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.arch-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  width: 100%;
}

.arch-row.center { display: flex; justify-content: center; }

.arch-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.25s, border-color 0.25s;
}

.arch-node:hover { transform: translateY(-3px); }

.arch-node strong { font-size: 15px; font-weight: 700; }

.arch-node span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
}

.node-entry { border-top: 3px solid var(--accent); }

.node-core {
  width: min(420px, 100%);
  border-top: 3px solid var(--accent-3);
  background: linear-gradient(180deg, rgba(34, 211, 167, 0.06), var(--bg-card));
}

.arch-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding: 6px 0;
  letter-spacing: 1px;
}

.arch-legend {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 32px;
  color: var(--text-dim);
  font-size: 13px;
}

.legend-item { display: inline-flex; align-items: center; gap: 8px; }

.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.legend-dot.entry { background: var(--accent); }
.legend-dot.core { background: var(--accent-3); }

/* ============================================================
   平台支持
   ============================================================ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.platform-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.25s, background 0.25s;
}

.platform-badge:hover { border-color: var(--accent); background: rgba(79, 140, 255, 0.06); }

.platform-note {
  margin-top: 28px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
}

.ok { color: var(--success); }

/* ============================================================
   快速开始
   ============================================================ */
.quickstart-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.quickstart-side h3 { font-size: 20px; margin-bottom: 18px; }

.usage-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.usage-list li {
  padding-left: 26px;
  position: relative;
  color: var(--text-dim);
  font-size: 14.5px;
}

.usage-list li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.usage-list b { color: var(--text); }

/* ============================================================
   文档导航
   ============================================================ */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.doc-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.doc-icon { font-size: 30px; margin-bottom: 14px; }

.doc-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

.doc-card p { color: var(--text-dim); font-size: 14px; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 60px 0 40px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
}

.footer-logo { width: 26px; height: 26px; object-fit: contain; }

.footer-desc { margin-top: 12px; color: var(--text-dim); font-size: 14px; }

.footer-meta {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13.5px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.footer-meta a { color: var(--text-dim); }
.footer-meta a:hover { color: var(--accent); }

.footer-copy { margin-top: 16px; color: var(--text-muted); font-size: 12.5px; }

/* ============================================================
   入场动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  .quickstart-grid { grid-template-columns: 1fr; gap: 32px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 0 20px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .nav-links.open { transform: translateY(0); }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a { display: block; padding: 13px 0; }

  .nav-links .nav-cta { display: inline-block; margin-top: 8px; }

  .section { padding: 72px 0; }
}
