/* ============================================================
   ProAgentes — movimento (revisao-sintra, fonte:
   docs/revisao-sintra/CATALOGO-MOVIMENTOS.md — M1..M27)
   Regra da casa: tudo aqui degrada para o estado final com
   prefers-reduced-motion e sem JS (as classes .anima são
   aplicadas pelo movimento.js; sem ele, nada fica invisível).
   ============================================================ */

/* ————— entrada em viewport (fade-rise da sintra, ~360ms) —————
   O JS marca o alvo com .anima (estado inicial) e troca para
   .in-view quando entra; o atraso de cascata vem em --anima-d. */
.anima {
  opacity: 0;
  transform: translateY(26px);
}
.anima.in-view {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--t-med, 360ms) var(--ease-smooth, ease),
    transform var(--t-slow, 520ms) var(--ease-emph, ease);
  transition-delay: var(--anima-d, 0ms);
}
/* pop com leve overshoot (M13) para CTAs e personagens de chamada */
.anima.is-pop { transform: translateY(18px) scale(0.96); }
.anima.is-pop.in-view {
  transform: translateY(0) scale(1);
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ————— personagem vivo (M1/M19/M27) —————
   Arte de camada única: respiração + balanço sutis, dessincronizados
   por slot via --vivo-d. O blink real chega com os WebM (o main.js já
   promove <img> → <video> quando o personagens.json apontar vídeo). */
@keyframes pa-vivo {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  30%      { transform: translateY(-4px) rotate(0.4deg) scale(1.006); }
  62%      { transform: translateY(-1px) rotate(-0.35deg) scale(1.003); }
}
.personagem-vivo > img,
.personagem-vivo picture img {
  animation: pa-vivo 7s ease-in-out infinite;
  animation-delay: var(--vivo-d, 0ms);
  transform-origin: 50% 88%;
  will-change: transform;
}
/* nos heros a arte cobre a tela: o balanço vira um Ken Burns lento (M4/M22) */
@keyframes pa-kenburns {
  0%, 100% { transform: scale(1.02) translateY(0); }
  50%      { transform: scale(1.065) translateY(-6px); }
}
.personagem-vivo.is-cena > img,
.personagem-vivo.is-cena picture img {
  animation: pa-kenburns 24s ease-in-out infinite;
  animation-delay: var(--vivo-d, 0ms);
  transform-origin: 50% 40%;
}

/* ————— parallax por scroll (M4/M22 — "fotos que reagem ao scroll") —————
   O JS escreve --par-y; a arte anda mais devagar que a página. */
[data-parallax] { overflow: hidden; }
[data-parallax] > img,
[data-parallax] .ph-personagem > img,
[data-parallax] .ph-personagem picture img {
  transform: translateY(var(--par-y, 0px)) scale(1.12);
  will-change: transform;
}

/* ————— tilt 3D que aplana ao centrar (M10) ————— */
.mock-browser, .mock-phone { transition: transform 200ms linear; }
.tilt-plano.mock-browser { transform: perspective(1800px) rotateY(4deg) rotateX(1deg); }
.tilt-plano.mock-phone { transform: perspective(1500px) rotateY(-7deg) rotateX(2deg) rotate(-0.5deg); }

/* ————— chips que caem em cascata (M5) —————
   estado inicial oculto só quando o JS está de pé (html.js-anima) */
html.js-anima .pose-chip { opacity: 0; transform: translateY(14px); }
.in-view .pose-chip, .pose-slot.in-view .pose-chip {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms var(--ease-smooth, ease), transform 420ms var(--ease-emph, ease);
}
.in-view .pose-chip.is-a { transition-delay: 220ms; }
.in-view .pose-chip.is-b { transition-delay: 440ms; }

/* ————— hover de cartão (M3/M11/M27) ————— */
@media (hover: hover) {
  .helper-card_video, .home-automations_card, .home-benefits_item,
  .helper-lp-hor-card_card, .testimonial_card {
    transition: transform 260ms var(--ease-smooth, ease), box-shadow 260ms var(--ease-smooth, ease);
  }
  .helper-card_video:hover { transform: translateY(-6px); }
  .home-benefits_item:hover, .helper-lp-hor-card_card:hover, .testimonial_card:hover {
    transform: translateY(-4px);
  }
}

/* ————— CTA fixo das páginas de produto (M20) ————— */
.cta-fixa {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 84px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(480px, calc(100vw - 32px));
  padding: 16px 34px;
  border-radius: var(--radius-pill, 1600px);
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 18px 44px -12px rgba(59, 130, 246, 0.55), 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms var(--ease-emph, ease), opacity 260ms var(--ease-smooth, ease), background 200ms ease;
}
.cta-fixa.is-visivel { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cta-fixa:hover { background: var(--accent-hover, #2563eb); }
.cta-fixa .seta { transition: transform 200ms var(--ease-smooth, ease); }
.cta-fixa:hover .seta { transform: translateX(4px); }
@media (max-width: 767px) { .cta-fixa { bottom: 12px; padding: 14px 24px; } }

/* ————— esquemático de integrações (M8) ————— */
.esquema_stage { position: relative; max-width: 1180px; margin: 0 auto; }
.esquema_svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.esquema_svg path {
  fill: none;
  stroke: rgba(148, 128, 190, 0.55);
  stroke-width: 1.5;
}
html.js-anima .esquema_svg path { stroke-dasharray: 620; stroke-dashoffset: 620; }
html.js-anima .esquema_stage.in-view .esquema_svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1100ms var(--ease-smooth, ease);
}
.esquema_stage.in-view .esquema_svg path:nth-of-type(2) { transition-delay: 140ms; }
.esquema_stage.in-view .esquema_svg path:nth-of-type(3) { transition-delay: 280ms; }
.esquema_stage.in-view .esquema_svg path:nth-of-type(4) { transition-delay: 420ms; }
.esquema_stage.in-view .esquema_svg path:nth-of-type(5) { transition-delay: 560ms; }
.esquema_stage.in-view .esquema_svg path:nth-of-type(6) { transition-delay: 700ms; }
.esquema_svg circle { fill: rgba(190, 172, 228, 0.9); }
html.js-anima .esquema_svg circle { opacity: 0; }
html.js-anima .esquema_stage.in-view .esquema_svg circle { opacity: 1; transition: opacity 300ms ease 900ms; }
.esquema_card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 208px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(24, 22, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(6px);
}
html.js-anima .esquema_card { opacity: 0; transform: translateY(16px); }
.esquema_stage.in-view .esquema_card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 380ms var(--ease-smooth, ease), transform 460ms var(--ease-emph, ease);
  transition-delay: var(--anima-d, 0ms);
}
.esquema_card .ico {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.esquema_card strong { display: block; font-size: 0.9375rem; font-weight: 500; color: #fff; line-height: 1.3; }
.esquema_card small { display: block; font-size: 0.78rem; color: rgba(255, 255, 255, 0.55); line-height: 1.3; }
@media (max-width: 991px) {
  .esquema_svg { display: none; }
  .esquema_card { position: static; min-width: 0; }
  .esquema_stage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .esquema_stage .home-brain_soshie { display: none; }
}

/* ————— depoimentos no formato review (M14) ————— */
.estrelas { display: inline-flex; gap: 3px; }
.estrelas svg { width: 18px; height: 18px; display: block; }
.testimonials_pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-pill, 1600px);
  background: #fff;
  color: #000;
  box-shadow: 0 12px 34px -10px rgba(0, 0, 0, 0.5);
  font-size: 0.9375rem;
  font-weight: 500;
}
.testimonials_pill .avatares { display: flex; }
.testimonials_pill .avatares img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}
.testimonials_pill .avatares img + img { margin-left: -10px; }
.testimonials_pill .divisor { width: 1px; height: 22px; background: rgba(0, 0, 0, 0.15); }
.testimonials_pill button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* colunas defasadas do mural (coluna do meio começa mais baixo, M14) */
@media (min-width: 992px) {
  .home-testimonials_grid > .coluna-defasada { margin-top: 56px; }
}

/* ————— rodapé: elenco vivo ————— */
.footera_visual .ph-personagem > img { transform-origin: 50% 100%; }

/* ————— scrub dos passos (M6): sem JS ou com reduced-motion,
   o pin longo vira seção normal (mata o vão morto) ————— */
@media (prefers-reduced-motion: reduce) {
  .anima, .anima.is-pop { opacity: 1; transform: none; transition: none; }
  .personagem-vivo > img, .personagem-vivo picture img,
  .personagem-vivo.is-cena > img, .personagem-vivo.is-cena picture img { animation: none; }
  [data-parallax] > img { transform: none; }
  .esquema_svg path { stroke-dashoffset: 0; transition: none; }
  .esquema_svg circle { opacity: 1; }
  .esquema_stage .esquema_card, .pose-chip { opacity: 1; transform: none; transition: none; }
  .how-it-works-phone_wrap, .helper-lp-phone_wrap { height: auto !important; }
  .how-it-works-phone_wrap .hiw_sticky, .helper-lp-phone_wrap .hiw_sticky { position: static; height: auto; padding: 48px 0; }
  .cta-fixa { transition: none; }
}
html.sem-js .how-it-works-phone_wrap, html.sem-js .helper-lp-phone_wrap { height: auto; }
html.sem-js .hiw_sticky { position: static; height: auto; padding: 48px 0; }
