/* =============================================================================
 * telos-boot-mascote.css — a SEGUNDA tela de carregamento do site: a do
 * bichinho. A primeira é a abertura da Home (telos-intro.js).
 *
 * O site tem duas telas de carregamento e só duas. Esta aqui é uma só, dividida
 * hoje em duas famílias de classe por causa de onde nasceram (o banco de
 * questões e a área do aluno); o desenho é o mesmo arquivo, então os dois lados
 * mudam juntos.
 *
 * Antes era ouro chapado (#d4a857) com um círculo, uma barrinha e um bichinho
 * parado. Passou a falar a mesma língua da abertura: fundo escuro com vidro,
 * halo prateado que abre, anel, a linha (seam) atravessando a tela, o bichinho
 * entrando com peso e as frases subindo por trás de uma máscara.
 *
 * Não pede nenhuma mudança de markup: o halo, o anel e a linha vêm de
 * pseudo-elementos. Piso de fonte 16px. prefers-reduced-motion desliga tudo.
 * ========================================================================== */

.bq-boot,
.aluno-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  contain: strict;
  --tb-ease: cubic-bezier(.22,.61,.36,1);
  --tb-bounce: cubic-bezier(.34,1.56,.64,1);
  --tb-ink: #e6ecf5;
  background: radial-gradient(ellipse at 50% 42%,
              rgba(7,18,31,.62) 0%, rgba(5,12,23,.80) 55%, rgba(3,9,18,.94) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
  opacity: 1;
  visibility: visible;
  transition: opacity .85s cubic-bezier(.4,0,.2,1),
              visibility .85s cubic-bezier(.4,0,.2,1),
              backdrop-filter .85s cubic-bezier(.4,0,.2,1),
              -webkit-backdrop-filter .85s cubic-bezier(.4,0,.2,1);
}

/* a linha que atravessa a tela, igual à da abertura */
.bq-boot::before,
.aluno-boot::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(220,230,255,.55) 50%, transparent 100%);
  transform: translateY(-50%) scaleX(0);
  transform-origin: 50% 50%;
  animation: tbSeam .85s var(--tb-ease) .08s forwards;
  z-index: 1;
}

/* saída: o vidro se desfaz e o painel se afasta, em vez de piscar */
body.is-bq-loaded .bq-boot,
body.is-aluno-loaded .aluno-boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(0) saturate(100%);
  backdrop-filter: blur(0) saturate(100%);
}
body.is-bq-loaded .bq-boot::before,
body.is-aluno-loaded .aluno-boot::before { opacity: 0; transition: opacity .2s linear }

.bq-boot__panel,
.aluno-boot__panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vh, 26px);
  padding: 0 24px;
  max-width: 460px;
  text-align: center;
  transition: transform .45s cubic-bezier(.2,.8,.3,1), opacity .35s ease;
}
body.is-bq-loaded .bq-boot__panel,
body.is-aluno-loaded .aluno-boot__panel { transform: scale(.96) translateY(-6px); opacity: 0 }

/* --- o bichinho: halo que abre + anel, e ele entrando com peso ------------- */
.bq-boot__avatar,
.aluno-boot__avatar {
  position: relative;
  width: clamp(150px, 20vw, 210px);
  height: clamp(150px, 20vw, 210px);
  display: grid;
  place-items: center;
  background: none;
  animation: none;
}
.bq-boot__avatar::before,
.aluno-boot__avatar::before,
.bq-boot__avatar::after,
.aluno-boot__avatar::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(220px, 32vmin, 420px);
  height: clamp(220px, 32vmin, 420px);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.bq-boot__avatar::before,
.aluno-boot__avatar::before {
  background: radial-gradient(circle at center,
              rgba(180,200,255,.28) 0%, rgba(180,200,255,.16) 30%, rgba(180,200,255,0) 65%);
  filter: blur(2px);
  animation: tbHalo 1.2s var(--tb-ease) .25s forwards;
}
.bq-boot__avatar::after,
.aluno-boot__avatar::after {
  border: 1px solid rgba(200,215,255,.5);
  box-shadow: none;
  filter: blur(.3px);
  animation: tbHalo 1.4s var(--tb-ease) .3s forwards;
}
.bq-boot__avatar img,
.aluno-boot__avatar .face {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(-30vw, -48vh, 0) rotate(-26deg);
  animation: tbFly .72s var(--tb-ease) .08s forwards,
             tbSettle .42s var(--tb-bounce) .8s both;
  filter: drop-shadow(0 10px 32px rgba(0,0,0,.45)) drop-shadow(0 0 18px rgba(180,200,255,.18));
}
/* na área do aluno o bichinho é um emoji, então precisa de corpo de texto */
.aluno-boot__avatar .face {
  font-size: clamp(120px, 16vw, 175px);
  line-height: 1;
  height: auto;
  display: grid;
  place-items: center;
}

