/* Páginas de projeto no computador: o scroll vertical anda para o lado (projeto-horizontal.js).
   No telemóvel / ecrãs pequenos nada disto se aplica: a página desce normalmente. */
html.hz-on .hz { position: relative; background: #262120; }
html.hz-on .hz-pin { position: sticky; top: 0; height: var(--hz-h, 100vh); overflow: hidden; }
html.hz-on .hz-track { display: flex; height: 100%; width: max-content; will-change: transform; }
html.hz-on .hz-track > * { flex: none; height: 100%; }
html.hz-on .hz-track > .conteudo-principal { width: 100vw; min-height: 0; }

/* painel 2: o projeto em grande */
.hz-ver { width: 78vw; display: flex; align-items: center; justify-content: center; padding: 11vh 3vw 13vh; background: #262120; }
.hz-ver-in { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 28px; overflow: hidden; background: rgba(243, 228, 221, .06); }
.hz-ver img { display: block; width: 100%; height: 100%; object-fit: contain; will-change: transform; }

/* painel 3: próximo projeto */
.hz-next { width: 100vw; display: flex; align-items: center; background: #262120; color: #F3E4DD; }
.hz-next a { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 5vw; width: 85.4%; margin: 0 auto; color: inherit; text-decoration: none; }
.hz-next-label { display: block; margin-bottom: 2.4vw; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(11px, .9vw, 15px); text-transform: uppercase; letter-spacing: .02em; opacity: .7; }
.hz-next-titulo { display: block; font-family: "Neufile Grotesk Extra Bold", sans-serif; font-weight: 800; font-size: clamp(44px, 7.4vw, 150px); line-height: 1; letter-spacing: -.045em; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.hz-next-seta { display: inline-block; margin-top: 2.6vw; font-size: clamp(22px, 2.4vw, 42px); transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.hz-next-img { display: block; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: rgba(243, 228, 221, .08); }
.hz-next-img img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.hz-next a:hover .hz-next-titulo { transform: translateX(1.2vw); }
.hz-next a:hover .hz-next-seta { transform: translate(.8vw, -.8vw); }
.hz-next a:hover .hz-next-img img { transform: scale(1.1); }

/* barra de progresso + dica */
.hz-barra { position: absolute; left: 7.3%; right: 7.3%; bottom: clamp(20px, 2.4vw, 40px); z-index: 6; display: flex; align-items: center; gap: 18px; color: #F3E4DD; pointer-events: none; }
.hz-barra-txt { font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(10px, .8vw, 13px); text-transform: uppercase; letter-spacing: .03em; opacity: .75; white-space: nowrap; transition: opacity .4s ease; }
.hz-barra-linha { position: relative; flex: 1; height: 1px; background: rgba(243, 228, 221, .28); }
.hz-barra-linha i { position: absolute; inset: 0; background: #F3E4DD; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hz-barra.is-end .hz-barra-txt { opacity: 0; }

/* ===== sem footer: o fim da página é o projeto seguinte ===== */
html.hz-on #footer-container { display: none; }
.hz-next-pull { display: flex; align-items: center; gap: 14px; margin-top: clamp(26px, 3vw, 56px); font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(10px, .8vw, 13px); text-transform: uppercase; letter-spacing: .03em; opacity: .8; }
.hz-next-pull i { position: relative; display: block; width: clamp(80px, 9vw, 160px); height: 1px; background: rgba(243, 228, 221, .28); overflow: hidden; }
.hz-next-pull i::after { content: ""; position: absolute; inset: 0; background: #F3E4DD; transform-origin: 0 50%; transform: scaleX(var(--n, 0)); }

/* ===== galeria: imagens soltas, desalinhadas (computador) ===== */
.hz-gal { position: relative; flex: none; background: #262120; }
.hz-fig {
  position: absolute; left: var(--x, 0); top: var(--y); height: var(--h); aspect-ratio: var(--ar, 4 / 3); margin: 0; overflow: hidden;
  border-radius: 0; background: none;
  opacity: 0; translate: 0 6vh; rotate: calc(var(--r) * 2.4);
  transition: opacity 1s ease, translate 1.3s cubic-bezier(.16, 1, .3, 1), rotate 1.5s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.hz-fig.is-in { opacity: 1; translate: 0 0; rotate: var(--r); }
.hz-fig img { display: block; width: 100%; height: 100%; object-fit: contain; will-change: transform; }

/* ===== sem scroll horizontal (telemóvel / ecrãs pequenos): a galeria desce como as outras imagens ===== */
.projeto-galeria { display: grid; gap: 14px; padding: 0 6% 56px; background: #262120; }
.projeto-galeria img { display: block; width: 100%; height: auto; border-radius: 14px; }
.projeto-galeria img:nth-child(odd) { width: 88%; }
.projeto-galeria img:nth-child(even) { width: 82%; margin-left: auto; }
html.hz-on .projeto-galeria { display: none; }
@media (prefers-reduced-motion: reduce) { .hz-fig { transition: none; opacity: 1; translate: 0 0; rotate: var(--r); } }


/* ===== avanço para o projeto seguinte: a imagem cresce até ser a página (sem fade nem fundo bege) ===== */
.hz-ghost { position: fixed; z-index: 40; margin: 0; overflow: hidden; pointer-events: none; background: #EADBD3; }
.hz-ghost-in { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.hz-ghost-in img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hz-ghost.is-photo .hz-ghost-in img { object-fit: cover; }
.hz-ghost-shade { 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)); }
html.hz-leaving .hz-next-label, html.hz-leaving .hz-next-seta, html.hz-leaving .hz-next-pull, html.hz-leaving .hz-barra { opacity: 0; transition: opacity .3s ease; }
html.hz-leaving .hz-next-titulo { opacity: 0; transform: translateX(-3vw); transition: opacity .45s ease, transform .8s cubic-bezier(.65, 0, .25, 1); }


/* galeria: a imagem sob o rato fica por cima das outras */
.hz-fig { will-change: transform; }
.hz-fig.is-hot { z-index: 3; }

/* "continua a fazer scroll": o painel inteiro reage ao scroll no fim (--n de 0 a 1) */
.hz-next a { --n: 0; }
.hz-next-img { transform: scale(calc(1 + var(--n) * .08)); transition: none; }
.hz-next-titulo { translate: calc(var(--n) * -1.6vw) 0; }
.hz-next-pull { gap: 16px; font-size: clamp(11px, .95vw, 15px); opacity: 1; }
.hz-next-pull i { width: clamp(110px, 12vw, 220px); height: 2px; background: rgba(243, 228, 221, .25); }


/* painel do projeto seguinte: mais espaço entre as partes */
.hz-next a { gap: 7vw; }
.hz-next-label { margin-bottom: 3.6vw; }
.hz-next-seta { margin-top: 3.8vw; }
.hz-next-pull { margin-top: clamp(48px, 5.4vw, 100px); }


/* ===== ecrãs pequenos: painel "próximo projeto" no fim, sem footer (como em computador) ===== */
.mn { display: none; }
html.mn-on .mn { display: block; position: relative; overflow: hidden; background: #262120; color: #F3E4DD; }
html.mn-on #footer-container { position: relative; height: 0; overflow: hidden; }   /* o botão fixo de idioma (dentro do footer) continua à vista */
html.mn-on .cta { display: none; }
.mn-a { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-height: 100vh; min-height: 100svh; box-sizing: border-box; padding: 110px 6% 90px; color: inherit; text-decoration: none; --n: 0; -webkit-tap-highlight-color: transparent; }
.mn-label { font-family: "Neufile Grotesk Regular", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; opacity: .75; }
.mn-titulo { font-family: "Neufile Grotesk Regular", sans-serif; font-weight: 500; font-size: clamp(44px, 14vw, 84px); line-height: 1; letter-spacing: -.045em; translate: calc(var(--n) * -6vw) 0; }
.mn-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: rgba(243, 228, 221, .08); transform: scale(calc(1 + var(--n) * .07)); }
.mn-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mn-pull { display: flex; align-items: center; gap: 14px; font-family: "Neufile Grotesk Regular", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.mn-pull i { position: relative; display: block; flex: 1; max-width: 160px; height: 2px; background: rgba(243, 228, 221, .25); overflow: hidden; }
.mn-pull i::after { content: ""; position: absolute; inset: 0; background: #F3E4DD; transform-origin: 0 50%; transform: scaleX(var(--n)); }
html.hz-leaving .mn-label, html.hz-leaving .mn-pull { opacity: 0; transition: opacity .3s ease; }
html.hz-leaving .mn-titulo { opacity: 0; transition: opacity .4s ease; }

.hz-veil { position: fixed; inset: 0; z-index: 41; background: #262120; pointer-events: none; opacity: 0; }

/* ===== Selos, desafio, como resolvemos, voltar, falar / projeto anterior ===== */
.pj-seals { list-style: none; margin: clamp(22px, 2vw, 34px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pj-seals a { display: block; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(243, 228, 221, .4); color: #F3E4DD; text-decoration: none; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(12px, .9vw, 14px); transition: background .3s, color .3s, border-color .3s; }
.pj-seals a:hover, .pj-seals a:focus-visible { background: #F3E4DD; border-color: #F3E4DD; color: #262120; }

.pj-extra { background: #262120; color: #F3E4DD; padding: 56px 6%; }
.pj-extra-in { display: grid; grid-template-columns: 1fr; gap: 36px; }
.pj-ex-col h2 { margin: 0 0 18px; font-family: "Neufile Grotesk Regular", sans-serif; font-weight: 400; font-size: clamp(11px, .95vw, 15px); text-transform: uppercase; letter-spacing: .04em; opacity: .6; }
.pj-ex-col p { margin: 0 0 1em; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(17px, 1.6vw, 28px); line-height: 1.42; letter-spacing: -.01em; opacity: .92; max-width: 30em; }
html.hz-on .hz-track > .pj-extra { width: 92vw; display: flex; align-items: center; padding: 0 5vw 0 7.3vw; }
html.hz-on .pj-extra-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 7vw; width: 100%; }

.pj-back { position: fixed; left: 7.3%; bottom: clamp(56px, 5.6vw, 96px); z-index: 30; display: inline-flex; align-items: center; gap: .6em; height: clamp(36px, 2.8vw, 46px); padding: 0 clamp(16px, 1.4vw, 24px); border-radius: 999px; background: #F3E4DD; color: #262120; text-decoration: none; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(13px, 1vw, 16px); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: background .3s, color .3s, opacity .4s, transform .3s; }
.pj-back:hover { background: #fff; transform: translateX(-3px); }
html.hz-leaving .pj-back { opacity: 0; pointer-events: none; }
@media (max-width: 1300px) { .pj-back { position: absolute; left: 6%; top: 84px; bottom: auto; box-shadow: none; } }
@media (max-width: 1300px) { .pj-extra { padding-top: 16px; } html.pf-page .container-layout { padding-top: 150px; } }

.hz-next { position: relative; }
.pj-links { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.hz-next .pj-links { position: absolute; left: 7.3%; right: 7.3%; bottom: clamp(70px, 6.8vw, 116px); z-index: 3; }
.pj-cta2 { display: inline-flex; align-items: center; gap: .6em; height: clamp(44px, 3.4vw, 56px); padding: 0 clamp(20px, 2vw, 34px); border-radius: 999px; background: #F3E4DD; color: #262120; text-decoration: none; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(14px, 1.1vw, 18px); transition: background .3s, transform .3s; }
.pj-cta2:hover { background: #fff; } .pj-cta2 i { font-style: normal; font-variant-emoji: text; transition: transform .3s; } .pj-cta2:hover i { transform: translate(3px, -3px); }
.pj-prev { display: block; text-align: right; color: #F3E4DD; text-decoration: none; }
.pj-prev span { display: block; font-family: "Neufile Grotesk Regular", sans-serif; font-size: clamp(10px, .8vw, 13px); text-transform: uppercase; letter-spacing: .06em; opacity: .6; margin-bottom: 4px; }
.pj-prev b { display: block; font-family: "Neufile Grotesk Regular", sans-serif; font-weight: 400; font-size: clamp(18px, 1.6vw, 28px); letter-spacing: -.03em; transition: transform .4s; }
.pj-prev:hover b { transform: translateX(-6px); }
html:not(.hz-on) .pj-links { background: #262120; padding: 0 6% 80px; }
html.hz-leaving .pj-links { opacity: 0; transition: opacity .3s; }
.pj-extra ~ .mn .mn-a, .mn-a { justify-content: flex-start; padding-top: 24px; }
@media (max-width: 1300px) { .pj-extra ~ .mn .mn-a, .mn-a { min-height: 0; padding-bottom: 40px; } }
@media (max-width: 1300px) { .pj-extra { padding-top: 56px; } html.pf-page .imagem-direita.is-photo + * , .pj-extra { scroll-margin-top: 0; } }
