/* ==========================================================================
   RAÍZES PRODUTORA - PRESTIGE STYLESHEET (OFFICIAL RESTORE)
   ========================================================================== */

:root {
    --color-primary: #2C1E11;
    --color-secondary: #3B4D3E; /* Verde institucional para botões principais */
    --color-accent: #C28455;    /* Tom Ocre Premium */
    --color-bg-light: #FDFBF7;   /* Fundo bege claro do site */
    --color-bg-alt: #F4EFEA;     /* Bege alternativo para seções com contraste */
    --color-text-dark: #2C2520;
    --color-text-light: #7A6F66;
    --color-white: #FFFFFF;
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition-smooth: all 0.4s ease;
    --container-width: 1200px;
}

/* Base Reset & Sistema Anti-Overflow (Trava o arrasto lateral) */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
    font-size: 16px; 
    overflow-x: hidden; 
    width: 100%;
}

body { 
    font-family: var(--font-body); 
    background-color: var(--color-bg-light); 
    /* BACKGROUND GLOBAL: Marca d'água fixa na raiz da página */
    background-image: url('../img/essencia-bg.webp');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-text-dark); 
    line-height: 1.7; 
    overflow-x: hidden; 
    width: 100%; 
    position: relative;
}

.container { 
    width: 100%; 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    position: relative;
    z-index: 2;
}

section { position: relative; }
.section-padding { padding: 6rem 0; }
.text-center { text-align: center; }

/* LAYERING EFFECT: Seções alternadas translúcidas (Vidro Fosco) */
.alt-bg { 
    background-color: rgba(244, 239, 234, 0.65) !important; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Seções padrão ficam limpas para exibir a marca d'água perfeitamente */
.sobre-section, .portfolio-section, .depoimentos-section, .diferenciais-section {
    background: transparent !important;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading); 
    color: var(--color-primary); 
    font-weight: 700; 
}
.section-tag { 
    display: inline-block; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--color-accent); 
    margin-bottom: 0.75rem; 
    font-weight: 600; 
}
.section-title { font-size: 2.2rem; margin-bottom: 1.5rem; }
.section-subtitle { 
    font-size: 1.1rem; 
    color: var(--color-text-light); 
    max-width: 700px; 
    margin: 0 auto 3.5rem auto; 
}

/* Navbar & Header */
.main-header { position: fixed; top: 0; width: 100%; z-index: 1000; transition: var(--transition-smooth); }
.navbar { padding: 1.5rem 0; transition: var(--transition-smooth); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
.logo { text-decoration: none; display: flex; align-items: center; }
.logo-img { height: 45px; width: auto; transition: var(--transition-smooth); filter: brightness(0) invert(1); }
.header-scrolled .logo-img { filter: none; }
.nav-list { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-link { text-decoration: none; color: var(--color-white); font-weight: 500; font-size: 0.9rem; letter-spacing: 1px; transition: var(--transition-smooth); position: relative; padding: 0.5rem 0; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background-color: var(--color-accent); transition: var(--transition-smooth); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--color-accent); }
.nav-cta { background-color: var(--color-secondary); padding: 0.6rem 1.3rem; border-radius: 2px; }
.nav-cta::after { display: none; }
.nav-cta:hover { background-color: var(--color-accent); color: var(--color-white) !important; }

.header-scrolled .navbar { background-color: rgba(254, 251, 247, 0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.05); padding: 0.9rem 0; }
.header-scrolled .nav-link { color: var(--color-text-dark); }
.header-scrolled .nav-cta { color: var(--color-white); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 1001; }
.hamburger { display: block; width: 24px; height: 2px; background-color: var(--color-white); position: relative; transition: var(--transition-smooth); }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 24px; height: 2px; background-color: inherit; left: 0; transition: var(--transition-smooth); }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.header-scrolled .hamburger { background-color: var(--color-primary); }

