/* A3KM Premium Splash Engine */
:root {
  --a3km-splash-bg-1: #030000;
  --a3km-splash-bg-2: #120000;
  --a3km-splash-glow: rgba(230, 18, 18, 0.78);
  --a3km-splash-soft-glow: rgba(230, 18, 18, 0.32);
  --a3km-splash-text: #ffe7e7;
  --a3km-splash-muted: rgba(255, 220, 220, 0.68);
}

.a3km-splash-lock {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  width: 100% !important;
}

.a3km-splash {
  position: fixed;
  inset: 0;
  z-index: 120000;
  background:
    radial-gradient(1200px 560px at 14% 14%, rgba(255, 0, 0, 0.09), transparent 65%),
    radial-gradient(950px 520px at 85% 85%, rgba(200, 0, 0, 0.1), transparent 68%),
    linear-gradient(140deg, var(--a3km-splash-bg-1), var(--a3km-splash-bg-2));
  display: grid;
  place-items: center;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.a3km-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: a3kmGridShift 11s linear infinite;
  opacity: 0.45;
  z-index: 0;
}

.a3km-splash-core {
  position: relative;
  width: min(92vw, 520px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  z-index: 2;
}

.a3km-splash-orbit,
.a3km-splash-orbit-b {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.84);
}

.a3km-splash-orbit {
  width: 260px;
  height: 260px;
}

.a3km-splash-orbit-b {
  width: 320px;
  height: 320px;
  border-color: rgba(255, 0, 0, 0.14);
}

.a3km-splash.is-running .a3km-splash-orbit,
.a3km-splash.is-running .a3km-splash-orbit-b {
  opacity: 1;
  animation: a3kmOrbitSpin 8s linear infinite;
}

.a3km-splash.is-running .a3km-splash-orbit-b {
  animation-direction: reverse;
  animation-duration: 12s;
}

.a3km-splash-logo-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.a3km-splash-logo-trace {
  position: absolute;
  inset: -12px;
  border-radius: 28px;
  border: 1px solid rgba(255, 0, 0, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.05), inset 0 0 28px rgba(255, 0, 0, 0.08);
  clip-path: inset(0 100% 0 0);
}

.a3km-splash-logo {
  width: 148px;
  height: 148px;
  object-fit: contain;
  opacity: 0;
  transform: translateZ(-120px) rotateY(-40deg) rotateX(14deg) scale(0.7);
  filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0));
}

.a3km-splash-wordmark,
.a3km-splash-tagline {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(12px);
  text-align: center;
}

.a3km-splash-wordmark {
  margin-top: 28px;
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
  color: var(--a3km-splash-text);
  text-shadow: 0 0 24px rgba(255, 0, 0, 0.3);
}

.a3km-splash-tagline {
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.34rem;
  text-transform: uppercase;
  color: var(--a3km-splash-muted);
}

.a3km-splash-progress {
  width: min(70vw, 280px);
  height: 3px;
  margin-top: 34px;
  border-radius: 99px;
  background: rgba(255, 0, 0, 0.22);
  overflow: hidden;
}

.a3km-splash-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6f0000, #ff2222, #ff5f5f);
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.65);
}

.a3km-splash-hint {
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.12rem;
  color: rgba(255, 220, 220, 0.48);
  text-transform: uppercase;
  opacity: 0;
}

.a3km-splash-logo-shine {
  position: absolute;
  inset: 0;
  transform: skewX(-24deg) translateX(-240%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 46%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0;
}

.a3km-splash.is-running .a3km-splash-logo-trace {
  animation: a3kmTrace 0.85s ease forwards;
}

.a3km-splash.phase-logo .a3km-splash-logo {
  animation: a3kmLogoIgnite 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.a3km-splash.phase-wordmark .a3km-splash-wordmark,
.a3km-splash.phase-wordmark .a3km-splash-tagline {
  animation: a3kmTextResolve 0.75s ease forwards;
}

.a3km-splash.phase-wordmark .a3km-splash-tagline {
  animation-delay: 0.08s;
}

.a3km-splash.phase-wordmark .a3km-splash-progress > span {
  animation: a3kmProgressFill var(--a3km-progress-duration, 2400ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.a3km-splash.phase-wordmark .a3km-splash-hint {
  animation: a3kmHintIn 0.45s ease forwards 0.42s;
}

.a3km-splash.phase-wordmark .a3km-splash-logo {
  animation:
    a3kmLogoIgnite 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    a3kmLogoIdle 2.2s ease-in-out infinite 0.95s;
}

.a3km-splash.phase-sweep .a3km-splash-logo-shine {
  opacity: 1;
  animation: a3kmSweep 0.7s ease;
}

.a3km-splash.phase-sweep-late .a3km-splash-logo-shine {
  opacity: 1;
  animation: a3kmSweep 0.78s ease;
}

.a3km-splash.is-exiting {
  animation: a3kmSplashExit 0.68s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.a3km-splash.is-exiting .a3km-splash-core {
  animation: a3kmCoreExit 0.68s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.a3km-splash-skip .a3km-splash {
  display: none !important;
}

@keyframes a3kmGridShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(44px); }
}

@keyframes a3kmTrace {
  from { clip-path: inset(0 100% 0 0); opacity: 0.5; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes a3kmLogoIgnite {
  0% {
    opacity: 0;
    transform: translateZ(-120px) rotateY(-42deg) rotateX(14deg) scale(0.7);
    filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0));
  }
  65% {
    opacity: 1;
    transform: translateZ(40px) rotateY(8deg) rotateX(-4deg) scale(1.02);
    filter: drop-shadow(0 0 32px rgba(255, 0, 0, 0.78));
  }
  100% {
    opacity: 1;
    transform: translateZ(0) rotateY(0) rotateX(0) scale(1);
    filter: drop-shadow(0 0 24px rgba(255, 0, 0, 0.58));
  }
}

@keyframes a3kmTextResolve {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(12px);
    letter-spacing: 0.45rem;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.3rem;
  }
}

@keyframes a3kmProgressFill {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes a3kmHintIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes a3kmSweep {
  from { transform: skewX(-24deg) translateX(-240%); }
  to { transform: skewX(-24deg) translateX(260%); }
}

@keyframes a3kmLogoIdle {
  0%, 100% {
    transform: translateZ(0) rotateY(0deg) scale(1);
    filter: drop-shadow(0 0 22px rgba(255, 0, 0, 0.56));
  }
  50% {
    transform: translateZ(10px) rotateY(2deg) scale(1.03);
    filter: drop-shadow(0 0 36px rgba(255, 0, 0, 0.78));
  }
}

@keyframes a3kmOrbitSpin {
  from { transform: scale(0.84) rotate(0deg); }
  to { transform: scale(1) rotate(360deg); }
}

@keyframes a3kmSplashExit {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

@keyframes a3kmCoreExit {
  0% { transform: scale(1) translateZ(0); filter: blur(0); }
  100% { transform: scale(1.08) translateZ(100px); filter: blur(8px); opacity: 0; }
}

@media (max-width: 640px) {
  .a3km-splash-core {
    min-height: 380px;
  }

  .a3km-splash-logo-wrap {
    width: 142px;
    height: 142px;
  }

  .a3km-splash-logo {
    width: 124px;
    height: 124px;
  }

  .a3km-splash-tagline {
    letter-spacing: 0.18rem;
    font-size: 0.66rem;
  }

  .a3km-splash-wordmark {
    letter-spacing: 0.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a3km-splash,
  .a3km-splash * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
