/* ============================================================
   Me Descubro — Sistema de diseño global
   Basado en el manual de marca (Poppins + paleta violeta)
   ============================================================ */

:root {
  /* === PALETA DE MARCA === */
  --violet: #6C3DF2;          /* Primario */
  --violet-deep: #5A2FE0;     /* Hover */
  --violet-soft: #8E66F5;     /* Acentos suaves */
  --ink: #1E1241;             /* Texto principal */
  --lavender: #F3EDFF;        /* Fondo de cards alternativas */
  --pink: #FF6EC7;
  --teal: #22D3C5;
  --yellow: #FFD84D;
  --bg: #F5F5F7;              /* Fondo general */
  --white: #FFFFFF;
  --gray-100: #F5F5F7;
  --gray-200: #E5E5EA;
  --gray-400: #A1A1AA;
  --gray-600: #6B7280;

  --shadow-sm: 0 2px 8px -2px rgba(30, 18, 65, 0.08);
  --shadow-md: 0 8px 24px -8px rgba(30, 18, 65, 0.12);
  --shadow-lg: 0 20px 50px -15px rgba(30, 18, 65, 0.18);
  --shadow-violet: 0 12px 30px -10px rgba(108, 61, 242, 0.45);
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body { min-height: 100vh; }

/* ===== Tipografía ===== */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; line-height: 1.55; }
a { color: var(--violet); text-decoration: none; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 768px) {
  .container { padding-left: 32px; padding-right: 32px; }
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 245, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30, 18, 65, 0.06);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--violet);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.04em;
}
.logo-text { display: flex; align-items: baseline; gap: 4px; }
.logo-text strong { font-weight: 700; }
.logo-text span { font-weight: 400; color: var(--violet); }

.header-tag {
  display: none;
  font-size: 13px;
  color: var(--gray-600);
}
@media (min-width: 768px) {
  .header-tag { display: inline; }
}

/* ===== Footer ===== */
.site-footer {
  background: white;
  border-top: 1px solid rgba(30, 18, 65, 0.06);
  padding: 32px 0 24px;
  margin-top: 60px;
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.footer-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--gray-600);
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--gray-600); }
.footer-links a:hover { color: var(--violet); }
.footer-legal {
  font-size: 11px;
  color: var(--gray-400);
  max-width: 460px;
  line-height: 1.5;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  border: none;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 200ms ease,
              background 200ms ease,
              opacity 200ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--violet);
  color: white;
  box-shadow: var(--shadow-violet);
}
.btn-primary:hover { background: var(--violet-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-light {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(30, 18, 65, 0.14);
}
.btn-ghost:hover { background: rgba(30, 18, 65, 0.04); }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ===== Cards (categorías de la home) ===== */
.test-card {
  position: relative;
  border-radius: 24px;
  padding: 28px 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
  text-decoration: none;
  color: inherit;
}
.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.test-card-dark {
  background: var(--ink);
  color: white;
}
.test-card-light {
  background: var(--lavender);
  color: var(--ink);
}

/* La "ola" decorativa de abajo, replicando el branding */
.test-card-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  pointer-events: none;
}

.test-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.test-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.test-card p {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.85;
  flex: 1;
}
.test-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: white;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  align-self: flex-start;
  z-index: 1;
  position: relative;
}
.test-card-dark .test-card-cta { background: white; color: var(--ink); }

/* Badge de "Próximamente" / "Nuevo" */
.test-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(6px);
  z-index: 1;
}
.test-card-light .test-badge { background: rgba(30, 18, 65, 0.08); color: var(--ink); }

/* Tarjetas pequeñas (grid de categorías) */
.cat-card {
  background: white;
  border-radius: 18px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 240ms ease, box-shadow 240ms ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 61, 242, 0.16);
}
.cat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cat-card-count {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ===== Mailjet form (compartido) ===== */
.mj-form { display: flex; flex-direction: column; gap: 10px; }

.mj-input {
  width: 100%;
  background: white;
  border: 1.5px solid rgba(30, 18, 65, 0.10);
  border-radius: 14px;
  padding: 15px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.mj-input::placeholder { color: rgba(30, 18, 65, 0.4); }
.mj-input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(108, 61, 242, 0.12);
}
.mj-input.invalid {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 110, 199, 0.16);
}

.mj-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mj-error {
  font-size: 13px;
  color: var(--pink);
  text-align: center;
  padding: 10px;
  background: rgba(255, 110, 199, 0.1);
  border-radius: 12px;
  display: none;
}
.mj-error.show { display: block; }

.mj-success {
  display: none;
  text-align: center;
  padding: 28px 16px;
  animation: successIn 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mj-success.show { display: block; }
@keyframes successIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mj-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms backwards;
}
@keyframes pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: white;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 200;
  max-width: calc(100vw - 40px);
  text-align: center;
  line-height: 1.4;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Pill / chip ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  background: white;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* ===== Utility ===== */
.text-violet { color: var(--violet); }
.bg-violet { background: var(--violet); }
.text-ink { color: var(--ink); }
.muted { color: var(--gray-600); }
