:root{
  --bg:#0b1220;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);
  --brand:#7c5cff;
  --brand2:#28d7ff;
  --ok:#2ee59d;
  --warn:#ffcc66;
  --border: rgba(255,255,255,.14);

  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 12px;

  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);

  background:
    radial-gradient(900px 600px at 15% 10%, rgba(124,92,255,.28), transparent 55%),
    radial-gradient(900px 600px at 85% 0%, rgba(40,215,255,.22), transparent 55%),
    radial-gradient(900px 700px at 60% 90%, rgba(46,229,157,.12), transparent 55%),
    linear-gradient(180deg, #060a12, var(--bg) 35%, #050913);

  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;

  line-height:1.55;
}

a{color:inherit}
.container{max-width:var(--max); margin:0 auto; padding:0 0px}
.section{padding:10px 10px}
.small{font-size:.94rem;color:var(--muted)}
.hr{height:1px;background:var(--border); margin:18px 0}

.skip-link{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:12px; top:12px; width:auto; height:auto; padding:10px 12px;
  background:#111a; border:1px solid var(--border); border-radius:12px;
  z-index:9999;
}

.navbar{
  position:sticky; top:0; z-index:50;
  background: rgba(7,10,18,.55);
  backdrop-filter: blur(12px);
  border-bottom:1px solid rgba(255,255,255,.10);
  padding: 0px 10px;
}
.navbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:12px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  text-decoration:none;
}
.brand-badge{
  width:70px; height:70px; border-radius:12px;
  background:
    url('logo.png') center/120px 120px no-repeat,
    linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 12px 32px rgba(124,92,255,.22);
}
.brand strong{letter-spacing:.2px}
.nav-links{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.nav-links a{
  text-decoration:none;
  padding:10px 12px; border-radius:12px;
  color: var(--muted);
}
.nav-links a[aria-current="page"], .nav-links a:hover{
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.nav-cta{
  display:flex; align-items:center; gap:10px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  border:1px solid rgba(255,255,255,.14);
  padding:11px 14px;
  border-radius:14px;
  text-decoration:none;
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.btn:hover{background: rgba(255,255,255,.08)}
.btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border-color: transparent;
  color: #07101f;
  font-weight: 700;
}
.btn.primary:hover{filter: brightness(1.05)}
.btn.ghost{
  background: transparent;
}
.tag{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  padding:6px 10px; border-radius:999px;
  color: var(--muted);
  font-size:.88rem;
}

.hero{
  padding:58px 0 42px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:24px;
  align-items:stretch;
}
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr; }
}
.h1{
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height:1.08;
  margin:10px 0 12px;
}
.lead{font-size:1.15rem; color:var(--muted); margin:0 0 20px}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin:16px 0 16px}
.kpis{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:18px}
@media (max-width: 700px){ .kpis{grid-template-columns:1fr; } }
.kpi{
  padding:14px;
  border-radius: var(--radius2);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.kpi strong{display:block; font-size:1.05rem}
.kpi span{color:var(--muted); font-size:.92rem}

.card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
}
.card.pad{padding:18px}
.card-title{margin:0 0 8px; font-size:1.05rem}
.card p{margin:0; color:var(--muted)}
.grid-3{display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px}
@media (max-width: 980px){ .grid-3{grid-template-columns:1fr} }

