/* NDRC Labs Promo — Animation Keyframes */

/* === Boot Screen === */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3rem 2rem;
  overflow: hidden;
  font-family: var(--font-terminal);
  transition: opacity 0.8s ease;
}

#boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#boot-screen.hidden {
  display: none;
}

#boot-output {
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  color: var(--amber);
  line-height: 1.6;
  white-space: pre-wrap;
  max-width: 80ch;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-dim) transparent;
}

#boot-output::-webkit-scrollbar {
  width: 6px;
}

#boot-output::-webkit-scrollbar-track {
  background: transparent;
}

#boot-output::-webkit-scrollbar-thumb {
  background: var(--amber-dim);
  border-radius: 0;
}

#boot-output::-webkit-scrollbar-thumb:hover {
  background: var(--amber);
}

#boot-output .boot-line {
  opacity: 0;
  animation: boot-line-appear 0.05s forwards;
}

@keyframes boot-line-appear {
  to { opacity: 1; }
}

#boot-output .boot-ok {
  color: var(--green);
}

#boot-output .boot-warn {
  color: #ff8800;
}

#boot-output .boot-fail {
  color: var(--red);
}

#boot-output .boot-header {
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber-glow);
}

#boot-prompt {
  font-family: var(--font-terminal);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: var(--amber-dim);
  margin-top: 2rem;
  animation: blink 1s step-end infinite;
}

/* === Typewriter === */
.typewriter-cursor::after {
  content: '_';
  animation: blink 0.7s step-end infinite;
}

/* === Radar Sweep === */
.radar-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid var(--amber-dim);
  position: relative;
  overflow: hidden;
  margin: 2rem auto;
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(to right, var(--amber), transparent);
  transform-origin: left center;
  animation: radar-rotate 4s linear infinite;
}

@keyframes radar-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-trail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 176, 0, 0.08) 30deg,
    transparent 60deg
  );
  animation: radar-rotate 4s linear infinite;
}

.radar-ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.radar-ring-1 { top: 25%; left: 25%; right: 25%; bottom: 25%; }
.radar-ring-2 { top: 40%; left: 40%; right: 40%; bottom: 40%; }

.radar-crosshair-h,
.radar-crosshair-v {
  position: absolute;
  background: var(--border);
}

.radar-crosshair-h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

.radar-crosshair-v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.radar-blip {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--amber-glow);
  animation: blip-pulse 2s ease-in-out infinite;
}

@keyframes blip-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* === Counter Roll === */
@keyframes count-glow {
  0%, 100% { text-shadow: 0 0 10px var(--amber-glow); }
  50% { text-shadow: 0 0 20px var(--amber-glow), 0 0 40px rgba(255, 176, 0, 0.2); }
}

.stat-number.counting {
  animation: count-glow 0.5s ease-in-out;
}

/* === Pulse === */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.pulse {
  animation: pulse 3s ease-in-out infinite;
}

/* === Data Stream (for decoration) === */
.data-stream {
  position: absolute;
  font-family: var(--font-terminal);
  font-size: 0.7rem;
  color: var(--amber-dark);
  writing-mode: vertical-rl;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0.15;
  pointer-events: none;
}

/* === Boot Screen Mobile === */
@media (max-width: 600px) {
  #boot-screen {
    padding: 1.5rem 1rem;
  }

  #boot-output {
    font-size: 0.7rem;
    line-height: 1.5;
  }

  #boot-prompt {
    font-size: 0.8rem;
  }

  .radar-container {
    width: 150px;
    height: 150px;
  }
}
