/* styles/landing.css — inicio/landing público (etapa "Mejora integral de
   experiencia", §19–§28). PROPIEDAD del flujo de trabajo del inicio.

   Reglas: sólo se usan variables CSS de styles.css (--…) para que el diseño
   funcione igual en el tema claro (por defecto) y en el oscuro. La tarjeta de
   marca (.auth-brand) es siempre oscura: sobre ella se usan los tokens
   --chrome-* y blancos fijos, igual que el resto del componente auth. */

/* ── Contenedor del landing ─────────────────────────────────────────────── */
.landing {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.7rem);
  padding-bottom: clamp(1.5rem, 4vh, 3rem);
}

.landing > * { min-width: 0; }

/* ── Identidad en la tarjeta de marca (fondo --chrome en ambos temas) ───── */
.landing-motto {
  margin: 0.95rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.landing-lead {
  margin: 0.35rem 0 0;
  max-width: 48ch;
  font-size: 0.88rem;
  color: var(--chrome-muted);
}

/* §2 principio del producto: bloque destacado, no una frase más del listado. */
.landing-principle {
  margin: 1rem 0 0;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #8fb2f0;
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--chrome-text);
}

/* ── §21 Acciones principales ───────────────────────────────────────────── */
.landing .landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0.25rem;
}

.landing .landing-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--chrome-text);
}

.landing .landing-actions .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(143, 178, 240, 0.35);
}

.landing-action-note {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--chrome-text);
}

.landing-action-note[hidden] { display: none; }

/* La línea de identidad queda después de las acciones en el landing. */
.landing .auth-tagline { margin: 1rem 0 0; }

/* ── §19 Animación de entrada (escalonada, lenta, sin rebotes) ──────────── */
@keyframes landing-in {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes landing-title-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(8px);
    text-shadow: 0 0 22px rgba(143, 178, 240, 0.75);
  }
  60% { text-shadow: 0 0 12px rgba(143, 178, 240, 0.32); }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
    text-shadow: 0 0 0 rgba(143, 178, 240, 0);
  }
}

/* Sólo el layout con .landing-anim (la raíz pública "#/") anima: así el
   registro y los re-renders de idioma no repiten el efecto en la columna. */
.landing-anim .landing-reveal {
  animation: landing-in 900ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.landing-anim .landing-title-reveal {
  animation: landing-title-in 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) 60ms both;
}

.landing-anim .landing-reveal-2 { animation-delay: 340ms; }
.landing-anim .landing-reveal-3 { animation-delay: 470ms; }
.landing-anim .landing-reveal-4 { animation-delay: 620ms; }
.landing-anim .landing-reveal-5 { animation-delay: 800ms; }
.landing-anim .landing-reveal-6 { animation-delay: 960ms; }
.landing-anim .landing-reveal-7 { animation-delay: 1080ms; }
.landing-anim .landing-reveal-8 { animation-delay: 1220ms; }

/* Sin movimiento reducido: todo aparece de inmediato (sin esperas ocultas). */
@media (prefers-reduced-motion: reduce) {
  .landing-anim .landing-reveal,
  .landing-anim .landing-title-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    text-shadow: none !important;
  }
}

/* ── Secciones informativas ─────────────────────────────────────────────── */
.landing-section {
  margin-bottom: 0;
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.landing-section .panel-subtitle { max-width: 84ch; }

/* §22 Qué hace */
.landing-do-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.landing-do {
  padding: 0.85rem 0.9rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.landing-do-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.55rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: 10px;
  color: var(--accent-strong);
}

.landing-do h3 { margin: 0 0 0.3rem; font-size: 0.98rem; }
.landing-do p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* §23 Por qué existe */
.landing-why { display: grid; gap: 0.6rem; max-width: 82ch; }
.landing-why p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.landing-why .landing-why-lead {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

/* §24 Por qué elegirlo */
.landing-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.landing-benefit {
  padding: 0.95rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.landing-benefit h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  font-size: 0.97rem;
}

.landing-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  color: var(--accent-strong);
}

.landing-benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }

.landing-benefit-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.landing-benefit-list li svg { flex: none; margin-top: 3px; color: var(--ok); }
.landing-benefit-list li span { min-width: 0; }

/* ── §25 Así funciona: pestañas accesibles ──────────────────────────────── */
.landing-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.landing-step-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.landing-step-tab:hover { border-color: var(--accent); color: var(--accent-strong); }

.landing-step-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* En oscuro --accent (#5b8cff) no da contraste 4.5:1 con texto blanco. */
:root[data-theme="dark"] .landing-step-tab.is-active {
  background: #2f63d6;
  border-color: #2f63d6;
  color: #ffffff;
}

.landing-step-num {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.landing-step-panel {
  padding: 0.95rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.landing-step-panel[hidden] { display: none; }
.landing-step-tags { margin: 0 0 0.55rem; }
.landing-step-text { margin: 0 0 0.7rem; max-width: 82ch; font-size: 0.9rem; color: var(--text-muted); }
.landing-step-panel .kv-list { margin: 0; }

/* ── §27 ¿Necesitas ayuda? ──────────────────────────────────────────────── */
.landing-help { display: grid; gap: 0.75rem; }

.landing-help-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 1rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.landing-help-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

.landing-help-title svg { color: var(--accent-strong); }
.landing-help-desc { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
.landing-help-action { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }

.landing-help-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-strong);
}

.landing-help-panel[hidden] { display: none; }
.landing-help-panel > p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.landing-help-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.landing-help-list li { margin-bottom: 0.35rem; }
.landing-help-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.landing-help-empty { font-size: 0.85rem; color: var(--text-dim); }

.landing-faq { background: var(--panel); }
.landing-faq > summary { font-size: 0.88rem; }
.landing-faq p { margin: 0.4rem 0 0; font-size: 0.87rem; color: var(--text-muted); }

.landing-support-form { display: grid; gap: 0.85rem; }
.landing-support-form[hidden] { display: none; }

.landing-support-ok { display: grid; gap: 0.7rem; }
.landing-support-ok[hidden] { display: none; }
.landing-support-ok .kv-list { margin: 0; }

.landing-support-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

.landing-support-list li {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.landing-support-list li strong { font-size: 0.88rem; }

.landing-support-list li span {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* ── Responsive del landing ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .landing-help-item { grid-template-columns: minmax(0, 1fr); }
  .landing-help-action { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .landing .landing-actions .btn { flex: 1 1 100%; }
  .landing-step-tab { flex: 1 1 calc(50% - 0.5rem); justify-content: center; }
}
