/* --- 1. CONFIGURAÇÃO GLOBAL --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400&display=swap');

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
    background-color: #FCF7EE;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
}

/* --- 2. SISTEMA DE LOADER --- */
body.loading {
    overflow: hidden !important;
}

/* FIX: Esconder APENAS durante o loading.
   O loader (z-index: 100000) cobre tudo por cima — não precisamos de esconder o header.
   Assim que o fetch resolve, o header já está no DOM por baixo do loader,
   e quando o loader desaparece, o header já está lá instantaneamente. */
body.loading main {
    visibility: hidden;
    opacity: 0;
}

/* Header e footer ficam visíveis logo que são injetados (por baixo do loader) */
#header-placeholder,
#footer-placeholder {
    opacity: 1;
    visibility: visible;
}

main {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
}

/* Revelação do main quando content-visible */
.content-visible main {
    opacity: 1;
    visibility: visible;
}

#loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background-color: #FCF7EE;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.loader-img {
    width: 7rem;
    height: 7rem;
    object-fit: contain;
}

@keyframes pulse-fade {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

.animate-pulse-fade {
    animation: pulse-fade 2s infinite ease-in-out;
}

#header-placeholder {
    min-height: 100px;
}

/* --- 4. ESTILOS DINÂMICOS PÁGINA PROJETO --- */

.projeto-full #header-placeholder {
    min-height: 0 !important;
    height: 0 !important;
}

/* ESTADO A: TRANSPARENTE (Sobre a Imagem) */
.projeto-full #header-placeholder nav,
.projeto-full #footer-placeholder footer {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.6s ease-in-out;
}

.projeto-full #header-placeholder a,
.projeto-full #footer-placeholder p {
    color: white !important;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.6s ease-in-out;
}

.projeto-full #header-placeholder img,
.projeto-full #footer-placeholder svg,
#budget-arrow-container svg,
#budget-arrow {
    color: white !important;
    filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.4)) !important;
    transition: all 0.6s ease-in-out, transform 0.7s ease-in-out;
}

.projeto-full #mobile-menu-btn span {
    background-color: white !important;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.6s ease-in-out;
}

/* ESTADO B: CORES PADRÃO (Ativado via scroll) */
.reveal-colors #header-placeholder nav,
.reveal-colors #footer-placeholder footer {
    background-color: #FCF7EE !important;
    border-bottom: 1px solid #f3f4f6 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.reveal-colors #header-placeholder a,
.reveal-colors #footer-placeholder p {
    color: #6b7280 !important; 
    text-shadow: none !important;
}

.reveal-colors #header-placeholder a:hover {
    color: black !important;
}

.reveal-colors #mobile-menu-btn span {
    background-color: black !important;
    box-shadow: none !important;
}

.reveal-colors #header-placeholder img,
.reveal-colors #budget-arrow,
.reveal-colors #footer-placeholder svg {
    filter: none !important;
}

/* --- 5. MENU MOBILE --- */
.projeto-full #mobile-menu {
    background-color: rgba(252, 247, 238, 0.98) !important;
    backdrop-filter: blur(15px);
}

.projeto-full #mobile-menu a {
    color: #1a1a1a !important;
}

/* --- 6. ANIMAÇÕES --- */
.projeto-full {
    overflow-y: auto !important;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-bounce-slow {
    animation: bounce-slow 2.5s infinite ease-in-out;
}

/* --- 7. UTILITÁRIOS EXTRA --- */
.box-shadow-custom {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}

/* --- 8. ACCORDION (Index) --- */
.accordion-item {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    cursor: pointer;
    user-select: none;
}
.accordion-title {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    font-weight: 400;
}
.accordion-icon {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}
.accordion-icon svg {
    width: 10px;
    height: 10px;
    stroke: rgba(255,255,255,0.6);
    transition: transform 0.4s ease;
}
.accordion-item.open .accordion-icon svg { transform: rotate(180deg); }
.accordion-item.open .accordion-icon { border-color: rgba(255,255,255,0.5); }
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item.open .accordion-body { max-height: 800px; }
.accordion-content { padding: 0 2.5rem 2.5rem 2.5rem; }
.accordion-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.accordion-text {
    font-size: 10px;
    color: rgba(255,255,255,0.38);
    line-height: 1.9;
}
.accordion-divider {
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .accordion-grid {
        display: flex;
        align-items: flex-start;
    }
    .accordion-item {
        flex: 1;
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.08);
    }
    .accordion-item:last-child { border-right: none; }
}