/* ==========================================================================
   FONT SYSTEM - AVENIR NEXT LT PRO RESPONSIVE
   ========================================================================== */

/* Font Face Declarations */
:root {
  --font-family-primary: "avenir-next-lt-pro", sans-serif;
  
  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-demi: 700;
  
  /* Base Font Sizes - Mobile First */
  --font-size-xs: clamp(1rem, 0.7rem + 0.25vw, 0.85rem);          /* 16px - 14px */
  --font-size-sm: clamp(1.25rem, 0.8rem + 0.375vw, 1rem);         /* 20px - 16px */
  --font-size-base: clamp(1.3rem, 0.9rem + 0.5vw, 1.25rem);     /* 22px - 18px */
  --font-size-md: clamp(1.5rem, 1rem + 0.625vw, 1.25rem);         /* 24px - 20px */
  --font-size-lg: clamp(1.625rem, 1.1rem + 0.75vw, 1.5rem);       /* 26px - 24px */
  --font-size-xl: clamp(1.875rem, 1.3rem + 1vw, 2rem);            /* 30px - 32px */
  --font-size-2xl: clamp(2.5rem, 1.6rem + 2vw, 3rem);             /* 40px - 60px */
  --font-size-3xl: clamp(3rem, 2rem + 2.5vw, 4.375rem);           /* 48px - 70px */
  --font-size-4xl: clamp(3.5rem, 2.5rem + 2.5vw, 5rem);           /* 56px - 80px */
  
  /* Statistics/Numbers - Larger sizes */
  --font-size-stats-sm: clamp(3.75rem, 2.5rem + 2vw, 5rem);       /* 60px - 88px */
  --font-size-stats-md: clamp(4.75rem, 3.5rem + 2.5vw, 6rem);     /* 76px - 96px */
  --font-size-stats-lg: clamp(5.75rem, 4rem + 5vw, 7.5rem);       /* 92px - 120px */
  
  /* Line Heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.2;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;
  
  /* ==========================================================================
     WORDPRESS FONT SIZE PRESETS - Aligned with our system
     ========================================================================== */
  
  /* WordPress Default Font Size Variables */
  --wp--preset--font-size--small: var(--font-size-sm);           /* 14px - 16px */
  --wp--preset--font-size--medium: var(--font-size-base);        /* 16px - 18px */
  --wp--preset--font-size--large: var(--font-size-lg);           /* 20px - 24px */
  --wp--preset--font-size--x-large: var(--font-size-xl);         /* 24px - 32px */
  --wp--preset--font-size--xx-large: var(--font-size-2xl);       /* 32px - 48px */
  
  /* WordPress Extended Font Size Variables */
  --wp--preset--font-size--huge: var(--font-size-3xl);           /* 40px - 64px */
  --wp--preset--font-size--gigantic: var(--font-size-4xl);       /* 48px - 80px */
  
  /* WordPress Additional Common Presets */
  --wp--preset--font-size--extra-small: var(--font-size-xs);     /* 12px - 14px */
  --wp--preset--font-size--normal: var(--font-size-base);        /* 16px - 18px */
  --wp--preset--font-size--bigger: var(--font-size-md);          /* 18px - 20px */
  --wp--preset--font-size--extra-large: var(--font-size-xl);     /* 24px - 32px */
  
  /* WordPress Custom Theme Presets */
  --wp--preset--font-size--display-small: var(--font-size-2xl);  /* 32px - 48px */
  --wp--preset--font-size--display-medium: var(--font-size-3xl); /* 40px - 64px */
  --wp--preset--font-size--display-large: var(--font-size-4xl);  /* 48px - 80px */
  
  /* WordPress Statistics/Numbers Presets */
  --wp--preset--font-size--stats-small: var(--font-size-stats-sm);  /* 56px - 88px */
  --wp--preset--font-size--stats-medium: var(--font-size-stats-md); /* 64px - 96px */
  --wp--preset--font-size--stats-large: var(--font-size-stats-lg);  /* 80px - 120px */
}

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */

/* Base font setup */
body {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   HEADINGS
   ========================================================================== */

h1, .h1 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-4xl);     /* Max 80px */
  line-height: var(--line-height-tight);
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h2, .h2 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-3xl);     /* Max 70px */
  line-height: var(--line-height-tight);
  margin-bottom: 0.875rem;
}

h3, .h3 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-2xl);     /* Max 60px */
  line-height: var(--line-height-tight);
  margin-bottom: 0.75rem;
}

h4, .h4 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-xl);      /* Max 32px */
  line-height: var(--line-height-snug);
  margin-bottom: 0.625rem;
}

h5, .h5 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  margin-bottom: 0.5rem;
}

h6, .h6 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   BODY TEXT STYLES
   ========================================================================== */

p, .text-base {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  margin-bottom: 1rem;
}

.text-large {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
}

.text-small {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.text-md {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}


.text-xs {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

/* ==========================================================================
   FONT WEIGHT UTILITIES
   ========================================================================== */

.font-regular {
  font-weight: var(--font-weight-regular);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-demi {
  font-weight: var(--font-weight-demi);
}

/* ==========================================================================
   DISPLAY TEXT STYLES
   ========================================================================== */

.display-1 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
}

.display-2 {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-regular);
}

.display-3 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
}

