/* Tela de entrada "Iniciar missão": botão redondo no centro com os serviços orbitando + consentimento de cookies (Kosmos) */
.kx-lock { overflow: hidden !important; }
.kx-gate {
  --s: min(600px, 94vw, 68vh);           /* tamanho do sistema solar */
  --tilt: 66deg;                         /* inclinação das órbitas */
  --btn: clamp(90px, calc(var(--s) * .22), 112px);
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; overflow: hidden;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 50%, rgba(22,32,12,.5) 0%, rgba(6,8,5,.84) 58%, rgba(6,8,5,.95) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8);
  color: var(--texto, #E9ECE1); font-family: var(--sans, "IBM Plex Sans", system-ui, sans-serif);
  transition: opacity .5s ease, backdrop-filter .6s ease, -webkit-backdrop-filter .6s ease;
}
.kx-gate::before { /* granulado sutil */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.kx-box { position: relative; width: 100%; max-width: 640px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.kx-logo { display: flex; align-items: center; gap: 12px; opacity: 0; animation: kx-in .7s .1s ease forwards; }
.kx-logo img:first-child { width: 42px; height: auto; }
.kx-logo img:last-child { width: 124px; height: auto; }

/* ---------- sistema solar ---------- */
/* Órbitas calculadas em JS (elipse inclinada + profundidade): funciona igual no desktop e no celular, sem 3D de CSS */
.kx-sys { position: relative; width: var(--s); height: calc(var(--s) * .7); margin: 6px 0 2px; opacity: 0; animation: kx-in .9s .35s ease forwards; }
.kx-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kx-rings ellipse { fill: none; stroke: rgba(175,224,44,.22); stroke-width: 1; }
.kx-rings ellipse.tracejada { stroke: rgba(233,236,225,.16); stroke-dasharray: 3 5; }
.kx-face { position: absolute; left: 0; top: 0; will-change: transform; }
.kx-face-in { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translate(-50%, -50%); }
.kx-face svg { width: calc(var(--s) * .105); height: calc(var(--s) * .105); min-width: 34px; min-height: 34px; overflow: visible; filter: drop-shadow(0 0 10px rgba(175,224,44,.18)); }
.kx-face span { font: 500 11px/1.15 var(--sans, "IBM Plex Sans", sans-serif); color: var(--texto, #E9ECE1); white-space: nowrap; letter-spacing: .01em; text-shadow: 0 1px 8px rgba(0,0,0,.9); }

/* botão redondo no centro do sistema */
.kx-core { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; transition: translate .35s cubic-bezier(.2,.8,.2,1); }

/* núcleo de energia: plasma girando + anel de luz + reflexo de vidro */
.kx-btn {
  --hx: 32%; --hy: 24%;                                   /* posição do reflexo (segue o mouse) */
  position: absolute; left: 0; top: 0; width: var(--btn); height: var(--btn); margin: calc(var(--btn) / -2) 0 0 calc(var(--btn) / -2);
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: #3d7a10; color: #0b0f06;
  font: 800 13.5px/1.05 var(--display, "Saira", sans-serif); letter-spacing: .02em;
  box-shadow: 0 0 0 5px rgba(6,8,5,.6), 0 0 22px 2px rgba(175,224,44,.45), 0 0 60px 6px rgba(175,224,44,.18);
  transition: transform .25s ease, box-shadow .3s ease, filter .3s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.kx-btn > svg, .kx-btn > span:not(.kx-plasma):not(.kx-shine) { position: relative; z-index: 3; text-shadow: 0 1px 0 rgba(233,255,160,.55); }
.kx-plasma { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; z-index: 0;
  background: radial-gradient(circle at 50% 55%, #b9ec3a 0%, #8fcf22 45%, #4f9a16 100%); }
.kx-plasma i { position: absolute; left: 50%; top: 50%; width: 120%; height: 120%; margin: -60% 0 0 -60%; border-radius: 45% 55% 50% 50%; mix-blend-mode: screen; filter: blur(6px); }
.kx-plasma i:nth-child(1) { background: radial-gradient(circle at 30% 30%, rgba(240,255,170,.95) 0%, rgba(240,255,170,0) 42%); animation: kx-spin 5.5s linear infinite; }
.kx-plasma i:nth-child(2) { background: radial-gradient(circle at 72% 64%, rgba(175,224,44,.95) 0%, rgba(175,224,44,0) 45%); animation: kx-spin 7.5s linear infinite reverse; }
.kx-plasma i:nth-child(3) { background: radial-gradient(circle at 40% 78%, rgba(87,171,42,.9) 0%, rgba(87,171,42,0) 40%), radial-gradient(circle at 78% 26%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 22%); animation: kx-spin 4s linear infinite; }
.kx-plasma::after { /* granulado da superfície */
  content: ""; position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.kx-shine { position: absolute; inset: 0; border-radius: 50%; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 46% 34% at var(--hx) var(--hy), rgba(255,255,255,.62) 0%, rgba(255,255,255,.12) 55%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 -10px 18px rgba(10,40,0,.5), inset 0 3px 8px rgba(255,255,255,.35), inset 0 0 0 1px rgba(233,255,160,.35);
  transition: background-position .3s; }
/* anel de energia: feixe de luz correndo pela borda */
.kx-btn::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(175,224,44,0) 0 58%, rgba(175,224,44,.85) 74%, #fff 78%, rgba(175,224,44,.85) 82%, rgba(175,224,44,0) 96%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: kx-spin 2.6s linear infinite; }
/* segundo anel tracejado girando ao contrário */
.kx-btn::after { content: ""; position: absolute; inset: -13px; border-radius: 50%; border: 1px dashed rgba(175,224,44,.38); pointer-events: none; animation: kx-spin 14s linear infinite reverse; }
/* faíscas orbitando colado na bola */
.kx-sparks { position: absolute; left: 0; top: 0; width: calc(var(--btn) + 34px); height: calc(var(--btn) + 34px); margin: calc((var(--btn) + 34px) / -2) 0 0 calc((var(--btn) + 34px) / -2); pointer-events: none; animation: kx-spin 6s linear infinite; }
.kx-sparks i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #f4ffd0; box-shadow: 0 0 8px 2px rgba(175,224,44,.9); }
.kx-sparks i:nth-child(1) { left: 50%; top: -2px; }
.kx-sparks i:nth-child(2) { left: 6%; top: 70%; width: 3px; height: 3px; }
.kx-sparks i:nth-child(3) { right: 4%; top: 64%; width: 2.5px; height: 2.5px; opacity: .8; }
.kx-btn:hover { transform: scale(1.06); filter: brightness(1.08) saturate(1.1); box-shadow: 0 0 0 5px rgba(6,8,5,.6), 0 0 30px 4px rgba(175,224,44,.6), 0 0 80px 10px rgba(175,224,44,.25); }
.kx-btn:hover .kx-plasma i { animation-duration: 2.2s; }
.kx-btn:hover::before { animation-duration: 1.2s; }
@keyframes kx-spin { to { transform: rotate(360deg); } }
.kx-glow { position: absolute; left: 0; top: 0; width: calc(var(--btn) * 2.6); height: calc(var(--btn) * 2.6); margin: calc(var(--btn) * -1.3) 0 0 calc(var(--btn) * -1.3); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(175,224,44,.34) 0%, rgba(175,224,44,.1) 35%, rgba(175,224,44,0) 62%); animation: kx-breath 3.2s ease-in-out infinite; }
@keyframes kx-breath { 50% { transform: scale(1.12); opacity: .75; } }
.kx-btn:focus { outline: none; }
.kx-btn:focus-visible { box-shadow: 0 0 0 5px rgba(6,8,5,.9), 0 0 0 8px #fff; }
.kx-btn svg { width: 16px; height: 16px; }
.kx-btn .kx-count { display: none; font: 800 calc(var(--btn) * .42)/1 var(--display, "Saira", sans-serif); font-variant-numeric: tabular-nums; }
.kx-pulse { position: absolute; left: 0; top: 0; width: var(--btn); height: var(--btn); margin: calc(var(--btn) / -2) 0 0 calc(var(--btn) / -2); border-radius: 50%;
  border: 1px solid rgba(175,224,44,.55); pointer-events: none; animation: kx-pulse 2.6s 1.2s ease-out infinite; opacity: 0; }
.kx-pulse + .kx-pulse { animation-delay: 2.5s; }

.kx-term { font: 400 10.5px/1.6 var(--painel-inst, "Michroma", monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--meio, #7E8772);
  opacity: 0; animation: kx-in .6s .9s ease forwards; }
.kx-term b { color: var(--lima, #AFE02C); font-weight: 400; }
.kx-consent { margin-top: 16px; max-width: 430px; font-size: 12.5px; line-height: 1.55; color: var(--texto-2, #AAB39D); opacity: 0; animation: kx-in .6s 1.1s ease forwards; }
.kx-consent a, .kx-consent button { color: var(--texto, #E9ECE1); background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(233,236,225,.35); }
.kx-consent a:hover, .kx-consent button:hover { color: var(--lima, #AFE02C); }

/* ---------- lançamento ---------- */
.kx-burst { position: fixed; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; z-index: 10000; transform: scale(0);
  background: radial-gradient(circle, rgba(175,224,44,0) 55%, rgba(175,224,44,.85) 62%, rgba(175,224,44,0) 70%); }
.kx-burst.go { animation: kx-burst .9s cubic-bezier(.2,.7,.2,1) forwards; }
.kx-gate.go .kx-logo, .kx-gate.go .kx-term, .kx-gate.go .kx-consent { animation: kx-fade .35s ease forwards; }
.kx-gate.go .kx-btn { cursor: default; }
.kx-gate.lanca .kx-btn { animation: kx-charge .45s ease forwards; }
.kx-gate.lanca .kx-sys { animation: kx-zoom .9s cubic-bezier(.5,0,.2,1) forwards; }
.kx-gate.open { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); pointer-events: none; }

@keyframes kx-in { to { opacity: 1; } }
@keyframes kx-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes kx-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes kx-charge { 0% { transform: scale(1); } 55% { transform: scale(.9); box-shadow: 0 0 0 10px rgba(175,224,44,.35); } 100% { transform: scale(1.08); } }
@keyframes kx-zoom { from { opacity: 1; transform: scale(1); filter: blur(0); } to { opacity: 0; transform: scale(2.6); filter: blur(6px); } }
@keyframes kx-burst { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(320); opacity: 0; } }

.kx-prefs { display: inline-block; margin-top: 10px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--texto-2, #AAB39D); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 520px) {
  .kx-gate { --s: min(96vw, 60vh); }
  .kx-face span { font-size: 10px; }
  .kx-btn { font-size: 12.5px; gap: 3px; }
  .kx-term { font-size: 9px; letter-spacing: .08em; }
  .kx-consent { font-size: 12px; }
}
@media (max-height: 560px) { .kx-gate { --s: min(420px, 94vw, 70vh); } .kx-logo { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .kx-gate *, .kx-gate::before { animation: none !important; transition: none !important; }
  .kx-logo, .kx-sys, .kx-term, .kx-consent { opacity: 1 !important; }
  .kx-burst { display: none; }
}

/* fogo do motor da nave-câmera (Social media) */
.kx-fogo { transform-box: fill-box; transform-origin: 100% 50%; animation: kx-fogo .18s ease-in-out infinite alternate; }
@keyframes kx-fogo { to { transform: scaleX(.55); opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .kx-fogo { animation: none; } }

/* ondas de sinal do satélite do CRM */
.kx-sinal { animation: kx-sinal 1.6s ease-in-out infinite; }
@keyframes kx-sinal { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kx-sinal { animation: none; } }

/* linha do terminal cabe numa linha só no celular */
@media (max-width: 520px) { .kx-gate .kx-term { font-size: min(9px, 2.15vw); letter-spacing: .04em; white-space: nowrap; } }