/* Buttons */
.btn { display: inline-block; text-decoration: none; padding: 1rem 2.2rem; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; border-radius: 2px; transition: var(--transition-smooth); cursor: pointer; border: 1px solid transparent; }
.btn-primary { background-color: var(--color-secondary); color: var(--color-white); }
.btn-primary:hover { background-color: var(--color-primary); transform: translateY(-2px);}
.btn-secondary { background-color: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.4); }
.btn-secondary:hover { background-color: var(--color-white); color: var(--color-primary); transform: translateY(-2px);}
.btn-accent { background-color: var(--color-accent); color: var(--color-white); }
.btn-accent:hover { background-color: var(--color-primary); transform: translateY(-2px); }
.btn-outline { background-color: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background-color: var(--color-primary); color: var(--color-white); transform: translateY(-2px); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Hero Section */
.hero-section { position: relative; height: 100vh; min-height: 600px; display: flex; align-items: center; background-color: var(--color-primary); overflow: hidden; }
.hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; transform: translate(-50%, -50%); object-fit: cover; z-index: 1; pointer-events: none; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(22, 14, 8, 0.70); z-index: 2; }
.hero-content { position: relative; z-index: 10; max-width: 800px; }
.hero-title { font-size: 3.5rem; color: var(--color-white); margin-bottom: 1.5rem; }
.hero-subtitle { font-family: var(--font-body); font-size: 1.25rem; color: var(--color-bg-light); margin-bottom: 2.5rem; font-weight: 300; max-width: 650px; }
.hero-actions { display: flex; gap: 1.5rem; }

/* Sobre Section */
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.sobre-video { width: 100%; border-radius: 4px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); display: block; object-fit: cover; }
.story-paragraph { margin-bottom: 1.5rem; color: var(--color-text-light); font-size: 1.05rem; }

/* Serviços Section */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background-color: var(--color-white); padding: 3rem 2rem; border-radius: 2px; box-shadow: 0 5px 15px rgba(0,0,0,0.02); transition: var(--transition-smooth); }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(44,30,17,0.06); }
.service-icon { color: var(--color-accent); margin-bottom: 1.5rem; }

/* Portfolio Section (Dynamic Grid) */
.portfolio-filters { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { background: none; border: none; font-weight: 600; text-transform: uppercase; padding: 0.5rem 1rem; font-size: 0.8rem; cursor: pointer; color: var(--color-text-light); transition: var(--transition-smooth); border-bottom: 2px solid transparent; }
.filter-btn:hover, .filter-btn.active { color: var(--color-primary); border-bottom-color: var(--color-accent); }
.portfolio-grid { column-count: 1; column-gap: 1.5rem; }
@media (min-width: 768px) { .portfolio-grid { column-count: 2; } }
@media (min-width: 1024px) { .portfolio-grid { column-count: 3; } }
.portfolio-item { break-inside: avoid; margin-bottom: 1.5rem; display: inline-block; width: 100%; }
.portfolio-wrapper { position: relative; overflow: hidden; border-radius: 4px; cursor: pointer; background: #EFEFEF; }
.portfolio-media { width: 100%; height: auto; display: block; transition: var(--transition-smooth); object-fit: cover; }
video.portfolio-media { pointer-events: none; } 
.portfolio-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(44, 30, 17, 0.85); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition-smooth); text-align: center; }
.portfolio-hover span { color: var(--color-accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem; }
.portfolio-hover h4 { color: var(--color-white); font-size: 1.5rem; margin: 0 1rem; }
.portfolio-wrapper:hover .portfolio-media { transform: scale(1.05); }
.portfolio-wrapper:hover .portfolio-hover { opacity: 1; }
.load-more-container { margin-top: 3.5rem; }

/* Lightbox Layout */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 10, 6, 0.98); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: var(--transition-smooth); }
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.lightbox-content { text-align: center; max-width: 85vw; }
.lightbox-content img, .lightbox-content video { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox-close, .lightbox-arrow { position: absolute; background: none; border: none; color: var(--color-white); font-size: 3rem; cursor: pointer; z-index: 2001; }
.lightbox-close { top: 30px; right: 30px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); }
.lightbox-arrow.prev { left: 20px; }
.lightbox-arrow.next { right: 20px; }
#lightbox-title { color: var(--color-white); margin-top: 1rem; font-weight: 400; letter-spacing: 1px; }

/* ==========================================================================
   A ESSÊNCIA RAÍZES - CARDS CLÁSSICOS CLEAN (RESTORE UI)
   ========================================================================== */
.diferenciais-cards-container {
    margin-top: 3.5rem;
}

