@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-blue: #0F2E4D;
    --accent-yellow: #F9A825;
    --energy-red: #C62828;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --text-dark: #333333;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease;
}

/* Typography */
h1, h2, h3 {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

p {
    margin-bottom: 20px;
}

.text-center { text-align: center; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: #f79a00;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
}

/* Paint Shared Effect Layout */
#paint-shared-wrapper {
    position: relative;
    background-color: var(--white);
    margin-top: 0; /* Garante que não haja gap com o Hero */
    min-height: 200vh; /* Altura suficiente para rolar pelas duas seções com o fundo fixo */
}

.paint-group {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.paint-background {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    margin-bottom: -100vh; /* Mantém a sobreposição */
}

.paint-background canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    opacity: 1;
    background-color: #ffffff !important;
    object-fit: cover !important; /* Força preenchimento total */
}

.paint-section {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Conteúdo para a direita */
    padding: 0 !important;
    background: transparent;
}

.paint-section:first-of-type {
    padding-top: 0 !important; /* Sem padding: o scroll é controlado pelo Hero */
}

.content-over-paint {
    width: 100%;
    position: relative;
}

.content-over-paint h2 {
    margin-bottom: 30px;
    color: var(--primary-blue);
    display: none; /* O título agora está dentro do paint-text-box */
}

/* Ajuste da grid de produtos para o novo layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.product-card {
    background: var(--light-gray); /* Fundo sólido para contraste dentro do box */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.paint-text-box {
    background: #ffffff;
    padding: 60px;
    border-radius: 20px;
    max-width: 650px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 5;
    position: relative;
    border-left: 8px solid var(--primary-blue);
}

.paint-text-box h2 {
    margin-top: 0;
    font-size: 2.5rem;
    color: var(--primary-blue);
}

.paint-text-box p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* --- Seção Sobre (Institucional) --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
}

.about-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 350px; /* Reduzido ainda mais */
    background-color: #ddd; 
}

.image-overlay-text {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: var(--primary-blue);
    color: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    border-left: 6px solid var(--accent-yellow);
    display: flex;
    flex-direction: column;
}

.years {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-yellow);
}

.years-text {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(249, 168, 37, 0.15); /* Amarelo transparente */
    color: var(--text-dark); /* Mudou para usar a variável existente */
    font-weight: 700;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.about-content h2 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 2.8rem;
    line-height: 1.2;
}

.lead-text {
    font-size: 1.25rem;
    color: #444;
    margin-bottom: 40px;
}

/* Apple-Style Information Cards */
.apple-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.apple-card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.apple-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-color: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.apple-card:hover .card-icon {
    transform: scale(1.1);
}

.apple-card h4 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.apple-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

@media (max-width: 768px) {

    .headline { font-size: 3rem; }
    .paint-background { height: 100vh; }
}

/* Hero Section */
#hero {
    position: relative;
    z-index: 50 !important;
    height: 150vh; /* Reduzido de 250vh para diminuir o "espaço gigante" em branco ao final do scroll */
    padding: 0 !important;
    overflow: visible !important; 
}

/* Ignora a animação automática do main.js para o Hero para não esconder no início */
#hero.reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
}

#paint-group-hero {
    margin-top: 0 !important; /* Colagem natural agora que o fundo é do grupo */
}

#hero, .paint-section, .paint-group {
    border: none !important;
    outline: none !important;
    margin: 0;
    padding: 0;
}

.paint-text-box {
    background: #ffffff;
    padding: 50px;
    border-radius: 20px;
    max-width: 550px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    z-index: 10;
    margin-right: 8%; /* Distância da borda direita */
    position: relative;
    border-left: 10px solid var(--primary-blue);
}

.hero-grid {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
}

.hero-text {
    flex: 0 0 50%;
    padding: 0 8% 0 10%;
    z-index: 100 !important; /* Garantir acima de tudo */
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-intro {
    position: absolute;
    width: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centralizado total */
    opacity: 1;
    z-index: 102;
    text-align: center;
    white-space: nowrap; /* Garante uma linha só */
}

.highlight-cor {
    color: var(--accent-yellow);
}

.intro-phrase {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.1;
    margin: 0;
    text-rendering: optimizeLegibility;
}

.hero-main-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px); /* Aumentado para um efeito de subida mais nítido */
    transition: none; /* Animação controlada 100% pelo JS para sincronia total */
    width: 100%;
    z-index: 101;
    will-change: opacity, transform;
}

