/* ==========================================================================
   Faturas Med — camada de movimento
   Entra por cima do style.css. Tudo aqui é opcional: sem JS o site fica
   igual ao de antes; com "reduzir movimento" no sistema, tudo desliga.
   Degradê da marca = azul do nome → ciano das barras → menta da seta.
   ========================================================================== */

:root {
  --m-ease: cubic-bezier(.2, .8, .2, 1);
  --m-grad: linear-gradient(90deg, #0B60B5, #01ABE8 55%, #13F8CF);
}

/* ---------- barra de progresso da rolagem ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 1000;
  width: 100%; height: 3px; pointer-events: none;
  background: var(--m-grad);
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- cabeçalho ---------- */
.site-header { transition: box-shadow .35s ease, background-color .35s ease; }
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 28px -14px rgba(10, 42, 87, .35);
}
body.motion .site-header { animation: m-desce .8s var(--m-ease) both; }
@keyframes m-desce { from { transform: translateY(-100%); opacity: 0; } }

/* ---------- hero: luz de fundo que flutua ---------- */
.hero-light { position: relative; overflow: hidden; }
.hero-light::before, .hero-light::after {
  content: ""; position: absolute; z-index: 0; border-radius: 50%;
  pointer-events: none; will-change: transform;
}
.hero-light::before {
  width: 620px; height: 620px; left: -240px; top: -200px;
  background: radial-gradient(circle, rgba(1, 171, 232, .22) 0%, rgba(1, 171, 232, .08) 35%, transparent 68%);
}
.hero-light::after {
  width: 560px; height: 560px; right: -200px; bottom: -220px;
  background: radial-gradient(circle, rgba(19, 248, 207, .2) 0%, rgba(19, 248, 207, .07) 35%, transparent 68%);
}
body.motion .hero-light::before { animation: m-flutua 16s ease-in-out infinite alternate; }
body.motion .hero-light::after  { animation: m-flutua 20s ease-in-out infinite alternate-reverse; }
@keyframes m-flutua { to { transform: translate(50px, 36px) scale(1.12); } }
.hero-content { position: relative; z-index: 1; }

/* ---------- hero: entrada do texto ---------- */
body.motion .hero .eyebrow { opacity: 0; animation: m-sobe .7s var(--m-ease) .3s forwards; }
body.motion .hero .eyebrow::before { width: 0; animation: m-linha .6s var(--m-ease) .45s forwards; }
@keyframes m-linha { to { width: 18px; } }

.hero h1 .palavra { display: inline-block; }
body.motion .hero h1 .palavra {
  opacity: 0; transform: translateY(.55em); filter: blur(8px);
  animation: m-palavra .75s var(--m-ease) forwards;
  animation-delay: calc(.5s + var(--i, 0) * 50ms);
}
@keyframes m-palavra { to { opacity: 1; transform: none; filter: blur(0); } }

.hero h1 .hl { position: relative; color: var(--blue-700); white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; z-index: -1;
  background: var(--m-grad); border-radius: 3px; opacity: .55;
  transform: scaleX(0); transform-origin: 0 50%;
}
body.motion .hero h1 .hl::after { animation: m-sublinha .7s var(--m-ease) 1.5s forwards; }
@keyframes m-sublinha { to { transform: scaleX(1); } }

body.motion .hero-lead { opacity: 0; animation: m-sobe .8s var(--m-ease) 1.25s forwards; }
body.motion .hero-cta  { opacity: 0; animation: m-sobe .8s var(--m-ease) 1.45s forwards; }
@keyframes m-sobe { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- hero: foto revelada + zoom lento ---------- */
.hero-dark { background: var(--blue-900); }
body.motion .hero-dark-bg {
  clip-path: inset(0 0 0 100%); transform: scale(1.12);
  animation: m-revela 1.2s var(--m-ease) .35s forwards, m-kenburns 22s linear 1.5s forwards;
}
@keyframes m-revela { to { clip-path: inset(0 0 0 0); } }
@keyframes m-kenburns { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 42, 87, .04), rgba(10, 42, 87, .5));
}
body.motion .hero-photo-caption { opacity: 0; animation: m-sobe .8s var(--m-ease) 1.6s forwards; }

/* ---------- hero: painel vivo (cartões sobre a foto) ---------- */
.hero-vivo {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  transition: transform .5s var(--m-ease);
}
.vivo-chip { position: absolute; }
.vivo-1 { top: 11%; right: 7%; }
.vivo-2 { top: 44%; left: 6%; }
.vivo-3 { top: 68%; right: 10%; }
body.motion .vivo-chip {
  opacity: 0; transform: translateY(18px) scale(.96);
  animation: m-chip .8s var(--m-ease) forwards; animation-delay: var(--t, 1.6s);
}
.vivo-1 { --t: 1.7s; } .vivo-2 { --t: 2.05s; } .vivo-3 { --t: 2.4s; }
@keyframes m-chip { to { opacity: 1; transform: none; } }

