/* ===== Typography System ===== */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: currentColor;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.01em;
}

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

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

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

/* Responsive Headings */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-4xl);
  }

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

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

  h4 {
    font-size: var(--font-size-xl);
  }
}

/* Body Text */
p {
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-md);
}

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

/* Lead Text */
.text-lead {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-normal);
}

/* Small Text */
.text-small {
  font-size: var(--font-size-sm);
}

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

/* Text Colors */
.text-muted {
  color: var(--color-text-muted-light);
}

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

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

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

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

/* Text Alignment */
.text-left {
  text-align: left;
}

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

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

/* Font Weights */
.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);
}

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

/* Links */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

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

/* Strong & Emphasis */
strong,
b {
  font-weight: var(--font-weight-bold);
}

em,
i {
  font-style: italic;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  font-size: var(--font-size-lg);
  font-style: italic;
  color: var(--color-text-muted-light);
}

/* Code */
code {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  background-color: var(--color-bg-alt);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

pre {
  background-color: var(--color-bg-alt);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--spacing-md) 0;
}

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

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--spacing-xl) 0;
}

/* Lists */
ul,
ol {
  margin-bottom: var(--spacing-md);
}

ul li,
ol li {
  margin-bottom: var(--spacing-xs);
}

/* Only style lists that are in content areas */
.content ul {
  list-style: disc;
  padding-left: var(--spacing-lg);
}

.content ol {
  list-style: decimal;
  padding-left: var(--spacing-lg);
}

/* Section Titles */
.section-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text-light);
}

.section-subtitle {
  font-family: var(--font-secondary);
  font-size: var(--font-size-lg);
  text-align: center;
  color: var(--color-text-muted-light);
  margin-bottom: var(--spacing-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark Background Typography */
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6 {
  color: var(--color-text-light);
}

.bg-dark p,
.bg-dark li {
  color: var(--color-text-light);
}

.bg-dark .text-muted {
  color: var(--color-text-muted-light);
}

.bg-dark hr {
  border-color: var(--color-border-light);
}
