/**
 * MyInkConnect – animierter Start-Splash (installierte PWA, display-mode: standalone)
 */
html.ink-pwa-boot-active {
  overflow: hidden;
}

html.ink-pwa-boot-active body {
  overflow: hidden;
}

html.ink-pwa-boot-active body > *:not(#ink-pwa-boot) {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.ink-pwa-boot-active #ink-pwa-boot {
  visibility: visible !important;
  pointer-events: all !important;
}

#ink-pwa-boot {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3.5vw, 22px);
  padding: max(20px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
  background:
    radial-gradient(42rem 28rem at 18% 8%, rgba(138, 92, 255, 0.38), transparent 58%),
    radial-gradient(38rem 26rem at 88% 12%, rgba(29, 209, 161, 0.28), transparent 62%),
    radial-gradient(32rem 22rem at 50% 95%, rgba(255, 92, 124, 0.2), transparent 55%),
    linear-gradient(165deg, #070b14 0%, #0a0f19 42%, #0c1220 100%);
  color: #e9efff;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
  -webkit-user-select: none;
  user-select: none;
}

#ink-pwa-boot.ink-pwa-boot--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#ink-pwa-boot[hidden]:not(.ink-pwa-boot--show) {
  display: none !important;
}

#ink-pwa-boot.ink-pwa-boot--show {
  display: flex !important;
}

#ink-pwa-boot[hidden].ink-pwa-boot--show {
  display: flex !important;
}

.ink-pwa-boot__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  animation: ink-pwa-orb 5.5s ease-in-out infinite alternate;
}

.ink-pwa-boot__orb--violet {
  width: min(52vw, 280px);
  height: min(52vw, 280px);
  top: 12%;
  left: 8%;
  background: rgba(138, 92, 255, 0.55);
}

.ink-pwa-boot__orb--mint {
  width: min(44vw, 240px);
  height: min(44vw, 240px);
  bottom: 18%;
  right: 6%;
  background: rgba(29, 209, 161, 0.45);
  animation-delay: -2.2s;
}

.ink-pwa-boot__logo-wrap {
  position: relative;
  z-index: 1;
  width: clamp(96px, 28vw, 132px);
  height: clamp(96px, 28vw, 132px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28%;
  background: linear-gradient(
    145deg,
    rgba(138, 92, 255, 0.22),
    rgba(12, 18, 32, 0.75) 48%,
    rgba(29, 209, 161, 0.12)
  );
  border: 1px solid rgba(187, 167, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(138, 92, 255, 0.35);
  animation: ink-pwa-logo-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ink-pwa-boot__logo-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    120deg,
    rgba(138, 92, 255, 0.9),
    rgba(255, 255, 255, 0.55),
    rgba(29, 209, 161, 0.85),
    rgba(138, 92, 255, 0.9)
  );
  background-size: 280% 280%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ink-pwa-ring 2.8s linear infinite;
  opacity: 0.85;
}

.ink-pwa-boot__logo {
  width: 72%;
  height: 72%;
  object-fit: contain;
  border-radius: 18%;
  animation: ink-pwa-logo-pulse 2.4s ease-in-out infinite;
}

.ink-pwa-boot__brand {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  animation: ink-pwa-brand-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.ink-pwa-boot__brand-accent {
  color: #e94c5a;
  text-shadow: 0 0 18px rgba(233, 76, 90, 0.45);
}

.ink-pwa-boot__tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(0.78rem, 2.4vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(154, 163, 178, 0.92);
  animation: ink-pwa-brand-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.ink-pwa-boot__loader {
  position: relative;
  z-index: 1;
  width: min(200px, 56vw);
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(120, 130, 170, 0.22);
  overflow: hidden;
  animation: ink-pwa-brand-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

.ink-pwa-boot__loader::after {
  content: "";
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #8a5cff, #1dd1a1, transparent);
  animation: ink-pwa-loader 1.15s ease-in-out infinite;
}

@keyframes ink-pwa-orb {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(12px, -10px) scale(1.08);
  }
}

@keyframes ink-pwa-logo-in {
  from {
    opacity: 0;
    transform: scale(0.72) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ink-pwa-logo-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 12px rgba(138, 92, 255, 0.35));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 22px rgba(138, 92, 255, 0.55));
  }
}

@keyframes ink-pwa-ring {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes ink-pwa-shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes ink-pwa-brand-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ink-pwa-loader {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #ink-pwa-boot,
  #ink-pwa-boot * {
    animation: none !important;
    transition-duration: 0.2s !important;
  }

  .ink-pwa-boot__logo-wrap::before {
    opacity: 0.4;
  }
}
