/* ============================================
   TYPOGRAPHY.CSS - Text Hierarchy & Styles
   Loads after base.css
   ============================================ */

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
  line-height: var(--leading-tight);
  margin: 0;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-normal);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-normal);
  letter-spacing: -0.01em;
}

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

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

h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

/* ============================================
   BODY TEXT
   ============================================ */

p, li, span {
  font-family: var(--font-body);
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-700);
}

/* Lead paragraph */
.lead {
  font-size: var(--text-lg);
  color: var(--color-neutral-600);
  line-height: var(--leading-relaxed);
}

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

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

/* ============================================
   TEXT COLORS
   ============================================ */

.text-primary { color: var(--color-primary-600); }
.text-secondary { color: var(--color-secondary-600); }
.text-accent { color: var(--color-accent-600); }
.text-muted { color: var(--color-neutral-500); }
.text-light { color: var(--color-neutral-400); }
.text-dark { color: var(--color-neutral-900); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-white { color: var(--color-neutral-0); }

/* ============================================
   TEXT ALIGNMENT
   ============================================ */

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

/* ============================================
   FONT WEIGHTS
   ============================================ */

.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 FAMILIES
   ============================================ */

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* ============================================
   LINE HEIGHT
   ============================================ */

.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

/* ============================================
   TEXT TRANSFORMS
   ============================================ */

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ============================================
   TEXT DECORATION
   ============================================ */

.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }

/* ============================================
   TEXT OVERFLOW
   ============================================ */

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

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   PROSE - Long-form content
   ============================================ */

.prose {
  max-width: 70ch;
  line-height: var(--leading-relaxed);
}

.prose p + p {
  margin-top: var(--space-4);
}

.prose h1,
.prose h2,
.prose h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.prose ul,
.prose ol {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: var(--space-2);
}

.prose a {
  color: var(--color-primary-600);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--color-primary-700);
}

/* ============================================
   LABELS & CAPTIONS
   ============================================ */

.label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.caption {
  font-size: var(--text-sm);
  color: var(--color-neutral-500);
  font-style: italic;
}

/* ============================================
   PAGE HEADER PATTERN
   ============================================ */

.page-header {
  margin-bottom: var(--space-8);
}

.page-header h1 {
  margin-bottom: var(--space-2);
}

.page-header .subtitle {
  font-size: var(--text-lg);
  color: var(--color-neutral-500);
  font-weight: var(--font-normal);
}

/* ============================================
   SECTION HEADER PATTERN
   ============================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
  margin: 0;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-neutral-500);
  margin: var(--space-1) 0 0;
}

.section-link {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary-500);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: color var(--transition-fast);
}

.section-link:hover {
  color: var(--color-primary-600);
}
