/* =============================================================================
   Typography - Font declarations and text-related styles
   ============================================================================= */

/* Body text defaults */
body {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-loose);
}

/* Display/Large heading */
.heading-display {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-lg);
}

/* Large heading */
.heading-large {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-md);
}

/* Medium heading */
.heading-medium {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-md);
}

/* Small heading */
.heading-small {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-bottom: var(--spacing-sm);
}

/* Body text sizes */
.text-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-loose);
}

.text-body-small {
  font-size: var(--font-size-small);
  line-height: var(--line-height-normal);
}

.text-caption {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--text-tertiary);
}

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

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

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

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

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

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

.text-critical {
  color: var(--color-red-critical);
}

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

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

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

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

/* Text style utilities */
.italic {
  font-style: italic;
}

.underline {
  text-decoration: underline;
}

.line-through {
  text-decoration: line-through;
}

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

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

/* Line height utilities */
.leading-tight {
  line-height: var(--line-height-tight);
}

.leading-normal {
  line-height: var(--line-height-normal);
}

.leading-loose {
  line-height: var(--line-height-loose);
}

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

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

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

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

/* Text overflow utilities */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Code formatting */
.monospace {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-code);
}

/* Letter spacing */
.tracking-tight {
  letter-spacing: -0.02em;
}

.tracking-normal {
  letter-spacing: 0;
}

.tracking-wide {
  letter-spacing: 0.05em;
}

/* Special text styles */
.emphasis {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.highlight {
  background-color: var(--color-amber-warning);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
}

/* Narrative-specific typography */
.chapter-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: var(--border-width-sm) solid var(--color-gray-light);
}

.chapter-subtitle {
  font-size: var(--font-size-h3);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.evidence-label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-md);
}

.quote-text {
  font-size: var(--font-size-body);
  font-style: italic;
  color: var(--text-secondary);
  margin: var(--spacing-lg) 0;
  padding-left: var(--spacing-md);
  border-left: var(--border-width-lg) solid var(--color-red-critical);
}

.witness-attribution {
  font-size: var(--font-size-small);
  color: var(--text-tertiary);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--spacing-sm);
}
