/* Efeitos inspirados na demo Gerstner: mosaico de fotos, líquido, menu grande, busca, transição em pixels */

/* ---------- mosaico ---------- */
.mz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; display: block; cursor: crosshair; }
.tile.mz-on .mask { display: none; }
.tile.mz-on img, .work-img.mz-on img { opacity: 0; transition: none; }
html.js .tile.mz-on { clip-path: none !important; transition: none; }
html.js .work .work-img.mz-on { clip-path: none !important; }
.tile.mz-on { cursor: crosshair; }
.work-img.mz-on::after { z-index: 3; }
.tile .label { z-index: 4; }

/* ---------- líquido ---------- */
.lq { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.has-liquid { position: relative; overflow: hidden; isolation: isolate; }
.has-liquid > *:not(.lq):not(.px-edge) { position: relative; z-index: 1; }
.vision.has-liquid { overflow: visible; }
.vision.has-liquid .lq { overflow: hidden; }

/* "Por que a tmuzia?" em colunas líquidas */
.reasons .r { min-height: 380px; padding: 14px; border: 0; color: #fff; grid-template-rows: auto 1fr auto auto; gap: 8px; }
.reasons .r:first-child { border: 0; }
.reasons .r > span { color: #ffffffb0; }
.reasons .r b { grid-row: 3; font-weight: 800; font-size: clamp(18px, 2vw, 28px); letter-spacing: -.03em; line-height: 1; }
.reasons .r p { grid-row: 4; color: #f3f3f3; max-width: 28ch; margin-top: 2px; text-shadow: 0 1px 12px #0008; }
.reasons .r.has-liquid::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0) 78%); pointer-events: none; }
.reasons .r.has-liquid > * { z-index: 1; }

/* ---------- degraus de pixels ---------- */
.has-edge { position: relative; }
.px-edge { position: absolute; left: 0; right: 0; bottom: 100%; height: calc(var(--cs) * 3); display: flex; align-items: flex-end; overflow: hidden; pointer-events: none; z-index: 2; }
.px-edge i { flex: 0 0 var(--cs); background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 16ms); }
.px-edge.in i { transform: none; }

