/* =========================================================
 * base.css
 * Reglas globales, reset, tipografía, colores y estilos comunes
 * ======================================================= */

/* 1. Reset y box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. Variables de diseño */
:root {
  /* Paleta principal */
  --clr-burgundy: #800020;
  --clr-black: #000000;
  --clr-davys-gray: #000000;
  /* #4A4A4A; */
  --clr-gray: #777777;
  --clr-white: #FFFFFF;

  /* Alias semánticos */
  --clr-accent: var(--clr-burgundy);
  --clr-text: var(--clr-black);
  --clr-text-secondary: var(--clr-davys-gray);
  --clr-text-muted: var(--clr-gray);
  --clr-surface: var(--clr-white);
  --clr-surface-alt: #f8f8f8;

  /* Tipografía */
  --ff-base: 'Montserrat', Arial, Helvetica, sans-serif;
  --fs-100: 0.75rem;
  /* 12px */
  --fs-200: 0.875rem;
  /* 14px */
  --fs-300: 1rem;
  /* 16px */
  --fs-400: 1.125rem;
  /* 18px */
  --fs-500: 1.25rem;
  /* 20px */
  --fs-600: 1.5rem;
  /* 24px */
  --fs-700: 2rem;
  /* 32px */
  --fs-800: 2.5rem;
  /* 40px */
  --fs-900: 3rem;
  /* 48px */

  /* Peso de fuente */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Espaciado */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-7: 2rem;
  --sp-8: 2.5rem;
  --sp-9: 3rem;
  --sp-10: 4rem;

  /* Dimensiones */
  --max-width: 1200px;
  --max-width-sm: 768px;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xl: 16px;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

  /* Transiciones */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* 3. Tipografía global */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-base);
  font-size: var(--fs-300);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: var(--clr-text);
  background-color: var(--clr-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 4. Encabezados */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

h1 {
  font-size: var(--fs-900);
  font-weight: var(--fw-bold);
}

h2 {
  font-size: var(--fs-800);
  font-weight: var(--fw-bold);
}

h3 {
  font-size: var(--fs-700);
}

h4 {
  font-size: var(--fs-600);
}

h5 {
  font-size: var(--fs-500);
}

h6 {
  font-size: var(--fs-400);
}

/* 5. Párrafos y texto */
p {
  margin-bottom: var(--sp-4);
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--clr-text);
}

/* 6. Listas */
ul,
ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-6);
}

li {
  margin-bottom: var(--sp-2);
}

/* 7. Imágenes */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 8. Utilidades globales */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--sp-6);
  }
}

.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;
}