/* ====================================
   RESET Y BASE STYLES
   ==================================== */

/* Box sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base body */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); font-weight: 800; }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-4xl); }
h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }

/* Párrafos */
p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-primary);
}

/* Listas */
ul, ol {
  list-style: none;
}

/* Imágenes */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Formularios */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Tablas */
table {
  border-collapse: collapse;
  width: 100%;
}

/* Strong y emphasis */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--color-gray-200);
  margin: var(--spacing-lg) 0;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--color-accent-primary);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Code */
code {
  font-family: 'Courier New', monospace;
  background: var(--color-gray-100);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

pre code {
  display: block;
  padding: var(--spacing-md);
  overflow-x: auto;
}

/* Selection */
::selection {
  background-color: var(--color-accent-primary);
  color: white;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* Disabled */
:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
}
