/* We Incorporadora · camada de movimento (nov/2026)
   Tudo aqui é progressivo: sem JS ou com "reduzir movimento" ligado, o site funciona parado. */

/* ---------- transição entre páginas (View Transitions) ---------- */
@view-transition { navigation: auto; }
.topo { view-transition-name: topo; }
::view-transition-old(root) { animation: vtSai .45s cubic-bezier(.7, 0, .3, 1) both; }
::view-transition-new(root) { animation: vtEntra .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vtSai { to { opacity: 0; transform: translateY(-24px); } }
@keyframes vtEntra { from { opacity: 0; transform: translateY(36px); } }
/* ao voltar no histórico, o caminho se inverte (a página que sai desce, a anterior volta de cima) */
:active-view-transition-type(volta)::view-transition-old(root) { animation-name: vtSaiVolta; }
:active-view-transition-type(volta)::view-transition-new(root) { animation-name: vtEntraVolta; }
@keyframes vtSaiVolta { to { opacity: 0; transform: translateY(24px); } }
@keyframes vtEntraVolta { from { opacity: 0; transform: translateY(-36px); } }

/* ---------- abertura com o logo (1ª visita da sessão) ---------- */
.we-intro {
  position: fixed; inset: 0; z-index: 200; background: var(--espresso);
  display: grid; place-items: center; pointer-events: none;
  animation: introSobe 1s cubic-bezier(.76, 0, .24, 1) 1.5s both;
}
.we-intro img { width: clamp(120px, 14vw, 190px); opacity: 0; animation: introLogo 1s cubic-bezier(.2, .7, .2, 1) .15s both; }
.we-intro .fio { position: absolute; left: 50%; bottom: 38%; width: 120px; height: 1px; margin-left: -60px; background: var(--laranja); transform: scaleX(0); transform-origin: left; animation: introFio .9s cubic-bezier(.65, 0, .35, 1) .5s both; }
@keyframes introLogo { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes introFio { to { transform: scaleX(1); } }
@keyframes introSobe { to { clip-path: inset(0 0 100% 0); } }
.we-intro { clip-path: inset(0 0 0 0); }

/* ---------- barra de progresso e cabeçalho que se esconde ---------- */
.progresso { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--laranja); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.topo { transition: background .4s var(--ease), padding .4s var(--ease), color .4s, transform .5s var(--ease); }
.topo.escondido { transform: translateY(-110%); }

/* ---------- títulos palavra por palavra ---------- */
.palavras .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.palavras .w > span { display: inline-block; transform: translateY(105%); transition: transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 40ms); }
.palavras.visto .w > span { transform: none; }

/* ---------- fotos que se revelam ----------
   O recorte fica na imagem, não na moldura: o IntersectionObserver ignora alvos 100% recortados. */
.cortina { background: transparent !important; }
.cortina > img, .cortina > video { clip-path: inset(0 0 100% 0); transform: scale(1.18); transition: clip-path .9s cubic-bezier(.76, 0, .24, 1), transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.cortina .ilustrativa, .cortina .selo-real { opacity: 0; transition: opacity .5s ease .7s; }
.cortina.visto > img, .cortina.visto > video { clip-path: inset(0 0 0 0); transform: scale(1); }
.cortina.visto .ilustrativa, .cortina.visto .selo-real { opacity: 1; }
.cortina.visto:hover > img { transform: scale(1.04); }
.pin-track .foto.cortina > img, .grade-ev .foto.cortina > img { clip-path: inset(0 100% 0 0); }
.pin-track .foto.cortina.visto > img, .grade-ev .foto.cortina.visto > img { clip-path: inset(0 0 0 0); }

/* ---------- parallax ---------- */
[data-parallax] { will-change: transform; }
.hero-home .foto, .pd-hero .foto, .cw-abertura .foto, .pd-proximo .foto { overflow: hidden; }
.hero-home .foto img, .hero-home .foto > .takes, .pd-hero .foto img, .pd-hero .foto video, .cw-abertura .foto img, .cw-abertura .foto video, .pd-proximo .foto img { height: 120%; }

/* ---------- vídeo de fundo ---------- */
.bg-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .bg-video { transition: transform 1.4s var(--ease); }
.selo-video { position: absolute; z-index: 3; right: var(--margem); top: 92px; display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); background: none; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.selo-video::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--laranja); animation: pulsa 1.6s ease-in-out infinite; }
.selo-video.pausado::before { animation: none; background: rgba(255,255,255,.6); }
@keyframes pulsa { 50% { opacity: .25; } }

/* ---------- indicador de rolagem no hero ---------- */
.rolar { position: absolute; z-index: 3; left: 50%; bottom: 22px; width: 1px; height: 54px; background: rgba(255,255,255,.25); overflow: hidden; }
.rolar::after { content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: var(--linho); animation: rolar 2s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes rolar { to { top: 100%; } }

/* ---------- faixa corrida (marquee) ---------- */
.faixa-corrida { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--fio-escuro); border-bottom: 1px solid var(--fio-escuro); padding: clamp(18px, 2.4vw, 34px) 0; background: var(--linho); }
.faixa-corrida .trilha { display: inline-flex; gap: clamp(30px, 4vw, 70px); animation: corre 38s linear infinite; padding-right: clamp(30px, 4vw, 70px); }
.faixa-corrida:hover .trilha { animation-play-state: paused; }
.faixa-corrida a, .faixa-corrida span { font-weight: 300; font-size: clamp(34px, 5.4vw, 86px); letter-spacing: -.04em; line-height: 1; display: inline-flex; align-items: center; gap: clamp(30px, 4vw, 70px); transition: color .3s; }
.faixa-corrida a::after, .faixa-corrida span::after { content: ""; width: .22em; height: .22em; border-radius: 50%; background: var(--laranja); display: inline-block; }
.faixa-corrida a:hover { color: var(--laranja); }
.faixa-corrida.escura { background: var(--cw-fundo-2); border-color: rgba(230,227,220,.14); color: var(--cw-claro); }
.faixa-corrida.escura span { font-size: clamp(22px, 2.6vw, 38px); }
.faixa-corrida.escura span::after { background: rgba(230,227,220,.35); width: .2em; height: .2em; }
@keyframes corre { to { transform: translateX(-50%); } }

