@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Montserrat:ital,wght@0,800;0,900;1,900&family=Silkscreen&display=swap');

:root {
  --void: #000000;
  --signal: #ffffff;
  --lime: #d4ff3f;
  --lime-glow: rgba(212, 255, 63, 0.45);
  --cyan: #00ffe0;
  --dust: #a6a6a6;
  --haze: #666666;
  --panel: #0d0e12;
  --panel-card: rgba(14, 16, 24, 0.85);
  --line: rgba(255, 255, 255, 0.14);
  --line-lime: rgba(212, 255, 63, 0.35);
  --inset: 20px;
  --pad: clamp(24px, 5vw, 72px);
  --f-sans: "Inter Tight", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --f-pixel: "Silkscreen", ui-monospace, monospace;
  --f-display: "Montserrat", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--void);
  color: var(--signal);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  font-family: var(--f-sans);
  background: var(--void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  color: var(--signal);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 3D Warp Starfield Canvas ---------- */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  user-select: none;
  touch-action: pan-y;
  pointer-events: none;
}

/* CSS fallback background stars */
.css-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.css-stars i {
  position: absolute;
  width: 1.5px;
  height: 1.5px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.25;
}

/* ---------- Pixel Hero Starfighter ---------- */
.ship {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: auto !important;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(212, 255, 63, 0.55));
  transition: filter 0.2s ease;
}

.ship:active,
.ship.ship-active-warp {
  cursor: grabbing;
  filter: drop-shadow(0 0 26px rgba(212, 255, 63, 1)) drop-shadow(0 0 45px rgba(0, 255, 224, 0.8));
}

.ship::after {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  pointer-events: auto;
}

.ship canvas {
  display: block;
  image-rendering: pixelated;
}

/* ---------- Tech Viewport Frame ---------- */
.frame {
  position: fixed;
  inset: var(--inset);
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 6;
}

.frame i {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--lime);
}

.frame .tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.frame .tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.frame .bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.frame .br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* ---------- Topbar Header Lockup ---------- */
.topbar {
  position: fixed;
  top: var(--inset);
  left: var(--inset);
  right: var(--inset);
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(to bottom, #000 60%, rgba(0, 0, 0, 0));
}

.lockup {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--signal);
}

/* High-Fidelity Animated BuildFolks Logo Lockup */
.bf-brand-lockup {
  display: inline-flex;
  align-items: center;
  user-select: none;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bf-skew {
  display: inline-flex;
  align-items: center;
  transform: skewX(-14.5deg);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.02em;
  color: #ffffff;
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.bf-o-bolt-circle {
  width: 0.86em;
  height: 0.86em;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-0.015em);
  margin: 0 0.03em;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(212, 255, 63, 0.6));
  animation: logoBoltPulse 2.8s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

/* Breathing Neon Energy Pulse */
@keyframes logoBoltPulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(212, 255, 63, 0.5));
    transform: translateY(-0.015em) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(212, 255, 63, 0.95)) drop-shadow(0 0 26px rgba(0, 255, 224, 0.5));
    transform: translateY(-0.015em) scale(1.08);
  }
}

/* Hover: Electric Ignition & Thunderbolt Jolt */
.lockup:hover .bf-skew {
  transform: skewX(-14.5deg) scale(1.02);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
}

.lockup:hover .bf-o-bolt-circle {
  animation: logoBoltJolt 0.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 20px rgba(212, 255, 63, 1)) drop-shadow(0 0 34px rgba(0, 255, 224, 0.85));
}

@keyframes logoBoltJolt {
  0% { transform: translateY(-0.015em) scale(1.14) rotate(-5deg); }
  50% { transform: translateY(-0.015em) scale(1.22) rotate(5deg); }
  100% { transform: translateY(-0.015em) scale(1.18) rotate(-2deg); }
}

.bf-tag-badge {
  font-family: var(--f-pixel);
  font-size: 10px;
  color: var(--lime);
  background: rgba(212, 255, 63, 0.12);
  border: 1px solid var(--line-lime);
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 12px;
  letter-spacing: 0.1em;
  transition: all 0.25s ease;
}

.lockup:hover .bf-tag-badge {
  background: var(--lime);
  color: var(--void);
  box-shadow: 0 0 14px var(--lime-glow);
}

/* Topbar Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .btn {
  transition: opacity 0.3s, background 0.16s steps(3), color 0.16s steps(3);
}

.topbar .btn.away {
  opacity: 0;
  pointer-events: none;
}

/* Retro Toggle Buttons */
.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--dust);
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-pixel);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--signal);
  border-color: rgba(255, 255, 255, 0.4);
}

.icon-btn.active {
  color: #000;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 14px var(--lime-glow);
}

/* Hamburger button */
.hamburger-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--lime);
}

.hamburger-btn span {
  width: 18px;
  height: 2px;
  background: var(--signal);
  transition: all 0.2s ease;
}

