/*!
 * EKRE 2025 Theme Font Declarations - Migrated from ekre-theme
 * Version: 1.0.0
 * 
 * Note: Trim font requires a commercial license from Letters from Sweden
 * https://lettersfromsweden.se/font/trim/
 * 
 * Font formats included: .woff, .eot, .ttf, .otf for maximum compatibility
 */

/* 
 * Trim Regular
 * Used for body text and general content
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-Regular.eot'); /* IE9 Compat Modes */
    src: url('../fonts/Trim-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('../fonts/Trim-Regular.woff') format('woff'), /* Modern Browsers */
         url('../fonts/Trim-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
         url('../fonts/Trim-Regular.otf') format('opentype'); /* Modern browsers, better hinting */
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Performance optimization */
}

/* 
 * Trim Light
 * Used for subtle text elements and light emphasis
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-Light.eot');
    src: url('../fonts/Trim-Light.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-Light.woff') format('woff'),
         url('../fonts/Trim-Light.ttf') format('truetype'),
         url('../fonts/Trim-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* 
 * Trim Medium
 * Used for subheadings and navigation
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-Medium.eot');
    src: url('../fonts/Trim-Medium.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-Medium.woff') format('woff'),
         url('../fonts/Trim-Medium.ttf') format('truetype'),
         url('../fonts/Trim-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* 
 * Trim SemiBold
 * Used for prominent headings and strong navigation
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-SemiBold.eot');
    src: url('../fonts/Trim-SemiBold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-SemiBold.woff') format('woff'),
         url('../fonts/Trim-SemiBold.ttf') format('truetype'),
         url('../fonts/Trim-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* 
 * Trim Bold
 * Used for main headings and strong emphasis
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-Bold.eot');
    src: url('../fonts/Trim-Bold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-Bold.woff') format('woff'),
         url('../fonts/Trim-Bold.ttf') format('truetype'),
         url('../fonts/Trim-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 
 * Trim ExtraBold
 * Used for major headings and hero text
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-ExtraBold.eot');
    src: url('../fonts/Trim-ExtraBold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-ExtraBold.woff') format('woff'),
         url('../fonts/Trim-ExtraBold.ttf') format('truetype'),
         url('../fonts/Trim-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* 
 * Trim Thin
 * Used for delicate text elements and light display text
 */
@font-face {
    font-family: 'Trim';
    src: url('../fonts/Trim-Thin.eot');
    src: url('../fonts/Trim-Thin.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Trim-Thin.woff') format('woff'),
         url('../fonts/Trim-Thin.ttf') format('truetype'),
         url('../fonts/Trim-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/*
 * CSS Custom Property for the Trim font stack. Actual application to
 * body/headings/utility classes lives in main.css (single source of truth
 * for typography) — this file only declares the font faces and the stack
 * variable so it's not duplicated/out of sync across two stylesheets.
 */
:root {
    --font-primary: 'Trim', Georgia, 'Times New Roman', Times, serif;
}

/* 
 * Print styles
 */
@media print {
    body {
        font-family: 'Times New Roman', Times, serif;
    }
}

/*
 * Responsive font sizes
 * Adjusts font weights for better readability on smaller screens
 */
@media (max-width: 768px) {
    h1, .h1 { font-weight: 600; }
    h2, .h2 { font-weight: 600; }
    
    .display-1, .display-2, .display-3, .display-4 {
        font-weight: 600;
    }
}

/*
 * Performance optimization for font loading
 * These should be added to the HTML head for critical font weights:
 * 
 * <link rel="preload" href="<?php echo get_template_directory_uri(); ?>/assets/fonts/Trim-Regular.woff" as="font" type="font/woff" crossorigin>
 * <link rel="preload" href="<?php echo get_template_directory_uri(); ?>/assets/fonts/Trim-SemiBold.woff" as="font" type="font/woff" crossorigin>
 * <link rel="preload" href="<?php echo get_template_directory_uri(); ?>/assets/fonts/Trim-Bold.woff" as="font" type="font/woff" crossorigin>
 */