/* NextQ — Embedded Signup. Sistema visual: NextQ-marketing/nextq/visual-system.md */

:root {
  /* Marca */
  --nq-navy: #0B1D51;
  --nq-blue: #62B8F5;
  --nq-violet: #8B5CF6;
  --nq-fuchsia: #D946EF;
  --nq-gradient: linear-gradient(135deg, #62B8F5 0%, #8B5CF6 55%, #D946EF 100%);

  /* Neutros */
  --white: #FFFFFF;
  --gray-50: #F8F9FB;
  --gray-200: #E5E8EF;
  --gray-400: #9AA3B2;
  --gray-600: #5B6472;

  /* Semánticos */
  --fg1: var(--nq-navy);
  --fg2: var(--gray-600);
  --fg3: var(--gray-400);
  --bg-base: var(--gray-50);
  --border-subtle: var(--gray-200);
  --accent: var(--nq-violet);
  --accent-wash: rgba(139, 92, 246, 0.08);
  --status-success: #10B981;
  --status-error: #EF4444;

  /* Forma */
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 29, 81, 0.06), 0 4px 16px rgba(11, 29, 81, 0.08);
  --space-6: 40px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background:
    radial-gradient(560px circle at 14% 8%, rgba(98, 184, 245, 0.10), transparent 60%),
    radial-gradient(480px circle at 88% 92%, rgba(217, 70, 239, 0.07), transparent 60%),
    var(--bg-base);
  background-attachment: fixed;
  color: var(--fg1);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
}

a { color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.shell {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Tarjeta principal: acción --- */
.card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6) 32px;
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.wordmark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--nq-navy);
  margin-bottom: 28px;
}
.wordmark .q {
  background: var(--nq-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-wash);
  color: var(--accent);
}
.icon svg { width: 26px; height: 26px; }

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 12px;
  color: var(--nq-navy);
}

.lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg2);
  margin: 0 0 32px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  padding: 15px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  background: var(--nq-gradient);
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(139, 92, 246, 0.45);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.status {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg2);
}
.status.is-ok { color: var(--status-success); }
.status.is-error { color: var(--status-error); }

/* Empuja el bloque de confianza al piso de la tarjeta, para que ambas
   columnas (acción + contexto) terminen a la misma altura visual. */
.trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg2);
}
.trust svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); margin-top: 1px; }

.foot {
  align-self: center;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--fg3);
}

/* Estado de carga del botón */
.btn.is-loading { position: relative; color: transparent; }
.btn.is-loading::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::after { animation: none; }
  .btn:hover:not(:disabled) { transform: none; }
}

/* --- Tarjeta secundaria: contexto/confianza --- */
.about {
  padding: var(--space-6) 34px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.about-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg2);
  margin: 0 0 10px;
}
.about-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.about-head .icon { width: 44px; height: 44px; margin: 0; flex: 0 0 auto; }
.about-head .icon svg { width: 22px; height: 22px; }
.about h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--nq-navy);
  margin: 0;
}
.about p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--fg2);
  margin: 0;
}
.about-links {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-size: 13px;
  color: var(--fg2);
}
.about-links .sep { color: var(--border-subtle); margin: 0 10px; }
.about a { color: var(--accent); text-decoration: none; font-weight: 600; }
.about a:hover { text-decoration: underline; }

/* --- Layout ancho: dos columnas lado a lado --- */
/* Al final del archivo a propósito: en CSS, entre reglas de igual
   especificidad (.card vs .card), gana la que aparece más abajo en el
   archivo — sin importar si está dentro de un @media. Si este bloque
   fuera antes de la regla base ".card", el "flex: 0 0 340px" de acá
   perdería silenciosamente contra el "flex: 1 1 auto" de la regla base. */
@media (min-width: 760px) {
  .shell {
    max-width: 800px;
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
  }
  .card { flex: 0 0 340px; }
  .col-about { flex: 1 1 0; }
}