/* ---------- galeria horizontal presa (Casa WE) ---------- */
.pin { position: relative; }
.pin-sticky { overflow-x: auto; scroll-snap-type: x mandatory; }
.pin-track { display: flex; gap: 6px; padding: clamp(50px, 6vw, 90px) var(--margem); width: max-content; }
.pin-track figure { margin: 0; flex: 0 0 auto; width: min(62vw, 900px); scroll-snap-align: start; }
.pin-track figure.ret { width: min(36vw, 430px); }
.pin-track .foto { height: min(72vh, 640px); background: #1b1512; }
.pin-track .foto img { width: 100%; height: 100%; object-fit: cover; }
.pin-track figcaption { margin-top: 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(230,227,220,.72); }
.pin.ativo .pin-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; scroll-snap-type: none; }
.pin.ativo .pin-track { will-change: transform; }
.pin .contador-pin { position: absolute; right: var(--margem); bottom: 28px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(230,227,220,.72); display: none; }
.pin.ativo .contador-pin { display: block; }
.pin.ativo + .cw-dica { display: none; }

/* ---------- cursor próprio ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--laranja); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, opacity .3s; display: grid; place-items: center; mix-blend-mode: normal; }
.cursor span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--linho); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor.link { width: 42px; height: 42px; margin: -21px 0 0 -21px; background: rgba(200, 100, 47, .25); }
.cursor.rotulo-on { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--laranja); }
.cursor.rotulo-on span { opacity: 1; }
.cursor.oculto { opacity: 0; }
html.tem-cursor, html.tem-cursor a, html.tem-cursor button { cursor: none; }
html.tem-cursor input, html.tem-cursor textarea, html.tem-cursor select { cursor: auto; }

/* ---------- visualizador em tela cheia ---------- */
.lb { position: fixed; inset: 0; z-index: 180; display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s; color: var(--linho); }
/* o fundo é uma camada própria: some enquanto a foto volta para a miniatura ou é arrastada para baixo */
.lb::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(14, 12, 10, .96); opacity: var(--fundo, 1); transition: opacity .35s var(--ease); }
.lb.arrastando::before { transition: none; }
.lb .lb-topo, .lb .lb-pe { transition: opacity .3s var(--ease); }
.lb.fechando .lb-topo, .lb.fechando .lb-pe { opacity: 0; }
.lb.fechando { pointer-events: none; }
.lb.aberto { opacity: 1; visibility: visible; }
.lb .lb-topo, .lb .lb-pe { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px var(--margem); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,237,228,.7); }
.lb .lb-pe { text-transform: none; letter-spacing: 0; font-size: 14px; }
.lb figure { margin: 0; display: grid; place-items: center; padding: 0 var(--margem); min-height: 0; touch-action: none; user-select: none; }
.lb img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; transition: opacity .25s ease-out; will-change: transform; -webkit-user-drag: none; }
.lb.arrastando figure { cursor: grabbing; }
.lb button { background: none; border: 1px solid rgba(242,237,228,.35); color: var(--linho); border-radius: 999px; padding: 10px 18px; cursor: pointer; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.lb button:hover { background: var(--linho); color: var(--espresso); }
.lb .navs { display: flex; gap: 8px; }
html.lb-on { overflow: hidden; }
.foto.ampliavel { cursor: zoom-in; }

/* ---------- trilhos arrastáveis ---------- */
.trilho.arrastando { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.trilho.arrastando img { pointer-events: none; }
.trilho.deslizando { scroll-snap-type: none; }

/* ---------- botões magnéticos ---------- */
.magnetico { transition: transform .4s var(--ease), scale .25s var(--ease), background .3s, color .3s; }

/* ---------- reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .we-intro, .cursor, .progresso, .rolar { display: none !important; }
  .palavras .w > span, .cortina > img, .cortina > video { transform: none !important; clip-path: none !important; transition: none !important; }
  .faixa-corrida .trilha, .selo-video::before { animation: none; }
  .pin.ativo .pin-sticky { position: static; height: auto; overflow-x: auto; }
}

.rolar { left: auto; right: var(--margem); bottom: auto; top: 46%; }
@media (max-width: 1000px) { .rolar { display: none; } .selo-video { top: 78px; } .take-legenda { top: 80px; max-width: calc(100% - 2 * var(--margem) - 140px); } .take-legenda .ilu { display: none; } }

/* ---------- menos transparência ---------- */
@media (prefers-reduced-transparency: reduce) {
  .topo.solido { background: var(--abismo) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .topo.solido.casa { background: var(--cw-fundo) !important; }
}
