/* =========================================================
   ADAGO — camada de animações
   Carregar por último. Os estados escondidos só valem
   quando o animacoes.js marca o elemento.
   ========================================================= */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, .1, .2, 1);
}

/* ---------- Cabeçalho: sombra e barra de progresso ---------- */
.header { transition: box-shadow .3s ease, background-color .3s ease; }
.header.is-scrolled { box-shadow: 0 10px 30px -18px #13265a55; }
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #274cde, #6f8cff 60%, #80ebcf);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Botões ---------- */
.button { position: relative; overflow: hidden; isolation: isolate; }
.button svg { transition: translate .3s var(--ease-out); }
.button:hover svg { translate: 3px 0; }
.button.primary::after,
.contact-box .white::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, #ffffff59 48%, transparent 66%);
  transform: translateX(-120%);
  pointer-events: none;
}

/* ---------- Feed ao vivo no hero ---------- */
.live-feed {
  position: absolute;
  z-index: 3;
  top: -26px;
  left: -30px;
  width: 268px;
  height: 58px;
  pointer-events: none;
}
.live-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px 9px 9px;
  border: 1px solid #c5d6ff55;
  border-radius: 13px;
  color: #f7faff;
  background: linear-gradient(135deg, #3c5387f0, #233456f2);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 35px #10163088, inset 0 1px #ffffff26;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .45s var(--ease-out), transform .55s var(--ease-out);
}
.live-item.is-on { opacity: 1; transform: none; }
.live-item.is-off { opacity: 0; transform: translateY(-10px) scale(.96); }
.live-item .float-icon { width: 36px; height: 36px; flex: none; }
.live-item b, .live-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-item > span:nth-child(2) { min-width: 0; }
.live-item b { font-size: 12px; }
.live-item small { margin-top: 2px; font-size: 10px; color: #d8e5ff; }
.live-item em {
  margin-left: auto;
  align-self: flex-start;
  font-style: normal;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 600;
  color: #80ebcf;
}
.live-item em::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #80ebcf;
  vertical-align: 1px;
}

/* ---------- Telas do sistema no banner ---------- */
.hero-screen { position: relative; }
.hero-screen .screen-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .9s ease, transform 1.6s var(--ease-out);
}
.hero-screen .screen-layer.is-on { opacity: 1; transform: none; }
.window-top > span:last-child { transition: opacity .22s ease; }
.window-top > span:last-child.is-swapping { opacity: 0; }

/* ---------- Faixa em movimento ---------- */
.strip.is-marquee .strip-inner {
  display: block;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; flex: none; gap: 56px; padding-right: 56px; }
.strip.is-marquee .strip-inner span { white-space: nowrap; }

/* ---------- Tabs da plataforma (barra de tempo) ---------- */
.module-tabs button { position: relative; overflow: hidden; }
.module-tabs button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: #9fb8ff;
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
.screen-open img { transition: transform .6s var(--ease-out); }
.screen-open:hover img { transform: scale(1.025); }

/* ---------- Fluxo em etapas ---------- */
.workflow-grid li {
  position: relative;
  overflow: hidden;
  transition: border-color .4s ease, box-shadow .4s ease, transform .4s var(--ease-out);
}
.workflow-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #274cde, #6f8cff);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.workflow-grid li.is-done::before { transform: scaleX(1); }
.workflow-grid li.is-current {
  border-color: #a9bdff;
  box-shadow: 0 16px 34px -16px #2446bc55;
  transform: translateY(-3px);
}
.step-number { display: inline-block; transition: color .3s ease; }
.workflow-grid li.is-current .step-number { color: #274cde; }

/* ---------- Cards de recursos: luz que segue o cursor ---------- */
.resource-grid article { position: relative; overflow: hidden; }
.resource-grid article > * { position: relative; z-index: 1; }
.resource-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), #dbe5ff 0, transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.resource-grid article:hover::before { opacity: 1; }
.feature-icon { transition: transform .45s var(--ease-out), background-color .3s ease, color .3s ease; }
.resource-grid article:hover .feature-icon {
  transform: rotate(-8deg) scale(1.1);
  background: #274cde;
  color: #fff;
}