.diferenciais-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Divide perfeitamente em 3 colunas iguais */
    gap: 2.5rem;
    align-items: stretch;
}

/* Caixa com fundo branco e cantos arredondados discretos como na image_9ae96c.png */
.diferencial-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--color-white);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    border-bottom: 3px solid transparent;
}

.diferencial-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(44, 30, 17, 0.06);
    border-bottom-color: var(--color-accent);
}

/* Círculo minimalista para o ícone */
.dif-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(194, 132, 85, 0.15);
}

.diferencial-item:hover .dif-icon-wrapper {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}

.dif-content h4 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-weight: 700;
}

.dif-content p {
    font-family: var(--font-body);
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Depoimentos */
.carousel-container { max-width: 800px; margin: 0 auto; position: relative; overflow: hidden; padding-bottom: 3rem; }
.carousel-track { display: flex; transition: transform 0.6s ease; }
.carousel-slide { min-width: 100%; padding: 2rem 5rem; text-align: center; }
.depoimento-stars { color: #C28455; font-size: 1.3rem; letter-spacing: 2px; margin-bottom: 1rem; }
.depoimento-text { font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; color: var(--color-primary); margin-bottom: 1.5rem; line-height: 1.5; }
.depoimento-autor { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.depoimento-tipo { font-size: 0.8rem; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; }
.carousel-controls { display: flex; justify-content: space-between; position: absolute; top: 40%; width: 100%; transform: translateY(-50%); pointer-events: none; }
.carousel-btn { background: none; border: none; font-size: 2.5rem; color: var(--color-accent); cursor: pointer; transition: var(--transition-smooth); padding: 0 1rem; pointer-events: auto; }
.carousel-btn:hover { color: var(--color-primary); }
/* Dots de paginacao */
.carousel-dots { display: flex; justify-content: center; gap: 0.6rem; position: absolute; bottom: 0; left: 0; right: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-bg-alt); border: 1px solid var(--color-accent); cursor: pointer; transition: var(--transition-smooth); padding: 0; }
.dot.active { background-color: var(--color-accent); transform: scale(1.3); }

/* CTA Premium Section */
.cta-premium-section { background: url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover; text-align: center; color: var(--color-white); }
.cta-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(22, 14, 8, 0.75); }
.cta-content { position: relative; z-index: 5; }
.cta-title { color: var(--color-white); font-size: 2.5rem; margin-bottom: 1rem; }
.cta-subtitle { font-size: 1.2rem; margin-bottom: 2.5rem; font-weight: 300; }

/* Contato Form Layout */
.contato-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
.contato-details { margin-top: 2rem; }
.contato-details p { margin-bottom: 0.75rem; }
.contact-form { background-color: var(--color-white); padding: 3rem; border-radius: 2px; box-shadow: 0 10px 40px rgba(0,0,0,0.03); }
.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-primary); }
input, select, textarea { padding: 0.85rem 1rem; border: 1px solid #E1DCD6; background-color: var(--color-bg-light); font-family: var(--font-body); font-size: 0.95rem; border-radius: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(194, 132, 85, 0.1); }
input.invalid, select.invalid, textarea.invalid { border-color: #A94442; background-color: #FFF6F6; }
.form-feedback.success { display: block; background-color: #E2EED8; color: #3C763D; border: 1px solid #D6E9C6; margin-top: 1.5rem; padding: 1rem; }

/* WhatsApp Button */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 999; transition: var(--transition-smooth); }
.whatsapp-float:hover { transform: scale(1.1); background-color: #20BA5A; }

/* Footer */
.main-footer { background-color: var(--color-primary); color: var(--color-bg-alt); padding: 4rem 0 2rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 3rem; align-items: start; }
.logo-footer { display: inline-block; }
.logo-footer img { width: 150px; height: auto; }
.footer-links h4, .footer-social h4 { color: var(--color-accent); font-size: 1rem; margin-bottom: 1.25rem; text-transform: uppercase; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.75rem; }
.footer-links ul li a { color: var(--color-bg-alt); text-decoration: none; font-size: 0.95rem; transition: var(--transition-smooth); }
.footer-links ul li a:hover { color: var(--color-accent); }
.social-icons a { color: var(--color-white); text-decoration: none; margin-right: 1.5rem; font-size: 0.95rem; transition: var(--transition-smooth); }
.social-icons a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; font-size: 0.85rem; color: var(--color-text-light); }

/* Animations Keyframes */
.reveal-fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-fade-in { opacity: 0; transition: opacity 1.2s ease; }
.reveal-active { opacity: 1; transform: translateY(0); }

/* Acessibilidade: respeita preferencia do sistema operacional por reducao de animacoes */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-fade-up, .reveal-fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   TABLET (768px - 1023px) — Grid intermediario
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title    { font-size: 2.8rem; }
    .section-title { font-size: 1.9rem; }

    /* Servicos: 2 colunas no tablet */
    .services-grid { grid-template-columns: repeat(2, 1fr); }

    /* Diferenciais: 3 colunas no tablet tambem e ok se couber, senao 2 */
    .diferenciais-grid { grid-template-columns: repeat(2, 1fr); }

    /* Sobre: mantém 1 coluna no tablet, mas com espacamento menor */
    .sobre-grid { grid-template-columns: 1fr; gap: 2.5rem; }

    /* Contato: 1 coluna no tablet */
    .contato-grid { grid-template-columns: 1fr; gap: 2.5rem; }

    /* Footer: 2 colunas */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ==========================================================================
   OTIMIZAÇÕES PREMIUM EXCLUSIVAS PARA DISPOSITIVOS MÓVEIS (RESPONSIVO)
   ========================================================================== */
@media (max-width: 767px) {
    .menu-toggle { display: block; z-index: 1001; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 80%; height: 100vh; background-color: var(--color-primary); padding: 6rem 2rem 2rem 2rem; transition: var(--transition-smooth); box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
    .nav-menu.open { right: 0; }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .nav-link { color: var(--color-white) !important; font-size: 1.2rem; }
    .menu-toggle[aria-expanded="true"] .hamburger { background-color: transparent; }
    .menu-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg) translate(4px, 5px); background-color: var(--color-white); }
    .menu-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg) translate(4px, -5px); background-color: var(--color-white); }
    
    /* Configuração da Imagem de Fundo no Celular (Fluidez Garantida) */
    body {
        background-image: url('../img/essencia-bg-mobile.webp') !important;
        background-attachment: scroll !important;
        background-size: contain;
        background-repeat: repeat-y;
    }
    .alt-bg {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: rgba(244, 239, 234, 0.85) !important;
    }

    /* Correção do Topo (Hero) no Mobile */
    .hero-title { font-size: 2.5rem; line-height: 1.15; margin-bottom: 1rem; }
    .hero-subtitle { font-size: 1.05rem; line-height: 1.4; margin-bottom: 2rem; }
    .hero-actions { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
    .hero-actions .btn { width: 100%; text-align: center; }
    
    /* Correção dos Títulos (Reduz o line-height para juntar as linhas) */
    .section-title { font-size: 2rem; line-height: 1.2; }
    
    /* LEGIBILIDADE MOBILE: left (justify cria lacunas em telas estreitas) */
    .container { padding: 0 1.5rem !important; }
    p, .story-paragraph, .dif-content p, .service-card p, .contato-info p {
        text-align: left;
    }
    
    /* Correcao de Respiros Verticais entre Secoes */
    .section-padding { padding: 5rem 0 4rem 0; } 
    #sobre { margin-top: 3rem; } 
    
    /* Adaptacao dos Cards Classicos no Mobile */
    .diferenciais-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .diferencial-item {
        padding: 2.5rem 1.5rem;
    }
    .diferencial-item .dif-text, .diferencial-item p {
        text-align: left;
    }
    .diferenciais-grid-premium {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .dif-card-premium { padding: 2.5rem 1.5rem; }
    .dif-card-premium .dif-text { text-align: left; }
    
    /* Seção Sobre em 1 Coluna */
    .sobre-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .sobre-content { order: 1; padding-bottom: 0; }
    .sobre-image-wrapper { order: 2; }
    
    /* Grids e Linhas de Formulários em 1 Coluna */
    .contato-grid, .footer-grid, .form-row { grid-template-columns: 1fr; gap: 2.5rem; }
    .lightbox-arrow { font-size: 2.5rem; padding: 0.5rem; }
}