/* =============================================================================
   site-motion.css — movimento do site público. Só CSS, sem biblioteca.

   A regra (13/11/2026): movimento pequeno e com função, como no sistema.
     · o que entra na tela sobe poucos pixels e aparece (ys-reveal, site.css);
     · o que responde ao ponteiro muda de cor, de borda ou sobe 2 px;
     · nada pisca, flutua ou se repete sozinho, a não ser o zoom muito lento da
       foto do hero;
     · o título principal NUNCA nasce invisível: ele é a maior peça da primeira
       dobra, e escondê-lo atrasava a pintura medida pelos buscadores (LCP).

   Tudo dentro de prefers-reduced-motion: no-preference. Sem preferência de
   movimento, nada se move e nada nasce escondido.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* ---------- Transição entre páginas (navegadores com View Transitions) ---------- */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: ys-vt-out .22s var(--ys-ease) both; }
  ::view-transition-new(root) { animation: ys-vt-in .38s var(--ys-ease) both; }
  @keyframes ys-vt-out { to { opacity: 0; } }
  @keyframes ys-vt-in { from { opacity: 0; transform: translateY(8px); } }

  /* ---------- Cabeçalho ---------- */
  body.ys .ys-header { transition: height .3s var(--ys-ease), border-color .25s, box-shadow .25s, background .25s; }
  body.ys .ys-header.is-scrolled { height: 64px; background: rgba(255,255,255,.94); }
  body.ys .ys-logo img { transition: transform .3s var(--ys-ease); }
  body.ys .ys-header.is-scrolled .ys-logo img { transform: scale(.88); }
  body.ys .ys-nav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--ys-blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ys-ease); }
  body.ys .ys-nav a:hover::after, body.ys .ys-nav a.is-active::after { transform: scaleX(1); }

  /* ---------- Hero ----------
     O título pinta na hora, parado. O apoio, os botões, a foto e a faixa chegam em
     seguida, cada um um passo depois do outro. */
  html.js body.ys .ys-hero-text > :not(.ys-h1) { animation: ys-up .6s var(--ys-ease) both; }
  html.js body.ys .ys-hero-text > :nth-child(2) { animation-delay: .08s; }
  html.js body.ys .ys-hero-text > :nth-child(3) { animation-delay: .16s; }
  html.js body.ys .ys-hero-art { animation: ys-art .8s var(--ys-ease) .1s both; }
  html.js body.ys .ys-hero-text > :nth-child(4) { animation-delay: .22s; }
  html.js body.ys .ys-hero-text > :nth-child(5) { animation-delay: .3s; }
  body.ys .ys-hero-photo { animation: ys-kenburns 26s ease-in-out infinite alternate; }
  html.js body.ys .ys-pagehero > .ys-container > * > :not(h1) { animation: ys-up .6s var(--ys-ease) both; }
  /* Nas páginas de soluções a ilustração está na primeira dobra: nasce inteira e visível
     (só sobe um pouco), para não atrasar a pintura principal da página. */
  html.js body.ys .ys-pagehero-art { animation: ys-sobe .7s var(--ys-ease) both; }
  html.js body.ys .ys-pagehero-art .ys-reveal, html.js body.ys .ys-pagehero-art .ys-cena [style*="--i"] { opacity: 1; transform: none; transition: none; }
  html.js body.ys .ys-pagehero-art .ys-cena .ys-c-col-b i { transform: none; transition: none; }
  html.js body.ys .ys-pagehero-art .ys-cena .ys-c-barra i { width: var(--p); transition: none; }

  @keyframes ys-sobe { from { transform: translateY(14px); } to { transform: none; } }
  @keyframes ys-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes ys-art { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes ys-kenburns { from { transform: scale(1); } to { transform: scale(1.04); } }

  /* ---------- Botões: brilho que atravessa no hover ---------- */
  body.ys .ys-btn { position: relative; overflow: hidden; isolation: isolate; }
  body.ys .ys-btn::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%; transform: skewX(-22deg); background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent); transition: left .55s var(--ys-ease); pointer-events: none; z-index: -1; }
  body.ys .ys-btn:hover::after { left: 135%; }
  body.ys .ys-btn-ghost::after { background: linear-gradient(100deg, transparent, rgba(39,100,180,.12), transparent); }
  body.ys .ys-link svg { transition: transform .3s var(--ys-ease); }

  /* ---------- Cartões clicáveis: sobem 2 px, como no sistema ---------- */
  body.ys .ys-card, body.ys .ys-related-grid a { transition: transform .3s var(--ys-ease), box-shadow .3s var(--ys-ease), border-color .3s, background .3s; }

  /* ---------- Ilustrações de produto: as peças entram em sequência, uma vez ----------
     Cada peça traz a sua ordem em --i (posta no HTML). A cena inteira já sobe com o
     ys-reveal; aqui as peças de dentro chegam uma depois da outra, contando a ideia:
     a publicação, a seta, o prazo. Nada fica repetindo. */
  html.js body.ys .ys-cena [style*="--i"] { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ys-ease), transform .5s var(--ys-ease); transition-delay: calc(var(--i) * 110ms + 180ms); }
  html.js body.ys .ys-cena.is-in [style*="--i"] { opacity: 1; transform: none; }
  /* As barras crescem de baixo para cima e a faixa de parcelas enche. */
  html.js body.ys .ys-cena .ys-c-col-b i { opacity: 1; transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--ys-ease); transition-delay: calc(var(--i) * 90ms + 200ms); }
  html.js body.ys .ys-cena.is-in .ys-c-col-b i { transform: scaleY(1); }
  html.js body.ys .ys-cena .ys-c-barra i { width: 0; transition: width 1s var(--ys-ease) 1s; }
  html.js body.ys .ys-cena.is-in .ys-c-barra i { width: var(--p); }

  /* ---------- YURIS que nasce do logo: uma passada, quando a palavra entra na tela ----------
     A estrela do logo se forma no centro do palco, vai para o lugar do Y e vira a letra:
       0,0 s   o medalhão da balança gira e aparece;
       0,3 s   as três lâminas se abrem a partir dele (esquerda, direita, de baixo);
       1,0 s   os três arcos do anel giram até o lugar;
       1,85 s  a estrela pronta desliza para o lugar do Y;
       2,35 s  "URIS" é escrito, uma letra a cada 0,13 s;
       3,0 s   a estrela vira a letra Y (ela some encolhendo, o Y aparece no lugar);
       3,3 s   a frase de baixo se abre do centro;
       3,65 s  o brilho azul e prata atravessa a palavra (quem move é o site.js, por --b).
     Depois a palavra só responde ao ponteiro (is-pronta): inclina de leve e o brilho anda junto.
     Sem movimento aceito, a palavra nasce inteira e parada, sem estrela. */
  html.js body.ys .ys-origem-word.is-logo .ys-e { visibility: visible; }
  html.js body.ys .ys-origem-estrela { opacity: 1; transform: translateX(var(--dx, 0px)) scale(1.2); }
  html.js body.ys .ys-origem-word.is-cena .ys-origem-estrela { animation: ys-estrela 3.7s linear both; }
  /* 50% = 1,85 s (sai do centro), 75,7% = 2,8 s (chega no Y), 81% = 3,0 s (começa a virar a letra). */
  @keyframes ys-estrela {
    0%, 50% { opacity: 1; transform: translateX(var(--dx, 0px)) scale(1.2); animation-timing-function: cubic-bezier(.76,0,.24,1); }
    75.7%, 81% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.4,0,.2,1); }
    100% { opacity: 0; transform: scale(.74, .9); }
  }
  html.js body.ys .ys-e-medalhao { opacity: 0; transform: scale(.3) rotate(-120deg); transition: opacity .45s var(--ys-ease), transform .85s cubic-bezier(.16,1,.3,1); }
  html.js body.ys .ys-e-lam-esq, html.js body.ys .ys-e-lam-dir, html.js body.ys .ys-e-lam-baixo { opacity: 0; transform: scale(.1) rotate(-40deg); transition: opacity .35s var(--ys-ease), transform .95s cubic-bezier(.2,1.15,.3,1); }
  html.js body.ys .ys-e-lam-esq { transition-delay: .3s; }
  html.js body.ys .ys-e-lam-dir { transition-delay: .42s; }
  html.js body.ys .ys-e-lam-baixo { transition-delay: .54s; }
  html.js body.ys .ys-e-arco-topo, html.js body.ys .ys-e-arco-dir, html.js body.ys .ys-e-arco-esq { opacity: 0; transform: rotate(-120deg) scale(.9); transition: opacity .5s var(--ys-ease), transform 1s cubic-bezier(.16,1,.3,1); }
  html.js body.ys .ys-e-arco-topo { transition-delay: 1s; }
  html.js body.ys .ys-e-arco-dir { transition-delay: 1.1s; }
  html.js body.ys .ys-e-arco-esq { transition-delay: 1.2s; }
  html.js body.ys .ys-e-tudo { opacity: 0; transition: opacity .25s linear 1.95s; }
  html.js body.ys .ys-origem-word.is-cena .ys-e { opacity: 1; transform: none; }
  /* "URIS" escrito */
  html.js body.ys .ys-origem-word.is-logo .ys-origem-l:not(.ys-origem-y) { clip-path: inset(-12% 105% -12% -12%); transform: translateX(-.08em); transition: clip-path .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--i) * 130ms + 2350ms); }
  html.js body.ys .ys-origem-word.is-cena .ys-origem-l:not(.ys-origem-y) { clip-path: inset(-12% -12% -12% -12%); transform: none; }
  /* a estrela vira o Y */
  html.js body.ys .ys-origem-word.is-logo .ys-origem-y { opacity: 0; transform: scale(1.24, 1.07); transition: opacity .55s var(--ys-ease) 3.05s, transform .75s cubic-bezier(.16,1,.3,1) 3.05s; }
  html.js body.ys .ys-origem-word.is-cena .ys-origem-y { opacity: 1; transform: none; }
  html.js body.ys .ys-origem-word.is-logo + .ys-origem-sub { opacity: 0; clip-path: inset(0 50%); transition: opacity .6s var(--ys-ease) 3.3s, clip-path 1s cubic-bezier(.16,1,.3,1) 3.3s; }
  html.js body.ys .ys-origem-word.is-cena + .ys-origem-sub { opacity: 1; clip-path: inset(0 0); }
  /* Cena terminada: a palavra acompanha o ponteiro, pouco e devagar ("ficou perfeito"). */
  html.js body.ys .ys-origem-word.is-pronta .ys-origem-cam { transform: rotateX(calc(var(--ty, 0) * -5deg)) rotateY(calc(var(--tx, 0) * 8deg)); transition: transform .7s cubic-bezier(.16,1,.3,1); }

  /* ---------- FAQ ---------- */
  body.ys .ys-faq .ys-faq-a { animation: ys-faq .35s var(--ys-ease); }
  @keyframes ys-faq { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  /* ---------- Cartão que abre pop-up ----------
     O cartão entra na tela pelo ys-reveal (opacity e transform, com o atraso da fila) e
     responde ao ponteiro por translate, borda e fundo, sem herdar aquele atraso. */
  html.js body.ys .is-pop.ys-reveal { transition: opacity .7s var(--ys-ease) var(--d, 0s), transform .7s var(--ys-ease) var(--d, 0s), translate .25s var(--ys-ease), border-color .25s var(--ys-ease), background .25s var(--ys-ease), box-shadow .25s var(--ys-ease), color .2s, padding-left .3s var(--ys-ease); }

  /* ---------- Pop-up de explicação: sobe um pouco e aparece; some mais rápido ---------- */
  body.ys .ys-pop[open] { animation: ys-pop-entra .28s var(--ys-ease); }
  body.ys .ys-pop[open]::backdrop { animation: ys-pop-fundo .28s ease; }
  body.ys .ys-pop.is-saindo { animation: ys-pop-sai .17s ease forwards; }
  body.ys .ys-pop.is-saindo::backdrop { animation: ys-pop-fundo-sai .17s ease forwards; }
  @keyframes ys-pop-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
  @keyframes ys-pop-sai { to { opacity: 0; transform: translateY(8px); } }
  @keyframes ys-pop-fundo { from { opacity: 0; } }
  @keyframes ys-pop-fundo-sai { to { opacity: 0; } }
}
