/* ── Design Tokens ── */
:root {
  --bg: #06060a;
  --bg-elevated: #0c0c12;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #f0f0f5;
  --text-secondary: #8b8b9e;
  --text-muted: #5a5a6e;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.2);
  --gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --gradient-text: linear-gradient(135deg, #a5b4fc 0%, #67e8f9 50%, #c4b5fd 100%);
  --nav-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;
  --max-w: 1200px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Background Effects ── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glowDrift 12s ease-in-out infinite alternate;
}

.bg-glow-2 {
  position: fixed;
  bottom: -300px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glowDrift 15s ease-in-out infinite alternate-reverse;
}

@keyframes glowDrift {
  from { opacity: 0.5; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-45%) scale(1.1); }
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 10, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(6, 6, 10, 0.85);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.nav-toggle:hover { background: rgba(255,255,255,0.06); }

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.25s forwards;
}

.hero-title .gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 3vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 16px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-intro {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.55s forwards;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.7s forwards;
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.85s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out),
              background 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-card {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
}

.btn-card:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-card svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-out);
}

.btn-card:hover svg { transform: translate(2px, -2px); }

/* ── Sections ── */
main { position: relative; z-index: 1; }

.section {
  padding: 80px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.section-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 24px;
}

/* ── Tool Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.45s var(--ease-out),
              box-shadow 0.45s var(--ease-out),
              border-color 0.45s var(--ease-out),
              background 0.45s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
}

.tool-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.tool-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tool-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.45s var(--ease-out);
}

.tool-card:hover .tool-logo {
  transform: scale(1.08);
}

.tool-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ── CTA ── */
.cta {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 100px;
}

.cta-box {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(34,211,238,0.05) 100%);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.cta-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-box h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-box p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-light);
  transition: opacity 0.3s;
}

.footer a:hover { opacity: 0.7; }

/* ── Mobile Nav Drawer ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(6, 6, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 99;
  transform: translateY(-110%);
  transition: transform 0.4s var(--ease-out);
}

.mobile-menu.open { transform: translateY(0); }

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color 0.3s;
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: block; }

  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 22px; }

  .cards-grid { grid-template-columns: 1fr; }

  .section { padding: 60px 20px; }
  .cta-box { padding: 40px 24px; }
}
