/* 
 * Fallback Fonts untuk Offline Support
 * Digunakan jika Google Fonts tidak dapat diakses
 */

/* Roboto Fallback - Similar to Roboto */
@font-face {
    font-family: 'Roboto Fallback';
    font-style: normal;
    font-weight: 300;
    src: local('Segoe UI'), local('Tahoma'), local('Arial');
}

@font-face {
    font-family: 'Roboto Fallback';
    font-style: normal;
    font-weight: 400;
    src: local('Segoe UI'), local('Tahoma'), local('Arial');
}

@font-face {
    font-family: 'Roboto Fallback';
    font-style: normal;
    font-weight: 500;
    src: local('Segoe UI Semibold'), local('Tahoma'), local('Arial');
}

/* Poppins Fallback - Similar to Poppins */
@font-face {
    font-family: 'Poppins Fallback';
    font-style: normal;
    font-weight: 300;
    src: local('Segoe UI Light'), local('Calibri Light'), local('Arial');
}

@font-face {
    font-family: 'Poppins Fallback';
    font-style: normal;
    font-weight: 400;
    src: local('Segoe UI'), local('Calibri'), local('Arial');
}

@font-face {
    font-family: 'Poppins Fallback';
    font-style: normal;
    font-weight: 500;
    src: local('Segoe UI Semibold'), local('Calibri'), local('Arial Bold');
}

@font-face {
    font-family: 'Poppins Fallback';
    font-style: normal;
    font-weight: 600;
    src: local('Segoe UI Semibold'), local('Calibri Bold'), local('Arial Bold');
}

@font-face {
    font-family: 'Poppins Fallback';
    font-style: normal;
    font-weight: 700;
    src: local('Segoe UI Bold'), local('Calibri Bold'), local('Arial Black');
}

/* Font stack dengan fallback */
body {
    font-family: 'Roboto', 'Roboto Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.header-logo h1,
.result-value,
.btn,
.footer-logo {
    font-family: 'Poppins', 'Poppins Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Font loading states */
.fonts-loading body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.fonts-loading h1, 
.fonts-loading h2, 
.fonts-loading h3,
.fonts-loading .header-logo h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Optimasi untuk offline */
@media (prefers-reduced-motion: reduce) {
    .fonts-loading * {
        animation: none !important;
        transition: none !important;
    }
}