.hamburger-btn:hover span {
  background: var(--lime);
}

/* ---------- HUD Bar ---------- */
.hud {
  position: fixed;
  left: var(--inset);
  right: var(--inset);
  bottom: var(--inset);
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  font: 11px/1 var(--f-pixel);
  color: var(--haze);
  pointer-events: none;
  background: linear-gradient(to top, #000 50%, rgba(0, 0, 0, 0));
}

.hud b {
  font-weight: 400;
  color: var(--lime);
}

.hud-hint {
  color: var(--dust);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-hint kbd {
  font-family: var(--f-pixel);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--signal);
}

/* Toast Message */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--inset) + 24px);
  transform: translateX(-50%);
  z-index: 11;
  font: 11px/1 var(--f-pixel);
  color: #000;
  background: var(--lime);
  padding: 8px 18px;
  border-radius: 4px;
  box-shadow: 0 0 20px var(--lime-glow);
  opacity: 0;
  transition: opacity 0.3s steps(3);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
}

/* ---------- Waypoints Navigation ---------- */
.waypoints {
  position: fixed;
  right: calc(var(--inset) + 14px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.waypoints button {
  width: 28px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
}

.waypoints button::before {
  content: "";
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.28);
  transition: all 0.2s ease;
}

.waypoints button[aria-current="true"]::before {
  background: var(--lime);
  width: 10px;
  height: 10px;
  box-shadow: 0 0 10px var(--lime-glow);
}

.waypoints button::after {
  content: attr(data-label);
  position: absolute;
  right: 32px;
  font: 11px/1 var(--f-pixel);
  color: var(--lime);
  background: rgba(0, 0, 0, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.waypoints button:hover::after,
.waypoints button:focus-visible::after {
  opacity: 1;
}

/* ---------- General Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  font: 700 15px/1 var(--f-sans);
  letter-spacing: -0.01em;
  color: #000;
  background: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 0 18px rgba(212, 255, 63, 0.25);
}

.btn:hover {
  background: #e2ff6b;
  box-shadow: 0 0 30px var(--lime-glow);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(0, 0, 0, 0.4);
  color: var(--signal);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
  box-shadow: 0 0 20px var(--lime-glow);
}

.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
}

/* ---------- 3D Staged Scenes & Flythrough ---------- */
.scene {
  position: relative;
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 128px 0 104px;
}

.js .scene {
  height: 220vh;
}

.js .scene--hero {
  height: 110vh;
}

.js .stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  perspective: 1000px;
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
}

.js .stage.is-live {
  visibility: visible;
}

.content {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 calc(var(--inset) + var(--pad));
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.js .stage.is-live .content {
  pointer-events: auto;
}

.inner {
  max-width: min(880px, 68vw);
  transform-style: preserve-3d;
}

/* Eyebrows, Headlines & Body */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(12px, 1.1vw, 15px);
  font-family: var(--f-pixel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 22px;
  line-height: 1.3;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime-glow);
}

.title {
  font-weight: 800;
  font-size: clamp(40px, 6.2vw, 98px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 30px;
  transform-style: preserve-3d;
  text-wrap: balance;
  color: #ffffff;
}

.title .w {
  display: inline-block;
  will-change: transform, opacity, filter;
}

.title .hl-lime {
  color: var(--lime);
}

.body {
  font-size: clamp(16px, 1.35vw, 21px);
  line-height: 1.6;
  color: var(--dust);
  max-width: 48ch;
  margin-bottom: 38px;
}

.body strong {
  color: var(--signal);
  font-weight: 600;
}

/* Scroll Cue */
.cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 11px/1 var(--f-pixel);
  color: var(--lime);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 0;
  letter-spacing: 0.08em;
}

.cue svg {
  width: 14px;
  height: 14px;
  shape-rendering: crispEdges;
  animation: nudge 1.6s steps(4) infinite;
}

.cue:hover {
  color: #fff;
}

@keyframes nudge {
  50% { transform: translateY(4px); }
}

/* Multi-Cell Stat Counter */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  width: fit-content;
  border-radius: 12px;
  overflow: hidden;
}

.stat {
  background: var(--panel-card);
  backdrop-filter: blur(12px);
  padding: 24px 32px 24px;
  min-width: 160px;
}

.stat b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--lime);
}

.stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--dust);
  letter-spacing: 0.02em;
}

/* Capability Chips */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  list-style: none;
}

.tag {
  font-family: var(--f-pixel);
  font-size: 11px;
  color: var(--signal);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(212, 255, 63, 0.08);
}

/* Feature Grid Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-card {
  background: var(--panel-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
}

.feature-card h3 {
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--dust);
}

/* ---------- Contact Section / Mission Terminal ---------- */
.scene--contact {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 140px 0 60px;
}

.content.contact {
  max-width: 900px;
  margin: 0 auto;
}

.mission-terminal {
  background: var(--panel-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  margin: 28px 0 36px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 255, 63, 0.08);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  font-family: var(--f-pixel);
  font-size: 11px;
  color: var(--dust);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}

