/* --- Variáveis e Reset --- */
:root {
    --bg: #0a0a0a;          /* Preto Profundo */
    --text: #ffffff;        /* Branco */
    --gold: #D4AF37;        /* Dourado Manzanero */
    --gray: #333333;        /* Cinza Escuro */
    --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Curva suave */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Loader --- */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-line {
    width: 0;
    height: 2px;
    background: var(--gold);
    animation: loadLine 1.5s var(--easing) forwards;
}

body.loaded #loader { opacity: 0; pointer-events: none; }

@keyframes loadLine { to { width: 150px; } }

/* --- Tipografia --- */
.gold { color: var(--gold); }
.gold-italic { color: var(--gold); font-family: 'Georgia', serif; font-style: italic; }

.headline {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #fff;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo { font-weight: 700; letter-spacing: 0.15em; font-size: 1.1rem; }
.menu-btn { 
    background: none; border: none; color: #fff; 
    font-size: 0.9rem; letter-spacing: 0.1em; cursor: pointer; 
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 115%; /* Extra para parallax */
    object-fit: cover;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 1.5s ease-out, transform 1.5s var(--easing);
    will-change: transform;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0 1rem;
}

/* Animação de Texto Hero */
.line-mask { display: block; overflow: hidden; }

.line-text {
    display: block;
    transform: translateY(100%);
    transition: transform 1.2s var(--easing);
}

/* Delays para efeito cascata */
.line-mask:nth-child(1) .line-text { transition-delay: 0.4s; }
.line-mask:nth-child(2) .line-text { transition-delay: 0.6s; }
.line-mask:nth-child(3) .line-text { transition-delay: 0.8s; }

/* Subtítulo Hero */
.hero-footer {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: rgba(255,255,255,0.7);
}

.fade-in-delayed {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    transition-delay: 1.4s;
}

/* Scroll Indicator */
.scroll-indicator {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.track {
    width: 1px; height: 40px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.bar {
    position: absolute;
    width: 100%; height: 100%;
    background: var(--gold);
    top: -100%;
    animation: drop 2s infinite cubic-bezier(0.65, 0.05, 0.36, 1);
}

@keyframes drop {
    0% { top: -100%; }
    50% { top: 0; }
    100% { top: 100%; }
}

/* --- Estados Ativados (JS) --- */
body.loaded .hero-img { opacity: 0.8; transform: scale(1); }
body.loaded .line-text { transform: translateY(0); }
body.loaded .fade-in-delayed { opacity: 1; transform: translateY(0); }

/* --- Galeria --- */
.gallery-section {
    background-color: var(--bg);
    padding: 8rem 0;
    position: relative;
    z-index: 2;
}

.gallery-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-header { margin-bottom: 5rem; max-width: 600px; }

.section-label {
    display: block; font-size: 0.75rem; letter-spacing: 0.2em;
    color: #666; margin-bottom: 1rem;
}

.gallery-header h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 300; }

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
    .gallery-item:nth-child(even) { margin-top: 5rem; }
}

.gallery-item { position: relative; cursor: pointer; }

.img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    transition: transform 0.3s ease;
}

.portrait .img-wrapper { aspect-ratio: 3/4; }
.landscape .img-wrapper { aspect-ratio: 16/9; }

.img-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    /* filter: grayscale(100%); */
    transition: transform 0.8s var(--easing), filter 0.5s ease;
}

.gallery-item:hover .img-wrapper img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.caption {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.gallery-item:hover .caption { opacity: 1; transform: translateY(0); }

.caption h3 { font-size: 1.1rem; font-weight: 400; margin-bottom: 0.3rem; color: #fff; }
.caption p { font-size: 0.8rem; color: var(--gold); font-family: 'Georgia', serif; font-style: italic; }

/* Scroll Animation Class */
.fade-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- Instagram Section (Carousel) --- */
.instagram-section {
    padding: 6rem 0; /* Removi padding lateral para o carrossel vazar a tela */
    background-color: var(--bg);
    overflow: hidden;
    position: relative;
}

.insta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Alinha na base */
    margin-bottom: 3rem;
    padding: 0 5%; /* Padding apenas no header */
    flex-wrap: wrap;
    gap: 1.5rem;
}

.insta-label {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: #666;
    text-transform: uppercase;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.insta-handle {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.insta-handle:hover { color: var(--gold); }

/* Botões do Carrossel */
.carousel-nav {
    display: flex;
    gap: 10px;
}

.carousel-btn {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Botões redondos */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.1);
}

/* O Track do Carrossel */
.carousel-container {
    width: 100%;
    overflow: hidden; /* Esconde a barra de rolagem nativa feia */
}

.carousel-track {
    display: flex;
    gap: 10px; /* Espaço entre fotos */
    overflow-x: auto; /* Permite rolar */
    scroll-behavior: smooth; /* Rolagem suave */
    scroll-snap-type: x mandatory; /* Obriga a foto a parar no lugar certo */
    padding: 0 5%; /* Alinhamento inicial com o conteúdo */
    
    /* Esconde barra de rolagem (Chrome/Safari/Opera) */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Itens do Carrossel */
.insta-item {
    flex: 0 0 80%; /* Mobile: Mostra 80% da foto para incentivar scroll */
    aspect-ratio: 1 / 1;
    position: relative;
    scroll-snap-align: start; /* Alinha o item à esquerda ao parar */
    overflow: hidden;
}

@media (min-width: 600px) {
    .insta-item { flex: 0 0 45%; } /* Tablet: 2 fotos e meia */
}

@media (min-width: 1024px) {
    .insta-item { flex: 0 0 22%; } /* Desktop: 4 fotos e meia */
    .carousel-track { gap: 20px; }
}



.insta-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--easing);
    /* filter: grayscale(100%); */
}

/* Overlay */
.insta-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}

.icon { color: #fff; font-size: 1.5rem; transform: translateY(20px); transition: transform 0.3s ease; }

.insta-item:hover img { transform: scale(1.1); filter: grayscale(0%); }
.insta-item:hover .insta-overlay { opacity: 1; }
.insta-item:hover .icon { transform: translateY(0); }

/* --- Botão WhatsApp Pulsante --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366; /* Verde Oficial do WhatsApp */
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
    
    /* Animação de Pulso */
    animation: pulse-green 2s infinite;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: #ffffff;
}

.whatsapp-float:hover {
    background-color: #1ebc57; /* Verde um pouco mais escuro no hover */
    transform: scale(1.1); /* Cresce um pouco ao passar o mouse */
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajuste para Mobile (Botão um pouco menor) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}