.vivo-in {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 12px; padding: 11px 14px 11px 12px;
  box-shadow: 0 18px 40px -16px rgba(5, 20, 48, .55), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
body.motion .vivo-in { animation: m-respira 7s ease-in-out infinite; animation-delay: var(--t, 0s); }
.vivo-2 .vivo-in { animation-duration: 8.5s; }
.vivo-3 .vivo-in { animation-duration: 6.5s; }
@keyframes m-respira { 50% { transform: translateY(-7px); } }
.vivo-in strong { display: block; font-family: var(--font-display); font-size: .84rem; color: var(--blue-900); line-height: 1.2; }
.vivo-in span.vivo-sub { display: block; font-size: .72rem; color: var(--ink-500); margin-top: 2px; }

/* check */
.vivo-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.vivo-ico.ok { background: linear-gradient(135deg, #13D68F, #13F8CF); color: #063B2E; }
.vivo-ico.ok svg { width: 18px; height: 18px; }
.vivo-ico.ok path { stroke-dasharray: 24; stroke-dashoffset: 0; }
body.motion .vivo-ico.ok path { stroke-dashoffset: 24; animation: m-traco .5s var(--m-ease) 2.3s forwards; }
@keyframes m-traco { to { stroke-dashoffset: 0; } }

/* barras (eco da logo) */
.vivo-barras { flex: none; display: flex; align-items: flex-end; gap: 3px; width: 34px; height: 30px; padding: 0 3px; }
.vivo-barras i {
  flex: 1; border-radius: 2px 2px 0 0; transform-origin: 50% 100%;
  background: linear-gradient(180deg, #14B9F0, #0B60B5);
}
.vivo-barras i:nth-child(1) { height: 45%; }
.vivo-barras i:nth-child(2) { height: 65%; }
.vivo-barras i:nth-child(3) { height: 55%; }
.vivo-barras i:nth-child(4) { height: 100%; background: linear-gradient(180deg, #13F8CF, #0FBE86); }
body.motion .vivo-barras i { transform: scaleY(.25); animation: m-barra 2.8s ease-in-out infinite alternate; }
body.motion .vivo-barras i:nth-child(1) { animation-delay: 2.1s; }
body.motion .vivo-barras i:nth-child(2) { animation-delay: 2.3s; }
body.motion .vivo-barras i:nth-child(3) { animation-delay: 2.5s; }
body.motion .vivo-barras i:nth-child(4) { animation-delay: 2.7s; }
@keyframes m-barra { 0% { transform: scaleY(.25); } 35%, 100% { transform: scaleY(1); } }

/* anel que se completa */
.vivo-ico.anel { background: rgba(11, 96, 181, .08); }
.vivo-ico.anel svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.vivo-ico.anel .trilho { stroke: rgba(11, 96, 181, .15); }
.vivo-ico.anel .arco { stroke: url(#vivoGrad); stroke-dasharray: 62.8; stroke-dashoffset: 0; }
body.motion .vivo-ico.anel .arco { animation: m-anel 4.5s var(--m-ease) 2.7s infinite; }
@keyframes m-anel { 0% { stroke-dashoffset: 62.8; } 45%, 80% { stroke-dashoffset: 4; } 100% { stroke-dashoffset: 4; opacity: 0; } }

/* ---------- revelação ao rolar ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .85s var(--m-ease), transform .85s var(--m-ease);
  transition-delay: calc(var(--i, 0) * 85ms);
}
.reveal.is-in { opacity: 1; transform: none; }
.section-eyebrow.reveal::before { width: 0; transition: width .6s var(--m-ease) .25s; }
.section-eyebrow.reveal.is-in::before { width: 18px; }
.cred-steps li.reveal { transform: translateX(-18px); }
.cred-steps li.reveal .cred-step-num { transform: scale(.6); transition: transform .6s var(--m-ease) calc(var(--i, 0) * 85ms + .2s); }
.cred-steps li.reveal.is-in .cred-step-num { transform: none; }

/* ---------- toques (hover) ---------- */
.btn-primary, .btn-accent {
  position: relative; overflow: hidden;
  transition: transform .3s var(--m-ease), box-shadow .3s var(--m-ease), background-color .15s ease, color .15s ease;
}
.btn-primary::after, .btn-accent::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg); transition: left .7s ease; pointer-events: none;
}
.btn-primary:hover::after, .btn-accent:hover::after { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(11, 96, 181, .7); }
.btn-accent:hover  { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(19, 214, 143, .7); }

.service-card {
  position: relative; z-index: 0;
  transition: transform .4s var(--m-ease), box-shadow .4s var(--m-ease);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); z-index: 1; }
.service-icon {
  width: 44px; height: 44px; border-radius: 11px; align-items: center; justify-content: center;
  background: rgba(11, 96, 181, .08);
  transition: background .35s var(--m-ease), color .35s var(--m-ease), transform .45s var(--m-ease);
}
.service-card:hover .service-icon { background: var(--m-grad); color: #fff; transform: rotate(-8deg) scale(1.06); }

.advantage-icon { transition: transform .45s var(--m-ease); }
.advantage:hover .advantage-icon { transform: translateY(-4px) rotate(-6deg); }

.stat { transition: transform .4s var(--m-ease), border-left-color .4s; }
.stat:hover { transform: translateX(4px); border-left-color: var(--teal-400); }

.stat strong { font-variant-numeric: tabular-nums; }

/* ---------- telas menores ---------- */
@media (max-width: 900px) {
  .vivo-in { padding: 8px 11px 8px 9px; gap: 9px; }
  .vivo-in strong { font-size: .76rem; }
  .vivo-in span.vivo-sub { display: none; }
  .vivo-ico, .vivo-barras { width: 28px; height: 28px; }
  .vivo-1 { top: 10%; right: 5%; }
  .vivo-2 { top: 40%; left: 4%; }
  .vivo-3 { display: none; }
}

/* ---------- reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .section-eyebrow.reveal::before { width: 18px; }
  .cred-steps li.reveal .cred-step-num { transform: none; }
  .scroll-progress { display: none; }
}
