/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  overflow-x: hidden;
}
/* Prevenir scroll horizontal en móviles */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  overflow-x: hidden; /* CRÍTICO para móviles */
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-dark);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, var(--font-size-6xl));
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: clamp(2rem, 4vw, var(--font-size-5xl));
}

h3 {
  font-size: clamp(1.5rem, 3vw, var(--font-size-3xl));
}

h4 {
  font-size: var(--font-size-2xl);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-gray-700);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}


/* Imágenes */
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Listas */
ul, ol {
  list-style: none;
}

/* Botones y elementos interactivos */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Skip to main content (accesibilidad) */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-md);
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-to-main:focus {
  top: 0;
}

/* Utilidades */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}