/* ==========================================================================
   DESIGN TOKENS & VARIABLE DEFINITIONS
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-primary: #070b17;
  --surface-translucent: rgba(12, 18, 34, 0.45);
  --border-glass: rgba(201, 169, 107, 0.12);
  
  --text-primary: #f5f1ea;
  --text-secondary: #b8bdd0;
  
  --accent-gold: #c9a96b;
  --accent-gold-hover: #f7d38f;
  --accent-blue: #7c8cff;
  
  --line-constellation: rgba(201, 169, 107, 0.2);
  --shadow-gold: rgba(201, 169, 107, 0.15);
  
  /* Fonts */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  
  /* Transitions */
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  z-index: 2;
  overflow: hidden;
}

/* Canvas Backgrounds */
.canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#bg-stars-canvas {
  opacity: 0.85;
}

#interactive-constellation-canvas {
  pointer-events: auto; /* Allow mouse interaction */
  z-index: 1;
}

/* Cosmic Vignette Overlay */
.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(7, 11, 23, 0) 20%, rgba(4, 7, 16, 0.9) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   HERO / MAIN CONTENT
   ========================================================================== */
.hero-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 680px;
  text-align: center;
  z-index: 3;
}

/* Logo Block */
.logo-block {
  margin-bottom: clamp(16px, 4.5vh, 40px);
  opacity: 0;
  transform: scale(0.96);
  filter: blur(8px);
  animation: entrance-fade 1.2s var(--transition-smooth) forwards;
  animation-delay: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-image {
  width: clamp(120px, 17vh, 168px);
  height: auto;
  border-radius: 50%;
  /* High premium subtle shadow & glow matching the gold color */
  box-shadow: 0 0 40px rgba(201, 169, 107, 0.1),
              inset 0 0 15px rgba(201, 169, 107, 0.05);
  border: 1px solid rgba(201, 169, 107, 0.15);
  padding: 10px;
  background: radial-gradient(circle, rgba(12, 18, 34, 0.6) 0%, rgba(7, 11, 23, 0.9) 100%);
  transition: transform 0.6s var(--transition-smooth), box-shadow 0.6s var(--transition-smooth);
}

.logo-image:hover {
  transform: scale(1.03);
  box-shadow: 0 0 50px rgba(201, 169, 107, 0.25),
              inset 0 0 20px rgba(201, 169, 107, 0.1);
}

/* Heading Group */
.heading-group {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(8px);
  animation: entrance-slide-up 1.4s var(--transition-smooth) forwards;
  animation-delay: 0.5s;
  margin-bottom: clamp(16px, 4.5vh, 40px);
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  background: linear-gradient(180deg, #ffffff 40%, #e3dcd0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 24px rgba(7, 11, 23, 0.5);
}

.main-title span {
  display: block;
  font-size: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  margin-bottom: var(--space-xs);
  -webkit-text-fill-color: var(--accent-gold);
  font-weight: 400;
  font-family: var(--font-body);
}

.sub-title {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* Status Module (Loading Bar) */
.status-module {
  opacity: 0;
  transform: translateY(15px);
  filter: blur(8px);
  animation: entrance-slide-up 1.6s var(--transition-smooth) forwards;
  animation-delay: 0.8s;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-translucent);
  padding: clamp(12px, 2.2vh, 20px) clamp(16px, 4vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-label-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-label {
  color: var(--text-primary);
  font-weight: 500;
  animation: pulse-breathing 3s ease-in-out infinite;
}

.status-percentage {
  color: var(--accent-gold);
  font-weight: 600;
}

/* Loading Bar CSS */
.loading-track {
  width: 100%;
  height: 8px;
  background: rgba(12, 18, 34, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.loading-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold) 0%, #f7d38f 100%);
  border-radius: 9999px;
  position: relative;
  box-shadow: 0 0 12px rgba(201, 169, 107, 0.4);
}

/* Shimmer overlay effect on loading fill */
.loading-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100__
  );
  background-size: 200% 100%;
  animation: shimmer-effect 2s linear infinite;
}

/* Custom separator __ fix: replacing literal __ with % */
.loading-fill::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.status-caption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 12px;
  letter-spacing: 0.05em;
  font-weight: 300;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-minimalist {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  z-index: 3;
  opacity: 0;
  animation: entrance-fade 1.5s var(--transition-smooth) forwards;
  animation-delay: 1.1s;
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-bottom: 4px;
}

.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: color 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.social-link:hover {
  color: var(--accent-gold);
  transform: translateY(-1px);
  background: rgba(201, 169, 107, 0.05);
  border-color: rgba(201, 169, 107, 0.1);
}

.copyright {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes entrance-fade {
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes entrance-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pulse-breathing {
  0%, 100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes shimmer-effect {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  
  .status-label {
    animation: none !important;
  }
  
  .loading-fill::after {
    animation: none !important;
    display: none;
  }
  
  .logo-block, .heading-group, .status-module, .footer-minimalist {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 767px) {
  .app-container {
    padding: var(--space-sm);
  }
  
  .hero-wrapper {
    margin-top: 0;
  }
  
  .logo-block {
    margin-bottom: clamp(12px, 3vh, 24px);
  }
  
  .logo-image {
    width: clamp(108px, 13vh, 132px);
    padding: 8px;
  }
  
  .heading-group {
    margin-bottom: clamp(12px, 3vh, 24px);
  }
  
  .main-title {
    font-size: clamp(1.6rem, 5vh, 2.5rem);
  }
  
  .status-module {
    max-width: 270px;
    padding: clamp(8px, 1.8vh, 16px) var(--space-md);
  }
  
  .loading-track {
    height: 6px;
  }
  
  .social-links {
    gap: var(--space-sm);
  }
}

@media (max-height: 600px) {
  .app-container {
    padding: var(--space-xs);
  }
  
  .logo-block {
    margin-bottom: var(--space-xs);
  }
  
  .logo-image {
    width: clamp(90px, 12vh, 108px);
    padding: 6px;
  }
  
  .heading-group {
    margin-bottom: var(--space-xs);
  }
  
  .main-title {
    font-size: clamp(1.4rem, 5vh, 2rem);
  }
  
  .sub-title {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .status-module {
    padding: var(--space-xs) var(--space-md);
    border-radius: 12px;
  }
  
  .footer-minimalist {
    gap: 2px;
  }
}
