/* ============================================================
   Forge Platform — Website Styles v2
   ============================================================ */

:root {
  --primary: #7c6cf0;
  --primary-dark: #6558d9;
  --primary-glow: rgba(124,108,240,0.25);
  --accent: #38d9a9;
  --bg-body: #0b0d17;
  --bg-section: #10122a;
  --bg-card: #161937;
  --bg-card-hover: #1e2148;
  --text: #c8cad8;
  --text-muted: #7d7f99;
  --text-heading: #eef0ff;
  --border: rgba(124,108,240,0.12);
  --border-strong: rgba(124,108,240,0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }

/* ── Navigation ─────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11,13,23,0.8);
  backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.15rem; font-weight: 700; color: var(--text-heading);
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: .85rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-heading); }
.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: .45rem 1.1rem; border-radius: 8px;
  font-weight: 600; font-size: .8rem;
  transition: all .2s;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124,108,240,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(56,217,169,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(124,108,240,0.1);
  border: 1px solid rgba(124,108,240,0.2);
  padding: .3rem .9rem; border-radius: 100px;
  font-size: .75rem; color: var(--primary); font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800; color: var(--text-heading);
  line-height: 1.2; margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 540px; margin: 0 auto 2rem;
  line-height: 1.8;
}
.hero-buttons { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .875rem;
  transition: all .25s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 16px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px var(--primary-glow);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--primary); color: var(--primary);
  transform: translateY(-2px);
}

.hero-screenshot {
  margin: 4rem auto 0;
  max-width: 960px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(124,108,240,0.08),
    0 0 80px rgba(124,108,240,0.08);
}

/* ── Section helpers ────────────────────────────────── */
section { padding: 5rem 2rem; }
.section-alt { background: var(--bg-section); }

.section-header {
  text-align: center; margin-bottom: 3.5rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.section-label {
  display: inline-block;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--primary);
  margin-bottom: .5rem;
}
.section-header h2 {
  font-size: 2rem; font-weight: 700;
  color: var(--text-heading); margin-bottom: .75rem;
  letter-spacing: -0.01em;
}
.section-header p {
  color: var(--text-muted); font-size: 1rem;
}

/* ── Features ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all .3s;
}
.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 40px; height: 40px;
  background: rgba(124,108,240,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary);
}
.feature-card h3 {
  font-size: 1rem; font-weight: 600;
  color: var(--text-heading); margin-bottom: .5rem;
}
.feature-card p {
  color: var(--text-muted); font-size: .85rem; line-height: 1.6;
}

/* ── Architecture ───────────────────────────────────── */
.arch-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}
.arch-container img { border-radius: 8px; margin: 0 auto; }

/* ── Comparison ─────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.comparison-table {
  width: 100%; border-collapse: collapse;
}
.comparison-table th {
  background: rgba(124,108,240,0.08);
  padding: .9rem 1.25rem; text-align: left;
  font-weight: 600; color: var(--text-heading);
  font-size: .75rem; text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border);
}
.comparison-table td {
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover td { background: rgba(124,108,240,0.04); }
.check { color: var(--accent); font-weight: 700; }
.cross { color: var(--text-muted); }

/* ── Quick Start ────────────────────────────────────── */
.quickstart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  max-width: 700px;
  margin: 0 auto;
}
.quickstart pre {
  font-family: var(--font-mono); font-size: .85rem;
  line-height: 2; color: var(--text); white-space: pre-wrap;
}
.quickstart .comment { color: var(--text-muted); }
.quickstart .cmd { color: var(--accent); }

/* ── Stats ──────────────────────────────────────────── */
.stats-row {
  display: flex; justify-content: center; gap: 4rem;
  padding: 2.5rem 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem; font-weight: 800;
  color: var(--text-heading);
}
.stat-label { color: var(--text-muted); font-size: .8rem; margin-top: .15rem; }

/* ── CTA ────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(124,108,240,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { font-size: 1.75rem; color: var(--text-heading); margin-bottom: .75rem; }
.cta-section p { color: var(--text-muted); margin-bottom: 2rem; max-width: 420px; margin-left: auto; margin-right: auto; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted); font-size: .8rem;
}
.footer-links {
  display: flex; gap: 1.5rem; justify-content: center; margin-bottom: .75rem;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text-heading); }

/* ── Docs Layout ────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 76px;
  min-height: 100vh;
}
.docs-sidebar {
  position: sticky; top: 76px;
  height: calc(100vh - 76px);
  overflow-y: auto;
  padding: 1.5rem 0 1.5rem .5rem;
  border-right: 1px solid var(--border);
}
.docs-sidebar h4 {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted);
  margin: 1.25rem 0 .5rem; padding-left: .5rem;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar a {
  display: block; padding: .3rem .6rem;
  color: var(--text-muted); font-size: .8rem;
  border-radius: 6px; transition: all .15s;
  margin-bottom: 1px;
}
.docs-sidebar a:hover { color: var(--text-heading); background: var(--bg-card); }
.docs-sidebar a.active { color: var(--primary); background: rgba(124,108,240,0.08); }
.docs-content {
  padding: 1.5rem 2rem 4rem;
  max-width: 860px;
}
.docs-content h1 {
  font-size: 1.75rem; color: var(--text-heading);
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.docs-content h2 { font-size: 1.35rem; color: var(--text-heading); margin: 2rem 0 .75rem; }
.docs-content h3 { font-size: 1.05rem; color: var(--text-heading); margin: 1.5rem 0 .5rem; }
.docs-content p { margin-bottom: .75rem; font-size: .925rem; }
.docs-content ul, .docs-content ol { margin-bottom: .75rem; padding-left: 1.5rem; }
.docs-content li { margin-bottom: .35rem; font-size: .925rem; }
.docs-content code {
  background: rgba(124,108,240,0.1);
  padding: .15rem .35rem; border-radius: 4px;
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--primary);
}
.docs-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto; margin-bottom: 1.25rem;
}
.docs-content pre code {
  background: none; padding: 0; font-size: .8rem;
  line-height: 1.7; color: var(--text);
}
.docs-content table {
  width: 100%; border-collapse: collapse; margin-bottom: 1.25rem;
  font-size: .875rem;
}
.docs-content th {
  background: rgba(124,108,240,0.08);
  padding: .6rem .9rem; text-align: left;
  font-weight: 600; color: var(--text-heading);
  font-size: .8rem; border-bottom: 1px solid var(--border);
}
.docs-content td {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border);
}
.docs-content img {
  border-radius: 8px; border: 1px solid var(--border);
  margin: .75rem 0;
}
.docs-content blockquote {
  border-left: 3px solid var(--primary);
  padding: .75rem 1.25rem;
  background: rgba(124,108,240,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg-body); border-bottom: 1px solid var(--border);
    padding: 1rem 2rem; gap: .75rem;
  }
  .hero { padding: 7rem 1.5rem 3rem; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 2rem; flex-wrap: wrap; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: .75rem;
  }
  .quickstart { padding: 1.25rem; }
  .comparison-table th, .comparison-table td { padding: .5rem .6rem; font-size: .75rem; }
}
@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .stats-row { gap: 1.5rem; }
  .stat-number { font-size: 1.5rem; }
}
