/**
 * =====================================================================
 * CYBER PLATFORM — SPRINT P0: INSTANT ACCESS
 * PHASE 01 — PERCEPTUAL PERFORMANCE ENGINEERING
 * =====================================================================
 * Estilos de CSS Containment, GPU Compositing e View Transitions API
 */

/* 1. BLINDAGEM VISUAL DE CAMADAS ESTÁTICAS (Zero Repaint no Header e Footer) */
header, .site-header, #masthead, .cyber-header-wrapper,
footer, .site-footer, #colophon, .cyber-footer-wrapper {
    /* REMOVIDO contain: paint; pois clipa (esconde) o mega menu que é position: absolute saindo do header */
    content-visibility: visible;
}

/* 2. OTIMIZAÇÃO DE GEOMETRIA PARA EVITAR CLS (Layout Shift 0.000) */
#main, main.site-main, #content, #primary, main {
    min-height: 50vh;
    will-change: opacity, transform;
}

/* 3. VIEW TRANSITIONS API (Suavidade App-Like com cross-fade super rápido ~120ms) */
@keyframes cix-fade-out {
    from { opacity: 1; transform: translate3d(0, 0, 0); }
    to { opacity: 0; transform: translate3d(0, -4px, 0); }
}

@keyframes cix-fade-in {
    from { opacity: 0; transform: translate3d(0, 4px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

::view-transition-old(root) {
    animation: 0.10s cubic-bezier(0.4, 0, 1, 1) both cix-fade-out;
}

::view-transition-new(root) {
    animation: 0.12s cubic-bezier(0, 0, 0.2, 1) both cix-fade-in;
}

/* 4. FEEDBACK VISUAL INSTANTÂNEO (Removido delay redundante de opacity) */
html.cix-loading #main, html.cix-loading main.site-main {
    /* Retirado opacity: 0.88 para garantir sensação imediata (0ms percebido) */
}

html.cix-loaded #main, html.cix-loaded main.site-main {
    /* Mantém opacidade nativa sem transition delay extra */
}
