/* =============================================
   TYPOGRAPHY SCALE - Sistema de tipografía unificado
   ============================================= */

:root {
  /* Escala de tamaños base (en rem) */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */

  /* Alturas de línea */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;

  /* Pesos de fuente */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Espaciado de letras */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.02em;
}

/* HTML y Body - Base */
html {
  font-size: 16px;
}

body {
  font-family: 'Candara', sans-serif;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: #575759;
}

/* Párrafos */
p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  margin-bottom: 1rem;
}

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

/* Headings */
h1, .h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: 1.5rem;
  letter-spacing: var(--letter-spacing-tight);
}

h2, .h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: 1.25rem;
  letter-spacing: var(--letter-spacing-tight);
}

h3, .h3 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: 1rem;
}

h4, .h4 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-bottom: 0.875rem;
}

h5, .h5 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-bottom: 0.75rem;
}

h6, .h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-bottom: 0.5rem;
}

/* Elementos de texto común */
small, .small, .text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

/* Labels y inputs */
label {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

input, textarea, select, button {
  font-size: var(--font-size-base);
  font-family: inherit;
}

/* Links */
a {
  font-size: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Listas */
ul, ol {
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

/* Bloque de código */
code {
  font-size: var(--font-size-sm);
  font-family: 'Courier New', monospace;
}

pre {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  margin-bottom: 1rem;
}

/* Citas */
blockquote {
  font-size: var(--font-size-lg);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  border-left: 4px solid #ddd;
}

/* Clases de utilidad adicionales */
.text-bold {
  font-weight: var(--font-weight-bold);
}

.text-semibold {
  font-weight: var(--font-weight-semibold);
}

.text-light {
  font-weight: var(--font-weight-light);
}

.line-height-tight {
  line-height: var(--line-height-tight);
}

.line-height-normal {
  line-height: var(--line-height-normal);
}

.line-height-relaxed {
  line-height: var(--line-height-relaxed);
}

.line-height-loose {
  line-height: var(--line-height-loose);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.25rem;  /* 36px en mobile */
    --font-size-4xl: 1.875rem; /* 30px en mobile */
    --font-size-3xl: 1.5rem;   /* 24px en mobile */
  }

  h1, .h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
  }

  h2, .h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: 0.875rem;
  }

  h3, .h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: 0.75rem;
  }

  p {
    font-size: var(--font-size-base);
  }
}
