/* ========================================
   TYPOGRAPHY SYSTEM
   Optimized font sizes for better readability
   ======================================== */

:root {
  /* Typography Scale - Optimized for readability */
  --font-xs: 0.875rem;      /* 14px - Small text */
  --font-sm: 0.9375rem;     /* 15px - Small text */
  --font-base: 1rem;        /* 16px - Body text */
  --font-lg: 1.125rem;      /* 18px - Large body */
  --font-xl: 1.25rem;       /* 20px - Small headings */
  --font-2xl: 1.5rem;       /* 24px - Medium headings */
  --font-3xl: 2rem;         /* 32px - Large headings */
  --font-4xl: 2.5rem;       /* 40px - Extra large headings */
  --font-5xl: 3rem;         /* 48px - Hero headings */
}

/* Base Body Styles */
body {
  font-size: var(--font-base);
  line-height: 1.7;
  color: #333;
  font-weight: 400;
}

/* Heading Styles */
h1 {
  font-size: var(--font-4xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

h2 {
  font-size: var(--font-3xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.875rem;
  color: #1a1a1a;
}

h3 {
  font-size: var(--font-2xl);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: #2c3e50;
}

h4 {
  font-size: var(--font-xl);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.625rem;
  color: #2c3e50;
}

h5 {
  font-size: var(--font-lg);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: #34495e;
}

h6 {
  font-size: var(--font-base);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: #34495e;
}

/* Paragraph Styles */
p {
  font-size: var(--font-base);
  line-height: 1.7;
  margin-bottom: 1rem;
  color: #555;
}

p.lead {
  font-size: var(--font-lg);
  line-height: 1.8;
  font-weight: 400;
  color: #444;
}

/* Text Size Utilities */
.text-xs {
  font-size: var(--font-xs) !important;
}

.text-sm {
  font-size: var(--font-sm) !important;
}

.text-base {
  font-size: var(--font-base) !important;
}

.text-lg {
  font-size: var(--font-lg) !important;
}

.text-xl {
  font-size: var(--font-xl) !important;
}

.text-2xl {
  font-size: var(--font-2xl) !important;
}

.text-3xl {
  font-size: var(--font-3xl) !important;
}

.text-4xl {
  font-size: var(--font-4xl) !important;
}

.text-5xl {
  font-size: var(--font-5xl) !important;
}

/* Link Styles */
a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Strong & Bold */
strong, b {
  font-weight: 700;
}

/* Emphasis */
em, i {
  font-style: italic;
}

/* Small Text */
small {
  font-size: var(--font-xs);
  color: #666;
}

/* Blockquote */
blockquote {
  font-size: var(--font-lg);
  line-height: 1.8;
  padding: 1rem 1.5rem;
  border-left: 4px solid #007bff;
  background: #f8f9fa;
  margin: 1.5rem 0;
  color: #555;
}

/* Lists */
ul, ol {
  font-size: var(--font-base);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: #555;
}

li {
  margin-bottom: 0.5rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  :root {
    --font-xs: 0.8125rem;    /* 13px */
    --font-sm: 0.875rem;     /* 14px */
    --font-base: 0.9375rem;  /* 15px */
    --font-lg: 1rem;         /* 16px */
    --font-xl: 1.125rem;     /* 18px */
    --font-2xl: 1.25rem;     /* 20px */
    --font-3xl: 1.5rem;      /* 24px */
    --font-4xl: 1.875rem;    /* 30px */
    --font-5xl: 2.25rem;     /* 36px */
  }

  h1 {
    margin-bottom: 0.875rem;
  }

  h2 {
    margin-bottom: 0.75rem;
  }

  h3 {
    margin-bottom: 0.625rem;
  }

  p {
    margin-bottom: 0.875rem;
  }
}

@media (max-width: 480px) {
  :root {
    --font-xs: 0.75rem;      /* 12px */
    --font-sm: 0.8125rem;    /* 13px */
    --font-base: 0.875rem;   /* 14px */
    --font-lg: 0.9375rem;    /* 15px */
    --font-xl: 1rem;         /* 16px */
    --font-2xl: 1.125rem;    /* 18px */
    --font-3xl: 1.375rem;    /* 22px */
    --font-4xl: 1.625rem;    /* 26px */
    --font-5xl: 2rem;        /* 32px */
  }
}
