/* App splash — branded boot screen (mobile / PWA first paint) */

body.gg-app-loading {
  overflow: hidden;
}

.gg-app-splash {
  --gg-splash-teal: #35e0c2;
  --gg-splash-teal-deep: #0d8f8a;
  --gg-splash-bg: #050a12;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gg-splash-bg);
  overflow: hidden;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

/* Subtle dot grid */
.gg-app-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
  pointer-events: none;
}

.gg-app-splash.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Teal corner waves */
.gg-app-splash-wave {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.gg-app-splash-wave--tl {
  top: -18%;
  left: -42%;
  width: 118%;
  height: 52%;
  background: linear-gradient(145deg, var(--gg-splash-teal) 0%, var(--gg-splash-teal-deep) 55%, #066a72 100%);
  border-radius: 0 0 58% 42% / 0 0 100% 100%;
  transform: rotate(-8deg);
  opacity: 0.95;
  box-shadow: 0 24px 60px rgba(53, 224, 194, 0.18);
}

.gg-app-splash-wave--br {
  right: -18%;
  bottom: -8%;
  width: 58%;
  height: 28%;
  background: linear-gradient(210deg, var(--gg-splash-teal) 0%, var(--gg-splash-teal-deep) 60%, #055f66 100%);
  border-radius: 48% 0 0 42% / 100% 0 0 100%;
  opacity: 0.92;
  box-shadow: -12px -16px 40px rgba(53, 224, 194, 0.14);
}

.gg-app-splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  width: min(100%, 22rem);
}

.gg-app-splash-logo {
  width: 5.25rem;
  height: 5.25rem;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(53, 224, 194, 0.28));
  animation: gg-splash-logo-in 0.55s ease both;
}

.gg-app-splash-brand {
  margin: 0.95rem 0 0;
  font-size: clamp(1.65rem, 7vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.05;
  animation: gg-splash-fade-in 0.5s ease 0.08s both;
}

.gg-app-splash-brand b {
  color: var(--gg-splash-teal);
  font-weight: 700;
  margin-left: 0.12em;
}

.gg-app-splash-tagline {
  margin: 0.55rem 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.88);
  animation: gg-splash-fade-in 0.5s ease 0.14s both;
}

.gg-app-splash-spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin-top: 2.35rem;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--gg-splash-teal);
  border-right-color: rgba(53, 224, 194, 0.35);
  animation: gg-splash-spin 0.85s linear infinite, gg-splash-fade-in 0.5s ease 0.2s both;
  box-shadow: 0 0 18px rgba(53, 224, 194, 0.18);
}

.gg-app-splash-text {
  margin: 0.85rem 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(53, 224, 194, 0.88);
  animation: gg-splash-fade-in 0.5s ease 0.26s both;
}

@keyframes gg-splash-spin {
  to { transform: rotate(360deg); }
}

@keyframes gg-splash-logo-in {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes gg-splash-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .gg-app-splash-logo,
  .gg-app-splash-brand,
  .gg-app-splash-tagline,
  .gg-app-splash-spinner,
  .gg-app-splash-text {
    animation: none;
  }

  .gg-app-splash-spinner {
    opacity: 0.7;
  }
}
