/* 
 * Local Fonts CSS for mpol solutions
 * Manrope Font Family - Self-hosted for better performance and GDPR compliance
 */

/* Manrope Regular (400) */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-regular.woff2') format('woff2'),
         url('../fonts/manrope-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Manrope SemiBold (600) */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-semibold.woff2') format('woff2'),
         url('../fonts/manrope-semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Manrope Bold (700) */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-bold.woff2') format('woff2'),
         url('../fonts/manrope-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Manrope ExtraBold (800) */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-extrabold.woff2') format('woff2'),
         url('../fonts/manrope-extrabold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* 
 * Font Fallbacks
 * These ensure good fallback fonts are used while custom fonts load
 */
body, 
.nav-logo,
.lang-switcher-li button,
.cta-button,
.cookie-consent-buttons button {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 
 * Font Performance Optimizations
 * Prevent invisible text during font swap period
 */
.hero h1,
.hero .subtitle,
.nav-logo {
    font-display: swap;
}

/* 
 * Optional: Font Loading States
 * You can use these classes to handle font loading states
 */
.fonts-loading {
    visibility: hidden;
}

.fonts-loaded {
    visibility: visible;
}

/* 
 * Preload Critical Text
 * Ensures important text renders immediately with fallback fonts
 */
.hero-content {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
}

/* 
 * Typography Enhancements
 * Better font rendering for different weights
 */
h1, h2, h3 {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
 * Responsive Font Loading
 * Optimize for different screen sizes
 */
@media (max-width: 768px) {
    /* Smaller devices can use system fonts as fallback more aggressively */
    body {
        font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    }
}

/* 
 * Print Styles
 * Ensure fonts work well in print
 */
@media print {
    body {
        font-family: 'Manrope', 'Times New Roman', serif;
    }
}