/* Página de projeto individual (todas as línguas) */
.conteudo-principal {
  width: 85.4%;
  margin: 150px auto;
  font-family: 'Neufile Grotesk Extra Bold', sans-serif;
  color: #333;
}

.container-layout {
  display: flex;
  align-items: center;
  gap: 60px;
  margin: 0 auto;
  justify-content: space-between;
}

.conteudo-esquerdo {
  flex: 1;
  max-width: 33%;
}

.titulo-principal {
  font-size: 48px;
  font-family: 'Neufile Grotesk Extra Bold', sans-serif;
  color: #333;
  margin-bottom: 50px;
  line-height: 1.2;
}

.texto-descritivo {
  font-size: 18px;
  font-family: 'Neufile Grotesk Regular', sans-serif;
  line-height: 1.6;
  color: #555;
}

.texto-descritivo-bold {
  font-size: 18px;
  font-family: 'Neufile Grotesk Bold', sans-serif;
  line-height: 1.6;
  color: #555;
}

.texto-adicional {
  font-size: 16px;
  font-family: 'Neufile Grotesk Regular', sans-serif;
  line-height: 1.6;
  color: #666;
}

.imagem-direita {
  flex: 1;
  max-width: 66%;
}

.imagem-direita img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 800px;
  object-fit: contain;
}

.imagem-projeto {
  width: 100%;
  height: auto;
}

@media (max-width: 1600px) {
  .conteudo-esquerdo,
  .imagem-direita { max-width: 50%; }
}

@media (max-width: 1300px) {
  .conteudo-principal { margin: 40px auto; }

  .container-layout {
    flex-direction: column;
    gap: 40px;
    align-items: flex-start;
  }

  .conteudo-esquerdo { max-width: 100%; }

  .titulo-principal { font-size: 40px; }

  .texto-descritivo { font-size: 16px; }
  .texto-adicional  { font-size: 14px; }

  .imagem-direita {
    max-width: 100%;
    align-self: flex-start;
  }

  .imagem-direita img { max-height: 500px; }
}

@media (max-width: 768px) {
  .conteudo-principal {
    width: 88%;
    margin: 30px auto;
  }

  .container-layout { gap: 30px; }

  .titulo-principal {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .texto-descritivo { margin-bottom: 15px; }

  .imagem-direita img {
    max-width: 100%;
    max-height: 360px;
  }
}

@media (max-width: 480px) {
  .conteudo-principal { margin: 20px auto; }

  .container-layout { gap: 25px; }

  .titulo-principal {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .texto-descritivo {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .texto-adicional { font-size: 13px; }

  .imagem-direita img { max-height: 280px; }
}

/* ===== Página de projeto: banner a toda a largura, header e texto em bege ===== */
html.pf-page .conteudo-principal {
  position: relative;
  width: 100%;
  min-height: max(100vh, 640px);
  margin: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #262120;
  color: #F3E4DD;
}
html.pf-page .container-layout {
  position: static;           /* o banner (.imagem-direita) posiciona-se em relação ao .conteudo-principal */
  width: 85.4%;
  margin: 0 auto;
  padding: 150px 0 90px;
}
html.pf-page .conteudo-esquerdo { position: relative; z-index: 2; max-width: 34%; }
html.pf-page .titulo-principal,
html.pf-page .texto-descritivo,
html.pf-page .texto-descritivo-bold,
html.pf-page .texto-adicional { color: #F3E4DD; }
html.pf-page .texto-descritivo,
html.pf-page .texto-adicional { opacity: .86; }

/* imagem = banner (à direita; nos projetos de foto ocupa tudo) */
html.pf-page .imagem-direita {
  position: absolute;
  inset: 0 0 0 40%;
  max-width: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 4% 70px 0;
}
html.pf-page .imagem-direita img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
html.pf-page .imagem-direita.is-light img { border-radius: 22px; }

html.pf-page .imagem-direita.is-photo { inset: 0; padding: 0; }
html.pf-page .imagem-direita.is-photo img { object-fit: cover; }
html.pf-page .imagem-direita.is-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 19, 17, .88) 0%, rgba(24, 19, 17, .78) 42%, rgba(24, 19, 17, .5) 68%, rgba(24, 19, 17, .28) 100%), linear-gradient(rgba(24, 19, 17, .18), rgba(24, 19, 17, .18));
}

/* header por cima do banner, em bege */
html.pf-page #header-container { position: absolute; top: 0; left: 0; width: 100%; z-index: 5; }
html.pf-page #header-container img {
  filter: brightness(0) invert(1) sepia(.16) saturate(1.1) brightness(.97);
}
html.pf-page .idioma-banner { mix-blend-mode: normal; }

@media (max-width: 1300px) {
  html.pf-page .conteudo-principal { display: block; min-height: 0; }
  html.pf-page .container-layout { padding: 130px 0 56px; }
  html.pf-page .conteudo-esquerdo { max-width: 100%; }
  html.pf-page .imagem-direita,
  html.pf-page .imagem-direita.is-photo { position: relative; inset: auto; max-width: 100%; padding: 0; margin-top: 8px; }
  html.pf-page .imagem-direita img { height: auto; max-height: 520px; }
  html.pf-page .imagem-direita.is-photo img { aspect-ratio: 4 / 3; max-height: none; border-radius: 18px; }
  html.pf-page .imagem-direita.is-photo::after { display: none; }
}

