/* Custom Nerdi Gras Fonts */
/* Font-face declarations for uploaded custom fonts */

/* Megloria - Used for titles and headings */
@font-face {
    font-family: 'Megloria';
    src: url('/assets/fonts/MEGLORIA.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Albertus Medium - Used for content and body text */
@font-face {
    font-family: 'Albertus';
    src: url('/assets/fonts/AlbertusMedium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Albertus';
    src: url('/assets/fonts/Albertus Medium Regular font.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Albertus';
    src: url('/assets/fonts/ALBR55W.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Albertus';
    src: url('/assets/fonts/ALBR56W.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Europa Regular - Additional font available */
@font-face {
    font-family: 'Europa';
    src: url('/assets/fonts/Europa Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Desdemona Black - Additional display font available */
@font-face {
    font-family: 'Desdemona';
    src: url('/assets/fonts/AnyConv.com__DESDEMONA BLACK REGULAR.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Font family CSS custom properties - Modern Tech Style */
:root {
    /* Primary fonts for the site - High-tech/Gaming focused */
    --font-heading: 'Orbitron', 'Exo 2', monospace, sans-serif;
    --font-content: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Orbitron', 'Rajdhani', monospace, sans-serif;
    --font-accent: 'Rajdhani', 'Exo 2', sans-serif;
    
    /* Fallback fonts for different contexts */
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Apply custom fonts to base elements */
body {
    font-family: var(--font-content);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Specific heading styles with Megloria */
.hero-title,
.page-title,
.section-title,
.card-title,
.modal-title,
.admin-title,
.logo-title {
    font-family: var(--font-heading);
    font-weight: normal;
}

/* Content styles with Albertus */
p, li, td, th, label, input, textarea, select, button {
    font-family: var(--font-content);
}

/* Special display elements */
.display-text,
.countdown-number,
.stat-number {
    font-family: var(--font-display);
}

/* Navigation and UI elements */
.nav-link,
.btn,
.tab-btn {
    font-family: var(--font-content);
    font-weight: 500;
}

/* Ensure proper font loading */
.fonts-loading body {
    visibility: hidden;
}

.fonts-loaded body {
    visibility: visible;
}

/* Responsive font scaling */
@media (max-width: 768px) {
    :root {
        /* Slightly smaller fonts on mobile */
        --font-scale-mobile: 0.95;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-size: calc(1em * var(--font-scale-mobile, 1));
    }
}

/* Font feature settings for better rendering */
body {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Specific overrides for custom fonts */
.megloria {
    font-family: var(--font-heading) !important;
}

.albertus {
    font-family: var(--font-content) !important;
}

.europa {
    font-family: 'Europa', var(--font-content);
}

.desdemona {
    font-family: var(--font-accent);
}