/* ============================================================
   boot.css — Cold Case Club v2 boot sequence
   1987-era IBM amber monochrome CRT intro. Period-accurate.
   ============================================================ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0705;
  color: #f4a82e; /* amber phosphor */
  font-family: var(--font-mono, "Courier Prime", monospace);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
  cursor: default;
}

/* CRT scanlines + curvature + flicker */
.boot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.18) 0px,
      rgba(0,0,0,0.18) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  z-index: 2;
  animation: boot-scan 6s linear infinite;
}

.boot::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
  z-index: 3;
  animation: boot-flicker 3.2s steps(2) infinite;
}

@keyframes boot-scan {
  0%   { background-position: 0 0; }
  100% { background-position: 0 12px; }
}
@keyframes boot-flicker {
  0%, 96%, 100% { opacity: 1; }
  97%           { opacity: 0.85; }
  98%           { opacity: 1; }
  99%           { opacity: 0.92; }
}

.boot__inner {
  position: relative;
  z-index: 4;
  width: min(760px, 92vw);
  padding: 32px;
  text-shadow: 0 0 2px rgba(244,168,46,0.7), 0 0 12px rgba(244,168,46,0.28);
}

/* Logo — spinning 2D brand mark */
.boot__logo-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 28px;
}
.boot__logo {
  width: 140px;
  height: 140px;
  animation: boot-spin 2.4s cubic-bezier(0.55, 0.1, 0.3, 1) forwards;
  filter: drop-shadow(0 0 14px rgba(244,168,46,0.5));
}
.boot__logo-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f4a82e;
}
@keyframes boot-spin {
  0%   { transform: rotate(0deg) scale(0.4); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: rotate(1080deg) scale(1); opacity: 1; }
}

.boot__title {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.5em;
  color: #f4a82e;
  margin-bottom: 24px;
  opacity: 0;
  animation: boot-fade-in 0.4s ease-out 2.4s forwards;
}

.boot__log {
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  min-height: 220px;
  margin-bottom: 28px;
  color: #d9922a;
}
.boot__log-line {
  display: block;
  opacity: 0;
  animation: boot-type 0.28s steps(1) forwards;
}
.boot__log-line .ok { color: #6bc96b; margin-left: 12px; }
.boot__log-line .warn { color: #e8894d; margin-left: 12px; }

@keyframes boot-type {
  0%   { opacity: 0; transform: translateX(-4px); }
  100% { opacity: 1; transform: none; }
}

.boot__cursor {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: #f4a82e;
  vertical-align: -2px;
  margin-left: 4px;
  animation: boot-blink 0.9s steps(2) infinite;
}
@keyframes boot-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.boot__prompt {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.25em;
  margin-top: 18px;
  opacity: 0;
  transition: opacity 500ms ease-out;
  color: #f4d89a;
  text-shadow: 0 0 8px rgba(244,216,154,0.5);
}
.boot__prompt.is-visible { opacity: 1; }
.boot__prompt kbd {
  display: inline-block;
  padding: 4px 10px;
  border: 1.5px solid #f4a82e;
  border-radius: 3px;
  font-family: var(--font-mono);
  margin: 0 8px;
  background: rgba(244,168,46,0.08);
  animation: boot-kbd-pulse 1.4s ease-in-out infinite;
}
@keyframes boot-kbd-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(244,168,46,0); }
  50%      { box-shadow: 0 0 16px rgba(244,168,46,0.55); }
}

@keyframes boot-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Exit animation */
.boot.is-exiting {
  animation: boot-power-off 620ms cubic-bezier(0.4, 0, 0.4, 1) forwards;
  pointer-events: none;
}
@keyframes boot-power-off {
  0%   { transform: scale(1); filter: brightness(1); opacity: 1; }
  20%  { transform: scale(1); filter: brightness(3); opacity: 1; }
  25%  { transform: scaleY(0.02) scaleX(1.1); filter: brightness(5); opacity: 1; }
  30%  { transform: scaleY(0.004) scaleX(0.01); filter: brightness(10); opacity: 1; }
  100% { transform: scale(0); filter: brightness(0); opacity: 0; }
}

/* Prevent scroll while boot is active */
body.boot-active { overflow: hidden; }

/* Reduced motion — still show it but skip the CRT stuff */
@media (prefers-reduced-motion: reduce) {
  .boot::before, .boot::after { animation: none; }
  .boot__logo { animation: none; transform: rotate(360deg); opacity: 1; }
  .boot__title { opacity: 1; animation: none; }
  .boot.is-exiting { animation: none; opacity: 0; transition: opacity 200ms; }
}

/* Mobile */
@media (max-width: 600px) {
  .boot__inner { padding: 20px; }
  .boot__logo { width: 100px; height: 100px; }
  .boot__log { font-size: 12px; min-height: 180px; }
  .boot__prompt { font-size: 12px; letter-spacing: 0.18em; }
}
