html.nexus-startup-pending,
html.nexus-startup-booting {
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  background: #217d73;
}

html.nexus-startup-pending body,
html.nexus-startup-booting body {
  height: 100%;
  min-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

html.nexus-startup-booting body > *,
html.nexus-startup-pending body > :not(#nexus-startup) {
  visibility: hidden !important;
}

html.nexus-startup-booting::before,
html.nexus-startup-booting::after {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  pointer-events: none;
  content: "";
}

html.nexus-startup-booting::before {
  background: #217d73;
}

html.nexus-startup-booting::after {
  --boot-unit: clamp(18px, min(6.8vw, 7vh), 68px);
  top: 50%;
  left: 50%;
  inset: 50% auto auto 50%;
  width: min(100vw, 103vh);
  aspect-ratio: 558 / 542;
  height: auto;
  transform: translate(-50%, -50%);
  background-color: #217d73;
  background-image:
    url("assets/nexus-opening-poster.jpg"),
    radial-gradient(circle, #fff 0 49%, transparent 52%),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-position:
    center,
    calc(var(--boot-unit) * 1.35) calc(var(--boot-unit) * 1.6),
    0 100%,
    calc(var(--boot-unit) * 1.5) 100%,
    calc(var(--boot-unit) * 3) 100%,
    calc(var(--boot-unit) * 4.5) 100%,
    calc(var(--boot-unit) * 6) 100%;
  background-size:
    contain,
    var(--boot-unit) var(--boot-unit),
    var(--boot-unit) var(--boot-unit),
    var(--boot-unit) calc(var(--boot-unit) * 2),
    var(--boot-unit) calc(var(--boot-unit) * 3),
    var(--boot-unit) calc(var(--boot-unit) * 4),
    var(--boot-unit) calc(var(--boot-unit) * 5);
}

.nexus-startup {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  isolation: isolate;
  background: #217d73;
  color: #fff7df;
  font-family: var(--font-body, Arial, sans-serif);
  opacity: 1;
  transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nexus-startup.is-exiting {
  opacity: 0;
  pointer-events: none;
}

.nexus-startup__opening,
.nexus-startup__reveal {
  position: absolute;
  inset: 0;
}

.nexus-startup__opening {
  z-index: 1;
  display: grid;
  place-items: center;
  background: #217d73;
}

.nexus-startup__opening-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
}

.nexus-loader-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: calc(var(--nexus-loader-unit) * 0.5);
  --nexus-loader-unit: clamp(18px, min(6.8vw, 7vh), 68px);
}

.nexus-loader-bar {
  display: block;
  width: var(--nexus-loader-unit);
  background: #fff;
  transform-origin: center bottom;
  animation: nexus-bar-pulse 1.15s ease-in-out infinite alternate;
}

.nexus-loader-bar:nth-child(1) {
  height: var(--nexus-loader-unit);
  animation-delay: -880ms;
}

.nexus-loader-bar:nth-child(2) {
  height: calc(var(--nexus-loader-unit) * 2);
  animation-delay: -660ms;
}

.nexus-loader-bar:nth-child(3) {
  height: calc(var(--nexus-loader-unit) * 3);
  animation-delay: -440ms;
}

.nexus-loader-bar:nth-child(4) {
  height: calc(var(--nexus-loader-unit) * 4);
  animation-delay: -220ms;
}

.nexus-loader-bar:nth-child(5) {
  height: calc(var(--nexus-loader-unit) * 5);
}

.nexus-loader-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--nexus-loader-unit);
  height: var(--nexus-loader-unit);
  border-radius: 50%;
  background: #fff;
  animation: nexus-indicator-travel 1.45s cubic-bezier(0.45, 0, 0.55, 1)
    infinite;
}

.nexus-startup.is-opening-fallback .nexus-startup__opening-fallback {
  display: grid;
}

.nexus-startup.is-opening-fallback .nexus-startup__opening-video {
  display: none;
}

.nexus-startup__opening-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #217d73;
  object-fit: contain;
}

.nexus-startup__reveal {
  z-index: 2;
  display: grid;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 55%, rgb(255 255 255 / 6%), transparent 34%),
    #080b11;
  opacity: 0;
}

