/* Reset e Variáveis Padrão (Fundo Branco Unificado) */
:root {
    --bg-primary: #FAF8F5; 
    --text-primary: #1A1A1A; 
    --accent: #1A1A1A; 
    
    --font-premium: 'Cormorant Garamond', serif;
    --font-tech: 'Montserrat', sans-serif;
    --font-tall: 'Oswald', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-tech);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img, video {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

h1, h2, h3, h4 {
    font-family: var(--font-tall);
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* -------------------------------------
   HEADER E NAVEGAÇÃO
-------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-primary);
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    position: relative;
    padding-bottom: 5px;
    color: var(--text-primary);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

nav a:hover::after {
    width: 100%;
}

/* -------------------------------------
   BOTÃO WHATSAPP
-------------------------------------- */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background-color: transparent;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    margin-top: 1.5rem;
    border: 1px solid currentColor;
    color: currentColor;
}

.btn-whatsapp svg {
    fill: currentColor !important; 
    transition: fill 0.4s ease;
}

.btn-whatsapp:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 0.85rem;
}

/* -------------------------------------
   HERO / SOBRE
-------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 5%;
    align-items: center;
}

.hero-content {
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--accent);
}

.text-block {
    margin-bottom: 2.5rem;
    max-width: 95%;
}

.text-block p {
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.img-1 { grid-column: 1 / 2; grid-row: 1 / 2; height: 300px; }
.img-2 { grid-column: 2 / 3; grid-row: 1 / 3; height: 100%; } 
.img-3 { 
    grid-column: 1 / 2; 
    grid-row: 3 / 4; 
    height: auto; 
    aspect-ratio: 3/4;
    transform: none; 
}

/* -------------------------------------
   EXPERTISE / ÁREAS DE ATUAÇÃO
-------------------------------------- */
.expertise-section {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 6rem 5% 4rem 5%; 
}

.expertise-container {
    max-width: 1200px;
    margin: 0 auto;
}

.expertise-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    color: var(--text-primary);
}

.expertise-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin: 20px auto 0;
    background-color: var(--text-primary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem 4rem; 
    border-top: 1px solid rgba(26, 26, 26, 0.15); 
    padding-top: 4rem;
}

.expertise-item {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.9;
}

.expertise-item::before {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    opacity: 0.4;
}

/* -------------------------------------
   FAIXAS DE TEXTO E LOGOS (MARQUEES)
-------------------------------------- */
.marquee-bar {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 15px 0;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    width: 100%; 
}

.marquee-track {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    animation: textMarquee 25s linear infinite;
    will-change: transform;
}

.marquee-track span {
    margin: 0 10px;
}

.logo-track {
    display: inline-flex;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 6rem;
    padding-right: 6rem;
}

.logo-group img {
    height: 45px; 
    width: auto; 
    max-width: none; 
    flex-shrink: 0; 
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.logo-group img:hover {
    opacity: 1;
}

@keyframes textMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* -------------------------------------
   SEÇÕES GERAIS E TÍTULOS
-------------------------------------- */
.services-section {
    padding: 8rem 5%;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); 
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    color: var(--text-primary);
    line-height: 1.1;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin: 20px auto 0;
    background-color: var(--text-primary);
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: -1.5rem auto 5rem auto; 
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-primary);
    opacity: 0.85;
}

/* -------------------------------------
   CARROSSEL INFINITO CSS-ONLY
-------------------------------------- */
.brand-group {
    margin-bottom: 6rem;
}

.brand-group h3 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.carousel-track {
    display: flex;
    width: max-content; 
    animation: scrollInfinite 30s linear infinite;
    will-change: transform;
}

@media (hover: hover) {
    .carousel-container:hover .carousel-track {
        animation-play-state: paused;
    }
}

.carousel-container.reverse-scroll .carousel-track {
    animation: scrollInfiniteReverse 35s linear infinite;
}

.carousel-group {
    display: flex;
    gap: 20px;
    padding-right: 20px;
}

.carousel-group img {
    height: 500px;
    width: 380px;
    flex-shrink: 0;
    background-color: rgba(0,0,0,0.05); 
    filter: grayscale(40%) sepia(10%);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
}

@media (hover: hover) {
    .carousel-group img:hover {
        transform: scale(1.02);
        filter: grayscale(0%) sepia(0%);
    }
}

@keyframes scrollInfinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollInfiniteReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* -------------------------------------
   VÍDEOS E IPHONE FRAME
-------------------------------------- */
.iphone-frame {
    position: relative;
    border: 8px solid #1A1A1A;
    border-radius: 40px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    height: 600px;
    width: 337.5px; 
    flex-shrink: 0;
}

.iphone-frame::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 25px;
    background-color: #1A1A1A;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 2;
}

.reels-carousel .carousel-group .iphone-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    border-radius: 32px; 
    transform: none;
    background-color: #000; 
    outline: none; 
}

