:root {
  --bg: #070b14;
  --bg-elevated: #0d1320;
  --surface: #121a2b;
  --surface-hover: #182236;
  --border: #243049;
  --text: #e8edf7;
  --muted: #8b9bb8;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --ok: #4ade80;
  --warn: #fb923c;
  --bad: #f87171;
  --header-h: 4rem;
  --max: 1080px;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 11, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.site-logo__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
}
.site-logo__img { height: 26px; width: auto; display: block; }
.site-logo__sep { color: var(--muted); font-weight: 400; opacity: 0.6; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}
.site-nav__cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem !important;
  background: var(--accent-dim) !important;
  color: #fff !important;
  font-weight: 600;
}
.site-nav__cta:hover { background: var(--accent) !important; }

.site-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Layout */
.section {
  padding: 4rem 1.25rem;
}
.section--alt { background: var(--bg-elevated); }
.section__inner { max-width: var(--max); margin: 0 auto; }
.section__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}
.section__lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 42rem;
  margin: 0 0 2rem;
}

/* Hero */
.hero {
  padding: 5rem 1.25rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(56, 189, 248, 0.15), transparent),
    var(--bg);
}
.hero__inner { max-width: var(--max); margin: 0 auto; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.hero__badge strong { color: var(--ok); }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  line-height: 1.1;
}
.hero__deck {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent-dim), #6366f1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 520px;
}
.stat {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat__num { font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.stat__lbl { font-size: 0.75rem; color: var(--muted); }

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.15s, background 0.15s;
}
.card:hover { border-color: rgba(56, 189, 248, 0.35); background: var(--surface-hover); }
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}
.card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.card .metric {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.25rem 0;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge--ok { background: #14532d; color: var(--ok); }
.badge--muted { background: var(--bg-elevated); color: var(--muted); border: 1px solid var(--border); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.step p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Problem list */
.problem-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.problem-list li {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.problem-list li::before {
  content: "✕";
  color: var(--bad);
  font-weight: 700;
  flex-shrink: 0;
}

/* Chat demo */
.chat-demo { margin-top: 1rem; }
.chat-bubble {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin: 0.5rem 0;
  font-size: 0.88rem;
  max-width: 95%;
}
.chat-bubble--user {
  background: #1e3a5f;
  margin-left: auto;
}
.chat-bubble--bad {
  background: var(--surface);
  border: 1px solid #7f1d1d;
}
.chat-bubble--good {
  background: var(--surface);
  border: 1px solid #14532d;
}

/* Kit block */
.kit-cmd {
  background: #0a0f18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  overflow-x: auto;
  margin: 1rem 0;
}
.kit-cmd span { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 3rem 1.25rem 2rem;
  margin-top: 2rem;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}
.site-footer h4 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { font-size: 0.875rem; color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer__bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* Eval page overrides */
.page-main { padding-top: 2rem; }
.eval-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.eval-page .eval-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.eval-page .eval-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.eval-page .eval-card .num { font-size: 2rem; font-weight: 700; }
.eval-page .eval-card .lbl {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.eval-page .eval-card.system .num { color: var(--accent); }
.eval-page .eval-card.delta .num { color: var(--ok); }
.eval-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.eval-page th, .eval-page td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}
.eval-page th { background: var(--surface); }
.eval-page .case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0.5rem 0;
  padding: 0.75rem;
}
.eval-page .case summary { cursor: pointer; font-size: 0.88rem; }
.eval-page pre {
  font-size: 0.72rem;
  white-space: pre-wrap;
  background: #0a0f18;
  padding: 0.5rem;
  border-radius: 6px;
}
.eval-page .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.eval-page .verdict {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}
.eval-page .verdict.ok { border-color: var(--ok); color: var(--ok); }
.eval-page td.delta { color: var(--ok); }
.eval-page .deck { color: var(--muted); margin: 0.5rem 0 1.25rem; font-size: 0.95rem; }
.eval-page h1 { font-size: 1.6rem; letter-spacing: -0.03em; margin-top: 0; }

/* Subpages */
.subpage {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.subpage .case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.5rem;
}
.subpage .case summary { cursor: pointer; font-weight: 600; }
.faq-list .case p { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* Feed / novedades */
.feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}
.feed-item:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--surface-hover);
}
.feed-item--featured {
  border-color: rgba(56, 189, 248, 0.28);
}
.feed-item__date {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-top: 0.15rem;
}
.feed-item__body h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}
.feed-item__body h3 a {
  color: var(--text);
  text-decoration: none;
}
.feed-item__body h3 a:hover { color: var(--accent); }
.feed-item__body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.feed-item__tag {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}
.feed--home .feed-item:nth-child(n+4) { display: none; }
@media (max-width: 640px) {
  .feed-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pricing-card--featured {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow);
}
.pricing-card h3 { margin: 0; color: var(--accent); }
.pricing-price {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}
.pricing-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.pricing-card .btn { align-self: flex-start; margin-top: 0.5rem; }

@media (max-width: 768px) {
  .site-menu-btn { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__cta { margin-left: 0; width: 100%; text-align: center; }
  .eval-page .eval-cards { grid-template-columns: 1fr; }
  .eval-page .cols { grid-template-columns: 1fr; }
}