/**
 * Typography Styles
 * Defines all text-related styles for headings, paragraphs, and body text
 * Ensures consistent and accessible text rendering
 */

/* ==================== BASE TYPOGRAPHY ==================== */

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== HEADINGS ==================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--spacing-xl);
}

h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
}

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

h5 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

h6 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

/* ==================== PARAGRAPHS ==================== */

p {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
}

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

/* ==================== LINKS ==================== */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==================== TEXT UTILITIES ==================== */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-capitalize {
  text-transform: capitalize;
}

/* Font Weight Utilities */
.font-light {
  font-weight: var(--font-weight-light);
}

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

/* Color Utilities */
.text-primary {
  color: var(--color-text-primary);
}

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

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

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

/* ==================== RESPONSIVE TYPOGRAPHY ==================== */

/* Tablet */
@media (max-width: 1024px) {
  h1 {
    font-size: var(--font-size-4xl);
  }
  
  h2 {
    font-size: var(--font-size-3xl);
  }
  
  h3 {
    font-size: var(--font-size-2xl);
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    font-size: var(--font-size-sm);
  }
  
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-xl);
  }
  
  h4 {
    font-size: var(--font-size-lg);
  }
}
