/* css/base/typography.css */

/* Base typography styles */
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-gray-800);
  
  /* --- NEW: Text Crispness Enhancement --- */
  /* This forces grayscale antialiasing for sharper font rendering on modern browsers. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-4);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-1);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-2);
}

/* Responsive typography */
@media (max-width: 767px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-xl);
  }
}

/* Paragraphs and lists */
p, ul, ol {
  margin-bottom: var(--space-4);
}

p:last-child, 
ul:last-child, 
ol:last-child {
  margin-bottom: 0;
}

/* Rich text lists */
.rich-text ul {
  list-style-type: disc;
  margin-left: var(--space-5);
}

.rich-text ol {
  list-style-type: decimal;
  margin-left: var(--space-5);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast) var(--ease-in-out);
}

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

/* Bold and emphasis */
strong, b {
  font-weight: var(--font-weight-bold);
}

em, i {
  font-style: italic;
}

/* Text utilities */
.text-xs {
  font-size: var(--font-size-xs);
}

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

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

.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);
}

/* Font weights */
.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

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

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Text colors */
.text-primary {
  color: var(--color-primary);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-danger {
  color: var(--color-danger);
}

.text-gray {
  color: var(--color-gray-500);
}

.text-muted {
  color: var(--color-gray-500);
}