/* Fotos do topo, galeria de trabalhos, rodapé com logo e visualizador */

/* ---------- topo com fotos ---------- */
a.tile { display: block; color: inherit; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); scale: 1.12; transition: filter .7s ease, scale 1.2s cubic-bezier(.2,.8,.2,1), translate .35s ease-out; translate: calc(var(--mx, 0) * -12px) calc(var(--my, 0) * -8px + var(--py, 0) * 1px); }
.tile:hover img, .tile:focus-visible img { filter: none; scale: 1.04; }
.tile.t1, .tile.t2, .tile.t3 { background: var(--ink); }

/* ---------- logo ---------- */
.brand img { height: 28px; width: 159px; }

/* ---------- rodapé ---------- */
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 6px 0 70px; }
.foot-logo { height: 56px; width: auto; }
.foot-top span { color: #bdbdbd; font-weight: 500; }
/* só o ponto final do rodapé gigante é verde (as letras divididas herdam a cor do pai) */
.site-footer .giant span { color: inherit; }
.site-footer .giant span:not(.ch) { color: var(--lime); }

/* ---------- galeria de trabalhos ---------- */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 56px var(--gutter); padding: 70px var(--gutter) 0; }
.work:first-child { grid-column: 1 / -1; }
.work-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.work-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.work-img { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.work:first-child .work-img { aspect-ratio: 21 / 9; }
.work:first-child .work-img img { object-position: center 38%; }
.work-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .6s; }
.work-btn:hover img, .work-btn:focus-visible img { transform: scale(1.05); filter: none; }
.work-img::after { content: "Ampliar +"; position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; background: var(--paper); color: var(--ink); font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.work-btn:hover .work-img::after, .work-btn:focus-visible .work-img::after { opacity: 1; transform: none; }
.work-cap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; padding-top: 12px; }
.work-cap b { font-weight: 700; font-size: clamp(16px, 1.6vw, 24px); letter-spacing: -.02em; line-height: 1.05; }
.work-cap .n, .work-cap .t { color: var(--mute); }
html.js .work .work-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.77,0,.18,1); }
html.js .work.in .work-img { clip-path: inset(0 0 0 0); }

/* ---------- visualizador ---------- */
.lb { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: 14px var(--gutter) 18px; background: rgba(10,10,10,.94); color: #fff; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb-top, .lb-bot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lb-stage { position: relative; min-height: 0; overflow: hidden; }
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scale(.96); opacity: 0; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.lb.open .lb-stage img.ready { transform: none; opacity: 1; }
.lb-bot b { display: block; font-weight: 700; font-size: clamp(18px, 2vw, 30px); letter-spacing: -.03em; }
.lb-bot .lb-desc { display: block; color: #bdbdbd; margin-top: 4px; max-width: 70ch; }
.lb-nav { display: flex; gap: 8px; }
.lb .btn.ghost { background: #222; color: #fff; }
.lb .btn.ghost:hover { background: var(--lime); color: var(--lime-ink); }
body.lb-open { overflow: hidden; }

@media (max-width: 980px) {
  .works { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .work:first-child .work-img { aspect-ratio: 16 / 9; }
  .work-cap { grid-template-columns: auto 1fr; }
  .work-cap .t { grid-column: 2; }
  .foot-top { padding-bottom: 44px; }
  .lb-bot { flex-direction: column; align-items: flex-start; }
}

/* ---------- links do trabalho ---------- */
.work-links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.lb-visit[hidden] { display: none; }
