/* Font Loading Optimization Styles */
/* Using font-display: optional for better performance - fonts load only if cached or very fast */

/* Font Display Optimization */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: optional; /* Better for performance - avoids layout shifts */
  src:
    url('/assets/fonts/Poppins/woff2/Poppins-Light.woff2') format('woff2'),
    url('/assets/fonts/Poppins/woff/Poppins-Light.woff') format('woff');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src:
    url('/assets/fonts/Poppins/woff2/Poppins-Regular.woff2') format('woff2'),
    url('/assets/fonts/Poppins/woff/Poppins-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src:
    url('/assets/fonts/Poppins/woff2/Poppins-Medium.woff2') format('woff2'),
    url('/assets/fonts/Poppins/woff/Poppins-Medium.woff') format('woff');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src:
    url('/assets/fonts/Poppins/woff2/Poppins-SemiBold.woff2') format('woff2'),
    url('/assets/fonts/Poppins/woff/Poppins-SemiBold.woff') format('woff');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src:
    url('/assets/fonts/Poppins/woff2/Poppins-Bold.woff2') format('woff2'),
    url('/assets/fonts/Poppins/woff/Poppins-Bold.woff') format('woff');
}

/* Critical Font Preload Styles */
.font-loading {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue',
    Arial, sans-serif; /* System font fallback */
}

.font-loaded {
  font-family:
    'Poppins',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Helvetica Neue',
    Arial,
    sans-serif;
}

/* Reduce layout shift during font loading */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue',
    Arial, sans-serif;
  line-height: 1.6;
}

body.fonts-loaded {
  font-family:
    'Poppins',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Helvetica Neue',
    Arial,
    sans-serif;
}
