/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0e14;
  --surface: #13161f;
  --surface2: #1a1e2b;
  --border: #242838;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent3: #38bdf8;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --text: #e2e5f0;
  --muted: #6b7494;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(12, 14, 20, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--text);
}

.logo-icon { font-size: 1.3rem; }

.nav-links {
  display: flex;
  gap: 1.6rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* === HERO === */
.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 65%);
  top: -200px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent2);
  padding: 0.3rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* === INSIGHTS BAR === */
.insights-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.insights-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.insight { text-align: center; }

.insight-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.insight-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 160px;
  margin: 0 auto;
  line-height: 1.4;
}

.insight-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* === MAIN CONTENT === */
.main-content { padding: 4rem 0 5rem; }

/* === CATEGORY === */
.category {
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.category.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.category-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}

.category-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.category-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 600px;
}

/* === TOOLS GRID === */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tool-card:hover {
  border-color: rgba(99,102,241,0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
  flex: 1;
}

.tool-benefit {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 500;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

/* === BADGES === */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-top {
  background: rgba(99,102,241,0.2);
  color: var(--accent2);
  border: 1px solid rgba(99,102,241,0.3);
}

.badge-popular {
  background: rgba(56,189,248,0.15);
  color: var(--accent3);
  border: 1px solid rgba(56,189,248,0.25);
}

.badge-free {
  background: rgba(52,211,153,0.15);
  color: var(--green);
  border: 1px solid rgba(52,211,153,0.25);
}

/* === SOURCE LINE === */
.source-line {
  font-size: 0.76rem;
  color: var(--muted);
  padding-top: 0.8rem;
}
.source-line a { color: var(--muted); }
.source-line a:hover { color: var(--accent2); }

/* === FOOTER === */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.footer-note {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 520px;
  line-height: 1.6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .nav-links.nav-open { display: flex; }
  .nav-toggle { display: block; }
  .insight-divider { display: none; }
  .category-header { flex-direction: column; gap: 0.6rem; }
  .category-icon { font-size: 1.8rem; }
  .hero { padding: 3.5rem 0 2.5rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .insights-inner { flex-direction: column; gap: 1.5rem; }
}