/* ---------- Integrações ---------- */
.partner-grid li { transition: background-color .25s ease, border-color .25s ease; }
.partner-grid li:hover { background: #f1f6ff22; border-color: #c2d2ff66; }

/* ---------- Apps ---------- */
.phone-mock { transition: transform .6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .app-card:hover .phone-mock { transform: rotate(0) scale(1.05); }
}

/* ---------- FAQ: abre e fecha suave ---------- */
.questions summary::after { transition: transform .35s var(--ease-out); }
.questions details[open] summary::after { transform: rotate(180deg); }
.questions details { interpolate-size: allow-keywords; }
.questions details::details-content {
  height: 0;
  overflow: clip;
  transition: height .4s var(--ease-out), content-visibility .4s allow-discrete;
}
.questions details[open]::details-content { height: auto; }

/* ---------- Bloco de contato ---------- */
.contact-box > * { position: relative; z-index: 1; }
.contact-box::before,
.contact-box::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}
.contact-box::before { width: 420px; height: 420px; right: -120px; top: -160px; background: #4c6bff66; }
.contact-box::after { width: 320px; height: 320px; left: 18%; bottom: -220px; background: #80ebcf2e; }

/* =========================================================
   Movimento (vale para todos os visitantes, inclusive com
   "Efeitos de animação" desligado no sistema)
   ========================================================= */
@media all {

  /* Entrada do hero, em sequência */
  .anim .hero-copy > * { animation: rise .9s var(--ease-out) both; }
  .anim .hero-copy > .eyebrow { animation-delay: .05s; }
  .anim .hero-copy > h1 { animation-delay: .15s; }
  .anim .hero-copy > .lead { animation-delay: .55s; }
  .anim .hero-copy > .actions { animation-delay: .7s; }
  .anim .hero-copy > .micro { animation-delay: .85s; }

  .anim .hero h1 span {
    display: inline-block;
    padding-right: .06em;
    background: linear-gradient(100deg, #aabfff 38%, #ffffff 50%, #aabfff 62%) 0 0 / 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rise 1s .42s var(--ease-out) both, shimmer 7s 1.8s var(--ease-soft) infinite;
  }

  .anim .hero-art { animation: art-in 1.3s .3s var(--ease-out) both; }
  .anim .window { animation: drift 7s 1.6s ease-in-out infinite; }
  .anim .float-chip { animation: pop .7s 1.15s var(--ease-out) both, bob 5s 1.9s ease-in-out infinite; }
  .anim .live-feed { animation: pop .7s 1.4s var(--ease-out) both; }
  .anim .orbit-one { animation: spin 120s linear infinite; }
  .anim .orbit-two { animation: spin 80s linear infinite reverse; }
  .anim .hero::before { animation: grid-drift 14s linear infinite; }
  .anim .hero .eyebrow i { position: relative; }
  .anim .hero .eyebrow i::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: ping 2.4s 1.2s ease-out infinite;
  }

  .hero-screen { position: relative; }
  .anim .hero-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, #ffffff3d 50%, transparent 65%);
    transform: translateX(-130%);
    animation: sheen 8s 2.4s ease-in-out infinite;
    pointer-events: none;
  }

  .window { transition: transform .5s var(--ease-out); }
  .window.is-tilting {
    transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2deg);
    transition: transform .15s linear;
  }

  /* Faixa */
  .strip.is-marquee .marquee-track { animation: marquee 32s linear infinite; }
  .strip.is-marquee:hover .marquee-track { animation-play-state: paused; }

  /* Botões */
  .button.primary:hover::after,
  .contact-box .white:hover::after { animation: shine .8s ease; }

  /* Revelar ao rolar */
  [data-reveal] {
    opacity: 0;
    transition:
      opacity .8s var(--ease-out) var(--d, 0s),
      transform .9s var(--ease-out) var(--d, 0s),
      filter .8s var(--ease-out) var(--d, 0s);
  }
  [data-reveal="up"] { transform: translateY(28px); }
  [data-reveal="left"] { transform: translateX(-36px); }
  [data-reveal="right"] { transform: translateX(36px); }
  [data-reveal="zoom"] { transform: translateY(34px) scale(.97); filter: blur(4px); }
  [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

  /* Sublinhado que se desenha nos títulos */
  .heading-accent {
    background: linear-gradient(90deg, #274cde, #80a0ff) no-repeat 0 94% / 0% .1em;
    transition: background-size 1s .45s var(--ease-out);
  }
  .is-in .heading-accent { background-size: 100% .1em; }

  /* Troca de módulo */
  .module-copy > * { animation: rise .6s var(--ease-out) both; }
  .module-copy > :nth-child(2) { animation-delay: .06s; }
  .module-copy > :nth-child(3) { animation-delay: .12s; }
  .module-copy li { animation: rise .55s var(--ease-out) both; }
  .module-copy li:nth-child(1) { animation-delay: .18s; }
  .module-copy li:nth-child(2) { animation-delay: .24s; }
  .module-copy li:nth-child(3) { animation-delay: .3s; }
  .demo-frame { animation: frame-in .75s .08s var(--ease-out) both; }

  .module-tabs.is-autoplay button[aria-selected=true]::after {
    animation: tab-progress var(--tab-time, 6s) linear forwards;
  }
  .module-tabs.is-autoplay.is-paused button[aria-selected=true]::after { animation-play-state: paused; }

  /* Fluxo */
  .workflow-grid li.is-current::before { animation: fill-bar var(--step-time, 1.8s) linear forwards; }
  .workflow-grid li.is-current .step-number { animation: nudge .5s var(--ease-out); }

  /* Integrações: parceiros entram em cascata */
  .integration-slide.is-active .partner-grid li { animation: rise .5s var(--ease-out) both; }
  .integration-slide.is-active .partner-grid li:nth-child(2) { animation-delay: .05s; }
  .integration-slide.is-active .partner-grid li:nth-child(3) { animation-delay: .1s; }
  .integration-slide.is-active .partner-grid li:nth-child(4) { animation-delay: .15s; }
  .integration-slide.is-active .partner-grid li:nth-child(5) { animation-delay: .2s; }
  .integration-slide.is-active .partner-grid li:nth-child(6) { animation-delay: .25s; }
  .integration-slide.is-active .feature-icon { animation: nudge .6s var(--ease-out); }

  /* Apps */
  .anim .phone-mock { animation: bob 6s ease-in-out infinite; }
  .anim .app-card:nth-child(2) .phone-mock { animation-delay: -2s; }
  .anim .app-card:nth-child(3) .phone-mock { animation-delay: -4s; }
  .anim .app-visual::before { animation: orbit-turn 26s linear infinite; }
  .anim .app-visual::after { animation: orbit-turn 38s linear infinite reverse; }

  /* FAQ */
  .questions details[open] p { animation: rise .45s .05s var(--ease-out) both; }

  /* Contato */
  .anim .contact-box::before { animation: blob-a 14s ease-in-out infinite alternate; }
  .anim .contact-box::after { animation: blob-b 18s ease-in-out infinite alternate; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
  }
  @keyframes art-in {
    from { opacity: 0; transform: perspective(1400px) translateY(40px) rotateX(14deg) rotateY(-10deg) scale(.94); }
    to { opacity: 1; transform: none; }
  }
  @keyframes pop {
    from { opacity: 0; transform: translateY(14px) scale(.9); }
    to { opacity: 1; transform: none; }
  }
  @keyframes bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -9px; }
  }
  @keyframes drift {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
  }
  @keyframes spin { to { rotate: 360deg; } }
  @keyframes orbit-turn { to { rotate: 360deg; } }
  @keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 52px 52px, 52px 52px; }
  }
  @keyframes ping {
    0% { transform: scale(1); opacity: .7; }
    80%, 100% { transform: scale(3.2); opacity: 0; }
  }
  @keyframes shimmer {
    0%, 70% { background-position: 100% 0; }
    100% { background-position: 0% 0; }
  }
  @keyframes sheen {
    0%, 72% { transform: translateX(-130%); }
    100% { transform: translateX(130%); }
  }
  @keyframes shine {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
  }
  @keyframes marquee { to { transform: translateX(-50%); } }
  @keyframes frame-in {
    from { opacity: 0; transform: translateX(28px) scale(.97); }
    to { opacity: 1; transform: none; }
  }
  @keyframes tab-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  @keyframes fill-bar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  @keyframes nudge {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); }
    100% { transform: scale(1); }
  }
  @keyframes blob-a {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-160px, 90px) scale(1.15); }
  }
  @keyframes blob-b {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(220px, -60px) scale(.9); }
  }
}

/* ---------- Telas menores ---------- */
@media (max-width: 790px) {
  .live-feed { top: -30px; left: 0; width: 236px; }
  .live-item em { display: none; }
  .marquee-group { gap: 36px; padding-right: 36px; }
}
@media (max-width: 420px) {
  .live-feed { width: 228px; transform-origin: 0 0; scale: .92; }
}
