/*
 * Philips Computer - Custom Fonts
 * Web Font Optimization for Performance
 */

/* Inter Font - Modern and readable */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/assets/fonts/inter-light.woff2') format('woff2'),
         url('/assets/fonts/inter-light.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter-regular.woff2') format('woff2'),
         url('/assets/fonts/inter-regular.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/inter-medium.woff2') format('woff2'),
         url('/assets/fonts/inter-medium.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/inter-semibold.woff2') format('woff2'),
         url('/assets/fonts/inter-semibold.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/inter-bold.woff2') format('woff2'),
         url('/assets/fonts/inter-bold.woff') format('woff');
}

/* Poppins Font - For headings */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/poppins-regular.woff2') format('woff2'),
         url('/assets/fonts/poppins-regular.woff') format('woff');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/poppins-semibold.woff2') format('woff2'),
         url('/assets/fonts/poppins-semibold.woff') format('woff');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/poppins-bold.woff2') format('woff2'),
         url('/assets/fonts/poppins-bold.woff') format('woff');
}

/* System Font Stack Fallback */
.system-fonts {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 
                 'Segoe UI Emoji', 'Segoe UI Symbol';
}

/* Font Loading Optimization */
.font-preload {
    position: absolute;
    left: -1000px;
    visibility: hidden;
}

/* Critical FOFT (Flash of Faux Text) */
.fonts-loaded body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.fonts-loaded h1,
.fonts-loaded h2,
.fonts-loaded h3,
.fonts-loaded h4,
.fonts-loaded h5,
.fonts-loaded h6 {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* Print Font Optimization */
@media print {
    body {
        font-family: "Times New Roman", Times, serif !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-family: "Times New Roman", Times, serif !important;
    }
}

/* Reduced Motion Font Optimization */
@media (prefers-reduced-motion: reduce) {
    * {
        font-kerning: normal;
        font-variant-ligatures: common-ligatures;
        font-feature-settings: "kern", "liga", "clig", "calt";
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        font-weight: 500;
    }
}