/* Digives PWA — luxusní úvodní animace (vzor Cojemoje portfolio splash) */

body.site-body.dg-splash-open {
  overflow: hidden;
}

.dg-splash {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  background: var(--dg-splash-bg, #ffffff);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

html.dg-pwa-launch .dg-splash,
.dg-splash.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dg-splash.is-exiting {
  animation: dgSplashExit 0.52s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dg-splash-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.dg-splash-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0;
  animation: dgSplashAuroraIn 1.4s ease forwards;
}

.dg-splash-aurora--gold {
  width: min(92vw, 520px);
  height: min(92vw, 520px);
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(212, 175, 98, 0.42) 0%,
    rgba(212, 175, 98, 0.1) 42%,
    transparent 72%
  );
  animation:
    dgSplashAuroraDrift 2.6s ease-in-out infinite alternate,
    dgSplashAuroraIn 0.9s ease forwards;
}

.dg-splash-aurora--mist {
  width: min(70vw, 380px);
  height: min(70vw, 380px);
  left: 14%;
  top: 60%;
  background: radial-gradient(circle, rgba(31, 92, 58, 0.1) 0%, transparent 70%);
  animation:
    dgSplashAuroraDriftAlt 3.2s ease-in-out infinite alternate,
    dgSplashAuroraIn 1.1s ease 0.15s forwards;
}

.dg-splash-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 75% 68% at 50% 46%,
    transparent 0%,
    rgba(230, 236, 232, 0.65) 100%
  );
  opacity: 0;
  animation: dgSplashFadeIn 0.8s ease 0.1s forwards;
}

.dg-splash-grid {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  opacity: 0;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(31, 92, 58, 0.06) 0,
      rgba(31, 92, 58, 0.06) 1px,
      transparent 1px,
      transparent 36px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(212, 175, 98, 0.07) 0,
      rgba(212, 175, 98, 0.07) 1px,
      transparent 1px,
      transparent 36px
    );
  transform: perspective(420px) rotateX(68deg) translateY(18%);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, #000 35%, transparent 100%);
  animation: dgSplashGridRise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.dg-splash-stage {
  position: relative;
  width: min(86vw, 400px);
  aspect-ratio: 1.55;
  display: grid;
  place-items: center;
}

.dg-splash-orbit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.dg-splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 98, 0.48);
  box-shadow: 0 0 24px rgba(212, 175, 98, 0.1);
  opacity: 0;
}

.dg-splash-ring--a {
  width: 72%;
  height: 72%;
  animation: dgSplashRingPulse 2.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.dg-splash-ring--b {
  width: 92%;
  height: 92%;
  border-color: rgba(212, 175, 98, 0.22);
  animation: dgSplashRingPulse 2.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.dg-splash-ring--c {
  width: 112%;
  height: 112%;
  border-style: dashed;
  border-color: rgba(31, 92, 58, 0.18);
  animation: dgSplashRingPulse 2.1s ease 0.45s forwards;
}

.dg-splash-logo-shell {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
}

.dg-splash-logo-glow {
  position: absolute;
  width: 88%;
  height: 55%;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(212, 175, 98, 0.45) 0%, transparent 72%);
  filter: blur(18px);
  opacity: 0;
  animation: dgSplashGlowPulse 2.2s ease 0.35s forwards;
}

.dg-splash-logo-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  animation: dgSplashLogoReveal 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.dg-splash-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(31, 92, 58, 0.12));
}

.dg-splash-shine {
  position: absolute;
  inset: -10% -40%;
  background: linear-gradient(
    108deg,
    transparent 38%,
    rgba(255, 255, 255, 0.35) 44%,
    rgba(212, 175, 98, 0.45) 50%,
    rgba(255, 255, 255, 0.25) 56%,
    transparent 62%
  );
  transform: translateX(-120%) skewX(-12deg);
  animation: dgSplashShineSweep 0.85s cubic-bezier(0.4, 0, 0.2, 1) 0.95s forwards;
  pointer-events: none;
}

.dg-splash-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dg-splash-sparks span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f0d78c;
  box-shadow: 0 0 10px rgba(240, 215, 140, 0.75);
  opacity: 0;
  animation: dgSplashSpark 1.4s ease forwards;
}

.dg-splash-sparks span:nth-child(1) {
  left: 14%;
  top: 58%;
  animation-delay: 0.7s;
}

.dg-splash-sparks span:nth-child(2) {
  left: 28%;
  top: 72%;
  animation-delay: 0.85s;
  width: 3px;
  height: 3px;
}

.dg-splash-sparks span:nth-child(3) {
  left: 76%;
  top: 64%;
  animation-delay: 0.78s;
}

.dg-splash-sparks span:nth-child(4) {
  left: 86%;
  top: 48%;
  animation-delay: 1s;
  width: 3px;
  height: 3px;
}

.dg-splash-sparks span:nth-child(5) {
  left: 52%;
  top: 78%;
  animation-delay: 0.92s;
}

.dg-splash-sparks span:nth-child(6) {
  left: 62%;
  top: 28%;
  animation-delay: 1.05s;
  width: 5px;
  height: 5px;
}

@keyframes dgSplashExit {
  0% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(6px);
    visibility: hidden;
  }
}

@keyframes dgSplashAuroraIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dgSplashAuroraDrift {
  from {
    transform: translate(-50%, -50%) scale(0.94);
  }
  to {
    transform: translate(calc(-50% + 12px), calc(-50% - 10px)) scale(1.06);
  }
}

@keyframes dgSplashAuroraDriftAlt {
  from {
    transform: translate(0, 0) scale(0.9);
  }
  to {
    transform: translate(16px, -12px) scale(1.08);
  }
}

@keyframes dgSplashFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes dgSplashGridRise {
  from {
    opacity: 0;
    transform: perspective(420px) rotateX(78deg) translateY(28%);
  }
  to {
    opacity: 0.55;
    transform: perspective(420px) rotateX(68deg) translateY(18%);
  }
}

@keyframes dgSplashRingPulse {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-12deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.08) rotate(0deg);
  }
}

@keyframes dgSplashGlowPulse {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  40% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0.55;
    transform: scale(1.04);
  }
}

@keyframes dgSplashLogoReveal {
  0% {
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
    filter: blur(16px) brightness(0.35);
    transform: translateY(14px) scale(0.94);
  }
  55% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0) brightness(1.08);
    transform: translateY(0) scale(1.02);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0) brightness(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes dgSplashShineSweep {
  to {
    transform: translateX(120%) skewX(-12deg);
  }
}

@keyframes dgSplashSpark {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.4);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dg-splash-aurora,
  .dg-splash-ring,
  .dg-splash-shine,
  .dg-splash-sparks span,
  .dg-splash-grid {
    animation: none !important;
  }

  .dg-splash-logo-wrap {
    animation: dgSplashFadeIn 0.5s ease forwards;
  }

  .dg-splash.is-exiting {
    animation-duration: 0.35s;
  }
}