.nexus-startup__beams {
  position: absolute;
  inset: -1%;
  width: 102%;
  height: 102%;
  overflow: visible;
  opacity: 0;
}

.nexus-startup__floor {
  position: absolute;
  top: 84%;
  left: 50%;
  width: min(96vw, 920px);
  height: clamp(38px, 12vh, 100px);
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 50%, rgb(245 236 218 / 26%), transparent 64%),
    radial-gradient(ellipse at 50% 76%, rgb(190 199 216 / 13%), transparent 72%);
  filter: blur(8px);
  opacity: 0;
}

.nexus-startup__dust {
  position: absolute;
  inset: 14% 12% 20%;
  pointer-events: none;
}

.nexus-startup__dust i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f4e7c8;
  box-shadow: 0 0 8px 2px rgb(244 231 200 / 42%);
  opacity: 0;
}

.nexus-startup__dust i:nth-child(1) {
  top: 24%;
  left: 18%;
}

.nexus-startup__dust i:nth-child(2) {
  top: 32%;
  left: 72%;
  width: 2px;
  height: 2px;
}

.nexus-startup__dust i:nth-child(3) {
  top: 46%;
  left: 34%;
}

.nexus-startup__dust i:nth-child(4) {
  top: 54%;
  left: 80%;
  width: 2px;
  height: 2px;
}

.nexus-startup__dust i:nth-child(5) {
  top: 64%;
  left: 25%;
  width: 2px;
  height: 2px;
}

.nexus-startup__dust i:nth-child(6) {
  top: 70%;
  left: 63%;
}

.nexus-startup__dust i:nth-child(7) {
  top: 16%;
  left: 54%;
  width: 2px;
  height: 2px;
}

.nexus-startup__dust i:nth-child(8) {
  top: 78%;
  left: 44%;
  width: 2px;
  height: 2px;
}

.nexus-startup__brand {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(92vw, 620px);
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  text-align: center;
}

