/* ═══════════════════════════════════════════════════════════
   Página de inicio comercial (#view-login.wm-landing) y ventana de acceso (#auth-modal).
   Markup en includes/landing.php. Usa las variables de style.css (tema claro y oscuro).
   ═══════════════════════════════════════════════════════════ */

/* ── Contenedor: pantalla fija con scroll propio, por debajo de los modales (1050+) ── */
.es-login-screen.wm-landing {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 0;
  background: var(--es-bg-body);
  color: var(--es-text);
  --lp-pad-l: calc(1rem + var(--safe-l));
  --lp-pad-r: calc(1rem + var(--safe-r));
  --lp-grad: linear-gradient(135deg, var(--es-primary) 0%, var(--es-primary-dark) 55%, var(--es-primary-deep, #e64a19) 100%);
  --lp-soft: color-mix(in srgb, var(--es-primary) 12%, transparent);
}
/* Pie corporativo: a todo el ancho, sin los márgenes negativos del login antiguo */
.es-login-screen.wm-landing > .cn-footer {
  margin: 0;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  padding-bottom: var(--safe-b);
}
.wm-landing main { display: block; }

.lp-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: var(--lp-pad-l);
  padding-right: var(--lp-pad-r);
}
.lp-center { text-align: center; }

/* ── Botones propios ─────────────────────────────────────── */
.lp-btn-ghost {
  background: var(--es-bg-card);
  color: var(--es-text);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-sm);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--es-transition);
}
.lp-btn-ghost:hover,
.lp-btn-ghost:focus-visible {
  background: var(--es-bg-hover);
  color: var(--es-text);
  border-color: var(--es-primary);
}
.lp-btn-lg { padding: 0.75rem 1.4rem; font-size: 1rem; border-radius: 10px; }
.lp-btn-sm { padding: 0.45rem 0.95rem; font-size: 0.88rem; }

/* ── Barra superior ──────────────────────────────────────── */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--es-bg-navbar);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--es-border-subtle);
}
.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
}
.lp-logo { display: inline-flex; color: var(--es-text); line-height: 0; flex: none; }
.lp-logo svg { height: 34px; width: auto; max-width: 240px; }
.lp-nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.lp-nav-links a {
  color: var(--es-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--es-transition);
}
.lp-nav-links a:hover { color: var(--es-text); }
.lp-nav-actions { display: flex; gap: 0.5rem; margin-left: auto; flex: none; }
.lp-nav-links + .lp-nav-actions { margin-left: 0; }

/* ── Portada ─────────────────────────────────────────────── */
.lp-hero {
  position: relative;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--es-primary) 22%, transparent) 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--es-accent) 14%, transparent) 0%, transparent 70%);
}
.lp-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--lp-soft);
  border: 1px solid var(--es-border);
  color: var(--es-primary-light);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.lp-h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  color: var(--es-text);
}
.lp-grad {
  background: var(--lp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--es-text-secondary);
  max-width: 560px;
  margin: 0 0 1.6rem;
}
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lp-center-row { justify-content: center; }
.lp-small {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--es-text-secondary);
}
.lp-small .bi-check-circle-fill { color: var(--es-success); }

/* Maqueta de la app: ventana con las capturas */
.lp-mock {
  background: var(--es-bg-card);
  border: 1px solid var(--es-border);
  border-radius: 18px;
  box-shadow: var(--es-shadow-lg), 0 0 60px var(--es-primary-glow);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  font-size: 0.8rem;
  min-width: 0;
}
.lp-mock-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  background: var(--es-bg-secondary);
  border-bottom: 1px solid var(--es-border-subtle);
}
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--es-text-muted); opacity: 0.5; flex: none; }
.lp-dot:nth-child(1) { background: #ff6b6b; opacity: 0.85; }
.lp-dot:nth-child(2) { background: #fdcb6e; opacity: 0.85; }
.lp-dot:nth-child(3) { background: #00b894; opacity: 0.85; }
/* Carrusel de capturas dentro de la maqueta (#lp-shots; Bootstrap Carousel, app15.js lo pone en marcha) */
.lp-shots img { display: block; width: 100%; height: auto; }

/* ── Secciones ───────────────────────────────────────────── */
.lp-section { padding: 4.5rem 0; }
.lp-alt { background: var(--es-bg-secondary); border-top: 1px solid var(--es-border-subtle); border-bottom: 1px solid var(--es-border-subtle); }
.lp-head { text-align: center; max-width: 700px; margin: 0 auto 2.5rem; }
.lp-h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  color: var(--es-text);
}
.lp-h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.35rem; color: var(--es-text); }
.lp-sub { font-size: 1.02rem; color: var(--es-text-secondary); margin: 0; line-height: 1.55; }

.lp-ico {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--lp-soft);
  color: var(--es-primary-light);
  font-size: 1.25rem;
}

