/* Launch screen: a living brand orbit around the logo and an indeterminate
   progress line. Shared by the first-paint splash and React BootScreen. */
.app-boot {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(110% 80% at 50% -10%, rgba(27, 71, 132, 0.55), transparent 60%),
    radial-gradient(90% 70% at 50% 110%, rgba(122, 82, 38, 0.2), transparent 65%),
    linear-gradient(180deg, #081426 0%, #050b16 55%, #03060d 100%);
  color: #efe9dc;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.app-boot__stage {
  position: relative;
  width: 188px;
  height: 188px;
  display: grid;
  place-items: center;
}

.app-boot__halo {
  position: absolute;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(111, 208, 255, 0.26),
    rgba(227, 180, 118, 0.12) 46%,
    transparent 72%
  );
  filter: blur(7px);
  animation: app-boot-halo 2.9s ease-in-out infinite;
}

.app-boot__orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.app-boot__orbit-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1.2;
}

.app-boot__orbit-arc {
  fill: none;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}

.app-boot__orbit-arc--outer {
  stroke: url(#boot-orbit-gradient);
  stroke-width: 2.6;
  stroke-dasharray: 21 79;
  animation: app-boot-orbit 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.app-boot__orbit-arc--inner {
  stroke: rgba(227, 180, 118, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 9 91;
  animation: app-boot-orbit-reverse 4.6s linear infinite;
}

.app-boot__orbit-dot {
  transform-box: view-box;
  transform-origin: 100px 100px;
  animation: app-boot-orbit 3.4s linear infinite;
}

.app-boot__orbit-dot circle {
  fill: #e3b476;
  filter: drop-shadow(0 0 6px rgba(227, 180, 118, 0.85));
}

.app-boot__logo {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(2, 8, 20, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: app-boot-breathe 3.8s ease-in-out infinite;
}

.app-boot__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: 0.035em;
  color: #d7e9ff;
  opacity: 0.92;
}

.app-boot__line {
  position: relative;
  width: 128px;
  height: 2px;
  margin-top: -6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.app-boot__line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #6fd0ff 30%, #e3b476 70%, transparent);
  animation: app-boot-line 1.65s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.app-boot__hint {
  max-width: 300px;
  margin: 0 24px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #8fb3d9;
}

@keyframes app-boot-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-boot-orbit-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes app-boot-halo {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes app-boot-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.022);
  }
}

@keyframes app-boot-line {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(240%);
    opacity: 0;
  }
}

/* Safety net: once the app shell is on screen the launch logo must never be
   able to remain above it, whatever an old WebView or cached node does. */
body:has(.app-shell) .app-boot {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .app-boot__orbit-arc--outer,
  .app-boot__orbit-arc--inner,
  .app-boot__orbit-dot,
  .app-boot__halo,
  .app-boot__logo,
  .app-boot__line::after {
    animation: none;
  }
  .app-boot__orbit-arc--outer {
    stroke-dashoffset: -30;
  }
  .app-boot__orbit-dot {
    opacity: 0.8;
  }
  .app-boot__line::after {
    width: 100%;
    opacity: 0.55;
    transform: none;
  }
}
