
/* ==========================================================================
   BASE.CSS
   Reset general del navegador y estilos por defecto de elementos comunes
   (body, títulos, párrafos, enlaces, listas, imágenes, botones nativos).
   Depende de variables.css — debe cargarse SIEMPRE después de variables.css
   y ANTES de componentes.css, layout.css y paginas.css.
   ========================================================================== */

/* ---------- RESET BÁSICO ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-principal);
  font-weight: var(--peso-regular);
  color: var(--color-texto);
  background-color: var(--color-blanco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- TÍTULOS ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--peso-semibold);
  line-height: 1.25;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.125rem;
}

/* ---------- PÁRRAFOS Y TEXTO ---------- */
p {
  font-weight: var(--peso-regular);
  color: var(--color-texto-secundario);
}

/* ---------- ENLACES ---------- */
a {
  text-decoration: none;
  color: inherit;
}

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

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

/* ---------- BOTONES NATIVOS (reset) ---------- */
button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ---------- INPUTS Y FORMULARIOS (reset) ---------- */
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

/* ---------- ACCESIBILIDAD: FOCO VISIBLE ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primario);
  outline-offset: 2px;
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA Y EFECTOS SCROLL
   ========================================================================== */

/* Barra de progreso de lectura (scroll progress) */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primario) 0%, #00C6FF 100%);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Header dinámico al hacer scroll */
.header {
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
  background-color: rgba(8, 24, 44, 0.95) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header--scrolled .header__contenido {
  padding-top: var(--espaciado-xs) !important;
  padding-bottom: var(--espaciado-xs) !important;
}

/* Scroll Reveal: Clases de animación */
.sr-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.sr-animate-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.sr-animate-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Modificadores de retraso para efectos escalonados */
.sr-delay-1 { transition-delay: 0.1s; }
.sr-delay-2 { transition-delay: 0.2s; }
.sr-delay-3 { transition-delay: 0.3s; }
.sr-delay-4 { transition-delay: 0.4s; }
.sr-delay-5 { transition-delay: 0.5s; }

/* Estado visible activado por JS */
.sr-visible {
  opacity: 1 !important;
  transform: translate(0) !important;
}