/* ==========================================================================
   VERTEX — ESTILO DO SITE
   Você normalmente NÃO precisa mexer aqui. As cores principais estão logo
   abaixo, caso queira ajustar algum dia.
   ========================================================================== */

:root {
  --preto:   #000000;   /* fundo */
  --vermelho:#F91735;   /* destaque / contraste */
  --branco:  #FFFFFF;   /* textos */
  --gap:     6px;       /* espaçamento fino entre os projetos */
}

/* Fonte Inter (variável) — usa os arquivos da sua pasta "Tipografia" */
@font-face {
  font-family: 'Inter';
  src: url('../Tipografia/Inter-VariableFont_slnt%2Cwght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* a rolagem "1 rolada = próxima seção" é controlada pelo JavaScript */
}

body {
  background: var(--preto);
  color: var(--branco);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* cada parte principal é um ponto de encaixe da rolagem */
.hero, .secao, .contato { scroll-snap-align: start; }

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

/* Destaque em vermelho */
.vermelho { color: var(--vermelho); }


/* ==========================================================================
   TOPO — LOGO FIXA (canto superior ESQUERDO) + menu "Sobre" ao lado
   ========================================================================== */
.topo {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo-fixa {
  position: fixed;       /* padrão (ex.: página de projeto): canto sup. direito */
  top: 28px;
  right: 32px;
  z-index: 50;
  height: 38px;
  display: block;
  opacity: 1;
  transition: opacity .6s ease;
}
/* dentro do TOPO (página inicial e Sobre), a logo fica à esquerda, em fluxo */
.topo .logo-fixa {
  position: static;
  top: auto;
  right: auto;
}
.logo-fixa.aparecer { opacity: 1; }
.logo-fixa img { height: 100%; width: auto; display: block; }
.logo-fixa .logo-texto {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 22px;
}

/* menu "Sobre" — escondido durante a animação, surge junto com o resto */
.menu-sobre {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--branco);
  opacity: 0;                 /* começa invisível (intro) */
  transition: opacity .6s ease, color .3s ease;
  position: relative;
  padding-bottom: 2px;
}
.menu-sobre.aparecer { opacity: 1; }
.menu-sobre::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--vermelho);
  transition: width .3s ease;
}
.menu-sobre:hover { color: var(--vermelho); }
.menu-sobre:hover::after { width: 100%; }


/* ==========================================================================
   INTRO — logo no centro que vira "estrela cadente" até o canto sup. direito
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  background: var(--preto);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.intro.terminou { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }

.intro-logo {
  height: 50vh;            /* começa grande: metade da altura da tela */
  opacity: 0;
  transform: translate(0, 0) scale(1);
  /* a animação é controlada por classes adicionadas via JavaScript */
}
.intro-logo img { height: 100%; width: auto; display: block; }
.intro-logo .logo-texto {
  font-weight: 800;
  letter-spacing: 4px;
  font-size: 46px;
}

/* 1) aparece suave no centro */
.intro-logo.fade { animation: introFade 1.1s ease forwards; }
@keyframes introFade {
  from { opacity: 0; transform: scale(1.05); }
  to   { opacity: 1; transform: scale(1); }
}

/* 2) o voo até o canto é controlado pelo JavaScript (transform + transition),
   sempre com opacidade 1, para a logo nunca sumir durante o trajeto. */


/* ==========================================================================
   HERO — slides dos projetos em tela cheia + frase principal
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--preto);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.ativo { opacity: 1; }
.hero-slide img,
.hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* leve escurecida para o texto ficar legível */
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.05));
}

.hero-frase {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);  /* centralizado na vertical */
  max-width: 60%;
  z-index: 5;
  text-align: left;             /* alinhado à esquerda */
  font-weight: 800;
  font-size: clamp(36px, 7.8vw, 94px);
  line-height: 1.02;
  color: var(--branco);
}
.hero-frase span { display: block; }   /* uma palavra/parte por linha */
.hero-frase .vermelho { color: var(--vermelho); }

/* quando não há nenhum projeto ainda */
.hero-vazio {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 32px;
}

/* seta "role para baixo" */
.scroll-dica {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: .6;
  animation: subir 1.6s ease-in-out infinite;
}
@keyframes subir { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,6px)} }


/* ==========================================================================
   GRADE DE PROJETOS — 3 por linha, 16:9, espaçamento fino, última linha
   centralizada automaticamente
   ========================================================================== */
.secao { padding: 90px 32px; }

.secao-titulo {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .55;
  margin-bottom: 28px;
}

