/* ════════════════════════════════════════════════════════════════════════════
   BrowserMan — Landing Page Styles (Dark Theme)
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2129;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --radius: 8px;
  --max-w: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  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); text-decoration: underline; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.hero-logo {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero-logo .accent { color: var(--accent); }

.hero-tagline {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #0d1117;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* ── Section ──────────────────────────────────────────────────────────────── */

section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

.section-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 16px;
}

/* ── How It Works ─────────────────────────────────────────────────────────── */

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  min-width: 160px;
  flex: 1;
  max-width: 220px;
}

.flow-step .icon { font-size: 32px; margin-bottom: 8px; }
.flow-step .label { font-weight: 600; font-size: 15px; }
.flow-step .desc { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.flow-arrow {
  font-size: 24px;
  color: var(--text-muted);
}

/* ── Platforms ────────────────────────────────────────────────────────────── */

.platforms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s;
}

.platform-card:hover { border-color: var(--text-muted); }

.platform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.platform-name {
  font-size: 18px;
  font-weight: 600;
}

.platform-count {
  color: var(--text-muted);
  font-size: 14px;
}

.actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.action-tag .health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.health-healthy { background: var(--green); }
.health-degraded { background: var(--yellow); }
.health-broken { background: var(--red); }
.health-untested { background: var(--text-muted); }

/* ── For Agents ───────────────────────────────────────────────────────────── */

.agent-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.info-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card p, .info-card li {
  color: var(--text-muted);
  font-size: 14px;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card li::before {
  content: '→ ';
  color: var(--accent);
}

.info-card code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ── Quick Start ──────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Health Legend ─────────────────────────────────────────────────────────── */

.health-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Loading ──────────────────────────────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-left: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero-logo { font-size: 32px; }
  .hero-tagline { font-size: 17px; }

  .platforms-grid { grid-template-columns: 1fr; }
  .agent-info { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }

  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}
