@import url("./theme.css");

:root {
  --bg: #0f1020;
  --bg-soft: #171a33;
  --text: #eff2ff;
  --text-soft: #b7bdd7;
  --primary: #ffe554;
  --accent: #75def2;
  --glass: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.16);
  --radius: 18px;
  --shadow: 0 20px 40px rgba(85, 55, 149, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 10%, #2a2554, transparent 32%), var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 92vw); margin: 0 auto; }
.narrow { width: min(760px, 92vw); margin: 0 auto; }
.eyebrow { color: var(--accent); letter-spacing: 0.08em; font-size: 12px; text-transform: uppercase; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 12, 37, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar.scrolled { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.nav-inner { min-height: 72px; display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; color: var(--primary); }
.brand { display: inline-flex; align-items: center; gap: 10px; max-width: 320px; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.navbar nav { display: flex; gap: 16px; color: var(--text-soft); font-size: 14px; }
.nav-cta { display: flex; gap: 10px; }

.btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.btn.primary { background: linear-gradient(120deg, var(--primary), #f3c65c); color: #1e163f; border: none; font-weight: 700; }
.btn.ghost { background: rgba(255, 255, 255, 0.04); }
.btn.ripple::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0);
  opacity: 0;
  animation: ripple 0.6s ease;
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0; }
}

.hero { padding: 84px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; margin: 10px 0 16px; }
.hero p { color: var(--text-soft); }
.hero-actions { display: flex; gap: 12px; margin-top: 20px; }
.glass-card {
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero-visual {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 14px;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stats div { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: rgba(255, 255, 255, 0.03); }
.stats strong { display: block; font-size: 24px; color: var(--primary); }

section { padding: 54px 0; }
h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 16px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card, .article-card, .doc-section, .triple-grid article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover, .article-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.triple-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list span { border: 1px solid var(--border); padding: 8px 14px; border-radius: 999px; }

.articles-grid .article-card span { font-size: 12px; color: var(--accent); }
#loadMoreArticles { margin-top: 16px; }

.cta-section { text-align: center; }
.footer { border-top: 1px solid var(--border); padding: 36px 0 24px; margin-top: 34px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.footer h4 { margin: 0 0 10px; color: var(--primary); }
.footer a { display: block; color: var(--text-soft); margin: 5px 0; }
.copyright { text-align: center; color: var(--text-soft); margin-top: 18px; }

#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #1f173d;
  font-weight: 700;
  display: none;
}

.fade-in { opacity: 0; transform: translateY(10px); animation: fade 0.5s ease forwards; }
@keyframes fade { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 968px) {
  .hero-grid, .card-grid, .triple-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .navbar nav { display: none; }
}

@media (max-width: 640px) {
  .hero-grid, .card-grid, .triple-grid, .footer-grid, .stats { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .nav-inner { flex-wrap: wrap; padding: 10px 0; }
}