/* ==========================================================================
   STATISTICS & NUMBERS
   ========================================================================== */

.stats-large, .number-large {
  font-family: var(--font-family-primary) !important;
  font-weight: var(--font-weight-demi) !important;
  font-size: var(--font-size-stats-lg) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: -0.03em !important; 
  font-feature-settings: 'tnum' 1 !important; /* Tabular numbers */
}

.stats-medium, .number-medium {
  font-family: var(--font-family-primary) !important;
  font-weight: var(--font-weight-demi) !important;
  font-size: var(--font-size-stats-md) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: -0.02em !important;
  font-feature-settings: 'tnum' 1 !important;
}

.stats-small, .number-small {
  font-family: var(--font-family-primary) !important;
  font-weight: var(--font-weight-demi) !important;
  font-size: var(--font-size-stats-sm) !important;
  line-height: var(--line-height-snug) !important;
  letter-spacing: -0.01em !important;
  font-feature-settings: 'tnum' 1 !important;
}

/* ==========================================================================
   SPECIAL TEXT STYLES
   ========================================================================== */

.lead {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  margin-bottom: 1.5rem;
}

.subtitle {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  margin-bottom: 0.5rem;
}

.eyebrow, .overline {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.caption {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: #666;
}

/* ==========================================================================
   LINE HEIGHT UTILITIES
   ========================================================================== */

.leading-tight {
  line-height: var(--line-height-tight);
}

.leading-snug {
  line-height: var(--line-height-snug);
}

.leading-normal {
  line-height: var(--line-height-normal);
}

.leading-relaxed {
  line-height: var(--line-height-relaxed);
}

.leading-loose {
  line-height: var(--line-height-loose);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINT ADJUSTMENTS
   ========================================================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  :root {
    --line-height-relaxed: 1.65;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  :root {
    --line-height-relaxed: 1.7;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  :root {
    --line-height-relaxed: 1.75;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  :root {
    --line-height-relaxed: 1.8;
  }
}

/* ==========================================================================
   ACCESSIBILITY & PERFORMANCE
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    font-weight: var(--font-weight-medium);
  }
  
  .font-regular {
    font-weight: var(--font-weight-medium);
  }
}

/* ==========================================================================
   WORDPRESS GENERATED CLASSES
   ========================================================================== */

/* WordPress font size classes that match our presets */
.has-small-font-size {
  font-size: var(--wp--preset--font-size--small) !important;
}

.has-medium-font-size {
  font-size: var(--wp--preset--font-size--medium) !important;
}

.has-large-font-size {
  font-size: var(--wp--preset--font-size--large) !important;
}

.has-x-large-font-size {
  font-size: var(--wp--preset--font-size--x-large) !important;
}

.has-xx-large-font-size {
  font-size: var(--wp--preset--font-size--xx-large) !important;
}

.has-huge-font-size {
  font-size: var(--wp--preset--font-size--huge) !important;
}

.has-gigantic-font-size {
  font-size: var(--wp--preset--font-size--gigantic) !important;
}

.has-extra-small-font-size {
  font-size: var(--wp--preset--font-size--extra-small) !important;
}

.has-normal-font-size {
  font-size: var(--wp--preset--font-size--normal) !important;
}

.has-bigger-font-size {
  font-size: var(--wp--preset--font-size--bigger) !important;
}

.has-extra-large-font-size {
  font-size: var(--wp--preset--font-size--extra-large) !important;
}

.has-display-small-font-size {
  font-size: var(--wp--preset--font-size--display-small) !important;
}

.has-display-medium-font-size {
  font-size: var(--wp--preset--font-size--display-medium) !important;
}

.has-display-large-font-size {
  font-size: var(--wp--preset--font-size--display-large) !important;
}

.has-stats-small-font-size {
  font-size: var(--wp--preset--font-size--stats-small) !important;
}

.has-stats-medium-font-size {
  font-size: var(--wp--preset--font-size--stats-medium) !important;
}

.has-stats-large-font-size {
  font-size: var(--wp--preset--font-size--stats-large) !important;
}

/* Ensure WordPress classes use our font family */
.has-small-font-size,
.has-medium-font-size,
.has-large-font-size,
.has-x-large-font-size,
.has-xx-large-font-size,
.has-huge-font-size,
.has-gigantic-font-size,
.has-extra-small-font-size,
.has-normal-font-size,
.has-bigger-font-size,
.has-extra-large-font-size,
.has-display-small-font-size,
.has-display-medium-font-size,
.has-display-large-font-size,
.has-stats-small-font-size,
.has-stats-medium-font-size,
.has-stats-large-font-size {
  font-family: var(--font-family-primary);
}

/* Print styles */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, .h1 { font-size: 24pt; }
  h2, .h2 { font-size: 20pt; }
  h3, .h3 { font-size: 18pt; }
  h4, .h4 { font-size: 16pt; }
  h5, .h5 { font-size: 14pt; }
  h6, .h6 { font-size: 12pt; }
}