/* magnet-common.css — Tokens y estilos compartidos entre landings de magnets */
/* Hereda sistema de diseño de assets/index.html */

:root {
  /* Brand colors oficiales Zenvrax */
  --g: #5CB82E;           /* Verde primario */
  --g2: #4EA827;          /* Verde secundario */
  --g-glow: rgba(92, 184, 46, 0.15);

  /* Grises */
  --c0: #0C0D0E;          /* Fondo principal dark */
  --c1: #16181A;          /* Fondo elevado */
  --c2: #1F2226;          /* Borde suave */
  --c3: #2A2E34;          /* Borde medio */
  --c-text: #FFFFFF;
  --c-text-muted: #E6EDE6;
  --c-text-dim: #8A9299;

  /* Alertas */
  --danger: #EF4444;
  --warn: #F59E0B;
  --ok: var(--g);
  --info: #3B82F6;

  /* Radius */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Spacing */
  --s-xs: 4px;
  --s-sm: 8px;
  --s: 16px;
  --s-md: 24px;
  --s-lg: 32px;
  --s-xl: 48px;
  --s-2xl: 64px;

  /* Fonts */
  --f-display: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Transitions */
  --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--f-body);
  background: linear-gradient(135deg, var(--c0) 0%, #1a1a1a 100%);
  color: var(--c-text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(24px, 4vw, 36px); }
h3 { font-size: clamp(20px, 3vw, 28px); }

a {
  color: var(--g);
  text-decoration: none;
  transition: opacity var(--t);
}
a:hover { opacity: 0.8; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--t);
}

/* Container */
.magnet-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--s-md) var(--s);
}

/* Header con logo */
.magnet-header {
  text-align: center;
  padding: var(--s-lg) 0 var(--s-md);
  border-bottom: 2px solid var(--g);
  margin-bottom: var(--s-xl);
}

.magnet-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  margin: 0 auto var(--s);
}

/* Botón primario */
.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: var(--g);
  color: #000;
  border-radius: var(--r);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  background: var(--g2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--g-glow);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 14px 20px;
  background: rgba(92, 184, 46, 0.1);
  border: 2px solid var(--g);
  border-radius: var(--r);
  color: var(--c-text);
  font-size: 14px;
  text-align: left;
}
.btn-secondary:hover {
  background: rgba(92, 184, 46, 0.2);
}
.btn-secondary.selected {
  background: var(--g);
  color: #000;
}

/* Inputs */
.magnet-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--c1);
  border: 1px solid var(--c3);
  border-radius: var(--r);
  color: var(--c-text);
  font-size: 15px;
  font-family: var(--f-body);
  transition: border-color var(--t), background var(--t);
}
.magnet-input:focus {
  outline: none;
  border-color: var(--g);
  background: var(--c0);
}
.magnet-input::placeholder { color: var(--c-text-dim); }

/* Progress bar */
.magnet-progress {
  height: 4px;
  background: rgba(92, 184, 46, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--s-md);
}
.magnet-progress-bar {
  height: 100%;
  background: var(--g);
  transition: width var(--t);
}

/* Card */
.magnet-card {
  background: var(--c1);
  border: 1px solid var(--c2);
  border-radius: var(--r-lg);
  padding: var(--s-md);
}
.magnet-card-hero {
  background: var(--g-glow);
  border: 2px solid var(--g);
  border-radius: var(--r-xl);
  padding: var(--s-lg);
  text-align: center;
}

/* Stats grid */
.magnet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s);
  margin: var(--s-md) 0;
}
.magnet-stat {
  background: rgba(92, 184, 46, 0.08);
  border: 1px solid var(--g);
  border-radius: var(--r);
  padding: var(--s-md);
  text-align: center;
}
.magnet-stat-value {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--g);
  line-height: 1;
}
.magnet-stat-label {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-top: var(--s-sm);
}

/* Features list */
.magnet-features {
  list-style: none;
  max-width: 600px;
  margin: var(--s-md) auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
}
.magnet-feature {
  display: flex;
  gap: var(--s);
  align-items: center;
  padding: var(--s-sm) 0;
}
.magnet-feature-icon {
  width: 24px;
  height: 24px;
  background: var(--g);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  flex-shrink: 0;
}

/* Loading state */
.magnet-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(92, 184, 46, 0.2);
  border-top-color: var(--g);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .magnet-container { padding: var(--s) 12px; }
  .magnet-stats { grid-template-columns: 1fr; }
  .magnet-card-hero { padding: var(--s-md); }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.text-dim { color: var(--c-text-dim); }
.text-green { color: var(--g); }
.mt-s { margin-top: var(--s); }
.mt-md { margin-top: var(--s-md); }
.mt-lg { margin-top: var(--s-lg); }
.mb-s { margin-bottom: var(--s); }
.mb-md { margin-bottom: var(--s-md); }
.hidden { display: none !important; }
