/* AgentBets.ai — Minimal, fast, readable */
:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --border: #2a2a2e;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #22d3ee;       /* cyan — prediction/data feel */
  --accent-hover: #06b6d4;
  --green: #4ade80;
  --orange: #fb923c;
  --purple: #a78bfa;
  --blue: #60a5fa;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Header --- */
.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo { font-size: 1.2rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-dot { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-cta {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
}
.nav-cta:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

/* --- Hero --- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
}
.hero h1 { font-size: 3rem; line-height: 1.15; letter-spacing: -0.02em; }
.hero-sub {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin-top: 1rem;
}
.hero-desc { color: var(--text-muted); max-width: 600px; margin: 1rem auto 0; }
.hero-cta { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); text-decoration: none; }

/* --- Stack Diagram --- */
.stack-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.stack-section h2 { text-align: center; margin-bottom: 2rem; }
.stack-diagram { display: flex; flex-direction: column; gap: 0.5rem; max-width: 700px; margin: 0 auto; }
.stack-layer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.stack-layer:hover { border-color: var(--accent); }
.layer-num {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 2rem;
  text-align: center;
}
.layer-content h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.layer-content p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.layer-tools { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); }

/* Layer-specific accents */
#layer-1 .layer-num { color: var(--green); }
#layer-1:hover { border-color: var(--green); }
#layer-2 .layer-num { color: var(--blue); }
#layer-2:hover { border-color: var(--blue); }
#layer-3 .layer-num { color: var(--orange); }
#layer-3:hover { border-color: var(--orange); }
#layer-4 .layer-num { color: var(--purple); }
#layer-4:hover { border-color: var(--purple); }

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  display: block;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text-muted); }
.card-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.5rem;
}
.card-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; display: block; }

/* --- Latest Section --- */
.latest-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.latest-section h2 { margin-bottom: 1.5rem; }

/* --- Newsletter --- */
.newsletter-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}
.newsletter-section h2 { margin-bottom: 0.5rem; }
.newsletter-section p { color: var(--text-muted); margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.newsletter-msg { font-size: 0.9rem; margin-top: 0.75rem; min-height: 1.4em; }
.newsletter-success { color: var(--green); }
.newsletter-error { color: var(--orange); }

/* --- Article --- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.article-header { margin-bottom: 2rem; }
.article-layer {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.5rem;
}
.article-header h1 { font-size: 2.2rem; line-height: 1.2; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.article-desc { color: var(--text-muted); margin-top: 0.75rem; font-size: 1.05rem; }
.article-body h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.article-body h3 { margin: 2rem 0 0.75rem; font-size: 1.2rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.article-body pre code { background: none; padding: 0; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.article-body th, .article-body td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.article-body th { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Tools sidebar --- */
.article-tools {
  margin-top: 3rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.article-tools h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.article-tools ul { list-style: none; }
.article-tools li { font-family: var(--mono); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }

/* --- Article nav --- */
.article-nav { margin-top: 3rem; display: flex; justify-content: space-between; }
.article-nav a { font-size: 0.9rem; }

/* --- List page --- */
.list-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.list-page h1 { margin-bottom: 0.5rem; }
.list-intro { color: var(--text-muted); margin-bottom: 2rem; max-width: 600px; }

/* --- Footer --- */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-col strong { display: block; margin-bottom: 0.75rem; }
.footer-col p { font-size: 0.9rem; color: var(--text-muted); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.9rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 3rem; font-size: 0.8rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .nav-links { display: none; } /* Hamburger TODO in phase 2 */
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
}