/* Funciones */
.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.lp-card {
  background: var(--es-bg-card);
  border: 1px solid var(--es-border-subtle);
  border-radius: var(--es-radius-lg);
  padding: 1.4rem 1.35rem;
  box-shadow: var(--es-shadow);
  transition: transform var(--es-transition), border-color var(--es-transition), box-shadow var(--es-transition);
}
.lp-card:hover { transform: translateY(-3px); border-color: var(--es-border); box-shadow: var(--es-shadow), 0 0 26px var(--es-primary-glow); }
.lp-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0.95rem 0 0.4rem; color: var(--es-text); }
.lp-card p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--es-text-secondary); }

/* Cómo funciona */
.lp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  counter-reset: none;
}
.lp-steps li {
  position: relative;
  background: var(--es-bg-card);
  border: 1px solid var(--es-border-subtle);
  border-radius: var(--es-radius-lg);
  padding: 1.6rem 1.4rem 1.4rem;
}
.lp-step-n {
  position: absolute;
  top: 1rem; right: 1.1rem;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  background: var(--lp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.35;
}
.lp-videos { text-align: center; margin: 2rem 0 0; }
.lp-videos a {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--es-text); text-decoration: none;
  padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--es-border-subtle); background: var(--es-bg-card);
}
.lp-videos a:hover { border-color: #ff0033; }
.lp-videos i { color: #ff0033; font-size: 1.2rem; }
.lp-steps h3 { font-size: 1.08rem; font-weight: 700; margin: 0.95rem 0 0.4rem; color: var(--es-text); }
.lp-steps p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--es-text-secondary); }

/* Franja de la comparativa */
.lp-why-strip { padding: 2.5rem 0; }
.lp-why-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.lp-why-inner > div { flex: 1 1 380px; min-width: 0; }
.lp-why-btn { padding: 0.7rem 1.4rem; border-radius: 999px; font-size: 0.98rem; flex: none; max-width: 100%; }

/* Precios */
.lp-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: stretch;
  margin-bottom: 1.2rem;
}
.lp-price {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--es-bg-card);
  border: 1px solid var(--es-border-subtle);
  border-radius: var(--es-radius-lg);
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: var(--es-shadow);
}
.lp-price.featured {
  border-color: var(--es-primary);
  box-shadow: var(--es-shadow-lg), 0 0 36px var(--es-primary-glow);
}
.lp-badge {
  position: absolute;
  top: -0.75rem; left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--lp-grad);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.lp-price-head { display: flex; align-items: center; gap: 0.8rem; }
.lp-price-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--es-text); }
.lp-price-tag { margin: 0; font-size: 0.85rem; color: var(--es-text-secondary); }
.lp-amount { margin: 1.2rem 0 0.4rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem; }
.lp-amount strong { font-size: 2rem; font-weight: 800; color: var(--es-text); letter-spacing: -0.01em; }
.lp-amount span { color: var(--es-text-secondary); font-size: 0.92rem; }
.lp-amount .lp-soon { font-size: 1.15rem; color: var(--es-text-secondary); font-weight: 700; }
.lp-price.soon .lp-checks { opacity: 0.7; }
.lp-price-note { font-size: 0.82rem; color: var(--es-text-muted); margin: 0 0 0.4rem; }
.lp-checks { list-style: none; padding: 0; margin: 0.8rem 0 1.3rem; flex: 1; }
.lp-checks li { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.3rem 0; font-size: 0.92rem; color: var(--es-text); }
.lp-checks i { color: var(--es-success); font-size: 1rem; line-height: 1.35; }

