/* motion.css
   Load this last. Keyframes live here, and the reduced-motion
   block turns them off. JS modules also read
   html[data-motion="reduce"] and skip particle, pulse, and
   glitch work.

   Do not put layout in this file.
*/

.logo__die,
.core__void {
  animation: diepulse 2.6s ease-in-out infinite;
}

.lamp__dot {
  animation: lamp 2.2s ease-in-out infinite;
}

.boot__caret {
  animation: caret 1s steps(1) infinite;
}

@keyframes diepulse {
  0%,
  100% { opacity: 0.55; }
  50% { opacity: 1; filter: drop-shadow(0 0 6px rgba(141, 255, 192, 0.85)); }
}

@keyframes lamp {
  0%,
  100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes caret {
  0%,
  45% { opacity: 1; }
  50%,
  100% { opacity: 0; }
}

.is-glitch {
  animation: glitch 200ms steps(2, end);
}

@keyframes glitch {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); text-shadow: 2px 0 #ff5c54, -2px 0 #8dffc0; }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0); text-shadow: none; }
}

.boot {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: stretch;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  background: #010101;
}

html[data-boot="on"] .boot {
  display: flex;
}

html[data-boot="on"] {
  overflow: hidden;
}

html[data-boot="on"] body {
  overflow: hidden;
}

.boot.is-leaving {
  opacity: 0;
  transition: opacity 0.45s linear;
}

.boot__crt {
  width: min(640px, 100%);
  margin: auto;
  padding: 1.2rem 1rem 1rem;
  background:
    radial-gradient(ellipse at center, rgba(80, 255, 170, 0.05), transparent 60%),
    #020302;
  border: 1px solid rgba(184, 255, 212, 0.28);
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.8);
  position: relative;
}

.boot__crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: multiply;
}

.boot__kicker,
.boot__row,
.boot__skip {
  position: relative;
  z-index: 1;
}

.boot__kicker {
  margin: 0 0 1rem;
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--patina-ink);
  font-size: 0.75rem;
}

.boot__log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.boot__row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--patina-ink);
  opacity: 0;
  transform: translateY(4px);
}

html.no-js .boot__row,
.boot__row.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.18s linear, transform 0.18s linear;
}

.boot__dots {
  flex: 1;
  border-bottom: 1px dotted rgba(184, 255, 212, 0.4);
  transform: translateY(-0.28em);
}

.boot__ok { color: var(--patina-ink); }
.boot__lock { color: var(--warn-ink); }
.boot__wait { color: var(--copper); }

.boot__skip {
  margin-top: 1.2rem;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--copper);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.boot__skip:hover {
  background: rgba(231, 165, 106, 0.1);
}

.boot__caret {
  display: inline-block;
  width: 0.55rem;
  height: 0.95em;
  margin-left: 0.35rem;
  background: var(--patina);
  vertical-align: -0.1em;
}

html.js:not([data-motion="reduce"]) .trace--hot,
html.js:not([data-motion="reduce"]) .route {
  --lit: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__stage {
    height: auto !important;
  }

  .hero__pin {
    position: relative !important;
    top: auto !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .trace--hot,
  .route {
    --lit: 1 !important;
    opacity: 1 !important;
  }

  .pulse,
  .cursor-glow,
  #dust {
    display: none !important;
  }
}