/* ---------- transição entre páginas ---------- */
.pt { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 500; pointer-events: none; }
html.pt-in::before { content: ""; position: fixed; inset: 0; background: #262525; z-index: 499; }
html.js body.leaving { opacity: 1; transform: none; transition: none; }

/* ---------- menu grande ---------- */
.nav-search { background: none; border: 0; padding: 6px 0; cursor: pointer; font-weight: 500; position: relative; }
.nav-search::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: currentColor; transition: right .25s; }
.nav-search:hover::after { right: 0; }
.brand .brand-dark { display: none; }
.site-header { transition: transform .45s cubic-bezier(.2,.7,.2,1), background .35s ease, color .35s ease; }
.site-header.mega-open { background: var(--ink); color: #fff; backdrop-filter: none; }
.site-header.mega-open .brand-light { display: none; }
.site-header.mega-open .brand-dark { display: block; }
.site-header.mega-open .btn { background: var(--lime); color: var(--lime-ink); }
.site-header .nav a, .site-header .nav button { transition: opacity .25s; }
.site-header.mega-open .nav > *:not(.hot) { opacity: .45; }
.mega { position: absolute; left: 0; right: 0; top: 100%; display: grid; grid-template-rows: 0fr; background: var(--ink); color: #fff; transition: grid-template-rows .55s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.mega-in { min-height: 0; overflow: hidden; }
.site-header.mega-open .mega { grid-template-rows: 1fr; pointer-events: auto; }
.mega-pane { display: none; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); padding: 26px var(--gutter) 34px; min-height: 340px; }
.mega-pane.on { display: grid; }
.mega-pane.on > * { animation: mgIn .6s cubic-bezier(.2,.8,.2,1) both; }
.mega-pane.on > *:nth-child(2) { animation-delay: .06s; } .mega-pane.on > *:nth-child(3) { animation-delay: .12s; } .mega-pane.on > *:nth-child(4) { animation-delay: .18s; }
@keyframes mgIn { from { opacity: 0; transform: translateY(14px); } }
.mg-col { display: grid; gap: 14px; align-content: start; }
.mg-span2 { grid-column: span 2; }
.mg-k { color: #8d8d8d; display: block; margin-bottom: 4px; }
.mg-col .mg-k:not(:first-child) { margin-top: 14px; }
.mg-big { display: grid; gap: 2px; }
.mg-big a { display: inline-block; font-weight: 600; font-size: clamp(20px, 2.1vw, 32px); letter-spacing: -.03em; line-height: 1.1; transition: color .2s, transform .3s cubic-bezier(.2,.8,.2,1); }
.mg-big a:hover { color: var(--lime); transform: translateX(6px); }
.mg-small { display: grid; gap: 4px; font-weight: 500; }
.mg-small a:hover { color: var(--lime); }
.mg-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gutter); }
.mg-list a { display: grid; grid-template-columns: 34px 1fr; padding: 9px 0; border-top: 1px solid #454444; font-weight: 600; font-size: 14px; letter-spacing: -.01em; transition: color .2s, padding .25s; }
.mg-list a em { font-style: normal; color: #8d8d8d; }
.mg-list a:hover { color: var(--lime); padding-left: 6px; }
.mg-card { position: relative; grid-column: 4; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 250px; padding: 14px; overflow: hidden; isolation: isolate; }
.mg-card.has-liquid::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 60%); }
.mg-card .mg-k { color: #ffffffc0; position: relative; z-index: 1; }
.mg-card b { position: relative; z-index: 1; font-weight: 800; font-size: clamp(22px, 2.3vw, 36px); letter-spacing: -.04em; line-height: .95; max-width: 14ch; }
.mg-card small { position: relative; z-index: 1; font-size: 12px; color: #e8e8e8; }
.mg-card::before { content: "↗"; position: absolute; right: 12px; top: 10px; z-index: 1; font-weight: 700; transition: transform .3s; }
.mg-card:hover::before { transform: translate(3px, -3px); }

/* ---------- busca ---------- */
.search { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; gap: 14px; padding: 14px var(--gutter) 24px; background: var(--paper); overflow-y: auto; clip-path: inset(0 0 100% 0); pointer-events: none; transition: clip-path .7s cubic-bezier(.77,0,.18,1); }
.search.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.sr-top { display: flex; justify-content: space-between; align-items: center; }
.sr-input { margin-top: clamp(40px, 12vh, 140px); width: 100%; border: 0; outline: 0; background: transparent; border-radius: 0; font-weight: 800; font-size: clamp(40px, 9vw, 150px); letter-spacing: -.05em; line-height: .95; text-transform: uppercase; padding: 0; -webkit-appearance: none; appearance: none; }
.sr-input::placeholder { color: #cfcfcb; }
.sr-input::-webkit-search-cancel-button { display: none; }
.sr-line { height: 2px; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.6,0,.2,1) .25s; }
.search.open .sr-line { transform: none; }
.sr-input:focus + .sr-line { background: var(--lime); }
.sr-hint { color: var(--mute); }
.sr-results { margin-top: 10px; }
.sr-results li { animation: mgIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 40ms); }
.sr-results a { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); transition: padding .25s, background .25s; }
.sr-results a:hover, .sr-results a:focus-visible { padding-left: 10px; background: linear-gradient(90deg, var(--lime) 0 4px, transparent 4px); outline: none; }
.sr-results a span { color: var(--mute); }
.sr-results a b { font-weight: 700; font-size: clamp(18px, 2.1vw, 32px); letter-spacing: -.03em; line-height: 1.05; }
.sr-results a i { font-style: normal; font-weight: 700; }

@media (max-width: 980px) {
  .mega { display: none; }
  .nav-search { text-align: left; }
  .mz { cursor: default; }
  .reasons .r { min-height: 300px; }
  .sr-results a { grid-template-columns: 1fr auto; } .sr-results a span { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .mega, .search, .sr-line, .px-edge i { transition: none; }
}

/* topo da home: 4 trabalhos grandes, na proporção dos mockups (16:9), em cores e inteiros */
.triptych { grid-template-columns: repeat(2, 1fr); row-gap: var(--gutter); }
.triptych .tile { aspect-ratio: 16 / 9; cursor: zoom-in; }
.triptych .tile img { scale: 1; filter: none; object-fit: cover; }
.triptych .tile:hover img { scale: 1; }
.triptych .tile .mz { cursor: zoom-in; }
.tile .open-hint { position: absolute; right: 10px; bottom: 10px; z-index: 4; background: var(--lime); color: var(--lime-ink); font-weight: 700; padding: 5px 9px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.tile:hover .open-hint, .tile:focus-visible .open-hint { opacity: 1; transform: none; }
@media (max-width: 980px) { .triptych { grid-template-columns: 1fr; } .tile .open-hint { opacity: 1; transform: none; right: 10px; top: 10px; bottom: auto; font-size: 0; padding: 6px 10px; } .tile .open-hint::before { content: "↗"; font-size: 14px; } }
