/* BotForge AI — dark UI design system */
:root {
  --bg: #0b0e14;
  --bg-raised: #121722;
  --bg-card: #161c29;
  --border: #26304400;
  --border-c: #262f42;
  --text: #e7ebf3;
  --text-dim: #9aa5b8;
  --text-faint: #6b7690;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-text: #0b0e14;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 12px;
  --maxw: 1200px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-dim); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,14,20,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-c);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: inline-block; }
.brand:hover { text-decoration: none; }
nav.main-nav { display: flex; gap: 22px; align-items: center; }
nav.main-nav a { color: var(--text-dim); font-weight: 600; font-size: .93rem; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-c); border-radius: 8px; color: var(--text); padding: 8px 10px; font-size: 1.1rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 9px; font-weight: 700; font-size: .92rem;
  border: 1px solid var(--border-c); cursor: pointer; transition: all .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6146e0); color: #fff; border-color: transparent; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-danger { background: var(--danger); color: #2a0a0a; border-color: transparent; }
.btn-block { width: 100%; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding: 84px 0 56px; text-align: center; background:
  radial-gradient(60% 60% at 50% 0%, rgba(124,92,255,.18), transparent 70%); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .4em; }
.hero .lede { max-width: 640px; margin: 0 auto 1.6em; color: var(--text-dim); font-size: 1.08rem; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.badge { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--bg-raised);
  border: 1px solid var(--border-c); color: var(--accent-2); font-size: .78rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 1.2em; }

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-head .see-all { font-weight: 700; font-size: .9rem; }
.eyebrow { color: var(--accent-2); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .4em; display: block; }

/* ── Grids / Cards ────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s ease, border-color .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { border-color: #3a4560; transform: translateY(-2px); }
.card-thumb {
  aspect-ratio: 16/10; width: 100%; position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, #1a2133, #1a2133 10px, #171d2c 10px, #171d2c 20px);
  display: flex; align-items: center; justify-content: center;
}
.card-thumb .ph-label { color: var(--text-faint); font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; background: rgba(11,14,20,.6); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border-c); }
.card-thumb .ph-icon { font-size: 2.4rem; opacity: .35; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body .tagline { color: var(--text-dim); font-size: .88rem; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; color: var(--text); }
.price .per { color: var(--text-faint); font-weight: 500; font-size: .78rem; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: var(--bg-raised); border: 1px solid var(--border-c); color: var(--text-dim); }
.chip-accent { color: var(--accent-2); border-color: #204652; background: #0e2530; }
.rating { color: var(--warn); font-size: .82rem; font-weight: 700; }
.rating .count { color: var(--text-faint); font-weight: 500; }

/* ── Filters / Search ─────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.search-input, select, input[type=text], input[type=email], input[type=password], textarea {
  background: var(--bg-raised); border: 1px solid var(--border-c); color: var(--text);
  border-radius: 8px; padding: 10px 13px; font-size: .92rem; font-family: inherit;
}
.search-input { flex: 1; min-width: 200px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row button { background: var(--bg-raised); border: 1px solid var(--border-c); color: var(--text-dim);
  border-radius: 99px; padding: 7px 14px; font-size: .83rem; font-weight: 600; cursor: pointer; }
.filter-row button.active { background: var(--accent); border-color: transparent; color: #fff; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }

/* ── Forms ────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .86rem; color: var(--text-dim); }
.field input, .field textarea, .field select { width: 100%; }
form .hint { font-size: .78rem; color: var(--text-faint); margin-top: 4px; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: .88rem; margin-bottom: 16px; }
.alert-ok { background: #0d2a20; color: var(--ok); border: 1px solid #16543c; }
.alert-err { background: #2a1414; color: var(--danger); border: 1px solid #542121; }

/* ── Product detail ───────────────────────────────────────── */
.product-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; padding: 40px 0; align-items: start; }
.buy-box { background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius); padding: 22px; position: sticky; top: 84px; }
.buy-box .price-big { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-c); margin: 30px 0 20px; }
.tabs button { background: none; border: none; color: var(--text-faint); font-weight: 700; padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--text); border-color: var(--accent); }
.prose { color: var(--text-dim); }
.prose h1, .prose h2, .prose h3 { color: var(--text); margin-top: 1.4em; }
.prose code { background: var(--bg-raised); padding: 2px 6px; border-radius: 4px; font-size: .88em; }
.prose pre { background: var(--bg-raised); padding: 14px; border-radius: 8px; overflow-x: auto; border: 1px solid var(--border-c); }

/* ── Docs / Blog layout ───────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 0; align-items: start; }
.docs-nav { position: sticky; top: 84px; }
.docs-nav .group-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 800; margin: 18px 0 8px; }
.docs-nav a { display: block; padding: 6px 0; color: var(--text-dim); font-size: .9rem; }
.docs-nav a.active, .docs-nav a:hover { color: var(--accent-2); }
.blog-list { display: grid; gap: 18px; }
.blog-item { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px; background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius); }
.blog-item .cover-ph { aspect-ratio: 16/10; border-radius: 8px; background: repeating-linear-gradient(135deg, #1a2133, #1a2133 8px, #171d2c 8px, #171d2c 16px); }
.blog-meta { color: var(--text-faint); font-size: .8rem; margin-bottom: 6px; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-c); padding: 48px 0 28px; margin-top: 60px; color: var(--text-faint); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: var(--text); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-faint); font-size: .88rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border-c); padding-top: 20px; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ── Misc ─────────────────────────────────────────────────── */
.newsletter-box { background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius); padding: 30px; text-align: center; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 16px auto 0; flex-wrap: wrap; justify-content: center; }
.newsletter-form input { flex: 1; min-width: 200px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius); padding: 26px; max-width: 440px; width: 100%; }
.modal-close { float: right; background: none; border: none; color: var(--text-faint); font-size: 1.3rem; cursor: pointer; }
.license-key { font-family: ui-monospace, monospace; background: var(--bg-raised); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-c); word-break: break-all; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-c); border-radius: var(--radius); padding: 18px; }
.stat-card .num { font-size: 1.7rem; font-weight: 800; }
.stat-card .label { color: var(--text-faint); font-size: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-c); }
th { color: var(--text-faint); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.skeleton { color: var(--text-faint); padding: 30px; text-align: center; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .product-hero { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .blog-item { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  nav.main-nav { position: fixed; top: 64px; left: 0; right: 0; background: var(--bg-raised);
    border-bottom: 1px solid var(--border-c); flex-direction: column; align-items: stretch;
    padding: 14px 20px; gap: 4px; display: none; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 10px 0; }
  .nav-toggle { display: block; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
