/* ===== LOADER — shown immediately, hides once JS reaches first frame ===== */
/* This rule lives at the top so it parses before anything else, giving us
   a true loading state instead of the flash of unstyled scene-text that
   would otherwise appear before the module script positions everything. */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier New', monospace;
  color: #6cff8a;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
#loader.done { opacity: 0; pointer-events: none; }
#loader .loader-content { text-align: center; }
#loader .loader-mark {
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: 0.45em;
  font-weight: 900;
  color: #f0fff5;
  text-shadow:
    0 0 14px rgba(108, 255, 138, 0.95),
    0 0 36px rgba(0, 255, 65, 0.7),
    0 0 80px rgba(0, 255, 65, 0.4);
  margin-bottom: 24px;
  /* Soft pulse so it doesn't feel frozen even on slow loads */
  animation: loader-pulse 2.2s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { opacity: 0.92; }
  50%      { opacity: 1; }
}
#loader .loader-bar {
  width: clamp(180px, 24vw, 280px);
  height: 2px;
  background: rgba(0, 255, 65, 0.18);
  margin: 0 auto;
  position: relative;
}
#loader .loader-bar-fill {
  position: absolute;
  left: 0; top: 0; height: 100%;
  background: #6cff8a;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.85);
  width: 0%;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#loader .loader-status {
  font-size: 10px; letter-spacing: 0.42em;
  color: rgba(150, 255, 170, 0.55);
  margin-top: 16px;
}
/* Hide everything except the loader until JS marks the body ready. */
body:not(.ready) > *:not(#loader) { opacity: 0 !important; }
body:not(.ready) canvas { opacity: 0 !important; }

/* Accessibility — when the user prefers reduced motion, suppress all the
   decorative CSS keyframe animations. The Three.js scene continues to
   respond to scroll but auto-scroll is disabled (handled in JS). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:root {
  --title-x: 50%;
  --title-y: 70%;
  --title-fs: 80px;
  --title-ls: 0.275em;
  --statement-y: 89%;
  --statement-x: 50%;
  --statement-ls: 0.165em;
  --statement-pad-y: 21px;
  --card-w: 274px;
  --card-h: 186px;
  --global-font: 'Courier New', monospace;
}
