/* CRITICAL H1 LCP OPTIMIZATION */
/* This CSS must load with highest priority to prevent h1 render delays */

/* Ultra-critical h1 styles - prevent 6810ms render delay */
.gianth1 h1,
.gianth1 h2,
.gianth1 h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
    contain: layout style !important;
    display: block !important;
}

/* Specific h1 optimization to prevent LCP delay */
.gianth1 h1 {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    margin: 1.5rem 0 1rem 0 !important;
    min-height: 58px !important;
    color: inherit !important;
    text-rendering: optimizeSpeed !important;
}

.gianth1 h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
    margin: 1.5rem 0 !important;
    min-height: 36px !important;
    color: inherit !important;
    text-rendering: optimizeSpeed !important;
}

.gianth1 h3 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    font-weight: 400 !important;
    margin: 1rem 0 !important;
    min-height: 32px !important;
    color: inherit !important;
    text-rendering: optimizeSpeed !important;
}

/* Critical section optimization */
#intro.gianth1 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
    contain: layout !important;
    padding: 60px 0 40px !important;
}

/* Prevent any animations or transitions from blocking render */
.gianth1 * {
    animation: none !important;
    transition: none !important;
}

/* Font enhancement - applied after fonts load without blocking */
html.fonts-loaded .gianth1 h1,
html.fonts-loaded .gianth1 h2,
html.fonts-loaded .gianth1 h3 {
    font-family: 'AbelPro-Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    text-rendering: optimizeLegibility !important;
}

/* Mobile responsiveness without CLS */
@media (max-width: 768px) {
    .gianth1 h1 {
        font-size: 2rem !important;
        min-height: 48px !important;
    }
    
    .gianth1 h2 {
        font-size: 1.3rem !important;
        min-height: 30px !important;
    }
    
    .gianth1 h3 {
        font-size: 1.1rem !important;
        min-height: 28px !important;
    }
}

@media (max-width: 576px) {
    .gianth1 h1 {
        font-size: 1.8rem !important;
        min-height: 42px !important;
    }
    
    .gianth1 h2 {
        font-size: 1.2rem !important;
        min-height: 28px !important;
    }
    
    .gianth1 h3 {
        font-size: 1rem !important;
        min-height: 24px !important;
    }
    
    #intro.gianth1 {
        padding: 40px 0 20px !important;
    }
}
