/* base.css — variables de marca + reset + tipografía
   Source of truth: BRAND.md §2. NO introducir colores/tipos sin actualizar BRAND.md.
*/

:root {
  /* Paleta primaria (BRAND.md §2.1) */
  --bg: #050806;              /* deep-graphite */
  --surface-1: #0d140f;        /* graphite-1 — cards, modales */
  --surface-2: #131c15;        /* graphite-2 — hover, secciones elevadas */
  --border: #1e2a20;           /* dim-green */
  --text-high: #d4e8d8;        /* mint-white */
  --text-low: #6a8570;         /* dim-mint */
  --primary: #00ff88;          /* matrix-green */
  --primary-dim: #00cc6a;      /* hover/active */
  --primary-glow: rgba(0, 255, 136, 0.18);
  --accent: #ffb347;           /* warm-amber — premium/warning */
  --accent-dim: #d99b3f;
  --danger: #ff3b5c;           /* hot-coral */

  /* Tipografía (BRAND.md §2.2) */
  --font-display: "Rajdhani", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", "Cascadia Code", monospace;

  /* Escala tipográfica (BRAND.md §2.2) */
  --fs-h1: 2.5rem;
  --fs-h2: 2rem;
  --fs-h3: 1.5rem;
  --fs-h4: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;

  /* Sistema de espaciado (8 px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --container-max: 1120px;
  --nav-height: 64px;
}

/* Reset moderno */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text-high);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-dim); }

/* Headings — Rajdhani, según BRAND.md */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-high);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 500; }

/* Mono / código */
code, kbd, pre, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Section spacing */
section { padding: var(--space-9) 0; }

/* Botones — BRAND.md §2 + microcopy §3.3 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #001a0d;
}
.btn-primary:hover {
  background: var(--primary-dim);
  color: #001a0d;
  box-shadow: 0 0 24px var(--primary-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text-high);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-low);
  border-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.btn-ghost:hover { color: var(--primary); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-primary { background: rgba(0, 255, 136, 0.12); color: var(--primary); border: 1px solid var(--primary); }
.badge-accent { background: rgba(255, 179, 71, 0.12); color: var(--accent); border: 1px solid var(--accent); }
.badge-muted { background: var(--surface-1); color: var(--text-low); border: 1px solid var(--border); }

/* Cards */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--text-low); }
.card-featured {
  border-color: var(--primary);
  box-shadow: 0 0 32px rgba(0, 255, 136, 0.06);
}

/* Section labels (eyebrow) */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

/* Helpers */
.text-muted { color: var(--text-low); }
.text-center { text-align: center; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-6 { margin-top: var(--space-6); }
.flex { display: flex; }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Accesibilidad */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
