/* ── Loader ─────────────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
#loader.loader--fade {
  opacity: 0;
  pointer-events: none;
}

/* ── Landing reveal ─ start hidden, revealed via JS ── */
.navbar,
.content,
.bg-overlay {
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.landing--reveal {
  opacity: 1 !important;
  transform: scale(1) !important;
}
#loader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#loader-ui {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.loader-brand {
  font-size: 1.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text);
}
.loader-brand .accent {
  color: var(--color-blue);
  filter: drop-shadow(0 0 12px rgba(79, 209, 255, 0.5));
}
.loader-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 260px;
}
.loader-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
#loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-violet));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(79, 209, 255, 0.7);
  transition: width 0.05s linear;
}
.loader-bar-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(79, 209, 255, 0.45);
}
#scan-percent {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-heading);
  color: rgba(79, 209, 255, 0.45);
  letter-spacing: 0.05em;
}
