/* Adaptado de nexastream-react: float-subtle, dash-flow e bordas luminosas. */
@keyframes float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dash-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1000; }
}
@keyframes packet-flow {
  from { stroke-dashoffset: 75; }
  to { stroke-dashoffset: -925; }
}
@keyframes node-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
@keyframes halo-pulse {
  0%, 100% { opacity: .28; transform: scale(.98); }
  50% { opacity: .62; transform: scale(1.02); }
}
.animate-float { animation: float-subtle 6s ease-in-out infinite; }
.animate-beam { stroke-dasharray: 40 400; animation: dash-flow 10s linear infinite; }
.animate-packet { animation: packet-flow 5s linear infinite; }
.hero { isolation: isolate; }
.hero-streams {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  stroke-width: 1;
  opacity: .6;
}
.stream-tracks { stroke: #334966; opacity: .35; stroke-width: .7; }
.stream-beams { stroke: #93c5fd; opacity: .5; }
.stream-beams .animate-beam:nth-child(2) { animation-delay: -3s; }
.stream-beams .animate-beam:nth-child(3) { animation-delay: -6s; }
.stream-road { stroke: url(#brpix-stream-color); stroke-width: 22; opacity: .14; }
.stream-packet { stroke: #93c5fd; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 18 982; opacity: .6; }
.hero-bottom { position: relative; z-index: 1; }
.motion-toggle {
  display: inline-flex;
  position: absolute;
  right: 4px;
  top: -35px;
  align-items: center;
  gap: 7px;
  color: #9badc5;
  background: #111722;
  border: 1px solid #334258;
  border-radius: 5px;
  padding: 7px 10px;
  font: 8px var(--mono);
  min-height: 30px;
  z-index: 4;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { color: #e0eafa; border-color: #738bab; }
.motion-toggle-icon { font: 11px var(--font); }
.motion-toggle:disabled { color: #8e9bb0; cursor: default; }
.floating-code { transform: none; }
.floating-code.animate-float { animation-delay: -2s; }
.dashboard-mock.animate-float { animation-delay: -.5s; }
.qr-illustration > span.animate-float { animation-delay: -1.5s; }
.security-chip.animate-float { animation-duration: 7s; }
.security-chip.chip-b { animation-delay: -2s; }
.security-chip.chip-c { animation-delay: -4s; }
.motion-hero .pulse-dot,
.motion-hero .transaction-value i,
.qr-illustration i,
.security-chip i,
.code-response i { animation: node-pulse 2.8s ease-in-out infinite; }
.shield-art.motion-region .r1 { animation: halo-pulse 6s ease-in-out infinite; }
.shield-art.motion-region .r2 { animation: halo-pulse 6s 1s ease-in-out infinite; }
.shield-art.motion-region .r3 { animation: halo-pulse 6s 2s ease-in-out infinite; }
.split-demo { isolation: isolate; }
.split-flow-line { position: relative; }
.split-flow-line::after {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: #93c5fd;
  animation: split-drop 2.5s ease-in-out infinite;
}
@keyframes split-drop {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: .9; }
  80% { opacity: .9; }
  100% { transform: translateY(27px); opacity: 0; }
}
.split-network {
  width: 100%;
  height: 52px;
  display: block;
  margin: 4px 0;
  pointer-events: none;
}
.split-network .network-track { stroke: #3d4c63; stroke-width: 1; }
.split-network .network-beam { stroke: #93c5fd; stroke-width: 1.8; }
.split-network .network-beam:last-child { stroke: #c6ae78; animation-delay: -2.5s; }
.split-network circle { fill: #93c5fd; stroke: none; animation: node-pulse 3s ease-in-out infinite; }
.split-demo.has-network .split-totals { margin-top: 0; }
.motion-border {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background .25s, transform .25s, box-shadow .3s;
}
/* A máscara limita o brilho ao contorno e preserva a legibilidade do texto. */
.motion-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: #93c5fd;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.motion-border:focus-visible::after { opacity: .75; }
.button > svg { transition: transform .3s ease; }
.product-card .icon-box { transition: transform .35s ease, border-color .35s; }
.hero-streams.motion-offscreen { visibility: hidden; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after,
.motion-region.motion-offscreen *, .motion-region.motion-offscreen *::before, .motion-region.motion-offscreen *::after {
  animation-play-state: paused !important;
}
.motion-paused .hero-streams { animation-play-state: paused !important; }
.motion-reduced .animate-float { animation: none !important; transform: none; }
.motion-reduced .animate-beam,
.motion-reduced .stream-packet,
.motion-reduced .pulse-dot,
.motion-reduced .transaction-value i,
.motion-reduced .qr-illustration i,
.motion-reduced .security-chip i,
.motion-reduced .code-response i,
.motion-reduced .shield-ring,
.motion-reduced .split-network circle,
.motion-reduced .split-flow-line::after { animation: none !important; }
.motion-reduced .stream-packet, .motion-reduced .split-flow-line::after { display: none; }
.motion-reduced .reveal { opacity: 1; transform: none; transition: none; }
@media (hover: hover) and (pointer: fine) {
  .motion-border:hover { box-shadow: 0 0 25px #1a5fd438; }
  .motion-border:hover::after { opacity: .8; }
  .motion-border:hover > svg { transform: translateX(3px); }
  .product-card:hover .icon-box { transform: translateY(-2px) scale(1.05); border-color: #7397c7; }
  .qr-illustration > svg { transition: transform .5s ease; }
  .product-card:hover .qr-illustration > svg { transform: translateY(-3px); }
}
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .motion-border { --motion-angle: 0deg; }
  .motion-border::after {
    background: conic-gradient(from var(--motion-angle), transparent 0% 65%, #93c5fd 85%, #c6ae78 100%);
  }
}
@property --motion-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes border-angle { to { --motion-angle: 360deg; } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .motion-border:hover::after { animation: border-angle 3s linear infinite; }
}
@media (max-width: 1000px) {
  .motion-toggle { top: -39px; right: 8px; font-size: 7px; min-height: 30px; }
  .hero-visual .visual-caption { padding-right: 105px; line-height: 1.7; }
}
@media (max-width: 760px) {
  .hero-streams { opacity: .32; }
  .motion-toggle { top: -8px; right: 10px; min-height: 38px; padding: 9px 10px; }
  .hero-visual .visual-caption { min-height: 25px; padding-right: 120px; max-width: 360px; }
  .animate-float { animation-duration: 8s; }
}
@media (max-width: 420px) {
  .hero-visual .visual-caption { font-size: 6px; letter-spacing: .6px; }
  .motion-toggle { font-size: 6px; right: 10px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .animate-float { transform: none; }
  .stream-packet, .split-flow-line::after { display: none; }
  .reveal { opacity: 1; transform: none; }
}
