/* ============================================================
   BASE CSS — RM Solutions Mx
   Reset universal, estilos base y utilidades globales.
   Garantiza consistencia visual en todos los navegadores.
   ============================================================ */

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

/* ---- Documento Base ---- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* ---- Tipografía Base ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-regular);
}

/* ---- Enlaces ---- */
a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-text-secondary);
}

/* ---- Imágenes ---- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ---- Formularios ---- */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-light);
}

/* ---- Selección de texto ---- */
::selection {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
}

/* ---- Scrollbar personalizada ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ---- Utilidades globales ---- */

/* Ocultar visualmente pero accesible para screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Contenedor estrecho para textos */
.container--narrow {
  max-width: var(--container-narrow);
}

/* Texto centrado */
.text-center {
  text-align: center;
}

/* Separador visual */
.divider {
  width: 60px;
  height: 2px;
  background-color: var(--color-text);
  margin: var(--space-lg) auto;
}

/* Etiqueta de sección */
.section-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

/* Título de sección */
.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-md);
}

/* Subtítulo de sección */
.section-subtitle {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
  line-height: var(--line-height-relaxed);
}
