/* ===============================
   ZERNYX — Diseño 2025
   Paleta: Blanco · Violeta · Negro
   =============================== */

:root {
  --bg: #f9fafb;
  --bg-alt: #ffffff;
  --bg-soft: #f3f4ff;
  --fg: #111111;
  --fg-soft: #6b7280;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-strong: #7c3aed;
  --border-subtle: rgba(148, 163, 184, 0.45);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.06);
  --max-w: 1120px;
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.06), transparent 60%),
    var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* =====================================
   HEADER / NAV
   ===================================== */

.topbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.6);
  z-index: 50;
}

.topbar-inner {
  max-width: var(--max-w);
  margin: auto;
  padding: 0.7rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-logo-img img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.05rem; font-weight: 600; }
.brand-tagline { font-size: 0.7rem; color: var(--fg-soft); }

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--fg-soft);
  transition: var(--transition-fast);
}

.nav-link:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--fg);
}

.nav-link.is-active {
  background: rgba(139, 92, 246, 0.14);
  color: var(--fg);
}

.nav-cta-link {
  border: 1px solid rgba(139, 92, 246, 0.7);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #000;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg) translateY(6px);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-6px);
}

/* =====================================
   HERO
   ===================================== */

.hero {
  max-width: var(--max-w);
  margin: 1.5rem auto;
  padding: 1.5rem 1.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.4rem;
}

.hero-pill {
  background: #eef2ff;
  border: 1px solid rgba(129, 140, 248, 0.5);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--fg-soft);
  display: inline-block;
  margin-bottom: 0.6rem;
}

.hero h1 {
  margin: 0 0 0.8rem 0;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.hero-gradient {
  background: linear-gradient(120deg, #4c1d95, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--fg-soft);
  margin-bottom: 1.2rem;
  max-width: 40rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4ff;
  border: 1px solid rgba(199, 210, 254, 0.9);
  color: #4338ca;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* HERO CARD */

.glass {
  background: var(--bg-alt);
  border: 1px solid rgba(199, 210, 254, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.hero-card { padding: 1rem; }

.hero-card-header {
  display: flex;
  gap: 0.3rem;
  padding-bottom: 0.4rem;
}

.dot {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
}

.dot-violet { background: var(--accent); }

.hero-card-body {
  background: #f9fafb;
  border-radius: 16px;
  padding: 0.9rem;
}

.metric-label { color: var(--fg-soft); }
.metric-value { font-weight: 600; }

/* =====================================
   BOTONES
   ===================================== */

.btn {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 10px 24px rgba(88, 28, 135, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(88, 28, 135, 0.45);
}

.btn-ghost {
  background: #ffffff;
  color: #111;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-full { width: 100%; }

/* =====================================
   SECCIONES
   ===================================== */

.section {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 1rem 1.2rem;
}

.section-alt {
  background: white;
  border: 1px solid rgba(199, 210, 254, 0.7);
  box-shadow: var(--shadow-soft);
  border-radius: 28px;
}

.section-header { margin-bottom: 1.3rem; }
.section-header h2 { margin: 0; font-size: 1.8rem; }
.section-header p { color: var(--fg-soft); }

.accent { color: var(--accent-strong); }

/* =====================================
   CARDS
   ===================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: white;
  border: 1px solid var(--border-subtle);
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-med);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-strong);
  box-shadow: 0 18px 40px rgba(139, 92, 246, 0.18);
}

/* =====================================
   TIMELINE
   ===================================== */

.timeline {
  border: 1px solid rgba(199, 210, 254, 0.7);
  border-radius: 26px;
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.7rem 0;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  height: calc(100% - 10px);
  border-left: 1px dashed rgba(148, 163, 184, 0.7);
}

.timeline-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =====================================
   FORMULARIO / CONTACTO
   ===================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.3rem;
  margin-top: 1rem;
}

.contact-form {
  background: white;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(199, 210, 254, 0.9);
  box-shadow: var(--shadow-card);
}

.field { margin-bottom: 0.8rem; }
.field label { font-size: 0.82rem; margin-bottom: 0.3rem; display: block; }

.field-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  background: white;
  transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #eef2ff;
}

textarea { resize: vertical; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.form-note {
  font-size: 0.75rem;
  color: var(--fg-soft);
  margin-top: 0.4rem;
}

/* ===== FIX SNIPPETS PEGADOS ===== */

.contact-snippets {
  margin-top: 1.2rem !important;
  gap: 1rem !important;
}

.snippet {
  padding: 0.9rem 1rem !important;
  border-radius: 14px;
}

/* =====================================
   PLANES — ESPACIADO MEJORADO
   ===================================== */

#planes.section-alt {
  padding-top: 2.3rem !important;
  padding-bottom: 2rem !important;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem !important;
  margin-top: 1.5rem;
}

.pricing {
  padding: 1.4rem !important;
}

/* =====================================
   FOOTER
   ===================================== */

.footer {
  margin-top: 1rem;
  background: white;
  border-top: 1px solid rgba(209, 213, 219, 0.7);
}

.footer-inner {
  max-width: var(--max-w);
  margin: auto;
  padding: 1rem 1.2rem;
  font-size: 0.8rem;
  color: var(--fg-soft);
}

/* =====================================
   ANIMACIONES
   ===================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-left"] {
  transform: translateX(20px);
}
[data-animate="fade-left"].is-visible {
  transform: translateX(0);
}

/* =====================================
   RESPONSIVE
   ===================================== */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-list {
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    background: white;
    flex-direction: column;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(209, 213, 219, 0.7);
    transform: translateY(-130%);
    transition: var(--transition-med);
  }

  .nav-list.is-open {
    transform: translateY(0);
  }

  .cards-grid,
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .brand-name { font-size: 0.95rem; }
  .hero h1 { font-size: 2rem; }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
}
