/*
 * Copyright © 2026 Tech Redux. All rights reserved. Includes Three.js Grassworks, original work by Muhammad Bilal Khan, Founder & CEO of Tech Redux. Unauthorized copying, reproduction, distribution, or use is prohibited.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #060604;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #e8e4d8;
  cursor: default;
}

#viewport {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}



#loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #15140f 0%, #070705 75%);
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

#loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
  width: min(420px, 80vw);
}

.loading-inner { width: min(560px, 88vw); }

.loading-inner h1 {
  font-size: clamp(1.25rem, 5.2vw, 2rem);
  letter-spacing: 0.4em;
  font-weight: 300;
  color: #cfc8ad;
  margin-bottom: 2.2rem;
  text-indent: 0.4em;
  opacity: 0.85;
  white-space: nowrap;
}

.loading-inner .brand {
  font-size: clamp(0.62rem, 2.3vw, 0.78rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: #a9ad8c;
  margin-bottom: 2.2rem;
  opacity: 0.9;
}

.bar {
  width: 100%;
  height: 2px;
  background: rgba(220, 210, 180, 0.15);
  position: relative;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 100% 0 0;
  background: #a9ad8c;
  width: 0%;
  transition: width 0.35s ease;
}

#loading-text {
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8c8874;
}

#start-btn {
  margin-top: 2rem;
  padding: 0.85rem 3.2rem;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  text-transform: uppercase;
  color: #cfc8ad;
  background: rgba(169, 173, 140, 0.08);
  border: 1px solid rgba(207, 200, 173, 0.45);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, background 0.2s ease, border-color 0.2s ease;
}
#start-btn.ready { opacity: 1; visibility: visible; }
#start-btn:hover, #start-btn:focus-visible {
  background: rgba(169, 173, 140, 0.22);
  border-color: rgba(230, 224, 196, 0.8);
  outline: none;
}



#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#hud.visible { opacity: 1; }

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(230, 226, 210, 0.55);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.4s ease;
}

#crosshair.visible { opacity: 1; }

#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 18vw 2vw rgba(0, 0, 0, 0.65);
  mix-blend-mode: multiply;
}

#intro {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  text-align: center;
  transition: opacity 0.6s ease;
}

#intro h2 {
  font-weight: 300;
  letter-spacing: 0.3em;
  font-size: 1rem;
  text-transform: uppercase;
  color: #d8d2bb;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

#intro p {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #b7b19a;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

#intro.hidden { opacity: 0; }

#compass {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #cfc8ad;
  background: rgba(10, 10, 8, 0.35);
  padding: 4px 10px;
  border-radius: 3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}



#unsupported {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a08;
  text-align: center;
  padding: 2rem;
}


#unsupported.hidden { display: none; }


#credit {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 0.5rem 0.95rem;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: #cfc8ad;
  background: rgba(10, 10, 8, 0.5);
  border: 1px solid rgba(207, 200, 173, 0.22);
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}
#credit a {
  color: #e6d9a8;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
#credit a:hover { color: #fff3c4; }