/* Preguntas */
.lp-faq-wrap { max-width: 820px; }
.lp-faq {
  --bs-accordion-bg: var(--es-bg-card);
  --bs-accordion-color: var(--es-text);
  --bs-accordion-border-color: var(--es-border-subtle);
  --bs-accordion-btn-color: var(--es-text);
  --bs-accordion-active-color: var(--es-primary-light);
  --bs-accordion-active-bg: var(--es-bg-hover);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem var(--es-primary-glow);
  --bs-accordion-border-radius: var(--es-radius);
  --bs-accordion-inner-border-radius: var(--es-radius);
}
.lp-faq .accordion-header { margin: 0; }
.lp-faq .accordion-button { font-weight: 600; font-size: 0.98rem; }
.lp-faq .accordion-body { color: var(--es-text-secondary); font-size: 0.93rem; line-height: 1.6; }
.lp-faq .accordion-body a { color: var(--es-primary-light); }

/* Llamada final */
.lp-final { padding: 4.5rem 0; }
.lp-final-inner {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-radius: 24px;
  background:
    radial-gradient(70% 120% at 50% 0%, color-mix(in srgb, var(--es-primary) 26%, transparent) 0%, transparent 70%),
    var(--es-bg-card);
  border: 1px solid var(--es-border);
  box-shadow: var(--es-shadow-lg);
  max-width: calc(1160px - 2rem);
  width: calc(100% - var(--lp-pad-l) - var(--lp-pad-r));
}
.lp-final-inner .lp-sub { margin-bottom: 1.6rem; }

/* ── Ventana de acceso (#auth-modal) ─────────────────────── */
.lp-auth-dialog { max-width: 480px; }
.lp-auth .modal-header { padding: 1rem 1.25rem 0; }
.lp-auth .modal-body { padding: 0.5rem 1.5rem 1.5rem; }
.lp-auth-brand { color: var(--es-text); line-height: 0; }
.lp-auth-brand svg { height: 30px; width: auto; max-width: 220px; }
.lp-auth-title { font-size: 1.3rem; font-weight: 700; margin: 0.6rem 0 1.1rem; color: var(--es-text); }
.lp-auth-text { font-size: 0.92rem; color: var(--es-text-secondary); line-height: 1.55; }
.lp-auth-text:empty { display: none; }
.lp-auth-sub { font-size: 1.1rem; font-weight: 700; color: var(--es-text); margin: 0.6rem 0; }
.lp-auth-center { text-align: center; }
.lp-auth-big {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--lp-soft, var(--es-bg-hover));
  background: color-mix(in srgb, var(--es-primary) 12%, transparent);
  color: var(--es-primary-light);
  font-size: 1.8rem;
}
.lp-auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--es-text-secondary);
}
.lp-auth-links--center { justify-content: center; text-align: center; }
.lp-auth-links a,
.lp-check-label a { color: var(--es-primary-light); text-decoration: none; font-weight: 600; }
.lp-auth-links a:hover,
.lp-check-label a:hover { text-decoration: underline; }
.lp-check-label { font-size: 0.88rem; }
.lp-help { font-size: 0.78rem; margin-top: 0.15rem; color: var(--es-text-secondary); }
.lp-opt { font-weight: 400; color: var(--es-text-muted); }
.lp-legend { float: none; width: auto; margin-bottom: 0.4rem; }
#resend-status { color: var(--es-text-secondary); }