/* --- as frases, subindo por trás de uma máscara ---------------------------- */
.bq-boot__title,
.aluno-boot__title {
  margin: 0;
  overflow: hidden;
  line-height: 1.05;
  padding: 0 2px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 4.2vmin, 40px);
  letter-spacing: .03em;
  color: var(--tb-ink);
  opacity: 0;
  transform: translateY(60%);
  animation: tbLineUp .68s var(--tb-ease) .85s forwards;
}
.bq-boot__title em,
.aluno-boot__title em {
  font-style: italic;
  color: #cfd7e8;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
  padding: 0;
  margin: 0;
}
.bq-boot__sub,
.aluno-boot__sub {
  margin: 0;
  min-height: 24px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: .02em;
  color: rgba(230,236,245,.66);
  opacity: 0;
  animation: tbSubIn .6s var(--tb-ease) 1.15s forwards;
  transition: opacity .22s ease;
}

/* --- o fio de progresso: prateado e translúcido, sem barrinha de plástico -- */
.bq-boot__bar,
.aluno-boot__bar {
  width: clamp(160px, 26vmin, 240px);
  height: 1px;
  border-radius: 999px;
  background: rgba(220,230,255,.14);
  overflow: hidden;
  position: relative;
  margin-top: 2px;
  opacity: 0;
  animation: tbSubIn .6s var(--tb-ease) 1.3s forwards;
}
.bq-boot__bar span,
.aluno-boot__bar::after {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(220,230,255,.9), transparent);
  animation: tbSlide 1.5s ease-in-out infinite;
}

@keyframes tbSeam {
  0%   { transform: translateY(-50%) scaleX(0); opacity: 0 }
  30%  { opacity: 1 }
  100% { transform: translateY(-50%) scaleX(1); opacity: .85 }
}
@keyframes tbHalo {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.2) }
  55%  { opacity: 1 }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.2) }
}
@keyframes tbFly {
  0%   { opacity: 0; transform: translate3d(-30vw,-48vh,0) rotate(-26deg) }
  28%  { opacity: 1 }
  55%  { transform: translate3d(-4vw,-8vh,0) rotate(-10deg) }
  100% { opacity: 1; transform: translate3d(0,0,0) rotate(0deg) }
}
@keyframes tbSettle {
  0%   { transform: translate3d(0,0,0) rotate(0) }
  22%  { transform: translate3d(0,0,0) rotate(-7deg) }
  48%  { transform: translate3d(0,0,0) rotate(5deg) }
  72%  { transform: translate3d(0,0,0) rotate(-2.5deg) }
  100% { transform: translate3d(0,0,0) rotate(0) }
}
@keyframes tbLineUp {
  0%   { transform: translateY(60%); opacity: 0 }
  30%  { opacity: 1 }
  100% { transform: translateY(0); opacity: 1 }
}
@keyframes tbSubIn { 0% { opacity: 0 } 100% { opacity: 1 } }
@keyframes tbSlide {
  0%   { transform: translateX(-120%) }
  100% { transform: translateX(320%) }
}

@media (prefers-reduced-motion: reduce) {
  .bq-boot::before, .aluno-boot::before,
  .bq-boot__avatar::before, .aluno-boot__avatar::before,
  .bq-boot__avatar::after, .aluno-boot__avatar::after,
  .bq-boot__avatar img, .aluno-boot__avatar .face,
  .bq-boot__title, .aluno-boot__title,
  .bq-boot__sub, .aluno-boot__sub,
  .bq-boot__bar, .aluno-boot__bar {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .bq-boot__avatar::before, .aluno-boot__avatar::before,
  .bq-boot__avatar::after, .aluno-boot__avatar::after { display: none }
  .bq-boot__bar span, .aluno-boot__bar::after { animation: none; left: 0; width: 100% }
}
