/* =============================================
   2026 INDUSTRIAL CSS LOADER (NO SVG)
   ============================================= */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: #0f0f0f;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* CSS-Only Blueprint Grid */
.blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.loader-content {
  position: relative;
  width: 280px;
  text-align: center;
}

/* Logo & Scan Line */
.logo-scan-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
}

.loader-logo {
  width: 220px;
  height: auto;
  opacity: 0.8;
  filter: brightness(0.9);
}

.scan-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary, #0B6B35);
  box-shadow: 0 0 15px var(--color-primary);
  animation: scanning 2s ease-in-out infinite;
}

@keyframes scanning {
  0% { top: 0%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Typing effect line */
.loader-typing {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  color: var(--color-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  animation: typing 2s steps(42, end) forwards;
}

@keyframes typing {
  from { width: 0; }
  to { width: 42ch; }
}

/* Progress Section */
.tech-progress-container {
  font-family: 'Courier New', Courier, monospace;
}

.tech-status {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.status-value {
  color: var(--color-primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Mechanical Progress Bar */
.progress-track {
  position: relative;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  animation: loading-fill 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes loading-fill {
  0% { width: 0%; }
  40% { width: 60%; }
  70% { width: 85%; }
  100% { width: 100%; }
}

/* Segmented industrial look overlay */
.progress-segments {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), #0f0f0f calc(100% - 1px), #0f0f0f 100%);
  background-size: 15px 100%;
  pointer-events: none;
}

/* Scroll Lock */
body.loading {
  overflow: hidden;
}
