/* ==========================================================================
   TG下载 tggba.com.cn - 全站样式
   设计令牌：主色 emerald / 中性 gray / 圆角 8-24px / 区块 py-24
   ========================================================================== */

:root {
  --em-50: #ecfdf5;
  --em-100: #d1fae5;
  --em-200: #a7f3d0;
  --em-400: #34d399;
  --em-500: #10b981;
  --em-600: #059669;
  --em-700: #047857;
  --teal-50: #f0fdfa;
  --teal-200: #99f6e4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --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;
  --container: 72rem; /* max-w-6xl */
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
  --shadow-md: 0 8px 24px -12px rgba(17, 24, 39, .18);
  --shadow-xl: 0 24px 48px -24px rgba(17, 24, 39, .28);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--gray-600);
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3, h4 { color: var(--gray-900); font-weight: 700; line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: var(--em-600); text-decoration: none; }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding-left: 1.25rem; }
button { font-family: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.section { padding: 6rem 0; }
.section--tight { padding: 3rem 0; }
.section--gray { background: var(--gray-50); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: 2.25rem; }
.section-head p { margin-top: 0.75rem; color: var(--gray-600); font-size: 1.125rem; }
.section-head--left { text-align: left; margin-left: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--em-600); color: #fff; padding: .75rem 1rem; border-radius: 0 0 var(--radius-lg) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: var(--radius-xl);
  padding: .7rem 1.3rem; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn svg { flex: none; }
.btn--primary { background: var(--em-600); color: #fff; box-shadow: 0 6px 20px -10px rgba(5,150,105,.9); }
.btn--primary:hover { background: var(--em-700); box-shadow: 0 10px 26px -12px rgba(5,150,105,.95); }
.btn--ghost { background: #fff; color: var(--gray-700); border-color: var(--gray-200); }
.btn--ghost:hover { border-color: var(--em-200); color: var(--em-700); background: var(--em-50); }
.btn--hero {
  border-radius: var(--radius-2xl); padding: 1rem 2rem; font-size: 1.125rem;
  animation: glow 3.2s ease-in-out infinite;
}
.btn--outline-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline-light:hover { background: rgba(255,255,255,.2); }

@keyframes glow {
  0%, 100% { box-shadow: 0 10px 28px -14px rgba(5,150,105,.85); }
  50% { box-shadow: 0 14px 40px -12px rgba(16,185,129,.85); }
}

.text-gradient {
  background: linear-gradient(95deg, var(--em-600) 10%, #0d9488 55%, #0891b2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-100);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--gray-900); font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; border-radius: var(--radius-lg); }
.brand-sub { display: block; font-size: .68rem; font-weight: 400; color: var(--gray-400); letter-spacing: .04em; }
.nav { margin-left: auto; display: none; align-items: center; gap: .35rem; }
.nav a {
  display: inline-block; padding: .5rem .85rem; border-radius: var(--radius-lg);
  color: var(--gray-600); font-size: .95rem; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.nav a[aria-current="page"] { background: var(--em-50); color: var(--em-600); font-weight: 600; }
.header-cta { display: none; margin-left: .75rem; }

.menu-toggle {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  background: #fff; color: var(--gray-700); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-menu {
  display: none; border-top: 1px solid var(--gray-100); background: #fff;
  padding: .75rem 1rem 1.25rem;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block; padding: .8rem .75rem; border-radius: var(--radius-lg);
  color: var(--gray-700); font-weight: 500;
}
.mobile-menu a:hover, .mobile-menu a[aria-current="page"] { background: var(--em-50); color: var(--em-700); }
.mobile-menu .btn { width: 100%; margin-top: .75rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 7rem 0 4.5rem;
  background: linear-gradient(160deg, #ffffff 0%, var(--em-50) 42%, var(--teal-50) 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; width: 30rem; height: 30rem; border-radius: 50%;
  filter: blur(64px); opacity: .3; pointer-events: none;
}
.hero::before { top: -10rem; right: -6rem; background: var(--em-400); }
.hero::after { bottom: -12rem; left: -8rem; background: var(--teal-200); }
.hero-inner { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--em-100); color: var(--em-700);
  border-radius: 9999px; padding: .4rem .9rem; font-size: .85rem; font-weight: 600;
}
.hero h1 { font-size: 2.9rem; margin-top: 1.1rem; }
.hero h1 span { display: block; }
.hero-sub { margin-top: 1.25rem; font-size: 1.15rem; color: var(--gray-600); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.hero-note { margin-top: 1.1rem; font-size: .85rem; color: var(--gray-500); }
.hero-visual img { display: block; width: 100%; height: auto; }

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

/* ---------- 核心功能 ---------- */
.feature-grid { display: grid; gap: 1.5rem; }
.card {
  border: 1px solid var(--gray-100); border-radius: var(--radius-3xl);
  background: #fff; padding: 2rem; transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: var(--em-200); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.feature-icon {
  width: 4rem; height: 4rem; border-radius: var(--radius-2xl);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: transform .25s;
}
.feature-icon svg { width: 1.75rem; height: 1.75rem; }
.card:hover .feature-icon { transform: scale(1.1); }
.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(--em-500), #14b8a6); }
.card h3 { font-size: 1.3rem; margin-top: 1.25rem; }
.card p { margin-top: .6rem; color: var(--gray-600); }

/* ---------- 全平台 ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.platform {
  display: block; border: 1px solid var(--gray-100); border-radius: var(--radius-3xl);
  padding: 2rem 1.25rem; background: #fff; text-align: center;
  transition: border-color .25s, box-shadow .25s;
}
.platform:hover { border-color: var(--em-200); box-shadow: var(--shadow-xl); }
.platform svg { width: 3rem; height: 3rem; color: var(--gray-700); margin: 0 auto; transition: color .2s; }
.platform:hover svg { color: var(--em-600); }
.platform h3 { font-size: 1.1rem; margin-top: 1rem; }
.platform .ver { display: block; color: var(--gray-500); font-size: .85rem; margin-top: .3rem; }
.platform .dl {
  display: flex; align-items: center; justify-content: center; gap: .3rem;
  margin-top: .85rem; font-size: .85rem; font-weight: 600; color: var(--em-600);
  opacity: 0; transition: opacity .25s;
}
.platform:hover .dl, .platform:focus-visible .dl { opacity: 1; }

/* ---------- 学习中心 ---------- */
.learn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.learn-head h2 { font-size: 2.25rem; }
.learn-head p { margin-top: .6rem; color: var(--gray-600); font-size: 1.05rem; }
.learn-more { display: none; font-weight: 600; white-space: nowrap; }
.article-grid { display: grid; gap: 1.5rem; }
.article-card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--gray-100); border-radius: var(--radius-2xl); overflow: hidden;
  background: #fff; transition: border-color .25s, box-shadow .25s, transform .25s;
}
.article-card:hover { border-color: var(--em-200); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.article-thumb { position: relative; height: 11rem; overflow: hidden; background: var(--gray-100); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-tag {
  position: absolute; left: .75rem; top: .75rem;
  background: var(--em-500); color: #fff; font-size: .72rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: var(--radius-lg);
}
.article-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.article-body h3 {
  font-size: 1.05rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .2s;
}
.article-card:hover .article-body h3 { color: var(--em-600); }
.article-body p {
  margin-top: .55rem; color: var(--gray-500); font-size: .875rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-meta {
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--gray-50);
  display: flex; justify-content: space-between; gap: .5rem;
  font-size: .75rem; color: var(--gray-400);
}
.article-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.article-meta svg { width: .9rem; height: .9rem; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 48rem; margin: 0 auto; }
.faq-item { border: 1px solid var(--gray-100); border-radius: var(--radius-2xl); background: #fff; margin-bottom: .85rem; overflow: hidden; }
.faq-item h3 { margin: 0; font-size: 1rem; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: 0; text-align: left; cursor: pointer;
  padding: 1.1rem 1.35rem; font-size: 1rem; font-weight: 600; color: var(--gray-900);
}
.faq-q:hover { color: var(--em-700); }
.faq-q svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--gray-400); transition: transform .25s; }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--em-600); }
.faq-a { display: none; padding: 0 1.35rem 1.2rem; color: var(--gray-600); font-size: .95rem; }
.faq-a.is-open { display: block; }
.faq-a p + p { margin-top: .6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-900); color: var(--gray-400); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-sub { color: var(--gray-500); }
.footer-brand p { margin-top: 1rem; font-size: .9rem; max-width: 22rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: .5rem; }
.site-footer ul a { color: var(--gray-400); font-size: .9rem; }
.site-footer ul a:hover { color: var(--em-400); }
.copyright {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem; color: var(--gray-500); display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  justify-content: space-between;
}

/* ---------- 子页面 ---------- */
.page-hero {
  padding: 8rem 0 3.5rem;
  background: linear-gradient(160deg, #fff 0%, var(--em-50) 60%, var(--teal-50) 100%);
  border-bottom: 1px solid var(--gray-100);
}
.page-hero h1 { font-size: 2.4rem; }
.page-hero p { margin-top: 1rem; font-size: 1.05rem; color: var(--gray-600); max-width: 42rem; }
.crumb { font-size: .85rem; color: var(--gray-500); margin-bottom: .9rem; }
.crumb a { color: var(--gray-500); }
.crumb a:hover { color: var(--em-600); }

.dl-card { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.dl-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  border: 1px solid var(--gray-100); border-radius: var(--radius-3xl); padding: 1.5rem 1.75rem;
  background: #fff; transition: border-color .25s, box-shadow .25s;
}
.dl-row:hover { border-color: var(--em-200); box-shadow: var(--shadow-xl); }
.dl-row svg { width: 2.25rem; height: 2.25rem; color: var(--em-600); flex: none; }
.dl-row .dl-info { flex: 1 1 12rem; }
.dl-row h3 { font-size: 1.1rem; }
.dl-row span { font-size: .85rem; color: var(--gray-500); }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.prose p, .prose ul, .prose ol { margin-top: .9rem; color: var(--gray-600); }
.prose li + li { margin-top: .4rem; }
.prose .lead { font-size: 1.05rem; color: var(--gray-700); }
.callout {
  margin-top: 1.5rem; background: var(--em-50); border-left: 3px solid var(--em-500);
  padding: 1rem 1.25rem; border-radius: var(--radius-lg); color: var(--gray-700); font-size: .95rem;
}
.post-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .85rem; color: var(--gray-400); margin-top: 1rem; }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(14px); 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; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .learn-more { display: inline-flex; }
  .hero h1 { font-size: 3.6rem; }
  .dl-card { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .hero { padding: 8rem 0 5.5rem; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
  .hero h1 { font-size: 4.3rem; }
  .platform-grid { grid-template-columns: repeat(4, 1fr); }
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .stat strong { font-size: 2.25rem; }
  .section-head h2 { font-size: 2.5rem; }
}

@media (min-width: 1280px) {
  .article-grid { gap: 1.75rem; }
}

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