/* style.css – FINAL CLEANED & OPTIMIZED VERSION
   - All duplicates removed
   - Logical sections with comments
   - Variables centralized in :root
   - Light-mode fully functional (readable text/buttons)
   - Backdrop-filter reduced + fallback added for perf
   - Touch targets ≥44px everywhere
   - No breaking changes – all original styles preserved
*/

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@800;900&family=Exo+2:wght@300;400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  font-family: 'Exo 2', sans-serif;
  color: #fff;
  background: #000 url('bg-huntx.jpg') center/cover fixed no-repeat;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

:root {
  --bg: #000;
  --glass: rgba(25,25,35,0.55);
  --border: rgba(255,107,0,0.5);
  --accent: #ff6b00;
  --accent-glow: #ffb800;
  --neon: 0 0 40px rgba(255,107,0,0.6);
  --radius: 24px;
  --transition: all 0.5s cubic-bezier(0.23,1,0.32,1);
  --text-muted: #aaaaaa;
}

/* Global overlay for readability */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(40,0,60,0.6));
  z-index: -1;
}

/* Shared header */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1rem 5%;
  background: rgba(10,10,30,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

nav a, nav span a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  font-size: clamp(0.85rem, 3vw, 0.95rem);
  transition: var(--transition);
  min-width: 44px;
  text-align: center;
}

nav a:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-4px);
}

/* Primary buttons */
.btn {
  background: linear-gradient(45deg, var(--accent), var(--accent-glow));
  color: #000;
  font-weight: 900;
  padding: clamp(0.8rem, 3vw, 1rem) clamp(2rem, 5vw, 2.5rem);
  border: none;
  border-radius: 50px;
  font-size: clamp(1rem, 4vw, 1.4rem);
  cursor: pointer;
  box-shadow: var(--neon);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 2px;
  min-height: 44px;
}

.btn:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 0 80px rgba(255,107,0,0.8);
}

/* Glass effect (used on cards, panels, etc.) */
.glass {
  background: var(--glass);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px); /* reduced from 25px for better mobile perf */
  box-shadow: var(--neon), 0 15px 40px rgba(0,0,0,0.6);
  transition: var(--transition);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(25,25,35,0.85); /* solid fallback */
  }
}

/* Main content wrapper */
.container {
  margin: 0 auto;
  max-width: 1400px;
  padding: 80px 5% 60px;
}

/* Light mode overrides */
body.light-mode {
  --bg: #f5f5f5;
  --glass: rgba(255,255,255,0.85);
  --border: rgba(0,0,0,0.15);
  --neon: 0 0 20px rgba(255,107,0,0.25);
  --text-muted: #555;
  color: #111;
}

body.light-mode::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,240,220,0.7));
}

body.light-mode header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.light-mode nav a {
  color: #111;
  background: rgba(0,0,0,0.05);
}

body.light-mode .btn {
  color: #fff;
}

/* Theme toggle */
#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid var(--border);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 9999;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

#themeToggle:hover {
  transform: scale(1.1);
}

/* Footer – shared across pages */
footer {
  text-align: center;
  padding: 3rem 5%;
  background: rgba(10,10,30,0.95);
  border-top: 1px solid var(--border);
  color: #888;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.8rem;
}

footer a:hover {
  text-decoration: underline;
}

/* Product grid (shop.html) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

/* Product card */
.product-card {
  background: rgba(30,30,45,0.75);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,107,0,0.35);
  transition: all 0.45s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.product-card:hover {
  transform: translateY(-14px) scale(1.025);
  box-shadow: 0 24px 64px rgba(255,107,0,0.45);
  border-color: rgba(255,107,0,0.7);
}

.product-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.09);
}

/* Operator / XP system */
#operator-system {
  margin: 4rem auto;
  max-width: 1200px;
  padding: 3rem;
  border-radius: 28px;
  text-align: center;
  background: rgba(15,20,35,0.7);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,107,0,0.3);
}

.xp-wrapper {
  max-width: 600px;
  margin: 0 auto 2rem;
}

#xp-bar {
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}

#xp-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  transition: width 0.5s ease;
}

