/* ============================================================
   CLARITY STATE AI — multipagina.css
   ADITIVO. Se carga DESPUÉS de styles.css en todas las páginas.
   No modifica styles.css (decisión LOCKED: no rediseñar).
   Contiene: hamburguesa móvil, dropdown Servicios, CTA jerarquizada,
   hero de página interior, bloque de cifra, grid de confianza, FAQ,
   lista de entregables, formulario de contacto, grid de recursos.
   Usa los tokens y la convención visual de styles.css.
   2026-06-15 — noche autónoma.
   ============================================================ */

/* ---------- NAV: hamburguesa + dropdown ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}
.nav-toggle:hover { border-color: var(--border-accent); }
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown Servicios (desktop hover / mobile expandido) */
.navbar-item { position: relative; }
.navbar-item--dropdown > .navbar-link::after {
  content: "▾";
  font-size: 0.7em;
  margin-left: 6px;
  opacity: 0.7;
}
.navbar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 10px;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 120;
}
.navbar-item--dropdown:hover .navbar-dropdown,
.navbar-item--dropdown:focus-within .navbar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.navbar-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.navbar-dropdown a:hover { background: var(--accent-glow); color: var(--accent-light); }
.navbar-dropdown a small { display: block; color: var(--text-muted); font-weight: 400; font-size: 0.78rem; margin-top: 2px; }

/* CTA secundaria como enlace de texto (jerarquizar la única CTA — estilo Arkham) */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.btn-text:hover { color: var(--accent-light); border-bottom-color: var(--border-accent); }

/* ---------- TRES FRENTES: grid de 3 + tarjeta-enlace ---------- */
.pilares-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .pilares-grid--3 { grid-template-columns: 1fr; } }

a.pilar-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.pilar-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 0 20px var(--accent-glow);
}
.pilar-card .prueba-tag { margin-bottom: 12px; }

/* ---------- HERO de página interior (compacto, sin canvas) ---------- */
.page-hero {
  position: relative;
  padding: 160px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero .container { position: relative; z-index: 2; max-width: 880px; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero-title {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 20px;
}
.page-hero-lede {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 0 32px;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-glow-strong) 0%, transparent 65%);
  filter: blur(20px);
  z-index: 1;
  pointer-events: none;
}

/* ---------- VÍAS DE CONTACTO (chooser rápido, priorizado por velocidad) ---------- */
.vias {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 780px;
  margin-top: 8px;
}
.via {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.via:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.75);
}
.via-ic {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.05));
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
}
.via-ic svg { width: 22px; height: 22px; }
.via-body { flex: 1; min-width: 0; }
.via-title { display: block; font-weight: 600; font-size: 1.03rem; line-height: 1.25; }
.via-desc { display: block; margin-top: 3px; font-size: 0.88rem; line-height: 1.4; color: var(--text-muted); }
.via-arrow { flex: none; width: 20px; height: 20px; color: var(--text-muted); transition: transform 0.2s ease, color 0.2s ease; }
.via:hover .via-arrow { transform: translateX(3px); color: var(--accent-light); }
.via-tag {
  position: absolute;
  top: -9px;
  left: 20px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0a0a0f;
  background: var(--accent-light);
  padding: 3px 9px;
  border-radius: 999px;
}
/* Vías rápidas (prioridad visual) */
.via-fast {
  border-color: var(--border-accent);
  background:
    linear-gradient(160deg, rgba(59, 130, 246, 0.10) 0%, rgba(18, 26, 36, 0) 60%),
    var(--bg-card);
}
/* WhatsApp en su color de marca */
.via-wa .via-ic {
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.22), rgba(37, 211, 102, 0.06));
  border-color: rgba(37, 211, 102, 0.42);
  color: #25d366;
}
.via-wa .via-tag { background: #25d366; }
@media (max-width: 760px) {
  .vias { grid-template-columns: 1fr; }
}

/* ---------- BLOQUE DE CIFRA (la prueba honesta) ---------- */
.stat {
  margin: 36px 0;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.stat-num {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1;
  color: var(--accent-light);
  margin-bottom: 10px;
}
.stat-label {
  display: block;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 560px;
  margin-bottom: 10px;
}
.stat-source {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
[data-theme="light"] .stat,
.section-light .stat { background: var(--card-on-light, rgba(10,10,15,0.04)); }

/* ---------- LISTA DE ENTREGABLES / qué incluye ---------- */
.includes-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.includes-list li {
  position: relative;
  padding: 2px 0 2px 34px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-primary);
}
.includes-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
}
.includes-list li::after {
  content: "✓";
  position: absolute;
  left: 5px;
  top: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
}

/* ---------- GRID DE CONFIANZA (confían en nosotros) ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.trust-card {
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.trust-card:hover { border-color: var(--border-accent); transform: translateY(-3px); }
.trust-card .trust-tag {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}
.trust-card h3 { font-size: 1.05rem; color: var(--text-primary); margin: 0 0 8px; }
.trust-card p { font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); margin: 0; }

/* ---------- FAQ (faq-item/faq-question/faq-answer ya en styles.css) ---------- */
.faq-list { max-width: 760px; margin: 32px auto 0; }

/* ---------- FORMULARIO DE CONTACTO ---------- */
.contact-form {
  max-width: 620px;
  margin: 8px 0 0;
  display: grid;
  gap: 18px;
  text-align: left;
}
.contact-form .form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { min-height: 130px; resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ---------- GRID DE RECURSOS (ebooks) ---------- */
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.recurso-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.recurso-card:hover { border-color: var(--border-accent); transform: translateY(-3px); box-shadow: 0 0 20px var(--accent-glow); }
.recurso-tag {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 14px;
}
.recurso-card h3 { font-family: 'Spectral', Georgia, serif; font-weight: 500; font-size: 1.25rem; color: var(--text-primary); margin: 0 0 10px; }
.recurso-card p { font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); margin: 0 0 18px; flex: 1; }
.recurso-card .recurso-cta { font-size: 0.9rem; font-weight: 600; color: var(--accent-light); }

/* Barra de retorno dentro de los ebooks */
.ebook-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  font-family: 'Inter', sans-serif;
}
.ebook-bar a { text-decoration: none; }
.ebook-bar .ebook-bar-back { color: #cbd5e1; font-size: 0.9rem; font-weight: 500; }
.ebook-bar .ebook-bar-back:hover { color: #fff; }
.ebook-cta-block {
  margin: 56px auto 0;
  max-width: 720px;
  padding: 36px;
  text-align: center;
  background: linear-gradient(160deg, rgba(59,130,246,0.12), rgba(59,130,246,0.03));
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 16px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  /* Mostrar hamburguesa, ocultar dropdown caret nativo */
  .nav-toggle { display: flex; }

  /* Panel móvil: navbar-links pasa de oculto a columna desplegable */
  .navbar-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 340px);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 96px 28px 28px;
    background: var(--bg-secondary, #0f1219);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 110;
  }
  .navbar-links.is-open { display: flex; transform: translateX(0); }
  .navbar-link { font-size: 1.05rem; padding: 10px 0; width: 100%; }

  /* Dropdown en móvil: lista plana siempre visible, indentada */
  .navbar-item--dropdown > .navbar-link::after { display: none; }
  .navbar-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    margin: 0 0 8px;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .navbar-dropdown a { padding: 8px 10px; font-size: 0.95rem; }

  /* Overlay para cerrar tocando fuera */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 105;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }

  .page-hero { padding: 120px 0 52px; }
  .trust-grid { grid-template-columns: 1fr; }
  .recursos-grid { grid-template-columns: 1fr; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .stat { padding: 24px 22px; }
}

/* Desktop: nunca mostrar overlay ni toggle */
@media (min-width: 769px) {
  .nav-overlay { display: none; }
  .nav-toggle { display: none; }
}

/* ============================================================
   COMPONENTE 1 — SHOWCASE DE PRODUCTO (techo cinematográfico, estilo Aaru)
   "El producto en acción". Fondo oscuro. Glassmorphism por capas.
   ============================================================ */
.showcase {
  position: relative;
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

/* Glow de acento detrás del panel de vidrio */
.showcase-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, 80%);
  height: 320px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--accent-glow-strong) 0%, transparent 70%);
  filter: blur(48px);
  z-index: 0;
  pointer-events: none;
}