/* ----- chegada vinda do portefólio: continua o escurecimento da transição e desfaz-se sobre o banner ----- */
html.pf-arrive::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;   /* abaixo do menu, dos idiomas e dos cookies */
  pointer-events: none;
  background: #262120;
  animation: pfArrive 1s cubic-bezier(.4, 0, .2, 1) .1s forwards;
}
html.pf-arrive.pf-photo::before {
  background: linear-gradient(rgba(38, 33, 32, .5), rgba(38, 33, 32, .5)), var(--pf-img) center / cover no-repeat;
}
@keyframes pfArrive { to { opacity: 0; visibility: hidden; } }

/* ----- entrada em cascata (header só opacity: transform deslocava o seletor de línguas fixo) ----- */
@keyframes pfRise  { from { opacity: 0; transform: translateY(32px); } }
@keyframes pfFade  { from { opacity: 0; } }
@keyframes pfPhoto { from { opacity: 0; transform: translateY(32px) scale(.97); } to { opacity: 1; transform: none; } }
html.pf-page #header-container { animation: pfFade 1.1s ease .05s backwards; }
html.pf-page .conteudo-esquerdo > *,
html.pf-page #footer-container { animation: pfRise 1.2s cubic-bezier(.16, 1, .3, 1) backwards; }
html.pf-page .conteudo-esquerdo > :nth-child(1) { animation-delay: .25s; }
html.pf-page .conteudo-esquerdo > :nth-child(2) { animation-delay: .4s; }
html.pf-page .conteudo-esquerdo > :nth-child(3) { animation-delay: .5s; }
html.pf-page .conteudo-esquerdo > :nth-child(n+4) { animation-delay: .6s; }
html.pf-page #footer-container { animation-delay: .8s; }
html.pf-page .imagem-direita { opacity: 0; animation: pfPhoto 1.3s cubic-bezier(.16, 1, .3, 1) 1.6s forwards; }
html.pf-page .imagem-direita.is-in { animation: pfPhoto 1.3s cubic-bezier(.16, 1, .3, 1) .35s both; }

@media (prefers-reduced-motion: reduce) {
  html.pf-arrive::before { display: none; }
  html.pf-page #header-container, html.pf-page .conteudo-esquerdo > *, html.pf-page #footer-container,
  html.pf-page .imagem-direita, html.pf-page .imagem-direita.is-in { animation: none; opacity: 1; }
}
html.pf-page .idioma-botao:not(.ativo) { opacity: .55; }

/* chegada "sem costura" (vinda do portefólio em ecrã largo): a página abre já no estado final da transição */
html.pf-arrive.pf-seamless::before { display: none; }
html.pf-seamless .imagem-direita { opacity: 1; animation: none; }
html.pf-seamless .imagem-direita.is-in { animation: none; }

/* o header único tem o logo escuro: nas páginas de projeto (fundo escuro) fica claro, como o antigo */
html.pf-page .sh-logo img { filter: brightness(0) invert(1); }

@media (max-width: 767px) { html.pf-page .container-layout { width: 88%; } }

/* páginas de projeto: o bloco escuro do projeto e o do CTA do footer juntam-se (sem faixa bege no meio) */
html.pf-page .cta { margin-top: 0; }


/* projetos de foto em ecrãs pequenos: a foto é o fundo (como em computador), com o texto por cima */
@media (max-width: 1300px) {
  html.pf-page .conteudo-principal:has(.imagem-direita.is-photo) { display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh; }
  html.pf-page .conteudo-principal:has(.imagem-direita.is-photo) .container-layout { padding: 130px 0 124px; }   /* o texto fica acima do botão de idioma e do de cookies */
  html.pf-page .imagem-direita.is-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; z-index: 1; }
  html.pf-page .imagem-direita.is-photo img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
  html.pf-page .imagem-direita.is-photo::after { display: block; background: linear-gradient(180deg, rgba(24, 19, 17, .55) 0%, rgba(24, 19, 17, .4) 32%, rgba(24, 19, 17, .9) 100%); }
}


/* fundo escuro também ao puxar a página (overscroll) em ecrãs pequenos e no scroll horizontal: nunca aparece o bege */
@media (max-width: 1300px) {
  html.pf-page:not(.mn-off), html.pf-page:not(.mn-off) body { background: #262120; }
}
html.pf-page.hz-on, html.pf-page.hz-on body { background: #262120; }

/* ===== Texto da página de projeto: maior e a acompanhar a largura do ecrã ===== */
html.pf-page .titulo-principal {
  font-size: clamp(34px, 3.7vw, 76px);
  margin-bottom: clamp(20px, 2.2vw, 44px);
}
html.pf-page .texto-descritivo,
html.pf-page .texto-descritivo-bold {
  font-size: clamp(16.5px, 1.4vw, 26px);
  line-height: 1.5;
}
html.pf-page .texto-adicional { font-size: clamp(15px, 1.25vw, 22px); }
html.pf-page .texto-descritivo { margin-bottom: .8em; }
@media (min-width: 1301px) {
  html.pf-page .conteudo-esquerdo { max-width: 38%; }
}

/* projetos com imagem de fundo (sem imagem ao lado do texto): o texto pode ocupar mais largura */
@media (min-width: 1301px) {
  html.pf-page .conteudo-principal:has(.imagem-direita.is-photo) .conteudo-esquerdo { max-width: 56%; }
}

/* texto da página de projeto em branco */
html.pf-page .titulo-principal,
html.pf-page .texto-descritivo,
html.pf-page .texto-descritivo-bold,
html.pf-page .texto-adicional { color: #fff; opacity: 1; }