.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terminal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.terminal-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--f-sans);
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.terminal-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(212, 255, 63, 0.15);
}

.terminal-select {
  width: 100%;
  background: #111218;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--f-sans);
  font-size: 14px;
  color: #fff;
  outline: none;
}

.terminal-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--f-sans);
  font-size: 14px;
  color: #fff;
  outline: none;
  resize: vertical;
  min-height: 90px;
}

.terminal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.direct-channels {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-pixel);
  font-size: 11px;
  color: var(--dust);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.channel-pill:hover {
  color: var(--signal);
  border-color: var(--lime);
}

.foot {
  text-align: center;
  font: 11px/1.8 var(--f-pixel);
  color: var(--haze);
  padding: 30px 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}

.foot a {
  color: var(--dust);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--lime);
}

/* ---------- Full-Screen Retro Menu Overlay ---------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(30px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

#overlay.open {
  display: flex;
}

.overlay-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: 1px solid var(--line);
  color: var(--dust);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.overlay-close:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: rotate(90deg);
}

.overlay-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.overlay-menu li {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
}

.overlay-menu li span {
  font-family: var(--f-pixel);
  font-size: 12px;
  color: var(--lime);
}

.overlay-menu li a {
  font-family: var(--f-display);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--signal);
  transition: all 0.2s;
}

.overlay-menu li a:hover {
  color: var(--lime);
  transform: translateX(8px);
}

.overlay-socials {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

.overlay-socials a {
  font-family: var(--f-pixel);
  font-size: 12px;
  color: var(--dust);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}

.overlay-socials a:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 768px) {
  :root {
    --inset: 10px;
    --pad: 18px;
  }

  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .bf-skew {
    font-size: 18px;
  }

  .bf-tag-badge {
    display: none;
  }

  .dock {
    height: 22px;
    width: 22px;
    margin-right: 10px;
  }

  .hud {
    padding: 0 14px;
    font-size: 10px;
  }

  .hud-hint {
    display: none;
  }

  .waypoints {
    display: none;
  }

  .js .scene {
    height: 200vh;
  }

  .js .scene--hero {
    height: 110vh;
  }

  .stage {
    padding: 96px 0 120px;
  }

  .inner {
    max-width: 100%;
  }

  .stat {
    padding: 16px 20px;
    min-width: 130px;
  }

  .terminal-row {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: auto;
    top: calc(var(--inset) + 70px);
  }

  .mission-terminal {
    padding: 24px 18px;
  }

  .foot {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .stage {
    position: relative;
    visibility: visible;
  }
  .js .scene {
    height: auto;
  }
}

/* ---------- Version Switcher Bar ---------- */
.version-switch-bar {
  position: fixed;
  top: calc(var(--inset) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 12, 18, 0.88);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--f-pixel);
  font-size: 10px;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.version-switch-bar .vs-label {
  color: var(--dust);
  margin-right: 4px;
}

.version-switch-bar .vs-btn {
  color: var(--signal);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.version-switch-bar .vs-btn:hover {
  border-color: var(--line-lime);
  color: var(--lime);
}

.version-switch-bar .vs-btn.active {
  background: var(--lime);
  color: var(--void);
  font-weight: 700;
  box-shadow: 0 0 10px var(--lime-glow);
}

@media (max-width: 900px) {
  .version-switch-bar {
    top: auto;
    bottom: calc(var(--inset) + 52px);
    font-size: 9px;
    gap: 3px;
    padding: 3px 6px;
  }
}

/* ---------- 3D Planetary Orbit & HUD Styles ---------- */
#planet-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  user-select: none;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
}

#planet-hud-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.planet-target {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}

.planet-target.visible {
  opacity: 1;
}

.planet-reticle {
  position: relative;
  border: 1px solid rgba(212, 255, 63, 0.45);
  background: rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--f-pixel);
  font-size: 10px;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(212, 255, 63, 0.12);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
}

.planet-reticle::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--lime);
  border-left: 2px solid var(--lime);
}

.planet-reticle::after {
  content: "";
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid var(--lime);
  border-right: 2px solid var(--lime);
}

.planet-target.locked .planet-reticle {
  border-color: var(--lime);
  box-shadow: 0 0 16px var(--lime-glow), inset 0 0 12px rgba(212, 255, 63, 0.25);
}

.planet-badge {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.planet-data {
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.planet-dist {
  color: #ffffff;
  font-size: 9px;
  opacity: 0.9;
}

/* ---------- Cinematic Earth Video Background (Ahura Style) ---------- */
.bg-over-vd-sec {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #000;
}

#myVideo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-90%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 0;
  pointer-events: none;
  object-fit: cover;
  filter: hue-rotate(133deg) brightness(1.15) contrast(1.1);
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  #myVideo {
    transform: translate(-50%, -50%);
    opacity: 0.75;
  }
}
