/* ========================================================================
   PROFESSIONAL SITE PRELOADER & TELEMETRY BACKGROUND
   ======================================================================== */

/* 0. Ambient Cryptographic Telemetry Canvas */
#gm-cyber-hex-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  transform: translateZ(0) !important;
  will-change: transform;
  backface-visibility: hidden;
}

.site {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Enforce absolute horizontal containment across all viewports */
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* 1. Preloader Overlay (Full-Screen) */
#gm-cyber-splash {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 99999999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.38s ease;
  user-select: none;
  cursor: default;
}

/* Dark Mode Theme */
html.dark-mode #gm-cyber-splash,
html[data-theme="dark"] #gm-cyber-splash {
  background-color: #040609 !important;
  color: #f8fafc !important;
}

/* Light Mode Theme */
html.light-mode #gm-cyber-splash,
html[data-theme="light"] #gm-cyber-splash {
  background-color: #f8fafc !important;
  color: #090b10 !important;
}

#gm-cyber-splash.gm-splash-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.985) !important;
}

/* Preloader Content Container */
.gm-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  max-width: 400px;
}

/* Logo Wrapping */
.gm-splash-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-bottom: 2px;
}

.gm-splash-logo {
  height: 44px;
  max-height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

/* Dark Mode Logo Display */
html.dark-mode .gm-splash-logo-dark,
html[data-theme="dark"] .gm-splash-logo-dark {
  display: block !important;
  filter: drop-shadow(0 2px 14px rgba(255, 255, 255, 0.12));
}

html.dark-mode .gm-splash-logo-light,
html[data-theme="dark"] .gm-splash-logo-light {
  display: none !important;
}

/* Light Mode Logo Display */
html.light-mode .gm-splash-logo-light,
html[data-theme="light"] .gm-splash-logo-light {
  display: block !important;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.06));
}

html.light-mode .gm-splash-logo-dark,
html[data-theme="light"] .gm-splash-logo-dark {
  display: none !important;
}

/* If only one logo exists */
.gm-splash-logo:only-child {
  display: block !important;
}

.gm-splash-fallback-title {
  font-family: var(--gh-font-body, var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Loading Typography & Animated Dots */
.gm-splash-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gh-font-body, var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

html.dark-mode .gm-splash-label,
html[data-theme="dark"] .gm-splash-label {
  color: #94a3b8;
}

html.light-mode .gm-splash-label,
html[data-theme="light"] .gm-splash-label {
  color: #475569;
}

.gm-splash-dots {
  display: inline-flex;
  margin-left: 2px;
  width: 16px;
  text-align: left;
}

.gm-splash-dots span {
  animation: gmDotFade 1.4s infinite ease-in-out;
  opacity: 0.2;
}

.gm-splash-dots span.dot-1 {
  animation-delay: 0s;
}
.gm-splash-dots span.dot-2 {
  animation-delay: 0.22s;
}
.gm-splash-dots span.dot-3 {
  animation-delay: 0.44s;
}

@keyframes gmDotFade {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Progress Track & Bar */
.gm-splash-progress-track {
  width: 150px;
  height: 2px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-top: 2px;
}

html.dark-mode .gm-splash-progress-track,
html[data-theme="dark"] .gm-splash-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

html.light-mode .gm-splash-progress-track,
html[data-theme="light"] .gm-splash-progress-track {
  background: rgba(0, 0, 0, 0.08);
}

.gm-splash-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.08s linear;
}

html.dark-mode .gm-splash-progress-bar,
html[data-theme="dark"] .gm-splash-progress-bar {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

html.light-mode .gm-splash-progress-bar,
html[data-theme="light"] .gm-splash-progress-bar {
  background: #090b10;
  box-shadow: 0 0 8px rgba(9, 11, 16, 0.2);
}