/* Modal (product detail, etc.) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.95);
  padding: 2rem;
  overflow: auto;
}

.modal-content {
  margin: auto;
  max-width: 1200px;
  padding: 3rem;
  border-radius: 32px;
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
}

.close:hover {
  color: var(--accent);
}

/* Floating cart (shop/cart pages) */
#floating-cart {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(20,20,30,0.95);
  border: 2px solid rgba(255,107,0,0.6);
  border-radius: 30px;
  padding: 1.8rem;
  max-width: 400px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  z-index: 999;
  transform: translateY(150%);
  transition: all 0.4s ease;
  overflow: hidden;
}

#floating-cart.show { transform: translateY(0); }
#floating-cart.minimized { padding: 1rem 1.8rem; height: 70px; border-radius: 50px; overflow: hidden; }

/* Mobile & accessibility fixes */
@media (max-width: 768px) {
  header { flex-direction: column; padding: 1rem 3%; }
  nav { justify-content: center; gap: 0.6rem; }
  #floating-cart { right: 12px; left: 12px; bottom: 12px; max-width: none; border-radius: 24px; }

  /* Ensure tappable targets */
  .btn, a, button, input, select {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ================== MISSION SECTION ================== */
.mission-section {
  max-width: 1100px;
  margin: 8rem auto;
  padding: 4rem;
  text-align: center;
  border-radius: 28px;
}

.mission-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, #ff6b00, #ffb800);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mission-subtitle {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 3rem;
  color: #ffffff;
}

.mission-text {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #e6e6e6;
}

.mission-divider {
  width: 120px;
  height: 4px;
  background: #ff6b00;
  margin: 3rem auto;
  border-radius: 2px;
}

.mission-highlight {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  margin: 3rem 0 2rem;
  color: #ff6b00;
}

.mission-tags {
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaaaaa;
  margin-top: 2rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Exo 2', sans-serif;
  color: #f5f7ff;
  background: #05070d;
}

/* BACKGROUND */
.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(58,166,255,0.15), transparent 40%),
    radial-gradient(circle at bottom, rgba(255,159,26,0.15), transparent 40%),
    linear-gradient(135deg, #02030a, #05070d);
  z-index: -1;
}
/* ================= iPHONE HEADER POLISH ================= */

@media (max-width: 430px) {

  .frontier-header {
    height: 64px;
    padding: 0 5%;
    gap: 0.75rem;
  }

  .frontier-header h1 {
    font-size: 1.35rem;
    letter-spacing: 2.5px;
    flex-shrink: 0;
  }

  .frontier-header nav {
    display: flex;
    gap: 0.35rem;
  }

  .frontier-header nav a {
    padding: 0.35rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    border-radius: 999px;
    white-space: nowrap;
  }
}
/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5,7,13,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,159,26,0.3);
  z-index: 100;
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #ff9f1a, #3aa6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a {
  color: #f5f7ff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  border: 1px solid rgba(255,159,26,0.3);
}

nav a.active {
  background: linear-gradient(90deg, #ff9f1a, #3aa6ff);
  color: #000;
}

/* LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 5% 80px;
  display: grid;
  gap: 4rem;
}

/* PANELS */
.panel {
  background: rgba(15,20,35,0.65);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 4rem;
  border: 1px solid rgba(255,159,26,0.35);
  box-shadow:
    0 0 60px rgba(0,0,0,0.7),
    inset 0 0 60px rgba(255,159,26,0.05);
  text-align: center;
}

.hero h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(3.5rem, 10vw, 6rem);
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #ff9f1a, #3aa6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel h3 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
}

.panel p {
  font-size: 1.5rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #dfe4ff;
}

