/* ==========================================================
   Astro Bot — estilos compartidos
   Paleta y estilo originales conservados (blurple + verde éxito)
   ========================================================== */
:root {
  --brand: #5865f2;
  --brand-hover: #4752c4;
  --brand-soft: #8b93ff;
  --accent: #29d3ff;
  --bg: #0b0d12;
  --bg-alt: #11141c;
  --card: #161a24;
  --border: #232838;
  --text: #f2f3f5;
  --muted: #9aa1b2;
  --success: #57f287;
  --warning: #fee75c;
  --danger: #ed4245;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--brand-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.noise {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(88,101,242,0.18), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(41,211,255,0.10), transparent 35%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 6%;
  border-bottom: 1px solid var(--border);
  background: rgba(11,13,18,0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-icon svg { width: 22px; height: 22px; color: #fff; }

nav.main {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

nav.main a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
nav.main a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.brand-logo { width: 40px; height: 40px; border-radius: 12px; display: block; object-fit: cover; }
.mock-head .brand-logo { width: 30px; height: 30px; border-radius: 9px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, box-shadow .15s, border-color .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 9px 18px; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(88,101,242,0.35);
}
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--brand); }

main { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 90px 6% 70px;
  max-width: 1160px;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(87,242,135,0.1);
  border: 1px solid rgba(87,242,135,0.3);
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 26px;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.hero h1 {
  font-size: 48px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 52ch;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn { padding: 15px 30px; font-size: 15px; }

.stats { display: flex; gap: 44px; margin-top: 48px; flex-wrap: wrap; }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .label { font-size: 13px; color: var(--muted); }

/* Registro de moderación de ejemplo */
.mock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(88,101,242,0.08);
}
.mock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.mock-head .brand-icon { width: 30px; height: 30px; border-radius: 9px; }
.mock-head .brand-icon svg { width: 16px; height: 16px; }
.bot-tag {
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}
.mock-head .chan { margin-left: auto; color: var(--muted); font-size: 13px; }

.log-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.log-line:last-of-type { border-bottom: 0; }
.log-line small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.chip {
  flex: none;
  font-family: Consolas, 'SFMono-Regular', Menlo, monospace;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.chip.warn { color: var(--warning); background: rgba(254,231,92,0.12); border-color: rgba(254,231,92,0.25); }
.chip.mute { color: var(--brand-soft); background: rgba(88,101,242,0.14); border-color: rgba(88,101,242,0.3); }
.chip.ban  { color: var(--danger); background: rgba(237,66,69,0.12); border-color: rgba(237,66,69,0.3); }
.mock-cap { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 12px; }

/* ---------- Secciones ---------- */
section.block { padding: 40px 6% 90px; max-width: 1080px; margin: 0 auto; }

.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; text-wrap: balance; }
.section-title p { color: var(--muted); font-size: 15px; max-width: 60ch; margin: 0 auto; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.span-2 { grid-column: span 2; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--brand); transform: translateY(-4px); }

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.icon.mod { background: rgba(254,231,92,0.15); color: var(--warning); }
.icon.tickets { background: rgba(88,101,242,0.15); color: var(--brand-soft); }
.icon.eco { background: rgba(87,242,135,0.15); color: var(--success); }
.icon.lvl { background: rgba(87,242,135,0.15); color: var(--success); }
.icon.util { background: rgba(88,101,242,0.15); color: var(--brand-soft); }

.card h3 { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.card ul { list-style: none; }
.card ul li {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-family: Consolas, 'SFMono-Regular', Menlo, monospace;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(88,101,242,0.16);
  color: var(--brand-soft);
  border: 1px solid rgba(88,101,242,0.35);
}
.badge.soon { background: rgba(254,231,92,0.1); color: var(--warning); border-color: rgba(254,231,92,0.3); }

.card.more {
  background: transparent;
  border-style: dashed;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card.more:hover { transform: none; }

/* ---------- Panel web ---------- */
.panel-wrap { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.panel-wrap section.block { padding-top: 80px; padding-bottom: 80px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 14px; }

/* ---------- Responsabilidad ---------- */
.notice {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(254,231,92,0.06);
  border: 1px solid rgba(254,231,92,0.25);
  border-radius: 18px;
  padding: 24px 26px;
}
.notice > svg { flex: none; width: 24px; height: 24px; color: var(--warning); margin-top: 2px; }
.notice h3 { font-size: 16px; margin-bottom: 6px; }
.notice p { color: var(--muted); font-size: 14px; }
.notice p + p { margin-top: 8px; }
.notice a.inline, .prose a { color: var(--brand-soft); text-decoration: underline; text-underline-offset: 3px; }
.notice a.inline:hover, .prose a:hover { color: #fff; }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 80px 6%;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.cta p { color: var(--muted); margin: 0 auto 30px; max-width: 56ch; }

/* ---------- Footer ---------- */
footer.site {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 44px 6% 32px;
  color: var(--muted);
  font-size: 13px;
}
.foot-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.foot-grid h4 { color: var(--text); font-size: 13px; margin-bottom: 10px; }
.foot-grid ul { list-style: none; }
.foot-grid li { padding: 4px 0; }
.foot-grid a:hover { color: var(--text); }
.foot-note { max-width: 1080px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- Páginas legales ---------- */
.legal-head { max-width: 1080px; margin: 0 auto; padding: 56px 6% 12px; }
.legal-head h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; text-wrap: balance; }
.legal-head p { color: var(--muted); font-size: 14px; }
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.legal-tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color .15s, color .15s;
}
.legal-tabs a:hover { border-color: var(--brand); color: var(--text); }
.legal-tabs a[aria-current="page"] { background: rgba(88,101,242,0.16); border-color: var(--brand); color: var(--text); }

.legal {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 6% 90px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.toc { position: sticky; top: 96px; font-size: 13px; }
.toc p { color: var(--text); font-weight: 700; margin-bottom: 10px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--muted); transition: color .15s; }
.toc a:hover { color: var(--text); }

.prose { max-width: 70ch; }
.prose h2 { font-size: 22px; margin: 44px 0 12px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16px; margin: 22px 0 8px; }
.prose p { color: #c9cdd8; font-size: 15px; margin-bottom: 14px; }
.prose ul, .prose ol.plain { color: #c9cdd8; font-size: 15px; margin: 0 0 16px 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }

.callout {
  background: rgba(88,101,242,0.08);
  border: 1px solid rgba(88,101,242,0.35);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: rgba(254,231,92,0.06); border-color: rgba(254,231,92,0.28); }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: #c9cdd8; }
.prose th { background: var(--bg-alt); color: var(--text); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* Marcadores para completar antes de publicar */
mark.ph {
  background: rgba(254,231,92,0.16);
  color: var(--warning);
  padding: 0 5px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .foot-grid { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; gap: 8px; }
  .toc { position: static; margin-bottom: 20px; }
  .legal-head h1 { font-size: 30px; }

  .nav-toggle { display: inline-flex; }
  header.site { gap: 12px; }
  .header-actions { margin-left: auto; }
  nav.main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 6% 16px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }
  nav.main a { padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
  header.site.open nav.main { display: flex; }
}

@media (max-width: 380px) {
  .header-actions .btn-primary { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