.grade {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centraliza a última linha incompleta */
  gap: var(--gap);
}
.projeto {
  /* 3 por linha considerando o espaçamento */
  width: calc((100% - 2 * var(--gap)) / 3);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #0a0a0a;
}
.projeto img,
.projeto video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease, filter .6s ease;
}
.projeto:hover img,
.projeto:hover video { transform: scale(1.04); filter: brightness(.7); }

/* vídeo de preview que toca ao passar o mouse (fica sobre a imagem) */
.projeto .preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.projeto:hover .preview-video { opacity: 1; }

/* título que surge ao passar o mouse */
.projeto-nome {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-weight: 700;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.projeto:hover .projeto-nome { opacity: 1; transform: translateY(0); }

.aviso-vazio {
  text-align: center;
  opacity: .4;
  font-size: 14px;
  padding: 40px 0;
}


/* ==========================================================================
   PARCEIROS — faixa de logos (parada se poucas, deslizando se muitas)
   ========================================================================== */
.parceiros-faixa {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.parceiros-trilho {
  display: flex;
  align-items: center;
  gap: 70px;
  width: max-content;
}
.parceiros-trilho.centralizado {
  width: 100%;
  justify-content: center;
}
.parceiros-trilho.deslizando { animation: deslizar 30s linear infinite; }
@keyframes deslizar {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* a lista é duplicada no JS */
}
.parceiro-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.6);
  opacity: .75;
  transition: opacity .3s ease, filter .3s ease;
}
.parceiro-logo:hover { opacity: 1; filter: grayscale(0) brightness(1); }


/* ==========================================================================
   CONTATO (rodapé) — esquerda alinhada à esquerda, direita à direita
   ========================================================================== */
.contato {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 40px;
  padding: 110px 32px 70px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.contato-esq { text-align: left; max-width: 480px; }
.contato-dir { text-align: right; margin-left: auto; }

.contato-convite {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 22px;
}

.contato-info { font-size: 16px; line-height: 1.9; }

/* redes sociais (logos clicáveis) */
.redes {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 16px;
}
.redes a {
  display: inline-flex;
  opacity: .8;
  transition: opacity .3s ease, transform .3s ease;
}
.redes a:hover { opacity: 1; transform: translateY(-2px); }
.redes svg { width: 24px; height: 24px; fill: var(--branco); }
.redes a:hover svg { fill: var(--vermelho); }


/* ==========================================================================
   BOTÕES — sem caixa. Só o texto. Linha fina vermelha ao passar o mouse.
   ========================================================================== */
.btn-texto {
  display: inline-block;
  background: none;
  border: none;
  color: var(--branco);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
}
.btn-texto::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--vermelho);
  transition: width .3s ease;
}
.btn-texto:hover { color: var(--vermelho); }
.btn-texto:hover::after { width: 100%; }


/* ==========================================================================
   POPUP (aparece após 10 segundos) — quadrado, minimalista, só texto
   ========================================================================== */
.popup-fundo {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.popup-fundo.aberto { display: flex; }

.popup {
  width: min(520px, 100%);
  max-height: 96vh;
  background: var(--preto);
  border: 1px solid rgba(255,255,255,.12);
  padding: 36px 40px;
  position: relative;
  /* sem scroll: tudo visível de uma vez */
}
.popup-fechar {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 22px;
  cursor: pointer;
  color: var(--branco);
  background: none; border: none;
  line-height: 1;
}
.popup-fechar:hover { color: var(--vermelho); }

.popup-titulo {
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 18px;
  color: var(--branco);
  max-width: 95%;
}

/* campos: só texto editável, com uma linha fininha embaixo */
.campo {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.18);
  color: var(--branco);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 0;
  margin-bottom: 10px;
  outline: none;
  transition: border-color .3s ease;
}
.campo::placeholder { color: rgba(255,255,255,.4); }
.campo:focus { border-bottom-color: var(--vermelho); }
textarea.campo { resize: none; min-height: 52px; }

/* escolhas (You language / Você é um) como texto clicável, sem botão */
.escolha-rotulo {
  font-size: 12px;
  letter-spacing: 1px;
  opacity: .5;
  margin: 8px 0 5px;
}
.escolhas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 6px;
}
.opcao {
  cursor: pointer;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  position: relative;
  padding-bottom: 2px;
  transition: color .25s ease;
}
.opcao::after {
  content:"";
  position:absolute; left:0; bottom:0;
  width:0; height:1px; background: var(--vermelho);
  transition: width .25s ease;
}
.opcao:hover { color: var(--branco); }
.opcao.selecionada { color: var(--vermelho); }
.opcao.selecionada::after { width: 100%; }

