/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #fcfcfc;
    --color-text: #1a1a1a;
    --color-light-text: #666;
    --font-primary: 'Space Mono', 'Courier New', Courier, monospace;
    --spacing-xs: 0.25rem;
    /* Reduced to bring subtitle closer */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Hierarchy */
h1,
h2,
h3 {
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* Header */
.header {
    background-color: transparent;
    border-bottom: none;
    padding: var(--spacing-sm) 0 0 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.nav {
    display: flex;
    justify-content: flex-start;
    /* Alinhado à esquerda em vez de espalhado pelas bordas */
    align-items: center;
    gap: 0.5rem;
    /* Reduzido espaço entre HOME, separador e CONTATO */
    /* Espaço entre os links e o pipe */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.nav-link {
    font-size: 12pt;
    /* Reduzido para 12pt */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
    transition: color var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-light-text);
}

.nav-separator {
    font-size: 14pt;
    /* Restored to original size */
    font-weight: normal;
    color: var(--color-text);
    /* Removido light-text para ficar na mesma cor do link */
    user-select: none;
}

/* Main Content constraints */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Espaçamento exato de 138px abaixo de 'Diretor de Arte' */
/* Removido padding-top aqui pois usaremos margens no branding para simetria */
.main-content:not(.index-page) {
    padding-top: 0;
}

/* Header Branding */
.header-branding {
    width: 100%;
    max-width: 1400px;
    margin: 80px auto 50px auto;
    /* Reduzido para 50px para subir o conteúdo +10px adicionais */
    padding: 0 var(--spacing-md);
    text-align: left;
    /* Alinhado à esquerda */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Alinhado à esquerda */
    justify-content: center;
    gap: 0;
}

.header-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    /* Pequena margem antes do subtitulo */
    letter-spacing: -0.06em;
    /* Apertada a entreletra (de -0.02 para -0.06) */
}

.header-subtitle {
    font-size: 1.34rem;
    /* Antes era 1.122rem. Aumentei em aprox 20% */
    text-transform: none;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 0;
}

/* Project Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    /* Reduzido de 40px para 30px para padronização */
    padding-bottom: var(--spacing-xl);
}

/* Project Item & Hover Effects */
.project-item {
    display: block;
    overflow: hidden;
    position: relative;
    height: 440px;
    background-color: #000;
    border-radius: 20px;
    /* Unificado */
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #eee;
    /* placeholder background */
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}


.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

/* Efeito de dots LCD no overlay da Home */
.project-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.5;
    pointer-events: none;
}

.home-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.project-title {
    color: #fff;
    font-size: 1.1rem;
    text-transform: uppercase;
    /* Reduzido de 1.5rem para 1.1rem */
    font-weight: 400;
    transform: translateY(20px);
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
    opacity: 0;
    position: relative;
    z-index: 2;
}

/* Hover States */
.project-item:hover .project-image {
    transform: scale(1.05);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover .project-title {
    transform: translateY(0);
    opacity: 1;
}

/* -----------------------------
   PROJECT INDIVIDUAL PAGE
   ----------------------------- */

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    transition: color var(--transition-smooth);
}

.back-button:hover {
    color: var(--color-light-text);
}

/* Project Header (Hero) */
.project-header {
    margin-bottom: var(--spacing-lg);
}

.project-hero-image-v2 {
    width: 100%;
    margin-bottom: 0;
    /* Removido para não somar com o margin-top da legenda */
}

.project-hero-image-v2 img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    /* Unificado */
}

.project-hero-image {
    width: 100%;
    max-height: 80vh;
    object-fit: cover;
    margin-bottom: var(--spacing-lg);
    border-radius: 20px;
}

.project-info {
    max-width: 800px;
    margin: 0 0 var(--spacing-lg) 0;
    /* Alinhado à esquerda do container */
    text-align: left;
}

.project-page-title {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    letter-spacing: -0.05em;
    /* Bold aplicado */
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.project-description {
    font-size: 1rem;
    color: var(--color-text);
    max-width: 400px;
    /* Limitado na horizontal conforme pedido */
    margin-top: 5px;
    line-height: 1.6;
}

.project-content-text {
    max-width: 800px;
    margin: 20px 0 60px 0;
    /* 20px de distância e alinhado à esquerda */
    text-align: left;
    font-size: 1rem;
    color: var(--color-light-text);
    line-height: 1.6;
}

/* Project details grid */
/* .project-details removido (conforme solicitado eliminação dos blocos de texto) */

.detail-block h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-light-text);
    margin-bottom: 0.25rem;
}

.detail-block p {
    font-size: 0.95rem;
}

/* Project Gallery */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

/* Extra Project Row 1 (Asymmetric) */
.extra-row-asymmetric {
    display: flex;
    align-items: stretch;
    /* Garante que os containers tenham a mesma altura */
    gap: 30px;
    margin-bottom: 30px;
}

