/* Typography Styles */

/* Headings */
h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-none);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
}

/* 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);
  }
  
  h5 {
    font-size: var(--text-lg);
  }
  
  h6 {
    font-size: var(--text-base);
  }
}

/* Body text */
p {
  margin-bottom: var(--space-4);
  color: var(--gray-700);
}

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

/* Lead paragraph */
.lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--gray-600);
  font-weight: var(--font-light);
}

/* Small text */
.small,
small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* Lists */
ul,
ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

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

/* Nested lists */
ul ul,
ol ul {
  list-style-type: circle;
  margin-top: var(--space-2);
  margin-bottom: 0;
}

ul ol,
ol ol {
  list-style-type: lower-latin;
  margin-top: var(--space-2);
  margin-bottom: 0;
}

/* Blockquotes */
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--primary);
  background-color: var(--gray-50);
  font-style: italic;
  color: var(--gray-700);
}

blockquote p {
  margin-bottom: var(--space-2);
}

blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--font-medium);
  color: var(--gray-600);
}

/* Code */
code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
  background-color: var(--gray-100);
  padding: 0.125em 0.25em;
  border-radius: var(--radius-base);
  color: var(--gray-800);
}

pre {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: var(--text-sm);
  background-color: var(--gray-900);
  color: var(--gray-100);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Links in content */
.content a,
article a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all var(--transition-base);
}

.content a:hover,
article a:hover {
  color: var(--primary-dark);
  text-decoration-thickness: 2px;
}

/* Text utilities */
.text-center {
  text-align: center;
}

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

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

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

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

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

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

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.text-white {
  color: white;
}