/**
 * Typography Styles
 * 
 * Based on Figma Design System
 * Fonts: Source Sans 3 (primary), Cinzel (headings), Freehand521 BT (accent)
 */

/* ===========================================
 * Headings
 * =========================================== */

h1, .h1 {
  font-family: var(--font-heading);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-h1);
  color: var(--color-text);
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-lg);
  color: var(--color-text);
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-lg);
  color: var(--color-text);
}

h4, .h4 {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-lg);
  color: var(--color-text);
}

h5, .h5 {
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-md);
  color: var(--color-text);
}

h6, .h6 {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-sm);
  color: var(--color-text);
}

/* ===========================================
 * Body Text - From Figma Text Styles
 * =========================================== */

/* Text XS: 14px/16px Regular */
.text-xs {
  font-family: var(--font-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-xs);
}

/* Text S: 16px/20px Regular */
.text-s,
.text-sm {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-sm);
}

/* Text S Bold: 16px/16px Medium */
.text-s-bold,
.text-sm-bold {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-size-sm);
}

/* Text M: 18px/24px Regular */
.text-m,
.text-md {
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-md);
}

/* Text M Bold: 18px/24px Medium */
.text-m-bold,
.text-md-bold {
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-md);
}

/* Text L Bold: 22px/32px Medium */
.text-l,
.text-lg {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-lg);
}

/* ===========================================
 * Accent Text (Freehand521 BT)
 * =========================================== */

.text-accent {
  font-family: var(--font-accent);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-lg);
}

/* ===========================================
 * Paragraph Styles
 * =========================================== */

.lead {
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  color: var(--color-text-secondary);
}

.small {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
}

/* ===========================================
 * Text Colors
 * =========================================== */

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

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

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

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

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

/* ===========================================
 * Text Alignment
 * =========================================== */

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

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

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

/* ===========================================
 * Text Transform
 * =========================================== */

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

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

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

/* ===========================================
 * Font Weight
 * =========================================== */

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

/* ===========================================
 * Links
 * =========================================== */

.link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

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

.link--accent {
  color: var(--color-accent);
}

.link--accent:hover {
  color: var(--color-accent-hover);
}

/* ===========================================
 * Responsive Typography
 * =========================================== */

@media (max-width: 767px) {
  h1, .h1 {
    font-size: 28px;
    line-height: 34px;
  }
  
  h2, .h2 {
    font-size: 24px;
    line-height: 30px;
  }
  
  h3, .h3 {
    font-size: 20px;
    line-height: 26px;
  }
}
