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

:root {
  --bg: #0a0a0b;
  --bg-card: #111113;
  --bg-code: #0d0d0f;
  --border: #1e1e22;
  --border-hover: #2a2a30;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --accent: #3b82f6;
  --accent-dim: #1d4ed8;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #f97316;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-w: 1120px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* === Layout === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }

/* === Nav === */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px; color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 6px;
  background: var(--accent); color: #fff !important;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-dim); text-decoration: none !important; }

/* === Hero === */
.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex; gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  transition: all 0.2s;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); text-decoration: none; }

/* === Install command === */
.install-box {
  margin: 32px auto 0;
  max-width: 400px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
  font-size: 14px;
}
.install-box code { color: var(--text-muted); }
.install-box code span { color: var(--green); }
.install-box button {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; font-size: 14px;
  transition: color 0.2s;
}
.install-box button:hover { color: var(--text); }

/* === Terminal demo === */
.terminal {
  max-width: 720px;
  margin: 56px auto 0;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.terminal-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #febc2e; }
.terminal-dot.g { background: #28c840; }
.terminal-title {
  font-size: 12px; color: var(--text-dim);
  margin-left: 8px; font-family: var(--sans);
}
.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.terminal-body .prompt { color: var(--green); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .flag { color: var(--yellow); }
.terminal-body .str { color: var(--orange); }
.terminal-body .output { color: var(--text-muted); }
.terminal-body .icon-done { color: var(--green); }
.terminal-body .icon-pending { color: var(--text-dim); }
.terminal-body .icon-progress { color: var(--yellow); }
.terminal-body .bar-filled { color: var(--green); }
.terminal-body .bar-empty { color: #27272a; }
.terminal-body .priority-critical { color: var(--red); font-weight: 600; }
.terminal-body .priority-high { color: var(--yellow); }
.terminal-body .priority-medium { color: var(--accent); }

/* === Problem section === */
.problem { background: var(--bg); }
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}
.pain-card:hover { border-color: var(--border-hover); }
.pain-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.pain-icon svg { width: 22px; height: 22px; }
.pain-icon.amnesia { background: rgba(239, 68, 68, 0.1); }
.pain-icon.amnesia svg { color: var(--red); }
.pain-icon.drift { background: rgba(234, 179, 8, 0.1); }
.pain-icon.drift svg { color: var(--yellow); }
.pain-icon.control { background: rgba(59, 130, 246, 0.1); }
.pain-icon.control svg { color: var(--accent); }
.pain-card h3 {
  font-size: 17px; font-weight: 700;
  margin-bottom: 8px;
}
.pain-card p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

/* === Solution section === */
.solution { background: var(--bg-card); }

.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.solution-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}
.solution-card:hover { border-color: var(--accent); }
.solution-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  margin-bottom: 16px;
}
.solution-card .icon svg {
  width: 22px; height: 22px;
  color: var(--accent);
}
.solution-card h3 {
  font-size: 17px; font-weight: 700;
  margin-bottom: 8px;
}
.solution-card p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

/* === How it works === */
.how-it-works { background: var(--bg); }

.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}
.flow-step {
  display: flex; gap: 20px;
  position: relative;
}
.flow-line {
  display: flex; flex-direction: column; align-items: center;
  width: 32px; flex-shrink: 0;
}
.flow-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--accent);
  z-index: 1;
}
.flow-connector {
  width: 2px; flex: 1;
  background: var(--border);
  min-height: 40px;
}
.flow-content {
  padding-bottom: 32px;
  padding-top: 4px;
}
.flow-content h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.flow-content p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}
.flow-content code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--green);
}

/* === Comparison === */
.comparison { background: var(--bg-card); }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.comparison-table thead {
  background: var(--bg);
}
.comparison-table th {
  text-align: left;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.comparison-table th:last-child { color: var(--accent); }
.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td:first-child {
  font-weight: 600; color: var(--text);
}
.comparison-table td:last-child { color: var(--text); }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--text-dim); }

/* === Code examples === */
.code-section { background: var(--bg); }

.code-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.code-tab {
  padding: 10px 20px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--sans);
  transition: all 0.2s;
}
.code-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.code-tab:hover { color: var(--text); }

.code-panels { position: relative; }
.code-panel {
  display: none;
}
.code-panel.active { display: block; }

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.code-block .comment { color: var(--text-dim); }
.code-block .key { color: #a78bfa; }
.code-block .string { color: var(--green); }
.code-block .keyword { color: #f472b6; }

/* === Footer === */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
footer p {
  font-size: 14px;
  color: var(--text-dim);
}
footer a { color: var(--text-muted); }

/* === Responsive === */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .hero { padding-top: 120px; padding-bottom: 48px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .pain-grid, .solution-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
