/* Authentic Kairo swarm adapted only for WL branding and integration.
   Source: ../reference-kairo/arquivos/site/src/{motion,styles/enxame.css,sections/barra.css} */
:root {
  --pagina: #08090c; --texto: #f4f6f8; --texto-2: #a4abb7; --texto-3: #768091;
  --branco: #fff; --fio: rgba(255,255,255,.09); --fio-forte: rgba(255,255,255,.16);
  --sel: #00b2ff; --sel-etiqueta: #0086c4;
  --marcador: rgba(158,164,178,.20); --marcador-grande: rgba(158,164,178,.05);
  --marcador-quadro: rgba(128,134,150,.025); --sans: 'Manrope',sans-serif;
  --ease: cubic-bezier(.23,1,.32,1); --t-micro: .16s; --swarm-tour-top: 120px;
}
body { position: relative; }
main { overflow-x: clip; }
/* Montagem pelos agentes.
   Enquanto a página monta (html.monta), o que ainda não foi montado fica invisível, mas no lugar: o layout já é o
   final e os agentes medem cada bloco antes de desenhar a caixa dele. */
html.monta [data-camada]:not([data-camada='quadro']):not([data-camada='marca']):not(.c-pronta):not(.c-viva):not(:has([data-camada])),
html.monta [data-camada='texto']:not(.c-pronta):not(.c-viva) {
  opacity: 0;
}
/* camada com outras dentro (o bloco vermelho do nome, o chip, o botão): some só o fundo e a borda dela */
html.monta [data-camada]:not(.c-pronta):has([data-camada]) {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html.monta [data-camada]:has([data-camada]) {
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.5s var(--ease), scale 0.14s var(--ease), opacity 0.35s var(--ease), translate 0.14s var(--ease);
}
html.monta [data-camada='quadro']:not(.c-pronta)::before { opacity: 0; }
html.monta [data-camada='titulo'].c-viva .letra { opacity: 0; }
.ch { opacity: 0; }
.ch.on { opacity: 1; }
.c-ja,
.c-ja::before,
.c-ja::after { transition: none !important; }

/* palco dos agentes: cobre o body inteiro, rola com a página e não aumenta a rolagem */
.enxame {
  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: clip;
  pointer-events: none;
}

/* cursores: seta colorida (andando), mira (desenhando uma caixa), barra de texto (digitando) */
.ag { position: absolute; left: 0; top: 0; will-change: transform; }
.ag svg {
  position: absolute;
  width: 20px;
  height: 20px;
  max-width: none;               /* o .ag não tem largura: sem isso o reset encolhe o SVG a zero */
  overflow: visible;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.6));
}
.ag__seta { left: -3.6px; top: -2.4px; }
.ag__seta path { fill: var(--c); stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; }
.ag__mira,
.ag__ibeam { left: -10px; top: -10px; display: none; }
.ag__mira path { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; }
.ag__mira path.f { stroke: #fff; stroke-width: 4.8; }
.ag__ibeam path { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.ag__ibeam path.f { stroke: rgba(0, 0, 0, 0.75); stroke-width: 3.8; }
.ag.is-mira .ag__seta,
.ag.is-texto .ag__seta { display: none; }
.ag.is-mira .ag__mira,
.ag.is-texto .ag__ibeam { display: block; }

/* clique de um agente ao aplicar uma camada */
.clique {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 1.5px solid var(--c);
  border-radius: 50%;
}

/* caixa de seleção: fio azul, quatro alças, etiqueta de medida embaixo e o placeholder cinza */
.cx {
  position: absolute;
  left: 0;
  top: 0;
  border: 1px solid var(--sel);
}
.cx__fill {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--marcador);
  opacity: 0;
}
.cx__fill--grande { background: var(--marcador-grande); }
.cx__fill--fundo { background: var(--marcador-quadro); } /* depois da grande: o fundo do hero também é grande */
.cx__fill svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cx__h {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid var(--sel);
  opacity: 0;
}
.cx__h:nth-of-type(1) { left: -3.5px; top: -3.5px; }
.cx__h:nth-of-type(2) { right: -3.5px; top: -3.5px; }
.cx__h:nth-of-type(3) { left: -3.5px; bottom: -3.5px; }
.cx__h:nth-of-type(4) { right: -3.5px; bottom: -3.5px; }
.cx.fixa .cx__h { opacity: 1; }
.cx__tam {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  translate: -50% 0;
  padding: 3px 5px;
  border-radius: 3px;
  background: var(--sel-etiqueta);
  color: var(--branco);
  font: 600 12px / 1 var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cx.digitando .cx__tam,
.cx.digitando .cx__h,
.cx.sem-medida .cx__tam { opacity: 0; }

/* cursor de texto piscando enquanto um agente digita */
.caret {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  background: #fff;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* o símbolo que os agentes rodeiam enquanto escaneiam a página */
.enx-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 15px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* copiar: a seta ganha o quadradinho com "+" do alt-arrastar */
.ag.is-copia::after {
  content: '+';
  position: absolute;
  left: 13px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 0 1px #fff;
  font: 700 12px / 1 var(--sans);
  color: #111;
}

/* a cópia que um agente arrasta até o lugar do item novo */
.fantasma {
  outline: 1px solid var(--sel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0.94;
}

/* linha-guia de alinhamento que pisca quando um elemento encaixa */
.guia {
  position: absolute;
  background: #ff3e9a;
  box-shadow: 0 0 6px rgba(255, 62, 154, 0.6);
}

/* fios que não são camada (linhas dos números e rodapé do hero): só aparecem quando algo dentro deles foi montado */
.hero__numeros li,
.hero__pe { transition: border-color 0.4s var(--ease); }
html.monta .hero__numeros li:not(:has(.c-pronta)),
html.monta .hero__pe:not(:has(.c-pronta)) { border-color: transparent; }

/* Barra dos agentes, fixa no pé ao centro: interface de ferramenta, em px fixos (não escala com a cena). */
.barra {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 5px 0 12px;
  background: rgba(20, 15, 16, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  font: 600 12px / 1 var(--sans);
  color: var(--texto);
  white-space: nowrap;
}

.barra__scan,
.barra__info { display: flex; align-items: center; gap: 12px; }
.barra__scan { display: none; color: var(--texto-2); }
.barra[data-estado='escaneando'] .barra__scan { display: flex; }
.barra[data-estado='escaneando'] .barra__info { display: none; }

.barra__avatares { display: flex; padding-left: 6px; }
.barra__avatares i {
  width: 18px;
  height: 18px;
  margin-left: -6px;
  border-radius: 50%;
  border: 2px solid #171213;
  background: var(--c, #888);
}
.barra__fim { display: none; color: var(--texto-2); }
.barra__fim b { color: var(--texto); font-variant-numeric: tabular-nums; }
.barra[data-estado='fim'] .barra__fim { display: inline; }
.barra[data-estado='fim'] .barra__agentes,
.barra[data-estado='fim'] .barra__camadas { display: none; }
.barra__agentes b,
.barra__camadas b { font-variant-numeric: tabular-nums; }
.barra__camadas { color: var(--texto-2); font-variant-numeric: tabular-nums; }
.barra__feitas { color: var(--texto); }

.barra__trilho {
  position: relative;
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.barra__trilho > i {
  position: absolute;
  inset: 0;
  background: var(--sel);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.barra__acoes { display: flex; gap: 2px; padding-left: 8px; border-left: 1px solid var(--fio); }
.barra__btn {
  display: grid;
  place-items: center;
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font: 600 12px / 1 var(--sans);
  color: var(--texto-2);
  transition: background-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease), scale 0.14s var(--ease);
}
.barra__btn:active { scale: 0.95; }
.barra__btn:focus-visible { outline: 2px solid var(--sel); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .barra__btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--texto); }
}
.barra__tour[aria-pressed='true'] { background: var(--sel-etiqueta); color: var(--branco); }
.barra__vel { min-width: 40px; font-variant-numeric: tabular-nums; }
.barra__refaz { padding: 0; }
.barra__refaz svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* movimento reduzido: a página já abre pronta e não há agentes */
html.sem-agentes .barra { display: none; }

@media (max-width: 760px) {
  .barra { bottom: 12px; gap: 10px; height: 44px; padding-left: 10px; }
  .barra__agentes,
  .barra__progresso,
  .barra[data-estado='fim'] .barra__palavra,
  .barra__palavra { display: none; }
  .barra__scan .barra__trilho { width: 48px; }
}

/* WL frame treatment; all motion, agent geometry and original toolbar states retained. */
.enx-logo { background: #101216; }
.enx-logo img { display:block; width:100%; height:100%; object-fit:contain; }
.barra { background:#101216; backdrop-filter:none; -webkit-backdrop-filter:none; }
.barra__avatares i { border-color:#101216; }
.barra__btn { border:0; background:none; cursor:pointer; }
.barra__tour[aria-pressed='true'] { background:var(--sel-etiqueta); }
.barra { border-radius:6px; border-color:#3a4553; }
.barra__btn { border-radius:3px; }
.barra[data-estado='escaneando'] { box-shadow:0 0 0 1px #00b2ff18,0 12px 34px #0008; }
.ag { transition:opacity .22s ease-out; }
.ag.wl-idle { opacity:0; }
html.sem-agentes .enxame { display:none; }
@media (max-width:760px) { .barra { max-width:calc(100vw - 24px); height:48px; } .barra__btn { min-height:44px; } }
@media (prefers-reduced-motion:reduce) {
  html [data-camada] { opacity:1 !important; filter:none !important; transform:none !important; }
  .enxame,.barra { display:none !important; }
}
