/* ===== 基础重置与设计令牌 ===== */
:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-50: #f0fdfa;
  --teal-200: #99f6e4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --max-w: 72rem;
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

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

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: #fff;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1rem; }
.section { padding: 6rem 0; }
.section--gray { background: var(--gray-50); }
.text-gradient {
  background: linear-gradient(90deg, var(--emerald-600), #0d9488 55%, var(--emerald-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 36px; height: 36px; border-radius: 0.6rem; }
.brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em; }
.nav { display: none; align-items: center; gap: 0.35rem; }
.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  color: var(--gray-600);
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.nav a[aria-current="page"] { background: var(--emerald-50); color: var(--emerald-600); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-xl);
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s;
}
.btn-primary { background: var(--emerald-600); color: #fff; }
.btn-primary:hover { background: var(--emerald-700); }
.btn-ghost { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-ghost:hover { border-color: var(--emerald-200); color: var(--emerald-700); }
.btn-hero {
  border-radius: var(--radius-2xl);
  padding: 1rem 2rem;
  font-size: 1.05rem;
  animation: glow 2.8s ease-in-out infinite;
}
.header-cta { display: none; }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
.menu-toggle span { display: block; height: 2px; background: var(--gray-700); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--gray-100);
  background: #fff;
  padding: 0.75rem 1rem 1.25rem;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-lg);
  color: var(--gray-700);
}
.mobile-menu a[aria-current="page"] { background: var(--emerald-50); color: var(--emerald-600); }
.mobile-menu .btn { width: 100%; margin-top: 0.5rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 8.5rem 0 5rem;
  background: linear-gradient(160deg, #ffffff 0%, var(--emerald-50) 45%, var(--teal-50) 100%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.3;
  pointer-events: none;
}
.hero::before { top: -120px; right: -80px; background: var(--emerald-400); }
.hero::after { bottom: -160px; left: -120px; background: var(--teal-200); }
.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--emerald-100);
  color: var(--emerald-700);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
}
.hero h1 { font-size: 2.8rem; margin: 1.1rem 0; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.2rem; color: var(--gray-600); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.hero-meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.85rem; color: var(--gray-500); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.hero-visual {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-xl);
  padding: 1rem;
}
.hero-visual img { width: 100%; height: auto; border-radius: var(--radius-2xl); }

/* ===== 数据信任条 ===== */
.stats { background: var(--gray-900); color: #fff; padding: 3rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.stat svg { width: 2rem; height: 2rem; color: var(--emerald-400); margin: 0 auto 0.6rem; }
.stat strong { display: block; font-size: 1.9rem; font-weight: 700; }
.stat span { color: var(--gray-400); font-size: 0.9rem; }

/* ===== 通用标题区 ===== */
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: 2.25rem; color: var(--gray-900); }
.section-head p { margin-top: 0.9rem; font-size: 1.1rem; color: var(--gray-600); }
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

/* ===== 功能卡片 ===== */
.feature-grid { display: grid; gap: 1.5rem; }
.card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-3xl);
  padding: 2rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.card .icon-box {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-2xl);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  transition: transform .25s;
}
.card:hover .icon-box { transform: scale(1.1); }
.icon-box svg { width: 2rem; height: 2rem; color: #fff; }
.g-purple { background: linear-gradient(135deg, #a855f7, #ec4899); }
.g-cyan { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.g-amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.g-emerald { background: linear-gradient(135deg, var(--emerald-500), #14b8a6); }
.card h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.card p { color: var(--gray-600); font-size: 1.02rem; }

/* ===== 平台卡片 ===== */
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.platform-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-3xl);
  padding: 2rem;
  transition: border-color .25s, box-shadow .25s;
}
.platform-card:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-xl); }
.platform-card svg { width: 3rem; height: 3rem; color: var(--gray-700); transition: color .2s; }
.platform-card:hover svg { color: var(--emerald-600); }
.platform-card h3 { font-size: 1.2rem; }
.platform-card .version { color: var(--gray-500); font-size: 0.85rem; }
.platform-card .dl {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--emerald-600);
  opacity: 0;
  transition: opacity .25s;
}
.platform-card:hover .dl, .platform-card:focus-within .dl { opacity: 1; }

/* ===== 学习中心 ===== */
.article-grid { display: grid; gap: 1.5rem; }
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.article-card:hover { border-color: var(--emerald-200); box-shadow: var(--shadow-xl); }
.article-cover {
  position: relative;
  height: 11rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
}
.article-cover .cover-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transition: transform .35s;
}
.article-card:hover .cover-art { transform: scale(1.05); }
.cover-art svg { width: 4rem; height: 4rem; color: var(--emerald-600); opacity: .85; }
.article-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--emerald-500);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-lg);
}
.article-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.article-body h3 { font-size: 1.08rem; transition: color .2s; }
.article-card:hover .article-body h3 { color: var(--emerald-600); }
.article-body p { color: var(--gray-500); font-size: 0.9rem; }
.article-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gray-50);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}
.article-foot span { display: inline-flex; align-items: center; gap: 0.3rem; }
.article-foot svg { width: 0.9rem; height: 0.9rem; }
.all-articles { display: none; font-size: 0.95rem; font-weight: 600; color: var(--emerald-600); }
.all-articles:hover { color: var(--emerald-700); }