.hero-animation {
    flex: 1 1 60%;
    position: relative;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas-bg {
    width: 100% !important;
    height: 100% !important;
    background-color: #ffffff !important;
    object-fit: cover !important; /* Preenche tudo sem bordas brancas */
}

.hero-logo {
    max-width: 250px; /* Aumentado de 180px */
    margin-bottom: 40px;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.headline {
    font-size: 2.8rem; /* Reduzido para o padrão original/esperado */
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    color: var(--primary-blue); /* Removido gradiente se ele for o culpado pelo peso visual */
    font-weight: 800;
}

.subheadline {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #555;
    max-width: 500px;
    font-weight: 400;
}

/* Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* No mobile, forçar tudo visível — o IntersectionObserver pode falhar
   quando o layout está modificado por CSS mobile */
@media (max-width: 768px) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 80px 0 30px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -10px);
    }
    60% {
        transform: translate(-50%, -5px);
    }
}

footer h3 {
    color: var(--accent-yellow);
    margin-bottom: 25px;
}

footer p {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .headline { font-size: 3rem; }
    #hero { min-height: 800px; }
}

@media (max-width: 992px) {
    .hero-text { 
        flex: 1 1 100%; 
        text-align: center; 
        padding: 80px 20px; 
        align-items: center;
    }
    .hero-animation { 
        flex: 1 1 100%; 
        height: 500px; 
    }
    .subheadline { margin: 0 auto 40px; }
    
    .about-grid { grid-template-columns: 1fr; }
    .about-image { min-height: 350px; }
    .apple-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .headline { font-size: 2.5rem; }
    section { padding: 60px 0; }
    .hero-animation { height: 350px; }
}

/* ========================================================= */
/* Catálogo de Cores (Estilo Suvinil) */
/* ========================================================= */

.color-tabs-wrapper {
    position: relative;
    max-width: 100%;
}

.color-tab-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 40px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.color-tab-btn:hover {
    border-color: #aaa;
}

.color-tab-btn.active {
    border-color: #F9A825;
    box-shadow: 0 0 0 1px #F9A825;
    color: #0F2E4D;
    font-weight: 700;
}

.color-tab-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.color-swatch-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.color-swatch-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.swatch-preview {
    height: 240px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 25px;
    position: relative;
}

.swatch-footer {
    padding: 20px;
    background: #fbfbfb;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-top: 1px solid #f2f2f2;
}

