/* --- RESET E VARIÁVEIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #F4F0EA;
    --text-color: #1A1A1A;
    --accent-color: #FF5722;
}

html {
    scroll-snap-type: y proximity; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    cursor: none;
    transition: background-color 0.8s cubic-bezier(0.25, 1, 0.5, 1), color 0.5s ease;
    overflow-x: hidden;
}

/* --- NAVEGAÇÃO --- */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Garante que o logo e os botões ficam alinhados ao centro verticalmente */
    z-index: 100;
    mix-blend-mode: difference;
    color: #fff;
}

.top-nav a { 
    color: #fff; 
    text-decoration: none; 
}

/* Estilo da caixa de idiomas */
.lang-toggle {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 1rem;
}

/* Estilo individual de cada botão de idioma */
.lang-btn {
    opacity: 0.4; /* Ficam mais apagados por padrão */
    transition: opacity 0.3s ease;
}

.lang-btn:hover {
    opacity: 0.8;
}

/* O idioma que está selecionado atualmente */
.lang-btn.active {
    opacity: 1;
    font-weight: 800;
    pointer-events: none; /* Impede que clique no idioma que já está ativo */
}

/* Os tracinhos de separação */
.separator {
    opacity: 0.3;
    font-weight: 300;
}

/* --- CURSOR CUSTOMIZADO --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    mix-blend-mode: difference;
}

/* --- HERO SECTION --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.massive-title {
    font-size: clamp(4rem, 12vw, 15rem);
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    font-weight: 900;
}

.subtitle {
    margin-top: 20px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Animação dos Personagens */
.hidden-char {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: clamp(150px, 20vw, 300px);
}

.char-left { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5); }
.char-right { 
    top: 48%; 
    left: 64.3%;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0; 
    
    z-index: 500; 
    transform-origin: left center; 
}

.hero-content:hover ~ .char-left {
    opacity: 1;
    transform: translate(-160%, -80%) rotate(-10deg) scale(1);
}

.hero-content:hover ~ .char-right {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(10deg);
}

/* --- GALERIA DINÂMICA --- */
.gallery-section {
    padding: 100px 5%;
    min-height: 100vh;
}

.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 60px;
    border-bottom: 2px solid currentColor;
    padding-bottom: 10px;
}

