/* Coworka · animações sutis do site (motion.js liga a classe .mx-on no <html>).
   Só transform e opacity: não mexe em layout (CLS) nem atrasa o título do topo (LCP).
   Sem JavaScript ou com "reduzir movimento" ligado, nada fica escondido nem anima. */

:root {
  --mx-ease: cubic-bezier(.2, .7, .2, 1);
  --mx-dur: .7s;
}

/* Revelação ao rolar */
.mx-on .mx-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity var(--mx-dur) var(--mx-ease), transform var(--mx-dur) var(--mx-ease);
  transition-delay: var(--mx-delay, 0s);
  will-change: opacity, transform;
}
.mx-on .mx-reveal.mx-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Foto do topo: entra com um leve zoom (só transform) */
.mx-on .mx-hero-img img {
  animation: mx-zoom 1.4s var(--mx-ease) both;
}
@keyframes mx-zoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

/* Botões: sobem um pouco no hover */
.mx-btn {
  transition: transform .25s var(--mx-ease), box-shadow .25s var(--mx-ease), background-color .15s, color .15s, border-color .15s !important;
}
.mx-btn:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 10px 24px rgba(30, 30, 30, .14);
}
.mx-btn:active {
  transform: translate3d(0, 0, 0);
  box-shadow: none;
}

/* Cards: elevam no hover e a foto dá um zoom suave */
.mx-card {
  transition: transform .35s var(--mx-ease), box-shadow .35s var(--mx-ease), border-color .2s !important;
}
.mx-card:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 18px 40px rgba(30, 30, 30, .12);
}
.mx-card .mx-zoom {
  transition: transform .6s var(--mx-ease);
}
.mx-card:hover .mx-zoom {
  transform: scale(1.05);
}

/* Cards de unidade (seção "Preparamos para você com todo carinho"):
   o card inteiro é clicável. O próprio link "Ver unidade" se estende sobre o card
   (::before), então continua sendo um link só, para buscadores e leitores de tela. */
article[data-uf]:not(.pf-soon) {
  position: relative !important;
  transition: opacity var(--mx-dur) var(--mx-ease), transform .4s var(--mx-ease), box-shadow .4s var(--mx-ease), border-color .3s !important;
}
article[data-uf]:not(.pf-soon) a[href]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
article[data-uf]:not(.pf-soon) a[href] {
  transition: background-color .25s, color .25s !important;
  /* nunca transformar o link: com transform ele vira a referência do ::before,
     a área clicável encolhe para o botão e o hover entra em loop (pisca) */
  transform: none !important;
  box-shadow: none !important;
}
/* o card sobe 6px no hover: esta faixa invisível mantém o hover na borda de baixo */
article[data-uf]:not(.pf-soon):has(a[href])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
}
article[data-uf]:not(.pf-soon) [role="img"] {
  background-size: 100% !important;
  transition: background-size .7s var(--mx-ease) !important;
}
article[data-uf]:not(.pf-soon) h3 {
  transition: color .25s;
}
article[data-uf]:not(.pf-soon):has(a[href]):hover {
  transform: translate3d(0, -6px, 0);
  border-color: #EDD42D !important;
  box-shadow: 0 22px 44px rgba(30, 30, 30, .12) !important;
}
article[data-uf]:not(.pf-soon):hover [role="img"] {
  background-size: 108% !important;
}
article[data-uf]:not(.pf-soon):hover h3 {
  color: #1F6E7B !important;
}
article[data-uf]:not(.pf-soon):hover a[href] {
  background: #EDD42D !important;
  color: #1E1E1E !important;
}
article[data-uf]:not(.pf-soon) a[href]:focus-visible {
  outline: none;
}
article[data-uf]:not(.pf-soon):has(a[href]:focus-visible) {
  outline: 3px solid #EDD42D;
  outline-offset: 3px;
}

/* Menu: ganha sombra ao rolar a página */
.hdr .hdr-bar {
  transition: box-shadow .3s var(--mx-ease), background-color .3s;
}
.mx-scrolled .hdr .hdr-bar {
  box-shadow: 0 10px 30px rgba(30, 30, 30, .10);
}

/* Barra de progresso de leitura (posts do blog) */
.mx-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 80;
  background: #EDD42D;
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mx-on .mx-reveal { opacity: 1; transform: none; transition: none; }
  .mx-on .mx-hero-img img { animation: none; }
  .mx-btn:hover, .mx-card:hover, .mx-card:hover .mx-zoom, article[data-uf]:not(.pf-soon):hover { transform: none; }
  article[data-uf]:not(.pf-soon) [role="img"] { transition: none !important; }
  .mx-progress { display: none; }
}