.btn-swatch-cta {
    background: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 12px;
    border-radius: 4px;
    width: 100%;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-swatch-cta:hover {
    background: #F9A825;
    border-color: #F9A825;
    color: #0F2E4D;
}

/* Room Mockup Hover Effect */
.room-mockup {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 5;
}

.color-swatch-card:hover .room-mockup {
    bottom: 0px;
    opacity: 1;
}

.swatch-text-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

/* =========================================================================
   RESPONSIVIDADE MOBILE — apenas telas até 768px
   Desktop permanece 100% intacto
========================================================================= */
@media (max-width: 768px) {

    /* ---- Reset horizontal scroll ---- */
    html, body { overflow-x: hidden !important; }

    /* ---- Header ---- */
    header { padding: 14px 16px !important; }
    nav ul { display: none !important; }
    .header-cta { padding: 10px 14px !important; font-size: 0.85rem !important; }

    /* ---- HERO: ajuste de altura para o mobile, mantendo a animação ---- */
    #hero {
        height: 120vh !important;   /* Reduzido de 150vh para scroll mais rápido no mobile */
        min-height: auto !important;
        padding: 0 !important;
    }

    /* Mantemos o paint-background visível para a animação do balde funcionar */
    .paint-background {
        height: 100vh !important;   /* Sempre ocupa a tela toda */
    }

    /* Reduz a margem negativa no mobile para não cobrir tanto conteúdo abaixo */
    .paint-group {
        min-height: auto !important;
    }

    /* A hero-grid no desktop é position:sticky — no mobile vira static e empilha */
    .hero-grid {
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        min-height: 100vh !important;
        height: auto !important;
        padding: 80px 20px 40px !important;
    }
    .hero-text {
        flex: none !important;
        width: 100% !important;
        padding: 0 !important;
        height: auto !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    /* Intro: era position:absolute com white-space:nowrap — corrigir para mobile */
    .hero-intro {
        position: static !important;
        transform: none !important;
        white-space: normal !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 24px !important;
    }
    .intro-phrase {
        font-size: 1.9rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
    /* Conteúdo principal: JS controla opacity/transform via scroll,
       mas no mobile forçamos visível pois não há espaço para o efeito */
    .hero-main-content {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        width: 100% !important;
    }
    .hero-logo { max-width: 160px !important; margin: 0 auto 20px !important; display: block !important; }
    .headline { font-size: 1.85rem !important; line-height: 1.15 !important; margin-bottom: 14px !important; }
    .subheadline { font-size: 0.95rem !important; margin-bottom: 24px !important; }

    /* ---- Espaçamentos gerais ---- */
    section { padding: 50px 16px !important; }
    h2 { font-size: 1.8rem !important; line-height: 1.2 !important; }
    .container { padding: 0 16px !important; }

    /* ---- Quem Somos ---- */
    .about-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .about-content h2 { font-size: 1.8rem !important; text-align: center !important; }
    .lead-text { font-size: 1rem !important; }

    /* ---- Produtos ---- */
    .product-grid, .products-grid { grid-template-columns: 1fr !important; gap: 14px !important; }

    /* ---- Diferenciais / Features ---- */
    .features-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
    .apple-cards-grid { grid-template-columns: 1fr !important; }
    .paint-text-box { padding: 24px 16px !important; max-width: 100% !important; margin: 0 !important; }

    /* ---- Segmentos ---- */
    .application-grid { grid-template-columns: 1fr !important; gap: 14px !important; }

    /* ---- Catálogo de Cores ---- */
    /* A seção usa overflow:hidden que pode clipar o conteúdo — liberar */
    #catalogo-cores { overflow: visible !important; padding: 50px 12px !important; }
    .color-tabs-wrapper { overflow: visible !important; margin-bottom: 16px !important; }
    #color-prev-btn, #color-next-btn { display: none !important; }
    #color-tabs-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
    .color-tab-btn {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    #color-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .color-swatch-card { height: 230px !important; }
    .swatch-preview { padding: 10px !important; }
    .swatch-text-top { top: 10px !important; left: 10px !important; right: 10px !important; }
    .swatch-text-top h3 { font-size: 0.75rem !important; }
    .btn-swatch-cta { font-size: 0.68rem !important; padding: 8px !important; }
    .room-mockup { transform: scale(0.75) !important; bottom: -40px !important; transform-origin: bottom center !important; }
    .color-swatch-card:hover .room-mockup,
    .color-swatch-card:active .room-mockup { bottom: -15px !important; }

    /* ---- Números ---- */
    .numbers-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* ---- Depoimentos ---- */
    .testimonial-slider-card { width: 260px !important; padding: 24px 16px !important; }

    /* ---- Modal CRM ---- */
    #surveyModal > div {
        width: 95% !important;
        padding: 24px 16px !important;
        max-height: 88vh !important;
        overflow-y: auto !important;
        border-radius: 20px !important;
    }
    #stepHeader h2 { font-size: 1.3rem !important; }
    .survey-step div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .survey-step input[type="text"],
    .survey-step input[type="tel"],
    .survey-step textarea { padding: 12px !important; font-size: 14px !important; }

    /* ---- CTA Final ---- */
    #cta-final h2 { font-size: 1.8rem !important; }
    #cta-final p { font-size: 1rem !important; }
    #cta-final div[style*="display: flex"] { flex-direction: column !important; }
    #cta-final .btn { width: 100% !important; text-align: center !important; }

    /* ---- Footer ---- */
    footer div[style*="display: flex"] { flex-direction: column !important; gap: 20px !important; }
}

@media (max-width: 400px) {
    .intro-phrase { font-size: 1.5rem !important; }
    .headline { font-size: 1.6rem !important; }
    #color-grid { grid-template-columns: 1fr !important; }
    .color-swatch-card { height: 290px !important; }
    .numbers-grid { grid-template-columns: 1fr !important; }
}

