/* Font Display Optimization - Prevents FOIT (Flash of Invisible Text) */

/* Override Font Awesome defaults with swap */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Brands";
  font-display: swap;
}

/* System font stack as fallback */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Apply custom font when loaded */
.fonts-loaded body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fonts-loaded h1, 
.fonts-loaded h2, 
.fonts-loaded h3, 
.fonts-loaded h4, 
.fonts-loaded h5, 
.fonts-loaded h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Icon fallback - show placeholder while Font Awesome loads */
.fas::before,
.far::before,
.fab::before,
.fa::before {
  font-display: swap;
}

/* Prevent icon shifting during load */
.fas, .far, .fab, .fa {
  min-width: 1em;
  display: inline-block;
  text-align: center;
}

/* Optional: Hide icons until loaded to prevent FOUT (Flash of Unstyled Text) */
/* Uncomment if you prefer invisible icons during load */
/*
.fonts-loading .fas::before,
.fonts-loading .far::before,
.fonts-loading .fab::before,
.fonts-loading .fa::before {
  content: '';
  visibility: hidden;
}
*/
