/* Official Cosmos Project startup call. This layer always precedes safety and game intro. */

.cosmos-brand-call {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  overflow: hidden;
  padding:
    max(24px, env(safe-area-inset-top))
    clamp(18px, 6vw, 48px)
    max(24px, env(safe-area-inset-bottom));
  background: #fff;
  color: #101d55;
  pointer-events: auto;
}

.cosmos-intro.logo-phase .cosmos-brand-call,
.cosmos-intro.logo-leaving .cosmos-brand-call {
  display: grid;
}

.cosmos-intro.logo-phase > :not(.cosmos-brand-call),
.cosmos-intro.logo-leaving > :not(.cosmos-brand-call) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.cosmos-brand-call::before,
.cosmos-brand-call::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cosmos-brand-call::before {
  inset: 0;
  opacity: .32;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 198, 240, .08), transparent 32%),
    linear-gradient(115deg, transparent 39%, rgba(43, 78, 195, .035) 50%, transparent 61%);
}

.cosmos-brand-call::after {
  left: 50%;
  bottom: max(19px, env(safe-area-inset-bottom));
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #19bfea;
  box-shadow: -12px 0 #2b4cc5, 12px 0 #6840be;
  transform: translateX(-50%);
  opacity: 0;
  animation: cosmosBrandDots .45s 1.1s ease-out forwards;
}

.cosmos-brand-call__stage {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(100%, 760px);
  opacity: 0;
  transform: translateY(8px) scale(.985);
  animation: cosmosBrandReveal .72s .12s cubic-bezier(.2, .75, .2, 1) forwards;
}

.cosmos-brand-call__stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.cosmos-brand-call__line {
  display: block;
  width: min(64%, 430px);
  height: 1px;
  margin-top: clamp(12px, 3vh, 24px);
  overflow: hidden;
  background: linear-gradient(90deg, transparent, #2851c4 20%, #15bde9 50%, #6641bd 80%, transparent);
  transform: scaleX(0);
  animation: cosmosBrandLine .54s .62s ease-out forwards;
}

.cosmos-brand-call__stage p {
  margin: clamp(10px, 2vh, 16px) 0 0;
  color: #425085;
  font: 700 clamp(7px, 1.8vw, 10px)/1.2 var(--entry-display, monospace);
  letter-spacing: .2em;
  text-align: center;
  opacity: 0;
  animation: cosmosBrandPresents .42s .88s ease-out forwards;
}

.cosmos-intro.logo-leaving .cosmos-brand-call {
  opacity: 0;
  transition: opacity .26s ease;
}

.cosmos-intro .rem-intro-brand-logo::before {
  content: "DESTINATION / COMBAT SYSTEM" !important;
}

@keyframes cosmosBrandReveal {
  0% { opacity: 0; transform: translateY(8px) scale(.985); }
  58% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cosmosBrandLine {
  to { transform: scaleX(1); }
}

@keyframes cosmosBrandPresents {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: .78; transform: translateY(0); }
}

@keyframes cosmosBrandDots {
  to { opacity: .72; }
}

@media (max-width: 430px) {
  .cosmos-brand-call {
    padding-inline: 15px;
  }

  .cosmos-brand-call__stage {
    width: min(100%, 390px);
  }

  .cosmos-brand-call__stage img {
    width: min(100%, 390px);
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .cosmos-brand-call__stage {
    width: min(72vw, 680px);
  }

  .cosmos-brand-call__stage img {
    max-height: 52vh;
  }

  .cosmos-brand-call__line {
    margin-top: 8px;
  }

  .cosmos-brand-call__stage p {
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmos-brand-call__stage,
  .cosmos-brand-call__line,
  .cosmos-brand-call__stage p,
  .cosmos-brand-call::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
  }
}