.extra-row-asymmetric>div:nth-child(1) {
    flex: 2.2;
    /* Banner horizontal (Mestra) */
}

.extra-row-asymmetric>div:nth-child(2) {
    flex: 1;
    /* Bloco vertical (Escrava) */
    position: relative;
    /* Base para o absoluto */
    overflow: hidden;
}

/* Row 2: Symmetric Grid */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 0;
    /* Removido para o gap com os vídeos ser controlado pelo margin-top do grid de vídeo */
}

/* Visual Consistency: Image 1 defines height, Image 2 matches and crops */
.extra-row-asymmetric>div:nth-child(1) img {
    width: 100%;
    height: auto;
    /* Define a altura da linha sem cortes */
    display: block;
    border-radius: 20px;
}

.extra-row-asymmetric>div:nth-child(2) img {
    position: absolute;
    /* Sai do fluxo para não afetar a altura */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Herda a altura do div pai (que foi esticado pela mestra) */
    object-fit: cover;
    /* Recorta o excesso vertical */
    display: block;
    border-radius: 20px;
}

.project-gallery-grid img,
.project-gallery-grid video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    /* Arredondamento moderno */
}

.project-gallery-grid .project-image {
    height: auto;
    object-fit: contain;
}

/* Specific grid for Vertical (9:16) videos side-by-side */
/* Colored video block - Respects margins */
/* Modern Video Block with Blurred Background */
.project-video-full-block {
    width: 100%;
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
    margin-top: 30px;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 20px;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    width: 110%;
    /* Levemente maior para não mostrar bordas ao desfoque */
    height: 110%;
    object-fit: cover;
    filter: blur(30px) brightness(0.4);
    transform: translate(-5%, -5%);
    /* Centraliza o vídeo ampliado */
}

/* Dots pattern overlay (LCD effect) */
.video-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.2px, transparent 1.2px);
    background-size: 5px 5px;
    z-index: 2;
    opacity: 0.8;
}

.video-foreground-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    /* Unificado para a sombra acompanhar */
}

.video-foreground-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    /* Arredondamento moderno */
}

/* Single Video Audio Toggle */
.audio-toggle-single {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 44px;
    height: 44px;
    background: #ccc;
    /* Cinza por padrão (muted) */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.audio-toggle-single svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.audio-toggle-single .unmute-icon {
    opacity: 0;
    transform: scale(0.8);
}

.audio-toggle-single .mute-icon {
    opacity: 1;
    transform: scale(1);
}

/* Estado Ligado (Preto) */
.audio-toggle-single.is-unmuted {
    background: #000;
    /* Preto quando ligado */
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.audio-toggle-single.is-unmuted .mute-icon {
    opacity: 0;
    transform: scale(0.8);
}

.audio-toggle-single.is-unmuted .unmute-icon {
    opacity: 1;
    transform: scale(1);
}

.audio-toggle-single:hover {
    transform: scale(1.05);
}

/* Override para o projeto Extra: Botão para fora do vídeo, à direita */
.project-video-full-block .audio-toggle-single {
    right: -60px;
    bottom: 0;
    /* Alinhado pela base do vídeo */
}

@media (max-width: 1200px) {
    .project-video-full-block .audio-toggle-single {
        right: 15px;
        /* Volta para dentro em telas menores */
        bottom: 15px;
    }
}

.project-video-vertical-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: var(--spacing-lg);
}

.project-video-vertical-grid .video-wrapper {
    width: 100%;
    max-width: 320px;
    /* Tamanho stories em desktop */
}

.project-video-vertical-grid video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 20px;
}

.project-gallery-grid .video-wrapper {
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrapper-full {
    width: 100%;
    margin-bottom: 0;
    /* Removido margin-bottom para controlar via legenda seguinte se houver */
}

.video-wrapper-full video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .header-branding {
        padding: 0 var(--spacing-md);
    }

    .project-details {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .project-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md) var(--spacing-md);
    text-align: left;
}

.copyright {
    font-size: 0.75rem;
    color: var(--color-light-text);
    letter-spacing: 0.02em;
}

/* Reveal On Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Lightbox / Image Zoom Styles
   ========================================================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform var(--transition-smooth), opacity 0.2s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: transform var(--transition-smooth);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 20px;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
    z-index: 10000;
    opacity: 0.7;
}

.lightbox-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-trigger {
    cursor: zoom-in;
}

/* ==========================================================================
   Contact Page Styles
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
    margin-top: 0;
    margin-bottom: var(--spacing-xl);
}

.contact-photo-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    background-color: #eee;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
    padding-top: 5px;
}

.contact-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-light-text);
    margin-bottom: 16px;
}

.contact-links {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 5px;
}

.contact-link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ddd;
    transition: color var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth);
    cursor: pointer;
}

.contact-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.5px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.contact-link-item:hover {
    color: #fff;
    background-color: var(--color-text);
    border-color: var(--color-text);
}

.contact-link-item:hover .contact-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}