/* ==========================================================================
   QAXpert — base.css
   Reset + Design Tokens + Tipografía base
   Estilo: claro, fresco, EdTech (inspirado en Coderhouse + colores marca QAXpert)
   ========================================================================== */

/* === DESIGN TOKENS === */
:root {
  /* --- Marca QAXpert (del PDF de marca) --- */
  --brand-green: #01C96E;
  --brand-dark: #163321;
  --brand-light: #EBFFEB;
  --brand-black: #07110B;

  /* --- Fondos (estilo Coderhouse: claro y cálido) --- */
  --bg-cream: #FAFBF7;
  --bg-white: #FFFFFF;
  --bg-soft: #F4F7F1;

  /* --- Texto --- */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* --- Bordes --- */
  --border-soft: #E5E7EB;
  --border-brand: #01C96E;

  /* --- Sombras --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(1, 201, 110, 0.12);
  --shadow-glow: 0 0 0 4px rgba(1, 201, 110, 0.15);

  /* --- Radios --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* --- Espaciado --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* --- Tipografía --- */
  --font-primary: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.75rem;   /* 44px */
  --text-5xl: 3.25rem;   /* 52px */

  /* --- Transiciones --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.25s;

  /* --- Layout --- */
  --max-width: 1100px;
  --header-height: 76px;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--brand-dark);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* === TIPOGRAFÍA BASE === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

/* === UTILIDADES === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.text-center { text-align: center; }
.text-brand { color: var(--brand-green); }
.text-dark { color: var(--brand-dark); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 800; }
.font-semibold { font-weight: 600; }

.bg-cream { background: var(--bg-cream); }
.bg-white { background: var(--bg-white); }
.bg-soft { background: var(--bg-soft); }
.bg-brand-light { background: var(--brand-light); }
.bg-brand-dark { background: var(--brand-dark); color: var(--brand-light); }

/* === ACCESIBILIDAD === */
:focus-visible {
  outline: 3px solid var(--brand-green);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
