/* Optimized Font Loading for Luxury Watch Service Theme */

/* Only load the most essential font weights and formats */
/* Priority 1: Critical fonts - load immediately */
@font-face {
    font-family: 'PreloOptimized';
    src: url('../fonts/Prelo-Book.woff2') format('woff2'),
         url('../fonts/Prelo-Book.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Improves FCP by showing fallback text immediately */
}

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

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

/* Priority 2: Secondary fonts - load when needed */
@font-face {
    font-family: 'TimesNowOptimized';
    src: url('../fonts/TimesNowLight.woff2') format('woff2'),
         url('../fonts/TimesNowLight.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Modern font stack with optimized fallbacks */
:root {
    --font-primary: 'PreloOptimized', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'TimesNowOptimized', Georgia, 'Times New Roman', Times, serif;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-montserrat: 'Montserrat', var(--font-system);
}

/* Update existing font references to use optimized versions */
body,
.common-btn {
    font-family: var(--font-montserrat);
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light font usage */
.light-text,
.quote-text {
    font-family: var(--font-primary);
    font-weight: 300;
}

/* Override existing font families to use optimized versions */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* Specific optimizations for different elements */
.logo-text {
    font-family: var(--font-primary);
    font-weight: 700;
}

.body-text {
    font-family: var(--font-system);
    font-weight: 400;
}

.heading-text {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* Performance optimization: Preload hints for critical fonts */
/* This will be added to header.php */
