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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --text: #e4e4ed;
  --text-dim: #8888a0;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --green: #4ade80;
  --yellow: #facc15;
  --blue: #60a5fa;
  --red: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(108,140,255,0.1); padding: 2px 6px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; }

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid var(--text-dim); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.logo-icon { font-size: 1.3rem; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero { padding: 140px 0 80px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
.highlight { color: var(--accent); }
.hero-sub { font-size: 1.15rem; color: var(--text-dim); max-width: 560px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 60px; }

/* Tree Demo */
.hero-visual { display: flex; justify-content: center; }
.tree-demo {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px 36px;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.88rem;
  min-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.tree-node { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.node-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-dim); flex-shrink: 0;
}
.node-dot.todo { background: var(--blue); }
.node-dot.wip { background: var(--yellow); }
.node-dot.done { background: var(--green); }
.node-label { color: var(--text); }
.tree-node.root .node-label { font-weight: 700; font-size: 0.95rem; }
.badge {
  font-size: 0.7rem; padding: 1px 8px; border-radius: 99px; font-weight: 600;
}
.badge-todo { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-wip { background: rgba(250,204,21,0.15); color: var(--yellow); }
.badge-done { background: rgba(74,222,128,0.15); color: var(--green); }
.tree-children { padding-left: 26px; border-left: 1.5px solid rgba(255,255,255,0.08); margin-left: 4px; }
.tree-children.nested { margin-top: 0; }

/* ===== Features ===== */
.features { padding: 80px 0; }
.features h2, .how-it-works h2, .cli-section h2, .get-started h2 {
  text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 12px;
}
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 48px; max-width: 560px; margin-left: auto; margin-right: auto; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.2s, border-color 0.2s;
}
.feature-card:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.12); }
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ===== How It Works ===== */
.how-it-works { padding: 80px 0; }
.steps { display: flex; flex-direction: column; gap: 32px; max-width: 600px; margin: 48px auto 0; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
}
.step-content h3 { font-size: 1.15rem; margin-bottom: 4px; }
.step-content p { color: var(--text-dim); font-size: 0.92rem; }

/* ===== CLI ===== */
.cli-section { padding: 80px 0; }
.cli-demo { max-width: 640px; margin: 0 auto; }
.cli-window {
  background: #1a1a2e;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.cli-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
}
.cli-dot { width: 12px; height: 12px; border-radius: 50%; }
.cli-dot.red { background: #ff5f57; }
.cli-dot.yellow { background: #febc2e; }
.cli-dot.green { background: #28c840; }
.cli-title { margin-left: 8px; font-size: 0.8rem; color: var(--text-dim); }
.cli-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}
.cli-body code { background: none; padding: 0; }
.cli-prompt { color: var(--green); font-weight: 700; }
.cli-output { color: var(--text-dim); }

/* ===== Get Started ===== */
.get-started { padding: 80px 0; }
.install-options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.install-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.install-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.install-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }
.install-hint { font-size: 0.8rem !important; margin-top: 12px !important; margin-bottom: 0 !important; opacity: 0.7; }
.code-block {
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
  overflow-x: auto;
  user-select: all;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 40px;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; }
.footer-copy { color: var(--text-dim); font-size: 0.8rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 110px 0 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .tree-demo { min-width: auto; padding: 20px 24px; font-size: 0.82rem; }
  .features-grid, .install-options { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .step, .install-card {
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.5s forwards;
  }
  .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .feature-card:nth-child(2) { animation-delay: 0.1s; }
  .feature-card:nth-child(3) { animation-delay: 0.15s; }
  .feature-card:nth-child(4) { animation-delay: 0.2s; }
  .feature-card:nth-child(5) { animation-delay: 0.25s; }
  .feature-card:nth-child(6) { animation-delay: 0.3s; }
  .step:nth-child(1) { animation-delay: 0.05s; }
  .step:nth-child(2) { animation-delay: 0.1s; }
  .step:nth-child(3) { animation-delay: 0.15s; }
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