/* -------------------------------------
   FEEDS (CARROSSEL PORTRAIT)
-------------------------------------- */
.feed-img {
    aspect-ratio: 4 / 5 !important; 
    height: 500px !important;
    width: 400px !important;
    cursor: pointer;
}

/* -------------------------------------
   CRESCIMENTO DE MARCA (MÉTRICAS NO IPHONE)
-------------------------------------- */
.growth-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.metrics-frame {
    background-color: #ffffff; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.06); 
}

.growth-grid .metrics-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    border-radius: 32px;
    padding-top: 35px; 
    background-color: #ffffff;
    filter: none; 
    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .growth-grid .metrics-frame:hover img {
        transform: scale(1.03); 
    }
}

/* -------------------------------------
   FOOTER / CONTATO
-------------------------------------- */
.footer-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    padding: 8rem 5%;
    align-items: center;
}

.contact-info {
    padding-left: 10%;
}

.contact-info h2 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.contact-info p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.contact-image img {
    aspect-ratio: 3/4;
    filter: grayscale(50%) sepia(10%);
    transition: filter 0.5s, transform 0.5s;
    width: 100%; 
}

@media (hover: hover) {
    .contact-image img:hover {
        filter: grayscale(0%) sepia(0%);
        transform: scale(1.02);
    }
}

/* -------------------------------------
   OVERLAY DE PLAY (DESKTOP E MOBILE)
-------------------------------------- */
.video-wrapper {
    cursor: pointer;
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

.play-overlay svg {
    fill: #ffffff;
    width: 20px;
    height: 20px;
    margin-left: 4px; 
}

.video-wrapper.is-playing .play-overlay {
    opacity: 0;
}

/* -------------------------------------
   MODAL DE VÍDEO E IMAGEM (MOBILE POPUP)
-------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    height: 80vh;
    position: relative;
}

.modal-content video {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    background-color: #000;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    font-family: var(--font-tech);
}

.modal-content.image-content {
    height: auto;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content.image-content img {
    max-height: 90vh;
    width: auto;
    max-width: 100%;
    border-radius: 16px;
    object-fit: contain;
}

/* Trava o carrossel durante a reprodução do vídeo no PC */
.carousel-container.is-paused .carousel-track {
    animation-play-state: paused !important;
}

/* -------------------------------------
   RESPONSIVIDADE (MOBILE AJUSTES)
-------------------------------------- */
@media (max-width: 900px) {
    .expertise-section {
        padding: 4rem 5% 2rem 5%;
    }
    .expertise-grid {
        grid-template-columns: 1fr; 
        padding-top: 3rem;
        gap: 1.5rem;
    }

    .services-section {
        padding: 5rem 5%;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 4rem 5%;
    }
    
    .hero-content {
        padding-right: 0;
        text-align: center;
    }
    
    .text-block {
        margin: 0 auto 2rem auto;
    }
    
    /* 1. Reorganização do Banner (Imagem 3 no formato Reels) */
    .hero-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
    }
    .img-1 { grid-column: 1 / 2; grid-row: 1 / 2; height: 220px; width: 100%; }
    .img-2 { grid-column: 2 / 3; grid-row: 1 / 2; height: 220px; width: 100%; }
    .hero-gallery .img-3 {
        grid-column: 1 / 3; 
        grid-row: 2 / 3; 
        height: auto; 
        width: 100%;
        aspect-ratio: 9 / 16; 
        transform: none; 
    }

    .footer-contact {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 5rem 5%;
    }
    
    .contact-info {
        padding-left: 0;
        text-align: center;
    }
    
    nav {
        display: none; 
    }
    
    /* Redimensionamento dos Carrosséis para telas menores */
    .carousel-group img {
        height: 350px;
        width: 260px;
    }
    
    .feed-img {
        height: 325px !important;
        width: 260px !important;
    }
    
    .iphone-frame {
        height: 400px;
        width: 225px; 
        border-width: 6px;
        border-radius: 30px;
    }
    .iphone-frame::before {
        width: 90px;
        height: 18px;
    }
    
    .reels-carousel .carousel-group .iphone-frame video {
        border-radius: 24px;
    }

    .brand-group {
        margin-bottom: 4rem;
    }
    
    .logo-group {
        gap: 4rem;
        padding-right: 4rem;
    }
    
    .logo-group img {
        height: 35px;
    }

    /* 2. Conversão dos Carrosséis para Arrasto Nativo Híbrido (Swipe + Auto) */
    .carousel-container {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        mask-image: none;
        -webkit-mask-image: none;
        padding-bottom: 15px;
        /* scroll-snap-type removido para não conflitar com o motor JS */
    }
    .carousel-container::-webkit-scrollbar {
        display: none; 
    }
    .carousel-track {
        animation: none !important; /* Desativa a animação CSS para o Javascript assumir */
        padding-right: 20px;
    }
    .carousel-group img, .iphone-frame {
        scroll-snap-align: center; 
    }
}