/**
 * @file: base.css
 * @description: Reset, Typography & Base Styles
 * @requires: variables.css
 */

/* =========================================
   1. FONTS IMPORT
   ========================================= */
/* Nota: Las fuentes se importan en el HTML mediante <link> para mejor rendimiento */
/* El @import bloquea el renderizado, por eso se usa <link> en index.php */

/* =========================================
   2. MODERN RESET
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Smooth scrolling para anclas */
}

/* =========================================
   3. BASE STYLES
   ========================================= */
body {
  font-family: var(--font-body);
  background-color: var(--color-primary);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Imágenes responsivas por defecto */
img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =========================================
   4. TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-white);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 1.875rem;
  /* ~40px Mobile */
}

h2 {
  font-size: 1.5rem;
  /* ~24px */
}

h3 {
  font-size: 1.25rem;
  /* ~16px */
  text-transform: uppercase;
}

/* Text styles */
p {
  color: var(--color-white);
  font-size: 1.125rem;
}

/* Desktop typography scaling */
@media (min-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }

  /* ~56px Desktop */
  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.75rem;
  }
}

/* =========================================
   5. LINKS & BUTTONS BASE
   ========================================= */
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =========================================
   6. ACCESSIBILITY (FOCUS)
   ========================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Eliminar outline feo si no es navegación por teclado */
:focus:not(:focus-visible) {
  outline: none;
}

/* =========================================
   7. UTILITY HELPERS
   ========================================= */
/* Selección de texto con color de marca */
::selection {
  background-color: var(--color-primary-light);
  color: white;
}