/* Elección de plan en el registro */
.lp-plan-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.lp-plan-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  padding: 0.7rem 0.4rem;
  border: 1px solid var(--es-border-subtle);
  border-radius: var(--es-radius-sm);
  background: var(--es-bg-input);
  cursor: pointer;
  transition: var(--es-transition);
  min-width: 0;
}
.lp-plan-opt i { font-size: 1.15rem; color: var(--es-text-secondary); }
.lp-plan-opt strong { font-size: 0.88rem; color: var(--es-text); }
.lp-plan-opt small { font-size: 0.72rem; color: var(--es-text-secondary); }
.lp-plan-opt:hover { border-color: var(--es-border); background: var(--es-bg-hover); }
.btn-check:checked + .lp-plan-opt {
  border-color: var(--es-primary);
  background: var(--es-bg-selected);
  box-shadow: 0 0 0 1px var(--es-primary) inset;
}
.btn-check:checked + .lp-plan-opt i { color: var(--es-primary-light); }
.btn-check:focus-visible + .lp-plan-opt { box-shadow: 0 0 0 0.2rem var(--es-primary-glow); }
.btn-check:disabled + .lp-plan-opt { opacity: 0.5; cursor: not-allowed; }
.btn-check:disabled + .lp-plan-opt:hover { border-color: var(--es-border-subtle); background: var(--es-bg-input); }

/* ── Adaptación ──────────────────────────────────────────── */
/* Escritorio estrecho: logotipo ancho + enlaces + botones justos en una línea */
@media (min-width: 992px) and (max-width: 1099.98px) {
  .lp-logo svg { height: 28px; }
  .lp-nav-links { gap: 1rem; }
}
@media (max-width: 991.98px) {
  .lp-hero { padding: 3rem 0; }
  .lp-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .lp-hero-text { text-align: center; }
  .lp-lead { margin-left: auto; margin-right: auto; }
  .lp-hero .lp-cta-row { justify-content: center; }
  .lp-mock { transform: none; max-width: 620px; margin: 0 auto; width: 100%; }
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-nav-links { display: none; }
  .lp-nav-actions { margin-left: auto; }
}
@media (max-width: 767.98px) {
  .lp-steps,
  .lp-prices { grid-template-columns: minmax(0, 1fr); }
  .lp-prices { gap: 1.6rem; max-width: 460px; margin-left: auto; margin-right: auto; }
  .lp-section,
  .lp-final { padding: 3rem 0; }
  .lp-why-inner { text-align: center; justify-content: center; }
  .lp-auth .modal-body { padding: 0.5rem 1.1rem calc(1.25rem + var(--safe-b)); }
  .lp-logo svg { height: 26px; max-width: 180px; }
}
@media (max-width: 575.98px) {
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-cta-row .lp-btn-lg { flex: 1 1 100%; }
  .lp-nav-inner { gap: 0.75rem; min-height: 58px; }
  .lp-nav-actions .lp-btn-ghost { padding: 0.42rem 0.7rem; font-size: 0.85rem; }
  .lp-nav-actions .lp-btn-sm { padding: 0.42rem 0.75rem; font-size: 0.85rem; }
  .lp-final-inner { padding: 2.2rem 1.1rem; border-radius: 18px; }
}
/* Móvil estrecho: el logotipo ancho («Pombela Mail») y los tres botones no caben en la barra;
   «Empieza gratis» ya está justo debajo, en grande, en la portada. */
@media (max-width: 480px) {
  .lp-nav-actions .lp-btn-sm[data-auth-open="register"] { display: none; }
}
@media (max-width: 400px) {
  .lp-nav-actions .lp-btn-ghost .bi { display: none; }
  .lp-plan-pick { grid-template-columns: minmax(0, 1fr); }
  .lp-plan-opt { flex-direction: row; justify-content: flex-start; gap: 0.6rem; text-align: left; padding: 0.6rem 0.8rem; }
  .lp-plan-opt small { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .es-login-screen.wm-landing { scroll-behavior: auto; }
  .lp-card,
  .lp-btn-ghost { transition: none; }
  .lp-card:hover { transform: none; }
  .lp-mock { transform: none; }
}

/* Selector de idioma de la barra (includes/landing.php) */
.lp-lang {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    color: inherit;
    font-size: .88rem;
    text-decoration: none;
    opacity: .85;
}
.lp-lang:hover,
.lp-lang:focus-visible { opacity: 1; background: rgba(127, 127, 127, .14); }
@media (max-width: 520px) { .lp-lang span { display: none; } }
