#loading {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: transparent;   /* the #ocean-bg canvas shows through (loader = ocean surfacing) */
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  user-select: none;
}

.ldr-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Subtle scan-line texture */
.ldr-ui::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.03) 0px,
    rgba(0,0,0,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

/* ── LOGO ─────────────────────────────────────────────────────── */
/* Brand logo image — dead-center of the screen, both axes */
.ldr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(220px, 36vw, 460px);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 26px rgba(0, 229, 255, 0.35));
}

.ldr-tagline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(50% + clamp(48px, 8vw, 96px));   /* just below the centered logo */
  font-size: clamp(9px, 1.05vw, 13px);
  letter-spacing: 0.3em;
  color: rgba(0, 229, 255, 0.45);
  white-space: nowrap;
}

/* ── LEFT DEPTH GAUGE ─────────────────────────────────────────── */
.ldr-gauge-wrap {
  position: absolute;
  left: clamp(20px, 3.5vw, 52px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ldr-gauge-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(0, 229, 255, 0.55);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ldr-gauge-track {
  width: 5px;
  height: clamp(120px, 22vh, 200px);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

#load-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(to top, #00e5ff, #00e5ff);
  border-radius: 3px;
  transition: height 0.3s ease;
}

#load-fill::after {
  content: '';
  position: absolute;
  top: -2px; left: -3px; right: -3px;
  height: 5px;
  background: #00e5ff;
  filter: blur(4px);
  border-radius: 2px;
}

/* ── BOTTOM CLUSTER ───────────────────────────────────────────── */
.ldr-bottom {
  position: absolute;
  bottom: clamp(28px, 5vh, 56px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  white-space: nowrap;
}

#load-pct {
  font-size: clamp(44px, 6.5vw, 80px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow:
    0 0 16px rgba(0, 229, 255, 0.8),
    0 0 36px rgba(0, 229, 255, 0.4);
}

.ldr-bar-track {
  width: clamp(180px, 26vw, 340px);
  height: 2px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.ldr-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00e5ff, #00e5ff);
  transition: width 0.3s ease;
}

#load-text {
  font-size: clamp(9px, 1vw, 12px);
  letter-spacing: 0.26em;
  color: rgba(0, 229, 255, 0.55);
  text-transform: uppercase;
  transition: opacity 0.2s;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (orientation: landscape) and (max-height: 480px) {
  .ldr-logo { width: clamp(150px, 26vw, 300px); }   /* stays centered (top:50%) */
  .ldr-gauge-track { height: clamp(80px, 18vh, 130px); }
  #load-pct { font-size: clamp(32px, 5vw, 52px); }
  .ldr-bottom { bottom: 14px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  #load-fill { transition: none; }
  .ldr-bar-fill { transition: none; }
}
