/* BOOT-прелоадер «взлом» */

#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 8vw;
  transition: opacity 0.5s ease, filter 0.5s ease;
}
#boot.is-flash { filter: invert(1); }
#boot.is-out {
  opacity: 0;
  filter: contrast(3) brightness(1.6);
  pointer-events: none;
}

.boot-log {
  font-size: clamp(11px, 1.4vw, 15px);
  line-height: 2;
  color: var(--faint);
  white-space: pre;
  min-height: 12em;
}
.boot-line::after { content: ''; }
.boot-log .boot-line:last-child::after {
  content: '_';
  color: var(--red);
  animation: boot-blink 0.7s steps(1) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }

.boot-final {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin-top: 5vh;
}
.boot-final.is-on { display: flex; }

.boot-granted {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(44px, 8vw, 120px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--red);
  animation: granted-in 0.5s steps(3) both, granted-glitch 3s steps(1) 1s infinite;
}
@keyframes granted-in {
  0% { opacity: 0; transform: translateX(-20px) skewX(-20deg); clip-path: inset(30% 0 30% 0); }
  60% { opacity: 1; clip-path: inset(10% 0 0 0); }
  100% { opacity: 1; transform: none; clip-path: inset(0); }
}
@keyframes granted-glitch {
  0%, 93%, 100% { text-shadow: none; transform: none; }
  95% { text-shadow: 5px 0 rgba(42, 170, 255, 0.7), -5px 0 rgba(255, 42, 42, 0.7); transform: translateX(2px); }
  97% { text-shadow: -4px 0 rgba(255, 42, 42, 0.6); transform: translateX(-2px) skewX(4deg); }
}

.boot-enter {
  font-family: var(--mono);
  font-size: clamp(15px, 1.8vw, 20px);
  letter-spacing: 0.12em;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 16px 34px;
  min-height: 48px;
  transition: background 0.15s, color 0.15s;
}
.boot-enter:hover { background: var(--fg); color: #000; }
.boot-enter:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.boot-nosound {
  font-size: 12px;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.boot-nosound:hover { color: var(--faint); }

.boot-hint { font-size: 10px; color: #3a3a3a; letter-spacing: 0.1em; }
