/* Next Hosting — hoja de estilos única (sin frameworks) */

:root {
  --bg: #0b1020;
  --bg-raised: #111830;
  --bg-panel: #141d3a;
  --border: #243154;
  --text: #e8edf7;
  --text-muted: #93a0bd;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --success: #34d399;
  --error: #f87171;
  --info: #fbbf24;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #16224a 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

main.container { flex: 1; padding-top: 32px; padding-bottom: 48px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.3rem; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible,
summary:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent);
  color: #04202e; padding: 8px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Banner de modo demostración */
.demo-banner {
  background: repeating-linear-gradient(45deg, #3b2f06, #3b2f06 12px, #43370a 12px, #43370a 24px);
  color: #fde68a;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid #57450c;
}

/* Cabecera y navegación */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.15rem; color: var(--text); font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand strong { color: var(--accent); }

.nav-menu {
  display: flex; align-items: center; gap: 20px;
  list-style: none; margin: 0; padding: 0;
}
.nav-menu a { color: var(--text); font-weight: 500; }
.nav-menu a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 1.3rem; padding: 6px 12px; cursor: pointer;
}

.inline-form { display: inline; margin: 0; }
.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text); font: inherit; font-weight: 500;
}
.linklike:hover { color: var(--accent); text-decoration: underline; }

/* Botones */
.btn {
  display: inline-block;
  background: var(--accent-strong);
  color: #04202e; font-weight: 600;
  padding: 10px 22px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 1rem; text-align: center;
}
.btn:hover, .btn:focus-visible { background: var(--accent); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent-strong);
}
.btn-ghost:hover { background: rgba(56, 189, 248, 0.12); }
.btn-block { display: block; width: 100%; }
.btn-small { padding: 6px 14px; font-size: 0.92rem; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px;
  align-items: center; padding: 40px 0 32px;
}
.lead { font-size: 1.12rem; color: var(--text-muted); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-stats {
  list-style: none; margin: 0; padding: 24px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; gap: 16px;
}
.hero-stats li { display: grid; }
.hero-stats strong { color: var(--accent); font-size: 1.05rem; }
.hero-stats span { color: var(--text-muted); font-size: 0.95rem; }

/* Secciones */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-top: 24px;
}
.page-intro { color: var(--text-muted); max-width: 46em; }

/* Tarjetas de planes */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin: 24px 0;
}
.plan-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
}
.plan-card h2, .plan-card h3 { margin-bottom: 0; }
.plan-price { font-size: 2rem; font-weight: 700; margin: 0; }
.plan-price span { font-size: 0.95rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.plan-features, .feature-list { margin: 0; padding-left: 1.2em; color: var(--text-muted); }
.plan-features { flex: 1; }
.plan-features li, .feature-list li { margin: 4px 0; }

.plan-detail {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start;
}
.buy-box {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; position: sticky; top: 84px;
}
.breadcrumb { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 12px; }

/* Pasos */
.steps { margin-top: 40px; }
.step-list {
  list-style: none; counter-reset: paso; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.step-list li {
  counter-increment: paso; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  display: grid; gap: 6px;
}
.step-list li::before {
  content: counter(paso);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--accent-strong); color: #04202e; font-weight: 700;
  border-radius: 50%; margin-bottom: 4px;
}
.step-list span { color: var(--text-muted); font-size: 0.95rem; }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 16px; }
.faq-list details {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 20px;
}
.faq-list summary {
  cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none;
}
.faq-list summary::before { content: "+"; color: var(--accent); margin-right: 10px; }
.faq-list details[open] summary::before { content: "–"; }
.faq-list p { color: var(--text-muted); margin-top: 0; }

/* Formularios */
.form-field { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-input, input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
}
.form-input:focus { border-color: var(--accent); }
textarea { min-height: 140px; resize: vertical; }
.field-errors { color: var(--error); margin: 6px 0 0; padding-left: 1.2em; font-size: 0.92rem; }
.checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--text-muted); }
.checkbox input { width: auto; }

.auth-card {
  max-width: 440px; margin: 32px auto;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; }

.contact-layout {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start;
}
.contact-info {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}

/* Área de cliente */
.account-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.account-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.panel {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.activity-list li:last-child { border-bottom: none; }
.activity-action { color: var(--text-muted); }
.activity-list time { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }

/* Pedidos */
.orders-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; margin: 20px 0;
}
.order-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
}
.order-card:hover {
  border-color: var(--accent-strong); transform: translateY(-2px);
  text-decoration: none;
}
.order-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.order-plan { font-weight: 600; font-size: 1rem; }
.order-card-body {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px;
}
.order-price { font-size: 1.3rem; font-weight: 700; }
.order-date { font-size: 0.85rem; }

/* Badges de estado de pedido */
.order-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  padding: 3px 10px; border-radius: 100px; white-space: nowrap; letter-spacing: 0.03em;
}
.order-badge-pending    { background: rgba(251,191,36,0.2);  color: #fbbf24; }
.order-badge-paid       { background: rgba(52,211,153,0.2); color: #34d399; }
.order-badge-failed    { background: rgba(248,113,113,0.2); color: #f87171; }
.order-badge-cancelled  { background: rgba(148,163,184,0.15); color: #94a3b8; }
.order-badge-refunded   { background: rgba(148,163,184,0.15); color: #94a3b8; }
.order-badge-manual_review { background: rgba(56,189,248,0.15); color: #38bdf8; }

/* Detalle de pedido */
.order-detail-grid {
  display: grid; grid-template-columns: 160px 1fr; gap: 12px 16px;
  margin: 16px 0;
}
.order-detail-grid dt { color: var(--text-muted); font-size: 0.9rem; }
.order-detail-grid dd { margin: 0; font-size: 0.95rem; }
.order-action-note {
  margin-top: 24px; padding: 16px; background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.2); border-radius: var(--radius); color: var(--text-muted);
}

/* Estados */
.empty-state {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 20px; color: var(--text-muted);
}
.error-page { text-align: center; padding: 48px 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.88rem; }

/* Avisos flash */
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 10px; padding: 12px 16px; border: 1px solid var(--border);
  background: var(--bg-raised);
}
.flash-success { border-color: rgba(52, 211, 153, 0.5); color: var(--success); }
.flash-error { border-color: rgba(248, 113, 113, 0.5); color: var(--error); }
.flash-info { border-color: rgba(251, 191, 36, 0.5); color: var(--info); }
.flash-close {
  background: none; border: none; color: inherit; font-size: 1.2rem;
  cursor: pointer; line-height: 1; padding: 4px;
}

/* Pie */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  margin-top: auto; padding: 32px 0 16px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px;
}
.footer-brand { font-weight: 700; }
.footer-brand strong { color: var(--accent); }
.footer-heading { font-weight: 600; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer p { color: var(--text-muted); }
.footer-legal { text-align: center; font-size: 0.88rem; margin-top: 24px; }

/* Adaptable */
@media (max-width: 780px) {
  .hero, .plan-detail, .contact-layout { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu .btn { display: block; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
