/* Semeio: movimento e efeitos da landing page.
   Só transform e opacity (leve no celular). Com "reduzir movimento" ligado, tudo fica parado. */

@property --angulo {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ───── Barra de progresso da leitura ───── */
.progresso {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 3px;
  transform-origin: 0 50%;
  transform: scaleX(var(--progresso, 0));
  background: linear-gradient(90deg, #0e6b45, #6cc05c, #f5b800);
}

/* Cabeçalho ganha sombra depois de rolar */
.topo {
  transition:
    box-shadow 0.3s,
    background 0.3s;
}
.topo.rolou {
  box-shadow: 0 10px 30px -18px rgb(15 23 42 / 0.35);
}

/* ───── Aurora do topo ───── */
.abertura__brilho {
  display: none;
}
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.aurora span:nth-child(1) {
  top: -18%;
  left: -8%;
  background: #4ba84a;
  animation: aurora-a 18s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  top: -10%;
  right: -6%;
  background: #0e6b45;
  animation: aurora-b 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  bottom: -30%;
  left: 30%;
  background: #f59e0b;
  opacity: 0.28;
  animation: aurora-c 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(4) {
  bottom: -20%;
  right: 10%;
  background: #2f8f55;
  opacity: 0.22;
  animation: aurora-a 30s ease-in-out infinite alternate-reverse;
}
@keyframes aurora-a {
  to {
    transform: translate3d(18%, 22%, 0) scale(1.15);
  }
}
@keyframes aurora-b {
  to {
    transform: translate3d(-22%, 18%, 0) scale(0.9);
  }
}
@keyframes aurora-c {
  to {
    transform: translate3d(-14%, -18%, 0) scale(1.2);
  }
}
@media (prefers-color-scheme: dark) {
  .aurora span {
    opacity: 0.35;
  }
}
@media (max-width: 700px) {
  .aurora span {
    width: 90vw;
    height: 90vw;
    filter: blur(50px);
  }
}

/* Grade sutil que some nas bordas */
.grade-fundo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--texto) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--texto) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

/* ───── Entrada do topo, em sequência ───── */
.entrada {
  opacity: 0;
  transform: translateY(18px);
  animation: entrar 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 110ms + 80ms);
}
@keyframes entrar {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Selo com ponto pulsando */
.selo__ponto {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
.selo__ponto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulso 2s ease-out infinite;
}
@keyframes pulso {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* Título com brilho correndo no gradiente */
.destaque {
  background-image: linear-gradient(100deg, var(--marca), #4ba84a 30%, #f5b800 50%, #4ba84a 70%, var(--marca));
  background-size: 200% auto;
  animation: brilho-texto 7s linear infinite;
}
@keyframes brilho-texto {
  to {
    background-position: -200% center;
  }
}

/* Botão principal com reflexo passando */
.botao--brilho {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.botao--brilho::after {
  content: "";
  position: absolute;
  inset: -50% auto -50% -60%;
  width: 40%;
  transform: skewX(-20deg) translateX(0);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent);
  animation: reflexo 4.5s ease-in-out infinite 1.5s;
  z-index: -1;
}
@keyframes reflexo {
  0%,
  60% {
    transform: skewX(-20deg) translateX(0);
  }
  100% {
    transform: skewX(-20deg) translateX(520%);
  }
}

/* ───── Vitrine: luz, inclinação (mouse) e celular flutuando ───── */
.vitrine {
  perspective: 1400px;
}
.vitrine__luz {
  position: absolute;
  inset: 8% 6% 14%;
  border-radius: 40px;
  background: conic-gradient(from var(--angulo), #0e6b45, #6cc05c, #f5b800, #2f8f55, #0e6b45);
  filter: blur(46px);
  opacity: 0.45;
  animation: girar 10s linear infinite;
  pointer-events: none;
}
.vitrine .navegador {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.celular--vitrine {
  animation: boiar 6s ease-in-out infinite;
}
@keyframes boiar {
  50% {
    transform: translateY(-12px);
  }
}
@keyframes girar {
  to {
    --angulo: 360deg;
  }
}

/* ───── Faixa rolante ───── */
.marquise {
  overflow: hidden;
  border-bottom: 1px solid var(--borda);
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquise__trilho {
  display: flex;
  width: max-content;
  animation: rolar 40s linear infinite;
}
.marquise:hover .marquise__trilho {
  animation-play-state: paused;
}
.marquise ul {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 6px;
  list-style: none;
}
.marquise li {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--borda);
  background: var(--superficie);
  font-size: 14px;
  font-weight: 500;
  color: var(--texto-2);
}
.marquise li::before {
  content: "✦";
  margin-right: 8px;
  color: var(--violeta);
}
@keyframes rolar {
  to {
    transform: translateX(-50%);
  }
}

/* ───── Revelar ao rolar ───── */
.revelar {
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.revelar.visivel {
  opacity: 1;
  transform: none;
}

/* ───── Cartões: luz que segue o mouse e borda em gradiente ───── */
.area,
.agente,
.mini,
.seguranca > div {
  position: relative;
  overflow: hidden;
}
.area::before,
.agente::before,
.mini::before,
.seguranca > div::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(75 168 74 / 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.agente::before {
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(165 180 252 / 0.18), transparent 45%);
}
@media (hover: hover) {
  .area:hover::before,
  .agente:hover::before,
  .mini:hover::before,
  .seguranca > div:hover::before {
    opacity: 1;
  }
  .area,
  .plano,
  .mini {
    transition:
      transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
      box-shadow 0.35s,
      opacity 0.8s ease;
  }
  .area:hover,
  .plano:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -24px rgb(14 107 69 / 0.35);
  }
}
.area__icone {
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.area:hover .area__icone {
  transform: rotate(-8deg) scale(1.1);
}

/* Plano em destaque com borda girando */
.plano--destaque {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--superficie), var(--superficie)) padding-box,
    conic-gradient(from var(--angulo), #0e6b45, #6cc05c, #f5b800, #2f8f55, #0e6b45) border-box;
  animation: girar 5s linear infinite;
}
.plano__valor {
  display: inline-block;
  transition: transform 0.3s;
}
.plano__valor.mudou {
  animation: saltar 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes saltar {
  40% {
    transform: translateY(-6px) scale(1.06);
  }
}

/* ───── IA: faíscas piscando ───── */
.faiscas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.faiscas span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  background: #f5b800;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: piscar 4s ease-in-out infinite var(--d);
}
@keyframes piscar {
  50% {
    opacity: 0.9;
    transform: scale(1.3) rotate(45deg);
  }
}
.secao--escura::before {
  animation: respirar 12s ease-in-out infinite alternate;
}
@keyframes respirar {
  to {
    opacity: 0.6;
    transform: scale(1.08);
  }
}

/* Chamada final com gradiente em movimento */
.final__caixa {
  background-size: 200% 200%;
  background-image: linear-gradient(120deg, #0a4a33, #0b5a3b, #4ba84a, #0a4a33);
  animation: mover-gradiente 14s ease infinite;
}
@keyframes mover-gradiente {
  50% {
    background-position: 100% 50%;
  }
}

/* ───── Sem movimento quando a pessoa pede ───── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .entrada,
  .revelar {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquise__trilho {
    flex-wrap: wrap;
    width: auto;
  }
  .marquise ul[aria-hidden] {
    display: none;
  }
}
