/* GT America Font Face Declarations - Optimized with WOFF2 */

/* Font Loading Strategy:
   1. WOFF2 format with WOFF fallback for broader compatibility
   2. Multiple URL formats to handle different deployment scenarios
   3. font-display: swap for better performance
   4. Explicit format declarations for better browser support
*/

/* Light Weight (300) */
@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/gt-america/GT-America-Standard-Light.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: italic;
  font-weight: 300;
  src: url('/fonts/gt-america/GT-America-Standard-Light-Italic.woff2') format('woff2');
}

/* Regular Weight (400) */
@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/gt-america/GT-America-Standard-Regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/gt-america/GT-America-Standard-Regular-Italic.woff2') format('woff2');
}

/* Medium Weight (500) */
@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/gt-america/GT-America-Standard-Medium.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: italic;
  font-weight: 500;
  src: url('/fonts/gt-america/GT-America-Standard-Medium-Italic.woff2') format('woff2');
}

/* Bold Weight (700) */
@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/gt-america/GT-America-Standard-Bold.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/gt-america/GT-America-Standard-Bold-Italic.woff2') format('woff2');
}

/* Black Weight (900) - Added for extra bold needs */
@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: normal;
  font-weight: 900;
  src: url('/fonts/gt-america/GT-America-Standard-Black.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'GT America';
  font-style: italic;
  font-weight: 900;
  src: url('/fonts/gt-america/GT-America-Standard-Black-Italic.woff2') format('woff2');
}

/* CSS Custom Properties for Font Stack */
:root {
  --font-sans: 'GT America', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-sans-fallback: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Utility class for GT America font */
.font-gt-america {
  font-family: var(--font-sans);
}

/* Font weight utilities */
.font-light {
  font-weight: 300;
}

.font-regular {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.font-black {
  font-weight: 900;
}

/* Debug class to test font loading */
.font-test-gt-america {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 10px;
  background: #f0f0f0;
  margin: 10px 0;
}

.font-test-gt-america::before {
  content: 'GT America Font Test: ';
  font-weight: 700;
}

.font-test-gt-america::after {
  content: ' (Light 300, Regular 400, Medium 500, Bold 700, Black 900)';
  font-weight: 300;
  font-style: italic;
}

/* Preload critical font weights for performance */
/* Note: Preload links are already added in baseof.html template
   Font paths use both absolute and relative URLs for maximum compatibility
*/

/* Debug: Force font loading with data URI fallback for testing */
@supports (font-display: swap) {
  .font-debug-info::after {
    content: 'Font support: YES';
    font-family: 'GT America', sans-serif;
  }
}