.nexus-startup__mark {
  display: grid;
  width: clamp(56px, 15vw, 72px);
  aspect-ratio: 1;
  margin-bottom: clamp(18px, 5vw, 30px);
  place-items: center;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 22%;
  background: #c9e6df;
  box-shadow: 0 0 0 rgb(241 219 168 / 0%);
  color: #1e5d5b;
  font-family: var(--font-display, var(--font-body, Arial, sans-serif));
  font-size: clamp(2.1rem, 8vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  clip-path: circle(0 at 50% 50%);
}

.nexus-startup__wordmark {
  margin: 0;
  color: #f4e7c8;
  font-family: var(--font-display, var(--font-body, Arial, sans-serif));
  font-size: clamp(1.7rem, 7vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(8px);
}

.nexus-startup__tagline {
  margin: 8px 0 0;
  color: rgb(255 247 223 / 82%);
  font-size: clamp(0.86rem, 3.5vw, 1.16rem);
  font-weight: 600;
  letter-spacing: 0.025em;
  opacity: 0;
  transform: translateY(6px);
}

.nexus-startup__notice {
  max-width: 420px;
  margin: 18px 0 0;
  color: rgb(255 255 255 / 88%);
  font-size: 0.9rem;
  line-height: 1.5;
}

.nexus-startup__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.nexus-startup__actions[hidden],
.nexus-startup__notice[hidden] {
  display: none;
}

.nexus-startup__button {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid rgb(255 247 223 / 52%);
  border-radius: 6px;
  background: transparent;
  color: #fff7df;
  cursor: pointer;
  font: inherit;
}

.nexus-startup__button:hover,
.nexus-startup__button:focus-visible {
  border-color: #fff;
  background: rgb(255 255 255 / 12%);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nexus-startup.is-spotlight .nexus-startup__opening {
  animation: nexus-opening-out 720ms ease-in-out both;
}

.nexus-startup.is-spotlight .nexus-startup__reveal {
  animation: nexus-stage-in 720ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.nexus-startup.is-spotlight .nexus-startup__beams {
  animation: nexus-beams-focus 2600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nexus-startup.is-spotlight .nexus-startup__floor {
  animation: nexus-floor-light 1800ms ease-out 450ms both;
}

.nexus-startup.is-spotlight .nexus-startup__dust i {
  animation: nexus-dust-appear 1100ms ease-out 450ms both;
}

.nexus-startup.is-spotlight .nexus-startup__dust i:nth-child(even) {
  animation-delay: 700ms;
}

.nexus-startup.is-spotlight .nexus-startup__wordmark {
  animation: nexus-copy-in 900ms ease-out 650ms both;
}

.nexus-startup.is-spotlight .nexus-startup__tagline {
  animation: nexus-copy-in 800ms ease-out 900ms both;
}

.nexus-startup.is-spotlight .nexus-startup__mark {
  animation: nexus-mark-reveal 3000ms cubic-bezier(0.2, 0.7, 0.18, 1) both;
}

.nexus-startup.is-reduced-motion {
  transition-duration: 0.01ms;
}

.nexus-startup.is-reduced-motion .nexus-startup__opening {
  display: none;
}

.nexus-startup.is-reduced-motion .nexus-startup__reveal {
  opacity: 1;
}

.nexus-startup.is-reduced-motion .nexus-startup__beams,
.nexus-startup.is-reduced-motion .nexus-startup__floor,
.nexus-startup.is-reduced-motion .nexus-startup__dust i,
.nexus-startup.is-reduced-motion .nexus-startup__wordmark,
.nexus-startup.is-reduced-motion .nexus-startup__tagline {
  opacity: 1;
  transform: none;
}

.nexus-startup.is-reduced-motion .nexus-startup__mark {
  clip-path: circle(74% at 50% 50%);
  opacity: 1;
}

@keyframes nexus-opening-out {
  to {
    opacity: 0;
    transform: scale(1.025);
  }
}

@keyframes nexus-bar-pulse {
  from {
    transform: scaleY(0.78);
  }

  to {
    transform: scaleY(1);
  }
}

@keyframes nexus-indicator-travel {
  0%,
  90%,
  100% {
    transform: translate(0, calc(var(--nexus-loader-unit) * 2.6));
  }

  10% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 1.5),
      calc(var(--nexus-loader-unit) * 1.7)
    );
  }

  20% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 3),
      calc(var(--nexus-loader-unit) * 0.8)
    );
  }

  30% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 4.5),
      calc(var(--nexus-loader-unit) * -0.1)
    );
  }

  40%,
  50% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 6),
      calc(var(--nexus-loader-unit) * -1)
    );
  }

  60% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 4.5),
      calc(var(--nexus-loader-unit) * -0.1)
    );
  }

  70% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 3),
      calc(var(--nexus-loader-unit) * 0.8)
    );
  }

  80% {
    transform: translate(
      calc(var(--nexus-loader-unit) * 1.5),
      calc(var(--nexus-loader-unit) * 1.7)
    );
  }
}

@keyframes nexus-stage-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes nexus-beams-focus {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }

  25% {
    opacity: 0.75;
  }

  72% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0.92;
    transform: scale(1);
  }
}

@keyframes nexus-floor-light {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.68);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes nexus-dust-appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.8;
  }
}

@keyframes nexus-mark-reveal {
  0%,
  66% {
    clip-path: circle(0 at 50% 50%);
    opacity: 0;
    filter: brightness(0.55);
    box-shadow: 0 0 0 rgb(241 219 168 / 0%);
  }

  78% {
    clip-path: circle(74% at 50% 50%);
    opacity: 1;
    filter: brightness(1.3);
    box-shadow: 0 0 38px 8px rgb(241 219 168 / 56%);
  }

  90% {
    box-shadow: 0 0 30px 6px rgb(241 219 168 / 48%);
  }

  100% {
    clip-path: circle(74% at 50% 50%);
    opacity: 1;
    filter: brightness(1);
    box-shadow: 0 0 23px 4px rgb(241 219 168 / 38%);
  }
}

@keyframes nexus-copy-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .nexus-startup__brand {
    padding-inline: 8px;
  }

  .nexus-startup__wordmark {
    font-size: clamp(1.48rem, 7vw, 1.8rem);
  }
}