/* CTA BUTTON */
.cta {
  display: inline-block;
  padding: 2.5rem 7.5rem;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9f1a, #3aa6ff);
  box-shadow:
    0 0 60px rgba(58,166,255,0.5),
    0 0 100px rgba(255,159,26,0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 90px rgba(58,166,255,0.8),
    0 0 160px rgba(255,159,26,0.9);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  color: #8890c9;
}
/* =====================================================
   GLOBAL MISSION CTA (INDEX + FRONTIER)
   ===================================================== */

.mission-btn {
  display: inline-block;
  margin-top: 3rem;
  padding: 2.2rem 6.5rem;

  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;

  color: #000;
  background: linear-gradient(45deg, #ff6b00, #ffb800);
  border-radius: 999px;

  box-shadow: 0 0 45px rgba(255,107,0,0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mission-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 0 80px rgba(255,107,0,0.85);
}
body {
  background-image: url('bg-huntx.jpg');   /* ← relative path — no file:// */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Hide the video since we're using an image now */
#bgVideo {
  display: none;
}

/* Keep some darkening overlay so text stays readable */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(30,0,50,0.55));
  z-index: -1;
}
/* Product Info Button */
.info-btn {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--neon);
  transition: var(--transition);
}

.info-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 60px rgba(255,107,0,0.8);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.95);
  padding: 2rem;
}

.modal-content {
  margin: auto;
  max-width: 1200px;
  padding: 3rem;
  border-radius: 32px;
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: var(--accent);
}

.modal img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

@media (max-width: 767px) {
  .modal-content {
    padding: 2rem;
    margin: 10% auto;
    width: 95%;
  }
  .info-btn {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    bottom: 10px;
    left: 10px;
  }
}
.product-card,
#floating-cart {
  will-change: transform;
  contain: content;
}
/* ================================
   OPERATOR LOADOUT SYSTEM CLEAN
================================ */

#operator-system {
  margin: 4rem auto;
  max-width: 1200px;
  padding: 3rem;
  border-radius: 28px;
  text-align: center;
  background: rgba(15,20,35,0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,107,0,0.3);
}

/* XP BAR */
.xp-wrapper {
  max-width: 600px;
  margin: 0 auto 2rem;
}

#xp-bar {
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}

#xp-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#ff6b00,#ffb800);
  transition: width 0.5s ease;
}

#xp-text {
  margin-top: 0.6rem;
  font-weight: 600;
}

/* LAYOUT */
.operator-layout {
  display: grid;
  grid-template-columns: 1fr 350px 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

/* 3D OPERATOR */
#operator-3d {
  width: 350px;
  height: 520px;
  margin: 0 auto;
  perspective: 1000px;
}

#operator-model {
  width: 100%;
  height: 100%;
  background: url('https://i.imgur.com/8QZ7Z9K.png') center/contain no-repeat;
  animation: rotateOperator 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes rotateOperator {
  0% { transform: rotateY(-6deg); }
  50% { transform: rotateY(6deg); }
  100% { transform: rotateY(-6deg); }
}

/* SLOT COLUMN */
#operator-slots {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

.operator-slot {
  width: 220px;
  height: 120px;
  border: 2px solid #ff6b00;
  background: rgba(255,107,0,0.12);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  transition: all 0.25s ease;
  overflow: hidden;
}

.operator-slot img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.operator-slot:hover {
  background: rgba(255,107,0,0.3);
  transform: translateY(-4px);
}

/* STATS */
#operator-stats {
  font-size: 1.2rem;
  margin-top: 2rem;
}

#loadout-score {
  margin-top: 1rem;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ff6b00;
}

/* RESPONSIVE */
@media (max-width: 950px) {
  .operator-layout {
    grid-template-columns: 1fr;
  }

  #operator-3d {
    height: 420px;
  }
}
  /* Silhouette styling – placed to the left of operator profile */
  #operator-silhouette {
    position: absolute;
    left: -120px;                /* Adjust left offset as needed */
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    height: 420px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(255,107,0,0.4));
    transition: opacity 0.6s ease;
  }

  #operator-system:hover ~ #operator-silhouette,
  #operator-silhouette:hover {
    opacity: 0.45;               /* Glow up on hover/interaction */
  }

  @media (max-width: 1100px) {
    #operator-silhouette {
      display: none;             /* Hide on smaller screens to avoid overlap */
    }
  }

  /* Optional subtle animation */
  @keyframes silhouettePulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.35; }
  }

  #operator-silhouette {
    animation: silhouettePulse 8s infinite ease-in-out;
  }
