/* Portada: diseño más sobrio y compacto (menos scroll, sin píldoras ni degradados).
   Usa los mismos tokens de color y tipografía que css/style.css. */

/* ---------- Hero ---------- */
.home-hero { padding: 120px 0 56px; text-align: left; }
.home-hero::before, .home-hero::after { display: none; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.home-title { font-family: var(--font-display); font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px; color: #fff; text-wrap: balance; }
.home-accent { color: var(--accent-cyan); }
.home-desc { font-size: 1.08rem; line-height: 1.6; color: var(--text-secondary); max-width: 56ch; margin: 0 0 28px; }
.home-actions { justify-content: flex-start; margin: 0 0 32px; flex-wrap: wrap; gap: 12px; }
.home-actions .btn { box-shadow: none; }

.home-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--border-color); }
.home-stats > div { display: flex; flex-direction: column; gap: 2px; }
.home-stats dd { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.home-stats dt { font-size: 0.85rem; color: var(--text-muted); }

/* Ejemplo de chat */
.home-demo { margin: 0; }
.home-demo-chat { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px; display: grid; gap: 18px; }
.home-demo-msg { display: flex; gap: 12px; align-items: flex-start; }
.home-demo-av { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: #f5c542; color: #2b1f00; font-weight: 700; object-fit: cover; }
.home-demo-body { min-width: 0; flex: 1; }
.home-demo-name { font-weight: 600; font-size: 0.92rem; color: #fff; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.home-demo-bot { font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #5865f2; color: #fff; }
.home-demo-scam { padding: 14px 16px; border-radius: 10px; background: linear-gradient(135deg, #5a3500, #b07800); color: #fff6d6; font-weight: 700; font-size: 0.95rem; line-height: 1.35; text-decoration: line-through; text-decoration-color: rgba(255, 80, 100, 0.85); text-decoration-thickness: 2px; opacity: 0.75; }
.home-demo-alert { border-left: 3px solid #ef4444; background: var(--bg-tertiary, rgba(255, 255, 255, 0.04)); border-radius: 8px; padding: 10px 14px; display: grid; gap: 4px; font-size: 0.88rem; }
.home-demo-alert strong { color: #fff; }
.home-demo-alert span { color: var(--text-secondary); overflow-wrap: anywhere; }
.home-demo figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Secciones ---------- */
.home-section { padding: 64px 0; }
.home-h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 28px; color: #fff; text-align: left; }

/* Qué hace: texto plano separado por líneas, no tarjetas */
.home-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.home-features article { border-top: 2px solid var(--accent-cyan); padding-top: 16px; }
.home-features h3 { font-size: 1.05rem; margin: 0 0 8px; color: #fff; }
.home-features p { margin: 0; font-size: 0.93rem; line-height: 1.55; color: var(--text-secondary); }
.home-more { display: inline-block; margin-top: 28px; color: var(--accent-cyan); font-weight: 600; text-decoration: none; }
.home-more:hover { text-decoration: underline; }

/* Servidores que lo usan: lista compacta */
#comunidades .communities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.home-community { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); min-width: 0; }
.home-community img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--bg-tertiary, #1a2030); }
.home-community-info { min-width: 0; flex: 1; }
.home-community-name { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-community-meta { font-size: 0.8rem; color: var(--text-muted); }
.home-community a { flex: 0 0 auto; font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan); text-decoration: none; padding: 6px 10px; border: 1px solid var(--border-color); border-radius: 8px; }
.home-community a:hover { border-color: var(--accent-cyan); }

/* Precios y FAQ: menos aire */
#precios .pricing-toggle-wrapper, #precios .pricing-toggle { margin-top: 0; }
#precios .pricing-grid { margin-top: 28px; }
#faq .faq-grid { margin-top: 0; }

/* ---------- Pie ---------- */
.home-footer { padding: 28px 0; }
.home-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.home-footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; color: #fff; text-decoration: none; }
.home-footer-brand img { border-radius: 50%; }
.home-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.home-footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.home-footer-links a:hover { color: #fff; }
.home-footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 960px) {
  .home-hero { padding: 96px 0 40px; }
  .home-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .home-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 560px) {
  .home-hero { padding: 84px 0 32px; }
  .home-desc { font-size: 1rem; margin-bottom: 22px; }
  .home-actions .btn { width: 100%; justify-content: center; }
  .home-stats { gap: 10px 22px; }
  .home-stats dd { font-size: 1.35rem; }
  .home-section { padding: 44px 0; }
  .home-h2 { margin-bottom: 20px; }
  .home-features { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-footer-row { flex-direction: column; align-items: flex-start; }
}

/* style.css reserva 700 px fijos para cada sección fuera de pantalla (content-visibility).
   En la portada corta provoca saltos al hacer scroll y alturas falsas: se dibuja todo. */
#simulador, #caracteristicas, #precios, #faq, .footer { content-visibility: visible; contain-intrinsic-size: none; }

/* Precios en móvil: los tres planes en fila y se deslizan de lado en vez de apilarse */
@media (max-width: 760px) {
  #precios .pricing-grid {
    display: grid; grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none;
    gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 18px 4px 12px; margin-left: -4px; margin-right: -4px; scrollbar-width: none;
  }
  #precios .pricing-grid::-webkit-scrollbar { display: none; }
  #precios .pricing-card { scroll-snap-align: center; margin: 0; transform: none; }
  #precios .home-swipe-hint { display: block; }
}
.home-swipe-hint { display: none; font-size: 0.82rem; color: var(--text-muted); margin: 10px 0 0; text-align: center; }

/* ---------- Reseñas ---------- */
.home-reviews-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 24px; }
.home-reviews-head .home-h2 { margin: 0; }
.home-reviews-score { display: flex; align-items: baseline; gap: 10px; color: var(--text-muted); font-size: 0.9rem; }
.home-reviews-score strong { font-family: var(--font-display); font-size: 1.6rem; color: #fff; }
.home-stars { color: #fbbf24; letter-spacing: 1px; white-space: nowrap; }
.home-stars .off { color: rgba(255, 255, 255, 0.18); }
.home-reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.home-review { border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.home-review blockquote { margin: 0; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.home-review-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-review-who img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; background: var(--bg-tertiary, #1a2030); }
.home-review-who div { min-width: 0; }
.home-review-guild { font-weight: 600; color: #fff; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-review-user { font-size: 0.78rem; color: var(--text-muted); }
.home-reviews-more { margin-top: 14px; }
@media (max-width: 760px) {
  .home-reviews-grid { grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .home-reviews-grid::-webkit-scrollbar { display: none; }
  .home-review { scroll-snap-align: center; }
}
