/* ==========================================================================
   FONT FAMILY CONFIGURATION
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@300;400;600;700&display=swap');

/* ==========================================================================
   ROOT FONT VARIABLES
   ========================================================================== */
:root {
  /* Primary Fonts */
  /* Previous primary: Open Sans */
  --font-primary: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; */

  /* Alternative Fonts */
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-monospace: 'Courier New', Courier, monospace;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Font Sizes */
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  --font-size-5xl: 3rem;       /* 48px */
}

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */

/* Body text */
body {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1, .h1 {
  font-size: var(--font-size-5xl);
}

h2, .h2 {
  font-size: var(--font-size-4xl);
}

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

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

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

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

/* Paragraphs */
p {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  line-height: 1.857;
  margin-bottom: 1em;
}

/* Links */
a {
  font-family: inherit;
}

/* Lists */
ul, ol {
  font-family: var(--font-primary);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Font Family Utilities */
.font-primary {
  font-family: var(--font-primary);
}

.font-heading {
  font-family: var(--font-heading);
}

.font-serif {
  font-family: var(--font-serif);
}

.font-monospace {
  font-family: var(--font-monospace);
}

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

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

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

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

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

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

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

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

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

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

/* ==========================================================================
   SPECIAL TEXT STYLES
   ========================================================================== */

/* Lead text (larger intro paragraphs) */
.lead {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-light);
  line-height: 1.6;
}

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

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

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

/* Code and Pre */
code, kbd, pre, samp {
  font-family: var(--font-monospace);
  font-size: 0.9em;
}

/* Blockquote */
blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--font-size-lg);
}

/* ==========================================================================
   RESPONSIVE TYPOGRAPHY
   ========================================================================== */

/* Tablet and below */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;   /* 40px */
    --font-size-4xl: 2rem;     /* 32px */
    --font-size-3xl: 1.75rem;  /* 28px */
  }

  body {
    font-size: 0.875rem; /* 14px */
  }
}

/* Mobile */
@media (max-width: 576px) {
  :root {
    --font-size-5xl: 2rem;     /* 32px */
    --font-size-4xl: 1.75rem;  /* 28px */
    --font-size-3xl: 1.5rem;   /* 24px */
  }
}

/* ==========================================================================
   ANTI-ALIASING FOR BETTER FONT RENDERING
   ========================================================================== */
body, h1, h2, h3, h4, h5, h6, p, a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
