/* ========== Font Face Declarations ========== */
@font-face {
    font-family: 'SpaceGrotesk';
    src: url('/static/fonts/SpaceGrotesk-Regular.woff2') format('woff2'),
         url('/static/fonts/SpaceGrotesk-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'SpaceGrotesk';
    src: url('/static/fonts/SpaceGrotesk-Medium.woff2') format('woff2'),
         url('/static/fonts/SpaceGrotesk-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'SpaceGrotesk';
    src: url('/static/fonts/SpaceGrotesk-SemiBold.woff2') format('woff2'),
         url('/static/fonts/SpaceGrotesk-SemiBold.woff') format('woff');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'SpaceGrotesk';
    src: url('/static/fonts/SpaceGrotesk-Bold.woff2') format('woff2'),
         url('/static/fonts/SpaceGrotesk-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'SpaceGrotesk';
    src: url('/static/fonts/SpaceGrotesk-Light.woff2') format('woff2'),
         url('/static/fonts/SpaceGrotesk-Light.woff') format('woff');
    font-weight: 900;
    font-display: swap;
}

/* ========== Global ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif !important;
}

body {
  background-color: #000;
  color: #fff;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ========== Force Font on All Elements ========== */
input, textarea, select, button, 
h1, h2, h3, h4, h5, h6, 
p, span, div, a, li, ul, ol,
.font-sans, .font-medium, .font-semibold, .font-bold,
.navbar, .logo, .hero-content, .badge, .cta-btn,
.loader-text, .loader-message {
    font-family: 'SpaceGrotesk', 'Inter', sans-serif !important;
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo span {
  background: linear-gradient(180deg, #D6A555 0%, #F3D082 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.navbar nav a {
  color: #ccc;
  text-decoration: none;
  margin: 0 15px;
  font-size: 0.9rem;
  transition: color 0.3s;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
  text-transform: uppercase;
}

.navbar nav a:hover {
  color: #fff;
}

.signin {
  color: #f8d700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

/* ========== Hero Section ========== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#bg-threejs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

/* Badge (BETA RELEASE) — compact dark pill with bright yellow dot */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  font-family: 'SpaceGrotesk', 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  color: #ddd;
  background: linear-gradient(180deg, #202020 0%, #111 100%);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 5px 100%, 0 50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6), inset 0 0 6px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* small glowing yellow dot on the left */
.badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8d6, #ffd800 40%, #cc9a00 100%);
  box-shadow: 0 0 10px rgba(248,215,0,0.95);
  flex: 0 0 10px;
  margin-left: -4px; /* tuck dot slightly towards edge like reference */
}

/* Title */
.hero-content h1 {
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.2;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

.hero-content h1 span {
  font-style: italic;
  font-weight: 500;
}

/* Subtext */
.hero-content p {
  margin-top: 20px;
  font-size: 1rem;
  color: #aaa;
  letter-spacing: 0.5px;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

/* ========== New CTA Button Using Custom System ========== */
.cta-btn {
  margin-top: 20px;
}

/* ========== Loading overlay ========== */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000; /* solid black */
  z-index: 9999;
  opacity: 1;
  transition: opacity 300ms ease, visibility 300ms ease;
  visibility: visible;
  pointer-events: auto;
}

.loading-overlay:not(.visible) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(4px);
  color: #fff;
  min-width: 220px;
}

/* replace previous spinner area with Lottie container sizing */
.loader-spinner,
#lottie-container {
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* message + percentage row */
.loader-text {
  font-size: 0.95rem;
  color: #ddd;
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

.loader-message {
  color: #ddd;
  opacity: 0.95;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

.loader-percent {
  font-weight: 700;
  color: #f8d700;
  font-family: 'SpaceGrotesk', 'Inter', sans-serif;
}

/* Small screens */
@media (max-width: 520px) {
  .loader-box { padding: 14px 18px; min-width: 160px; }
  #lottie-container, .loader-spinner { width: 176px; height: 176px; }
  .loader-text { font-size: 0.85rem; gap: 8px; }
  .cta-btn { height: 52px; padding: 0 18px; --poly-roundness: 12px; font-size: 0.95rem; }
  .cta-btn [data-border] { width: calc(var(--h,32px) * 0.85); }
}

/* ========== Mobile Responsive Typography ========== */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .navbar {
    padding: 0 20px;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .navbar nav a {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 0.9rem;
  }
  
  .badge {
    font-size: 11px;
    padding: 3px 12px;
  }
}
