/* ============================================================
   base.css — Reset y estilos fundamentales
   Sistema de Evaluación · Coordinación de Estudios · UAM Azcapotzalco
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap');

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

[hidden] { display: none !important; }

/* ----------------------------------------------------------
   BASE
   ---------------------------------------------------------- */
html {
  color-scheme: light;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  background-color: var(--bg-base);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   TIPOGRAFÍA
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-title); }
h3 { font-size: var(--fs-subtitle); }

p { color: var(--fg-3); }

a {
  color: var(--role-asesor);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover { color: var(--role-asesor-press); }

strong { font-weight: var(--fw-semibold); color: var(--fg-1); }
small  { font-size: var(--fs-caption); color: var(--fg-4); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* ----------------------------------------------------------
   LISTAS
   ---------------------------------------------------------- */
ul, ol { list-style: none; }

/* ----------------------------------------------------------
   IMÁGENES
   ---------------------------------------------------------- */
img, svg {
  display: block;
  max-width: 100%;
}

/* ----------------------------------------------------------
   FORMULARIOS — reset base
   ---------------------------------------------------------- */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

input, textarea, select {
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

/* ----------------------------------------------------------
   SCROLLBAR (webkit)
   ---------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bd-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--fg-5); }

/* ----------------------------------------------------------
   SELECCIÓN DE TEXTO
   ---------------------------------------------------------- */
::selection {
  background: rgba(128, 0, 0, 0.15);
  color: var(--fg-1);
}

/* ----------------------------------------------------------
   FOCUS VISIBLE
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid rgba(128, 0, 0, 0.5);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
   LAYOUT HELPERS
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow { max-width: 800px; }
.container--wide   { max-width: 1400px; }

/* ----------------------------------------------------------
   ANIMACIONES GLOBALES
   ---------------------------------------------------------- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1;   }
  50%       { opacity: 0.4; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-in    { animation: fade-in 0.25s ease both; }
.animate-pulse-soft { animation: pulse-soft 1.6s ease-in-out infinite; }
.animate-spin       { animation: spin 0.8s linear infinite; }