/* ===== FAQ ===== */
.faq-list { max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-2xl); overflow: hidden; }
.faq-item.is-open { border-color: var(--emerald-200); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--gray-900);
}
.faq-q svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--emerald-600); transition: transform .25s; }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.4rem 1.25rem; color: var(--gray-600); font-size: 0.95rem; }
.faq-a.is-open { display: block; }
.faq-a ul { padding-left: 1.2rem; margin-top: 0.4rem; }

/* ===== CTA 区块 ===== */
.cta-band {
  background: linear-gradient(135deg, var(--emerald-600), #0d9488);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta-band h2 { font-size: 2rem; }
.cta-band p { margin: 0.9rem auto 1.8rem; max-width: 36rem; color: var(--emerald-50); }
.cta-band .btn { background: #fff; color: var(--emerald-700); }
.cta-band .btn:hover { background: var(--emerald-50); }

/* ===== Footer ===== */
.site-footer { background: var(--gray-900); color: #fff; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: var(--gray-400); font-size: 0.9rem; margin-top: 0.75rem; max-width: 22rem; }
.footer-col h3 { font-size: 0.95rem; margin-bottom: 0.9rem; color: #fff; }
.footer-col a { display: block; color: var(--gray-400); font-size: 0.9rem; padding: 0.25rem 0; transition: color .2s; }
.footer-col a:hover { color: var(--emerald-400); }
.copyright {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: var(--gray-500);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

/* ===== 子页面 ===== */
.page-hero {
  padding: 8rem 0 3.5rem;
  background: linear-gradient(160deg, #fff, var(--emerald-50));
  border-bottom: 1px solid var(--gray-100);
}
.page-hero h1 { font-size: 2.3rem; }
.page-hero p { margin-top: 0.9rem; color: var(--gray-600); max-width: 42rem; font-size: 1.05rem; }
.breadcrumb { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.9rem; }
.breadcrumb a:hover { color: var(--emerald-600); }

.download-list { display: grid; gap: 1.25rem; }
.download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-2xl);
  padding: 1.5rem 1.75rem;
}
.download-row:hover { border-color: var(--emerald-200); }
.download-info { display: flex; align-items: center; gap: 1rem; }
.download-info svg { width: 2.2rem; height: 2.2rem; color: var(--emerald-600); }
.download-info h3 { font-size: 1.1rem; }
.download-info p { font-size: 0.85rem; color: var(--gray-500); }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 0.9rem; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.prose p { margin-bottom: 1rem; color: var(--gray-700); }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.4rem; color: var(--gray-700); }
.prose li { margin-bottom: 0.4rem; }
.prose .tip {
  background: var(--emerald-50);
  border-left: 3px solid var(--emerald-500);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  color: var(--gray-700);
  font-size: 0.95rem;
}
.prose code { background: var(--gray-100); padding: 0.1rem 0.35rem; border-radius: 0.3rem; font-size: 0.9em; }
.notice {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-2xl);
  padding: 1.25rem 1.5rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* ===== 动画 ===== */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgb(5 150 105 / 0.35); }
  50% { box-shadow: 0 0 0 12px rgb(5 150 105 / 0); }
}
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
@media (min-width: 768px) {
  .nav, .header-cta { display: flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .hero { padding: 9.5rem 0 6rem; }
  .hero h1 { font-size: 3.4rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
  .all-articles { display: inline-flex; }
  .stat strong { font-size: 2.2rem; }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; }
  .hero h1 { font-size: 4.2rem; }
  .platform-grid { grid-template-columns: repeat(4, 1fr); }
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .section-head h2 { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