/* Panel de vidrio (profundidad por capas) */
.showcase-glass {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  padding: 30px;
  border-radius: 18px;
  background: rgba(18, 26, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Barra superior tipo ventana (puntos) */
.showcase-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
}
.showcase-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.showcase-bar small {
  margin-left: auto;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Tarjeta de respuesta del cerebro */
.showcase-card {
  display: grid;
  gap: 16px;
}
.showcase-q {
  position: relative;
  padding: 16px 18px 16px 44px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-primary);
}
.showcase-q::before {
  content: "?";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
}
.showcase-a {
  position: relative;
  padding: 18px 20px 18px 44px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--accent);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.showcase-a::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow-strong);
}
.showcase-a strong { color: var(--accent-light); font-weight: 600; }
.showcase-meta {
  margin-top: 4px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Destacado de cifra dentro del showcase */
.showcase-stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.showcase-stat .showcase-stat-num {
  font-family: var(--f-serif, 'Spectral', Georgia, serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  color: var(--accent-light);
}
.showcase-stat .showcase-stat-label {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .showcase-glass { padding: 22px 18px; }
  .showcase-stat { flex-direction: column; gap: 6px; }
}

/* ============================================================
   COMPONENTE 2 — GRID DE CREDIBILIDAD EJECUTIVA (estilo Arkham)
   "Quién responde". Fondo claro (section-light). Fundador + trusted by.
   ============================================================ */
.cred-grid {
  margin-top: 40px;
  display: grid;
  gap: 32px;
}

/* Bloque de fundador */
.cred-founder {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 26px;
  align-items: center;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.cred-photo {
  width: 132px;
  height: 132px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
}
.cred-founder-name {
  font-family: var(--f-serif, 'Spectral', Georgia, serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.cred-founder-role {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}
.cred-founder-line {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
}

/* Wrapper de texto del fundador (columna derecha de .cred-founder) */
.cred-founder-body { min-width: 0; }

/* Bloque "trusted by" (segundo item del grid) */
.cred-trust-block {
  padding: 26px 28px;
  background: var(--card-on-light, rgba(10, 10, 15, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Fila trusted by anonimizada */
.cred-trust-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.cred-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cred-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card-on-light, rgba(10, 10, 15, 0.04));
  border: 1px solid var(--border-accent);
}

@media (max-width: 600px) {
  .cred-founder {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .cred-founder-line { max-width: none; }
}

/* prefers-reduced-motion: desactivar cualquier transición/animación añadida */
@media (prefers-reduced-motion: reduce) {
  .showcase-glass,
  .showcase-a::before,
  .cred-founder,
  .cred-chip {
    transition: none !important;
    animation: none !important;
  }
}