.feature{
  padding:16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.feature h3{margin:0 0 8px; font-size:1.06rem}
.feature p{margin:0; color:var(--muted)}
.icon{
  width:38px; height:38px; border-radius:14px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  display:grid; place-items:center;
  margin-bottom:10px;
}

.callout{
  display:flex; gap:14px; align-items:flex-start;
  padding:16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(40,215,255,.10);
}
.callout strong{display:block}
.callout p{margin:4px 0 0; color:var(--muted)}

.page-title{margin:0 0 6px; font-size:2.2rem}
.page-sub{margin:0; color:var(--muted)}

.manual-layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:18px;
  align-items:start;
}
@media (max-width: 980px){
  .manual-layout{grid-template-columns:1fr;}
}
.sidebar{
  position: sticky;
  top: 78px;
  padding:14px;
}
@media (max-width: 980px){
  .sidebar{position:relative; top:auto;}
}
.search{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
}
.search::placeholder{color: rgba(234,240,255,.55)}
.toc{
  margin-top:12px;
  max-height: calc(100vh - 210px);
  overflow:auto;
  padding-right:4px;
}
.toc a{
  display:block;
  padding:8px 10px;
  border-radius:12px;
  text-decoration:none;
  color: var(--muted);
}
.toc a:hover, .toc a.active{
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.prose{
  padding:18px;
}
.prose h2, .prose h3{scroll-margin-top: 90px;}
.prose h2{margin: 18px 0 8px; font-size:1.45rem}
.prose h3{margin: 16px 0 6px; font-size:1.15rem}
.prose p, .prose li{color: var(--muted)}
.prose ul{margin-top:8px}
.prose code{
  background: rgba(255,255,255,.06);
  padding:2px 6px; border-radius: 10px;
  border:1px solid rgba(255,255,255,.10);
  color: var(--text);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.12);
}
.table th,.table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.10);
  text-align:left;
}
.table th{color: var(--text); background: rgba(255,255,255,.06)}
.table td{color: var(--muted)}

.footer{
  border-top:1px solid rgba(255,255,255,.10);
  padding:28px 0;
  color: rgba(234,240,255,.65);
  margin-top: 60px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.3fr .7fr;
  gap:14px;
}
@media (max-width: 800px){ .footer-grid{grid-template-columns:1fr} }
.footer a{color: rgba(234,240,255,.82)}
.note{
  padding:12px 14px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.badges{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px}
.badge{
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size:.9rem;
}

/* =============================================
   SCROLL-TO-TOP
   ============================================= */
.scroll-top{
  position:fixed;
  bottom:28px;
  right:28px;
  z-index:90;
  width:46px; height:46px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(7,10,18,.75);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor:pointer;
  display:grid; place-items:center;

  /* oculto por defecto */
  opacity:0;
  pointer-events:none;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
}
.scroll-top.visible{
  opacity:1;
  pointer-events:auto;
  transform: translateY(0);
}
.scroll-top:hover{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #07101f;
  border-color: transparent;
}

/* =============================================
   MENÚ HAMBURGUESA (MÓVIL)
   ============================================= */
.menu-toggle{
  display:none;           /* oculto en escritorio */
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  width:42px; height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  padding:0;
}
.hamburger-line{
  display:block;
  width:22px; height:2px;
  background: var(--text);
  border-radius:2px;
  transition: transform .3s, opacity .25s;
}

/* Animación "X" al abrir */
.menu-toggle.active .hamburger-line:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active .hamburger-line:nth-child(2){
  opacity:0;
}
.menu-toggle.active .hamburger-line:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px){
  .menu-toggle{
    display:flex;
  }

  .nav-links{
    /* menú oculto por defecto en móvil */
    display:none;
    flex-direction:column;
    position:absolute;
    top:100%;
    left:0; right:0;
    background: rgba(7,10,18,.92);
    backdrop-filter: blur(14px);
    border-bottom:1px solid rgba(255,255,255,.10);
    padding:12px 16px;
    gap:4px;
  }
  .nav-links.open{
    display:flex;
  }
  .nav-links a{
    width:100%;
    padding:12px 14px;
  }

  .nav-cta{
    display:none;            /* se oculta; "Descargar" ya está en el menú */
  }
  /* Añadimos el botón CTA dentro del menú vía JS */
  .nav-links .nav-cta-mobile{
    display:inline-flex;
    margin-top:6px;
  }
}

.download-count{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:.9rem;
  color: var(--muted);
}
.download-count::before{
  content:"⬇";
  font-size:.8rem;
}