/* --- mascote 3D: seção final --- */
.mascot {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: max(100svh, 640px);
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #0a0f0c;
  color: var(--text);
}

.mascot-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

/* linhas verticais discretas + vinheta */
.mascot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 7px),
    radial-gradient(120% 80% at 50% 0%, transparent 55%, rgba(0, 0, 0, .45) 100%);
}

.mascot-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(calc(100% - 2 * var(--pad)), 1180px);
  min-height: inherit;
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  pointer-events: none;
}

.mascot-copy {
  max-width: 540px;
  pointer-events: auto;
}

.mascot .lead {
  margin-bottom: 0;
}

.mascot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-top: 2rem;
}

.mascot-actions .btn-accent {
  min-height: 54px;
  padding: 0 2rem;
  font-size: 1.05rem;
}

.mascot-link {
  color: var(--muted);
  font: 500 13px/1.4 var(--mono);
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.mascot-link:hover,
.mascot-link:focus-visible {
  color: var(--accent);
}

/* carregador no ponto onde o robô aparece */
.mascot-loader {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 70%;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(35, 234, 87, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: mascot-spin 1s linear infinite;
  transition: opacity .5s ease;
  pointer-events: none;
}

.mascot-loader.hide {
  opacity: 0;
}

@keyframes mascot-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* entrada do texto (só quando o JS está pronto para revelar) */
.mascot.is-armed .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
}

.mascot.is-armed.is-in .reveal {
  opacity: 1;
  transform: none;
}

.mascot.is-armed .reveal.d2 { transition-delay: .12s; }
.mascot.is-armed .reveal.d3 { transition-delay: .24s; }
.mascot.is-armed .reveal.d4 { transition-delay: .36s; }

/* sem WebGL, economia de dados ou falha: só o texto */
.mascot-static .mascot-canvas,
.mascot-static .mascot-loader {
  display: none;
}

.mascot-static {
  min-height: 0;
}

@media (max-width: 860px) {
  .mascot {
    min-height: max(100svh, 720px);
  }

  .mascot-inner {
    justify-content: flex-end;
    align-items: center;
    padding: 5rem 0 3.5rem;
    text-align: center;
  }

  .mascot-copy {
    max-width: 560px;
  }

  .mascot-copy h2 {
    margin-inline: auto;
  }

  .mascot-actions {
    justify-content: center;
    margin-top: 1.6rem;
  }

  .mascot-loader {
    left: 50%;
  }

  .mascot-static .mascot-inner {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .mascot-actions .btn-accent {
    min-height: 50px;
    padding: 0 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot.is-armed .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mascot-loader {
    animation-duration: 2.4s;
  }
}
