:root {
  --black: #000000;
  --white: #FFFFFF;
  --red: #E7191F;
  --red-glow: rgba(231, 25, 31, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none; /* Hide default cursor */
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* For landing page hero feel */
  background-color: var(--black);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── Custom Cursor ─── */
#cursor-dot, #cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}
#cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--red);
}
#cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}

/* ─── Loading Overlay (VR Entry effect) ─── */
#loader {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--black);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 1.2s cubic-bezier(0.165, 0.84, 0.44, 1), 
              visibility 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.loaded #loader {
  opacity: 0;
  visibility: hidden;
}
.loader-content {
  text-align: center;
}
.glitch-logo {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: var(--white);
  margin-bottom: 2rem;
  animation: pulse 2s infinite alternate;
}
.progress-text {
  font-size: 0.8rem;
  color: #888;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.progress-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 0.4s ease;
}

@keyframes pulse {
  0% { opacity: 0.6; text-shadow: 0 0 10px var(--red-glow); }
  100% { opacity: 1; text-shadow: 0 0 25px var(--red); }
}

/* Entering VR effect for the main elements */
.hero, .navbar, #bg, .elusive-btn {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.5s ease 0.5s, transform 2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
}
.loaded .hero, .loaded .navbar, .loaded #bg, .loaded .elusive-btn {
  opacity: 1;
  transform: scale(1);
}
/* Revert transition for elusive btn after loading so it can run fast */
.loaded .elusive-btn {
  transition: top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.3s ease, background 0.3s ease;
}

/* ─── 3D Background ─── */
#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: auto;
}

.navbar .nav-links {
  display: flex;
  gap: 2.5rem;
  pointer-events: auto;
}

.navbar a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.navbar a:hover {
  opacity: 1;
}
.navbar a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--red);
  transition: width 0.3s ease;
}
.navbar a:hover::after {
  width: 100%;
}

/* ─── Hero Section ─── */
.hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 10%;
  pointer-events: none;
}
.hero-content {
  max-width: 800px;
  user-select: none;
}
.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}
.title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.highlight {
  color: var(--red);
  text-shadow: 0 0 40px var(--red-glow);
}
.subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  max-width: 600px;
  line-height: 1.6;
}

/* ─── Elusive CTA ─── */
.elusive-btn {
  position: fixed; /* absolute positioning handled by JS */
  z-index: 20;
  padding: 1.2rem 3rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(231, 25, 31, 0.1);
  border: 1px solid var(--red);
  border-radius: 4px;
  outline: none;
  backdrop-filter: blur(10px);
  overflow: hidden;
  
  /* The tricky part: fast snappy movement! */
  transition: top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.3s ease, background 0.3s ease;
  pointer-events: auto; /* It needs to be hoverable to run away! */
}

/* Glassy glow inside button */
.elusive-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.elusive-btn span {
  position: relative;
  z-index: 2;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.elusive-btn .btn-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 150%; height: 150%;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}
.elusive-btn:hover {
  background: var(--red);
  box-shadow: 0 0 30px var(--red-glow), 0 0 60px var(--red-glow);
  cursor: none;
}
.elusive-btn:hover::before {
  left: 200%;
}
.elusive-btn:hover .btn-glow {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar { 
    padding: 1.5rem; 
    justify-content: center; /* Center logo optionally */
  }
  .navbar .nav-links { display: none; }
  
  .hero { 
    padding: 0 5%; 
    align-items: center; 
    text-align: center;
    /* Adjust height so logic fits with touch */
    height: 100vh;
    justify-content: flex-start;
    padding-top: 20vh;
  }
  
  .title {
    font-size: clamp(2.5rem, 10vw, 4rem);
    margin-bottom: 1rem;
  }
  
  .badge {
    margin-bottom: 1rem;
  }
  
  .subtitle {
    font-size: 1rem;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .elusive-btn {
    padding: 1rem 2rem;
    font-size: 0.85rem;
  }
  
  #cursor-dot, #cursor-outline {
    display: none !important;
  }
  
  * {
    cursor: auto !important;
  }
}
