/**
 * Copa Radar - Base Styles
 *
 * Reset CSS y estilos globales del sitio.
 * Siguiendo principios de CSS moderno y accesibilidad.
 */

/* ==========================================================================
   CSS RESET
   ========================================================================== */

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

/* ==========================================================================
   ESTILOS BASE
   ========================================================================== */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   TIPOGRAFÍA
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-tight);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ==========================================================================
   ELEMENTOS DE FORMULARIO
   ========================================================================== */

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

input::placeholder {
  color: var(--color-text-muted);
}

/* ==========================================================================
   LISTAS
   ========================================================================== */

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   IMÁGENES Y MEDIA
   ========================================================================== */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   ACCESIBILIDAD
   ========================================================================== */

/* Ocultar visualmente pero mantener accesible para lectores de pantalla */
.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;
}

/* Skip link para navegación por teclado */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

/* Colores de texto */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

/* Fondos */
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-tertiary { background-color: var(--color-bg-tertiary); }
