/* ═══════════════════════════════════════════════════════════
   WEBÁP — Landing webap.cl
   Paleta:
     Primarios: Río #3B82A6 · Noche #14213D
     Secundario: Niebla #6BA38E
     Acento: Ámbar #E0A458
     Fondo: Nube #F7F9FB
═══════════════════════════════════════════════════════════ */

:root {
  --rio: #3B82A6;
  --rio-hover: #2e6d8f;
  --noche: #14213D;
  --noche-deep: #0d1627;
  --niebla: #6BA38E;
  --ambar: #E0A458;
  --ambar-hover: #d4923f;
  --nube: #F7F9FB;
  --blanco: #FFFFFF;
  --texto: #2c2c2c;
  --texto-sec: #5a6478;
  --texto-light: #8a94a6;
  --border: rgba(20, 33, 61, 0.08);

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 2px 8px rgba(20, 33, 61, 0.05);
  --shadow: 0 4px 20px rgba(20, 33, 61, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 33, 61, 0.12);
  --shadow-ambar: 0 6px 20px rgba(224, 164, 88, 0.3);

  --transition: all 0.25s ease;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--texto);
  background: var(--nube);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.btn-ambar {
  background: var(--ambar);
  color: var(--noche);
}
.btn-ambar:hover {
  background: var(--ambar-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-ambar);
}
.btn-outline {
  border-color: var(--rio);
  color: var(--rio);
  background: transparent;
}
.btn-outline:hover {
  background: var(--rio);
  color: var(--blanco);
}
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Secciones */
.section { padding: 88px 0; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rio);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--noche);
  line-height: 1.25;
  margin-bottom: 14px;
}
.section-sub { color: var(--texto-sec); font-size: 1.05rem; }
.text-ambar { color: var(--ambar); }

/* ═══════════ NAVBAR ═══════════ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo-img { height: 38px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--noche);
  transition: var(--transition);
}
.nav-link:hover { color: var(--rio); }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-burger span {
  width: 24px;
  height: 2.5px;
  background: var(--noche);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  padding: 160px 0 100px;
  background: linear-gradient(180deg, var(--nube) 0%, #eef3f8 100%);
  text-align: center;
  overflow: hidden;
}
.hero-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-nodes svg { width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(59, 130, 166, 0.08);
  border: 1px solid rgba(59, 130, 166, 0.15);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rio);
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--niebla);
}
.hero-title {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--noche);
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--texto-sec);
  max-width: 580px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--texto-light);
}

/* ═══════════ STATS BAR ═══════════ */
.stats-bar {
  background: var(--noche);
  padding: 32px 0;
}
.stats-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ambar);
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

/* ═══════════ FEATURES ═══════════ */
.features { background: var(--blanco); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--nube);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: var(--transition);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59,130,166,0.2);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--noche);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--texto-sec);
}

/* ═══════════ DEMO / MOCKUP ═══════════ */
.demo { background: var(--nube); }
.demo-mockup {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.browser-chrome {
  background: #e8ecf0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.browser-dots {
  display: flex;
  gap: 7px;
}
.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1;
  background: var(--blanco);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.75rem;
  color: var(--texto-light);
}
.browser-body {
  display: flex;
  background: var(--blanco);
  height: 420px;
}
.mini-sidebar {
  width: 60px;
  background: var(--noche);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mini-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ambar);
  margin-bottom: 8px;
}
.mini-nav-item {
  width: 100%;
  height: 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
}
.mini-nav-item.active { background: var(--ambar); }
.mini-main { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.mini-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mini-title { width: 140px; height: 14px; background: #e8ecf0; border-radius: 4px; }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--rio); }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini-stat-card {
  height: 64px;
  background: var(--nube);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mini-chart-area {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.mini-chart {
  background: var(--nube);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 16px;
}
.mini-chart .bar {
  flex: 1;
  background: var(--rio);
  border-radius: 3px 3px 0 0;
  opacity: 0.8;
}
.mini-chart .bar:nth-child(4) { background: var(--ambar); opacity: 1; }
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-list-item {
  height: 32px;
  background: var(--nube);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ═══════════ PLANES ═══════════ */
.planes { background: var(--blanco); }
.planes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}
.plan-card {
  background: var(--nube);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.plan-featured {
  border-color: var(--ambar);
  background: var(--blanco);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.plan-featured:hover { transform: scale(1.03) translateY(-6px); }
.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ambar);
  color: var(--noche);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--noche);
  margin-bottom: 12px;
}
.plan-price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--noche);
  margin-bottom: 4px;
}
.plan-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--texto-light);
}
.plan-desc {
  font-size: 0.85rem;
  color: var(--texto-sec);
  margin-bottom: 24px;
}
.plan-features {
  text-align: left;
  margin-bottom: 28px;
  flex: 1;
}
.plan-features li {
  padding: 7px 0;
  font-size: 0.88rem;
  color: var(--texto-sec);
}

/* ═══════════ CTA FINAL ═══════════ */
.cta-final {
  background: linear-gradient(135deg, var(--noche) 0%, var(--rio-hover) 100%);
  padding: 80px 0;
  text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 12px;
}
.cta-sub {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* ═══════════ FOOTER ═══════════ */
.footer {
  background: var(--noche);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo { height: 36px; filter: brightness(0) invert(1); margin-bottom: 12px; }
.footer-tagline { color: var(--texto-light); font-size: 0.9rem; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blanco);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--texto-light);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--ambar); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  color: var(--texto-light);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--ambar); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .hero-title { font-size: 2.6rem; }
  .section-title { font-size: 1.8rem; }
  .features-grid, .planes-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .plan-featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .browser-body { height: 320px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--blanco);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    transition: right 0.35s ease;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
  }
  .nav-links.open { right: 0; }
  .nav-burger { display: flex; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.5rem; }
  .stats-row { flex-direction: column; gap: 16px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .mini-chart-area { grid-template-columns: 1fr; }
  .mini-list { display: none; }
}