.popup-enviar { margin-top: 14px; }


/* ==========================================================================
   PÁGINA DE PROJETO (projeto.html)
   ========================================================================== */
.voltar {
  position: fixed;
  top: 28px; left: 32px;
  z-index: 50;
  font-size: 14px;
  letter-spacing: 1px;
}
.projeto-pagina { padding: 0 0 90px; margin: 0; }

/* layout em duas colunas: imagens empilhadas à esquerda, info à direita */
.proj-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;     /* bloco (imagens + textos) centralizado no site */
  gap: clamp(24px, 4vw, 70px);
  padding: 120px 32px 40px;
  flex-wrap: wrap;
}

/* coluna esquerda — imagens uma embaixo da outra (metade da largura do site) */
.proj-galeria {
  flex: 0 1 50%;
  max-width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.proj-midia {
  width: 100%;
  display: block;
  cursor: zoom-in;
  transition: opacity .3s ease;
}
.proj-midia:hover { opacity: .92; }

/* coluna direita — título, dados e descrição (acompanha a rolagem) */
.proj-info {
  flex: 0 1 330px;
  position: sticky;
  top: 110px;
}
.proj-info h1 {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 26px;
  word-break: break-word;
}
.proj-meta { list-style: none; margin: 0 0 26px; padding: 0; }
.proj-meta li {
  font-size: 14px;
  letter-spacing: .4px;
  margin-bottom: 12px;
  opacity: .9;
}
.proj-meta li span {
  text-transform: uppercase;
  opacity: .65;
}
.proj-desc {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
  opacity: .85;
  white-space: pre-line;        /* respeita as quebras de linha */
}


/* ==========================================================================
   LIGHTBOX — abrir a imagem em tela cheia e navegar com setas minimalistas
   (as setas ficam invisíveis e só aparecem ao passar o mouse na lateral)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.aberto { display: flex; }

.lb-midia { display: flex; align-items: center; justify-content: center; }
.lb-midia img,
.lb-midia video {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}

.lb-fechar {
  position: absolute;
  top: 20px; right: 26px;
  font-size: 30px;
  line-height: 1;
  color: var(--branco);
  background: none; border: none;
  cursor: pointer;
  opacity: .7;
  z-index: 3;
  transition: opacity .25s ease, color .25s ease;
}
.lb-fechar:hover { opacity: 1; color: var(--vermelho); }

/* zonas laterais (invisíveis) que revelam a seta ao passar o mouse */
.lb-zona {
  position: absolute;
  top: 0; bottom: 0;
  width: 25%;
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 2;
}
.lb-esq { left: 0;  justify-content: flex-start; padding-left: 26px; }
.lb-dir { right: 0; justify-content: flex-end;   padding-right: 26px; }

.lb-seta {
  opacity: 0;                    /* invisível por padrão */
  transition: opacity .25s ease;
  color: var(--branco);
  display: inline-flex;
}
.lb-seta svg { width: 38px; height: 38px; display: block; }
.lb-esq:hover .lb-seta,
.lb-dir:hover .lb-seta { opacity: .9; }


/* ==========================================================================
   PÁGINA SOBRE (sobre.html) — logo no topo esq., texto ao centro, foto abaixo
   ========================================================================== */
.sobre-pagina {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 150px 32px 90px;
}
.sobre-conteudo {
  max-width: 760px;
  width: 100%;
  text-align: center;
}
.sobre-titulo {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 30px;
}
.sobre-texto {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
  opacity: .9;
  text-align: left;
}
.sobre-texto p { margin-bottom: 18px; }

/* foto do diretor + legenda */
.sobre-foto {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.sobre-foto img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 0;     /* quadrada */
  display: block;
}
.sobre-cargo {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .65;
}


/* ==========================================================================
   CELULAR / TABLET
   ========================================================================== */
@media (max-width: 900px) {
  .projeto { width: calc((100% - var(--gap)) / 2); } /* 2 por linha */
  .hero-frase { max-width: 90%; }
  .contato-dir { text-align: left; margin-left: 0; }
  .redes { justify-content: flex-start; }

  /* página de projeto: info acima das imagens no celular/tablet */
  .proj-layout { padding-top: 100px; }
  .proj-galeria {
    flex-basis: 100%;
    max-width: 100%;
  }
  .proj-info {
    position: static;
    top: auto;
    order: -1;
    flex-basis: 100%;
  }
}
@media (max-width: 560px) {
  .projeto { width: 100%; }                          /* 1 por linha */
  .secao { padding: 60px 20px; }
  .hero-frase { left: 20px; bottom: 40px; }
}