.project-item {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    padding: 50px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    text-decoration: none;
    color: inherit;
    transition: padding 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    animation: fadeUp 0.8s forwards ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-name {
    font-size: clamp(2.5rem, 5vw, 5rem) !important; 
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    flex-shrink: 0 !important; 
    white-space: nowrap;
    position: relative;
    z-index: 10;
    
    /* Prepara TODAS as propriedades para transicionarem suavemente */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                letter-spacing 0.5s ease, 
                text-shadow 0.3s ease,
                color 0.3s ease;
}

.project-role {
    font-size: 1.2rem;
    font-weight: 400;
}

.project-name, .project-role {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;
}

.project-item:hover .project-name {
    transform: translateX(20px);
}

.project-item:hover .project-role {
    transform: translateX(-20px);
}

.project-hover-img {
    position: absolute;
    top: 50%;
    left: 45%; /* Posiciona a imagem próximo ao fim do texto */
    width: clamp(100px, 25vw, 180px); /* Tamanho responsivo */
    
    /* Estado Inicial: invisível e levemente "puxada" para a esquerda */
    transform: translate(-30%, -50%) rotate(15deg); 
    opacity: 0;
    
    z-index: 1; /* Fica atrás do texto */
    pointer-events: none; /* Ignora o mouse para não atrapalhar o clique */
    
    /* Transição suave e elástica para dar peso ao movimento */
    transition: all 0.6s cubic-bezier(0, 0, 0, 1);
    /* transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); */
    border-radius: 8px; /* Opcional: arredonda as bordas da capa do livro */
    /* box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Opcional: cria profundidade */
}

/* O Movimento no Desktop (Hover) */
.project-item:hover .project-hover-img {
    opacity: 1;
    /* Desliza no sentido da seta (para a direita) e arruma a rotação */
    transform: translate(10%, -50%) rotate(5deg); 
}
/* --- A BASE DO PROJETO (Desktop e Mobile) --- */
.project-item {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    padding: 50px 0; /* Altura padrão quando fechado */
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    text-decoration: none;
    color: inherit;
    overflow: hidden; /* Mantém as ilustrações contidas dentro da linha do projeto */
    transition: padding 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* No desktop, a linha cresce/expande ao passar o rato */
@media (min-width: 769px) {
    .project-item:hover {
        padding: 180px 0; /* Expande brutalmente a secção para revelar as artes */
    }
}

/* Traz os textos para a frente de tudo */
.project-name, .project-role {
    position: relative;
    z-index: 10;
}

/* --- O PALCO DAS ARTES (Background e Desenhos) --- */
.project-assets {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none; /* Para não bloquear o clique no projeto */
}

/* 1. O Background Inteiro (Fade in / Fade out) */
.proj-bg {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* 2. Os Desenhos Soltos (Prepara para o pulo) */
.proj-el {
    position: absolute;
    opacity: 0;
    width: clamp(80px, 15vw, 250px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Começam todos microscópicos e invisíveis no centro da faixa */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.1);
}

/* --- A MÁGICA DE APARIÇÃO (Hover no Desktop / Scroll no Mobile) --- */

/* Aparecimento do Background (Fica com 30% de opacidade para não matar a leitura do texto) */
.project-item:hover .proj-bg,
.project-item.is-active .proj-bg {
    opacity: 0.3; 
}

/* O Salto dos Elementos (Eles brotam do centro para direções aleatórias) */
.project-item:hover .el-1,
.project-item.is-active .el-1 {
    opacity: 1;
    /* Pula para cima e esquerda */
    transform: translate(-180%, -120%) rotate(-10deg) scale(1);
}

.project-item:hover .el-2,
.project-item.is-active .el-2 {
    opacity: 1;
    /* Pula para baixo e direita */
    transform: translate(80%, 20%) rotate(15deg) scale(1.2);
}

.project-item:hover .el-3,
.project-item.is-active .el-3 {
    opacity: 1;
    /* Pula reto para o topo */
    transform: translate(-20%, -160%) rotate(5deg) scale(0.9);
}

/* --- FOOTER --- */
.site-footer {
    padding: 100px 5% 50px 5%;
    background-color: #111;
    color: #F4F0EA;
    cursor: default;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 50px;
}

.bio-section { max-width: 500px; }

.illustrated-avatar {
    width: 120px;
    height: 120px;
    background-color: #333; /* Adicione sua ilustração aqui via background-image */
    border-radius: 50%;
    margin-bottom: 30px;
}

.bio-section p { font-size: 1.5rem; line-height: 1.4; margin-bottom: 30px; }

.contact-btn {
    display: inline-block;
    padding: 18px 40px;
    background-color: var(--accent-color);
    color: #111;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    transition: transform 0.3s ease;
}

.contact-btn:hover { transform: translateY(-5px); }

.legal-section { max-width: 450px; }

.anti-ai-badge {
    padding: 20px;
    border: 2px solid var(--accent-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
    border-radius: 8px;
}

.copyright { font-size: 0.85rem; opacity: 0.5; }

/* --- FUNDO ANIMADO (BLOB) --- */
.blob-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(226,95,56,0.3) 0%, rgba(76,175,80,0.2) 40%, rgba(244,240,234,0) 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1; /* Fica atrás do texto */
    animation: blobMove 15s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

@keyframes blobMove {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-30%, -60%) scale(1.2); }
    100% { transform: translate(-70%, -40%) scale(0.9); }
}

/* Garanta que o texto do Hero fique na frente do Blob */
.hero-content {
    position: relative;
    z-index: 10;
}

/* --- RESPONSIVIDADE & ANIMAÇÕES MOBILE --- */
@media (max-width: 768px) {
    /* Oculta o cursor customizado em telas de toque */
    .custom-cursor {
        display: none !important;
    }

    .section-title {
        text-align: center;
        padding: 50px 0;
        margin-bottom: 0;
        border-bottom: none;
    }

    /* Reduz a tipografia para caber na tela */
    .massive-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .project-name {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    /* Remove os espaçamentos da seção para os projetos colarem nas bordas */
    .gallery-section {
        padding: 0;
    }

    .project-item {
        height: 100vh; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 20px;
        border-bottom: none; /* Removemos a linha, a própria mudança de cor fará a divisão */
        scroll-snap-align: start;
    }

    .project-item:hover {
        padding-left: 20px; /* Anula o hover do desktop */
    }

    .project-role {
        margin-top: 15px;
        opacity: 0.8;
    }

    /* 
      Personagens no mobile: O tamanho é reduzido e eles 
      aparecem via classe controlada pelo JavaScript ao rolar. 
    */
    .hidden-char {
        width: clamp(100px, 30vw, 140px);
    }

    .char-left.is-visible {
        opacity: 1;
        transform: translate(-140%, -100%) rotate(-10deg) scale(1);
    }

    .char-right.is-visible {
        opacity: 1;
        transform: translate(-50%, -65%) rotate(5deg) scale(1);
        z-index: 500;
    }

    .project-hover-img {
        left: 50%; /* Centraliza mais no mobile */
        /* Inicia mais escondida */
        transform: translate(-50%, -30%) rotate(-5deg); 
    }

    /* Essa classe será adicionada pelo Javascript durante o scroll */
    .project-item.is-active .project-hover-img {
        opacity: 1;
        /* Desliza de baixo para cima/direita e rotaciona */
        transform: translate(-30%, -60%) rotate(5deg); 
    }
}