:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --bg-primary: #04060b;
  --bg-secondary: #080c14;
  --bg-card: #0b101b;
  --bg-card-hover: #101727;
  --bg-glass: rgba(8, 12, 20, 0.82);

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-bright: rgba(125, 211, 252, 0.34);
  --border-purple: rgba(148, 163, 184, 0.24);

  --accent-cyan: #7dd3fc;
  --accent-blue: #38bdf8;
  --accent-purple: #bae6fd;
  --accent-green: #34d399;
  --accent-amber: #fbbf24;

  --gradient-primary: linear-gradient(135deg, #f8fafc 0%, #bae6fd 45%, #38bdf8 100%);

  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 18px 46px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 32px rgba(103, 232, 249, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(2, 4, 9, 0.72) 0%, transparent 68%),
    radial-gradient(ellipse 65% 45% at 44% 18%, rgba(28, 48, 84, 0.09) 0%, transparent 72%);
}

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #1a2233; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

.bg-grid-pattern {
  display: none;
}

.bg-glow-orb {
  display: none;
}

.bg-spotlight {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    580px circle at var(--mouse-x, 50vw) var(--mouse-y, 35vh),
    rgba(125, 211, 252, 0.04) 0%,
    rgba(30, 58, 138, 0.02) 40%,
    transparent 72%
  );
  transition: opacity 0.25s ease;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #bae6fd 0%, #67e8f9 55%, #38bdf8 100%);
  color: #050810;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(103, 232, 249, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.btn-primary:hover {
  opacity: 0.98;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(103, 232, 249, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-outline {
  background: rgba(12, 16, 26, 0.68);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-outline:hover {
  border-color: rgba(103, 232, 249, 0.55);
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.09);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(186, 230, 253, 0.22);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(12, 16, 26, 0.58);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-glass:hover {
  color: #f8fafc;
  background: rgba(23, 30, 46, 0.78);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 66px;
  z-index: 1000;
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.84) 0%, rgba(6, 9, 15, 0.72) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 34px rgba(0, 0, 0, 0.45);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
  color: #f8fafc;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.logo-bracket { color: #67e8f9; }
.logo-slash { color: #94a3b8; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.nav-link {
  font-size: 0.86rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.22s ease;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  border-radius: 2px;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}
.nav-link:hover, .nav-link.active {
  color: #f8fafc;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(15, 21, 33, 0.72);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.85);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.btn-github-quick {
  background: rgba(15, 21, 33, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.22s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-github-quick:hover {
  background: rgba(25, 34, 52, 0.92);
  color: #ffffff;
  border-color: rgba(103, 232, 249, 0.4);
  box-shadow: 0 4px 18px rgba(103, 232, 249, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn-discord-quick {
  background: rgba(15, 21, 33, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.22s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-discord-quick:hover {
  background: rgba(88, 101, 242, 0.22);
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
}

.hero-section {
  padding-top: 140px;
  padding-bottom: 80px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.9);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 30px;
}
.hero-subtitle strong {
  color: var(--text-primary);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.proof-bar {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  max-width: 540px;
  width: 100%;
}
.proof-item {
  flex: 1;
  min-width: 0;
}
.proof-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.proof-unit {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}
.proof-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}
.proof-badge-tag {
  flex-shrink: 0;
}
.proof-badge-tag span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-bright);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.terminal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.terminal-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.terminal-code {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.85;
  overflow-x: auto;
  max-height: 480px;
  background: #07090e;
}

.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.pulse-circle {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-right: 6px;
}

.t-comment { color: #526079; font-style: italic; }
.t-kw { color: #c084fc; font-weight: 700; }
.t-def { color: #38bdf8; }
.t-fn { color: #60a5fa; }
.t-str { color: #4ade80; }
.t-type { color: #fbbf24; }
.t-num { color: #f472b6; }

.section {
  padding: 95px 0;
}
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.video-showcase-header {
  margin-bottom: 24px;
}

.video-showcase-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px;
  border-radius: 16px;
  background: rgba(9, 13, 22, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.v-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 19, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.v-tab-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}

.v-tab:hover {
  border-color: rgba(125, 211, 252, 0.28);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.v-tab:hover .v-tab-num {
  color: #7dd3fc;
}

.v-tab.active {
  border-color: rgba(207, 250, 254, 0.85);
  color: #050810;
  background: linear-gradient(135deg, #cffafe 0%, #7dd3fc 100%);
  box-shadow: 0 0 22px rgba(103, 232, 249, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.v-tab.active .v-tab-num {
  color: rgba(5, 8, 16, 0.62);
}

.featured-video-card {
  display: none;
  background: linear-gradient(168deg, rgba(13, 18, 28, 0.9) 0%, rgba(7, 10, 17, 0.96) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  padding: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  grid-template-columns: 1.32fr 1fr;
  gap: 8px;
  align-items: stretch;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.featured-video-card:hover {
  border-color: rgba(125, 211, 252, 0.28);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.72), 0 0 36px rgba(56, 189, 248, 0.08), inset 0 1px 0 rgba(186, 230, 253, 0.18);
}

.featured-video-card.active {
  display: grid;
  animation: fadeInVideo 0.35s ease;
}

@keyframes fadeInVideo {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-video-wrapper {
  position: relative;
  background: #04060b;
  width: 100%;
  height: 100%;
  min-height: 330px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 11, 0.25) 0%, transparent 28%, transparent 72%, rgba(4, 6, 11, 0.55) 100%);
  z-index: 1;
}

.featured-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(7, 10, 17, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(125, 211, 252, 0.28);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e0f2fe;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.featured-video-info {
  padding: 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

.fv-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fv-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #bae6fd;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.fv-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.26;
}

.fv-desc {
  font-size: 0.89rem;
  color: var(--text-secondary);
  line-height: 1.62;
}

.fv-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.fv-metric {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 600;
}

/* Unified Obsidian Precision Spec Tables for Featured Video Showcases */
.dungeon-stat-grid,
.interaction-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  overflow: hidden;
  margin: 4px 0 6px 0;
}

.dungeon-stat-chip,
.interaction-stat-chip {
  background: rgba(10, 14, 23, 0.94);
  border: none;
  border-radius: 0;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.22s ease;
  box-shadow: none;
}

.dungeon-stat-chip:hover,
.interaction-stat-chip:hover {
  background: rgba(18, 25, 39, 0.98);
}

.dungeon-stat-val,
.interaction-stat-val {
  font-family: var(--font-mono);
  font-size: 1.06rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.03em;
}

.dungeon-stat-chip:hover .dungeon-stat-val,
.interaction-stat-chip:hover .interaction-stat-val {
  color: #7dd3fc;
}

.dungeon-stat-label,
.interaction-stat-label {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dungeon-metrics-list,
.interaction-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(8, 11, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 2px 0 6px 0;
}

.dungeon-metric-item,
.interaction-metric-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--text-secondary);
}

.dungeon-metric-pip,
.interaction-metric-pip {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.75);
  margin-top: 6px;
  flex-shrink: 0;
}

.dungeon-metric-title,
.interaction-metric-title {
  color: var(--text-primary);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .dungeon-stat-grid,
  .interaction-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .featured-video-card {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .featured-video-wrapper {
    min-height: 240px;
  }
  .featured-video-info {
    padding: 18px 10px 10px;
  }
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.system-card {
  position: relative;
  background: linear-gradient(168deg, rgba(13, 18, 28, 0.88) 0%, rgba(7, 10, 17, 0.96) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.32s ease;
}
.system-card::before,
.code-showroom-card::before,
.tech-card::before,
.service-card::before,
.standards-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(125, 211, 252, 0.08), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.system-card:hover::before,
.code-showroom-card:hover::before,
.tech-card:hover::before,
.service-card:hover::before,
.standards-banner:hover::before {
  opacity: 1;
}
.system-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.32);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.65), 0 0 32px rgba(56, 189, 248, 0.10), inset 0 1px 0 rgba(186, 230, 253, 0.22);
}

.system-media {
  position: relative;
  height: 215px;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #04060b;
}
.system-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 11, 0.12) 0%, transparent 45%, rgba(4, 6, 11, 0.65) 100%);
  z-index: 1;
}
.system-img,
.system-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.system-card:hover .system-img,
.system-card:hover .system-video {
  transform: scale(1.035);
}

.system-media-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: linear-gradient(135deg, rgba(207, 250, 254, 0.94) 0%, rgba(125, 211, 252, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #050810;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(103, 232, 249, 0.25);
}

.system-card-content {
  padding: 18px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.system-card-header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 12px;
}
.system-icon-box {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 9px;
  flex-shrink: 0;
  margin-top: 2px;
}

.system-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.28;
  margin-bottom: 4px;
}
.system-sub {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: #7dd3fc;
  display: block;
  margin-bottom: 8px;
  opacity: 0.92;
}

.system-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.system-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  overflow: hidden;
  margin-top: auto;
}
.system-tags span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  background: rgba(10, 14, 23, 0.94);
  border: none;
  padding: 8px 11px;
  border-radius: 0;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s ease, color 0.2s ease;
}
.system-card:hover .system-tags span {
  background: rgba(16, 22, 35, 0.96);
  color: #e0f2fe;
}
.system-tags span:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.system-card-plain .system-card-content {
  padding: 14px;
}

.code-showroom-card {
  position: relative;
  background: linear-gradient(168deg, rgba(14, 19, 30, 0.88) 0%, rgba(8, 11, 18, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: border-color 0.28s ease, box-shadow 0.3s ease;
}
.code-showroom-card:hover {
  border-color: rgba(103, 232, 249, 0.32);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62), 0 0 34px rgba(56, 189, 248, 0.1), inset 0 1px 0 rgba(186, 230, 253, 0.22);
}

.code-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.code-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 14px 22px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.code-tab:hover {
  color: var(--text-secondary);
}
.code-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
}
.tab-icon {
  font-size: 1rem;
}

.code-panel {
  display: none;
}
.code-panel.active {
  display: block;
}

.code-panel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.btn-copy-code {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy-code:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.code-panel pre {
  padding: 24px;
  background: #07090e;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  max-height: 520px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.tech-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, rgba(14, 19, 30, 0.84) 0%, rgba(8, 11, 18, 0.92) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.28s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.tech-card:hover {
  border-color: rgba(103, 232, 249, 0.34);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(56, 189, 248, 0.1), inset 0 1px 0 rgba(186, 230, 253, 0.22);
}
.tech-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--accent-cyan);
  letter-spacing: -0.01em;
}
.tech-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tech-card-list strong {
  color: #fff;
}

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.contact-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.contact-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.contact-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.c-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.c-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.discord-card {
  background: #131728;
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.discord-card:hover {
  border-color: rgba(88, 101, 242, 0.6);
  transform: translateY(-2px);
}

.crypto-card {
  background: #0d1e1c;
  border: 1px solid rgba(0, 220, 160, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.crypto-card:hover {
  border-color: rgba(0, 220, 160, 0.6);
  transform: translateY(-2px);
}

.c-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.c-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #5865f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crypto-icon {
  background: linear-gradient(135deg, #00d2aa 0%, #008f72 100%);
  color: #07090e;
  font-weight: 900;
  font-size: 1.5rem;
}
.crypto-symbol {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1;
}

.c-card-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #818cf8;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
}
.crypto-card .c-card-type {
  color: #00d2aa;
}

.c-card-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
}
.crypto-address {
  font-size: 0.84rem;
  word-break: break-all;
  color: #d1fae5;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.external-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ext-link-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  transition: all 0.2s;
}
.ext-link-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.ext-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7dd3fc;
  flex-shrink: 0;
}
.ext-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  flex: 1;
  margin-left: 10px;
}
.ext-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.service-card {
  background: linear-gradient(168deg, rgba(14, 19, 30, 0.84) 0%, rgba(8, 11, 18, 0.92) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: rgba(103, 232, 249, 0.34);
  background: linear-gradient(168deg, rgba(18, 25, 39, 0.9) 0%, rgba(10, 14, 24, 0.96) 100%);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(56, 189, 248, 0.1), inset 0 1px 0 rgba(186, 230, 253, 0.22);
}

.service-index {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.22);
  flex-shrink: 0;
  margin-top: 2px;
}

.service-body {
  flex: 1;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.standards-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(14, 19, 30, 0.88) 0%, rgba(8, 11, 18, 0.94) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.standards-header {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.standards-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.standards-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.standard-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.standard-index {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.22);
  flex-shrink: 0;
  margin-top: 2px;
}

.standard-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.standard-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 34px 0;
  background: var(--bg-primary);
}
.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 4px;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #111422;
  border: 1px solid var(--border-bright);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
}
.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
  flex-shrink: 0;
}
.toast-dot-error {
  background: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.85);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}



.scrolly-luau-container {
  position: relative;
  width: 100%;
  height: 520vh;
  background: #07090e;
  z-index: 10;
}

.scrolly-sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.webgl-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.luau-hud-header {
  position: absolute;
  top: 66px;
  left: 0;
  width: 100%;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0.78rem 2.5rem;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.78) 0%, rgba(7, 10, 16, 0.28) 72%, rgba(7, 10, 16, 0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: auto;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-shrink: 0;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #cbd5e1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hud-beacon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.26rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(13, 18, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-beacon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
  animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.hud-nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(10, 14, 22, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.hud-jump-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.38rem 0.95rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-jump-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
}

.hud-jump-link.active {
  background: linear-gradient(135deg, #cffafe 0%, #7dd3fc 100%);
  color: #050810;
  box-shadow: 0 0 22px rgba(103, 232, 249, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.hud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 15, 24, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0.38rem 0.9rem;
  border-radius: 9999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.9);
  animation: pulseBeacon 2s infinite ease-in-out;
}

.hud-status-txt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.luau-speedometer-hud {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  pointer-events: none;
}

.speed-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.speed-num {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  font-weight: 900;
  line-height: 0.95;
  color: #f8fafc;
  letter-spacing: -0.04em;
  text-shadow: 0 0 28px rgba(103, 232, 249, 0.35);
}

.speed-unit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #94a3b8;
  text-transform: uppercase;
}

.speed-meter-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.led-meter {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  width: 22px;
}

.led-segment {
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.led-segment.active {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}

.led-segment:nth-child(n+10).active {
  background: #bae6fd;
  box-shadow: 0 0 12px rgba(186, 230, 253, 0.95);
}

.stage-readout {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.luau-stage-card {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  filter: blur(4px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.luau-stage-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.stage-0 {
  text-align: center;
  max-width: 880px;
  padding: 2.6rem 3rem;
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% 48%, rgba(6, 8, 15, 0.58) 0%, rgba(6, 8, 15, 0.24) 56%, transparent 78%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin: 0 auto;
}

.f1-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.44rem 1.2rem;
  border-radius: 9999px;
  background: rgba(11, 15, 24, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(103, 232, 249, 0.26);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.f1-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.9);
  animation: beaconPulse 2s infinite;
}

.f1-hero-title {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 7.5vw, 6.2rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #f8fafc;
  margin-bottom: 1.4rem;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.78);
}

.gradient-accent {
  background: linear-gradient(120deg, #f8fafc 0%, #bae6fd 32%, #67e8f9 62%, #38bdf8 85%, #f8fafc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(103, 232, 249, 0.36));
  animation: heroGradientShift 7s ease infinite;
}

@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.f1-hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: #cbd5e1;
  max-width: 640px;
  margin: 0 auto 1.6rem;
  line-height: 1.65;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}

.hero-stage-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 auto 2.2rem;
  flex-wrap: wrap;
  pointer-events: auto;
}

.hero-stage-btn {
  font-size: 0.84rem;
  padding: 0.65rem 1.35rem;
  backdrop-filter: blur(8px);
}

.f1-scroll-prompt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #00f2fe;
}

.scroll-crosshair {
  font-size: 1.2rem;
  color: #00f2fe;
  opacity: 0.8;
}

.scroll-arrow-anim {
  font-size: 1.3rem;
  animation: scrollBounce 1.6s infinite ease-in-out;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

.stage-1, .stage-2, .stage-3 {
  left: 6vw;
  max-width: 470px;
  width: 90%;
}

.spec-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, rgba(14, 19, 30, 0.80) 0%, rgba(7, 10, 16, 0.90) 100%);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 1.95rem;
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.78),
    0 0 42px rgba(56, 189, 248, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: border-color 0.3s ease, box-shadow 0.35s ease;
}

.spec-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(103, 232, 249, 0.11), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spec-panel:hover::before {
  opacity: 1;
}

.spec-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 75%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.75), transparent);
  pointer-events: none;
}

.luau-stage-card.active .spec-panel::after {
  animation: specTopSweep 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes specTopSweep {
  0% { left: -80%; opacity: 0; }
  20% { opacity: 1; }
  65% { left: 115%; opacity: 1; }
  100% { left: 115%; opacity: 0; }
}

.stage-2 .spec-panel,
.stage-3 .spec-panel {
  border-color: rgba(255, 255, 255, 0.11);
}

.spec-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.05rem;
}

.spec-panel-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
}

.spec-panel-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #050810;
  background: linear-gradient(135deg, #cffafe 0%, #7dd3fc 100%);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.spec-panel-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-bottom: 0.8rem;
}

.spec-panel-desc {
  font-size: 0.91rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.45rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.spec-item {
  background: rgba(8, 12, 20, 0.88);
  border: none;
  border-radius: 0;
  padding: 0.92rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.24s ease;
}

.spec-item:hover {
  background: rgba(15, 23, 38, 0.94);
}

.spec-val {
  font-family: var(--font-sans);
  font-size: 1.18rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.015em;
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

.spec-item:hover .spec-val {
  color: #cffafe;
  text-shadow: 0 0 16px rgba(103, 232, 249, 0.45);
}

.stage-2 .spec-val {
  color: #f1f5f9;
}

.spec-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.24rem;
}

.luau-stage-card .spec-panel-header,
.luau-stage-card .spec-panel-title,
.luau-stage-card .spec-panel-desc,
.luau-stage-card .spec-grid {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.luau-stage-card.active .spec-panel-header { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.luau-stage-card.active .spec-panel-title { opacity: 1; transform: translateY(0); transition-delay: 0.11s; }
.luau-stage-card.active .spec-panel-desc { opacity: 1; transform: translateY(0); transition-delay: 0.17s; }
.luau-stage-card.active .spec-grid { opacity: 1; transform: translateY(0); transition-delay: 0.23s; }

.stage-4 {
  text-align: center;
  max-width: 960px;
  width: 92%;
}

.telemetry-hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.f1-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.f1-telemetry-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(14, 19, 30, 0.84) 0%, rgba(8, 11, 18, 0.92) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 1.85rem 1.25rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
}

.f1-telemetry-box::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(103, 232, 249, 0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.f1-telemetry-box:hover::before {
  opacity: 1;
}

.f1-telemetry-box:hover {
  border-color: rgba(103, 232, 249, 0.35);
}

.stage-4.active .f1-telemetry-box {
  opacity: 1;
  transform: translateY(0);
}
.stage-4.active .f1-telemetry-box:nth-child(1) { transition-delay: 0.06s; }
.stage-4.active .f1-telemetry-box:nth-child(2) { transition-delay: 0.12s; }
.stage-4.active .f1-telemetry-box:nth-child(3) { transition-delay: 0.18s; }
.stage-4.active .f1-telemetry-box:nth-child(4) { transition-delay: 0.24s; }

.telemetry-val {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 900;
  color: #f8fafc;
  line-height: 1;
}

.telemetry-unit {
  font-size: 0.95rem;
  color: #67e8f9;
  font-weight: 700;
  margin-left: 0.2rem;
}

.telemetry-lbl {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.8rem;
  line-height: 1.4;
}

.stage-5 {
  text-align: center;
  max-width: 720px;
  width: 90%;
  top: auto;
  bottom: 7vh;
}

.assembled-badge {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.pulse-green {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.f1-launch-title {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 45px rgba(0, 242, 254, 0.55);
}

.f1-launch-desc {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: #94a3b8;
  max-width: 580px;
  margin: 0 auto 1.6rem;
  line-height: 1.5;
}

.f1-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.f1-btn {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 1rem 1.8rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.f1-btn-reset {
  background: rgba(12, 16, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

.f1-btn-reset:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(186, 230, 253, 0.45);
  color: #e0f2fe;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.18);
  transform: translateY(-2px);
}

.f1-btn-primary {
  background: linear-gradient(135deg, #cffafe 0%, #67e8f9 55%, #38bdf8 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #050810;
  box-shadow: 0 0 32px rgba(103, 232, 249, 0.34);
}

.f1-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 46px rgba(103, 232, 249, 0.56);
}

.luau-hud-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 25;
  background: rgba(6, 9, 15, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.f1-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.f1-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #bae6fd 100%);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.8);
  transition: width 0.08s linear;
}

.hud-ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.7rem 1.5rem;
}

.hud-ticker-content {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.12em;
  animation: tickerSlide 35s linear infinite;
}

.ticker-highlight {
  color: #00f2fe;
}

.ticker-sep {
  color: #ef4444;
  margin: 0 0.8rem;
  opacity: 0.7;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS (TABLETS & MOBILE PHONES)
   ========================================================================== */

/* Desktop: Hide mobile-only controls */
.mobile-stage-nav {
  display: none !important;
}

@media (max-width: 1200px) and (min-width: 769px) {
  .nav-container {
    padding: 0 14px;
    gap: 8px;
  }
  .nav-logo {
    font-size: 0.96rem;
  }
  .nav-links {
    gap: 11px;
  }
  .nav-link {
    font-size: 0.78rem;
  }
  .nav-actions {
    gap: 7px;
  }
  .status-pill {
    padding: 4px 8px;
    font-size: 0.58rem;
    gap: 5px;
  }
  .btn-github-quick,
  .btn-discord-quick {
    padding: 5px 10px;
    font-size: 0.66rem;
    gap: 5px;
  }
  .luau-hud-header {
    padding: 0.75rem 1.15rem;
    gap: 10px;
  }
  .hud-left {
    gap: 0.65rem;
  }
  .hud-tag {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
  .hud-beacon {
    padding: 0.2rem 0.55rem;
    font-size: 0.64rem;
  }
  .hud-nav-links {
    gap: 2px;
    padding: 3px;
  }
  .hud-jump-link {
    padding: 0.3rem 0.62rem;
    font-size: 0.63rem;
  }
  .hud-status-badge {
    padding: 0.32rem 0.65rem;
  }
  .hud-status-txt {
    font-size: 0.64rem;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .systems-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-box {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }
  .f1-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage-1, .stage-2, .stage-3 {
    left: 4vw;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow globally */
  *, *::before, *::after {
    box-sizing: border-box;
  }

  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
  }

  .container {
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .section {
    padding: 50px 0;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .section-header {
    margin-bottom: 24px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .section-title {
    font-size: clamp(1.45rem, 6vw, 2rem) !important;
    word-break: break-word !important;
  }
  .section-desc {
    font-size: 0.85rem !important;
    line-height: 1.55;
  }

  /* Fixed Navigation */
  .navbar {
    height: calc(60px + var(--sat));
    padding-top: var(--sat);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .nav-container {
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-logo {
    font-size: 1.05rem;
    flex-shrink: 0;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .status-pill {
    display: none !important;
  }

  /* Compact circular icon chips for GitHub & Discord on mobile */
  .btn-github-text,
  .btn-discord-text {
    display: none !important;
  }
  .btn-github-quick,
  .btn-discord-quick {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    flex-shrink: 0;
  }
  .btn-github-quick svg,
  .btn-discord-quick svg {
    width: 18px;
    height: 18px;
  }

  .nav-toggle {
    display: flex !important;
    padding: 6px;
    min-width: 38px;
    min-height: 38px;
    flex-shrink: 0;
  }

  .nav-links {
    position: fixed;
    top: calc(60px + var(--sat));
    left: 0;
    right: 0;
    background: rgba(12, 15, 23, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-bright);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    flex-direction: column;
    padding: 18px 16px calc(24px + var(--sab));
    gap: 8px;
    transform: translateY(-160%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100dvh - 60px - var(--sat));
    overflow-y: auto;
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-link {
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-link.active {
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
    border-color: rgba(0, 242, 254, 0.25);
  }
  .nav-link.active::after {
    display: none;
  }

  /* 3D HERO ON MOBILE: EXACTLY 1 SCREEN (100dvh) WITHOUT SCROLL-TRAP */
  .scrolly-luau-container {
    height: 100vh !important;
    height: 100dvh !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .scrolly-sticky-viewport {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* HUD Header */
  .luau-hud-header {
    top: calc(60px + var(--sat));
    padding: 0.45rem 1rem;
    background: linear-gradient(180deg, rgba(7, 9, 14, 0.96) 0%, rgba(7, 9, 14, 0) 100%);
    width: 100%;
    box-sizing: border-box;
  }
  .hud-tag {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }
  .hud-beacon {
    padding: 0.2rem 0.55rem;
    font-size: 0.65rem;
  }
  .hud-nav-links {
    display: none !important;
  }
  .hud-status-badge {
    display: none !important;
  }

  /* SPEEDOMETER HUD */
  .luau-speedometer-hud {
    position: absolute;
    top: calc(105px + var(--sat)) !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    flex-direction: row;
    align-items: center;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 8px;
    padding: 3px 8px;
    gap: 6px;
    pointer-events: none;
    z-index: 25;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  }
  .speed-readout {
    flex-direction: row;
    align-items: baseline;
    gap: 3px;
  }
  .speed-num {
    font-size: 1.15rem;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
  }
  .speed-unit {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }
  .speed-meter-column {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }
  .led-meter {
    display: none !important;
  }
  .stage-readout {
    font-size: 0.68rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 5px;
  }

  /* STAGES CENTERING & PERFECT PADDING */
  .luau-stage-card {
    position: absolute;
    top: 47% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.96) !important;
    width: 94% !important;
    max-width: 420px !important;
    margin: 0 !important;
    box-sizing: border-box;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .luau-stage-card.active {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto;
  }

  .stage-0 {
    padding: 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .f1-badge {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.6rem;
    white-space: normal;
    max-width: 90%;
    line-height: 1.3;
  }
  .f1-hero-title {
    font-size: clamp(2rem, 7.8vw, 3rem);
    line-height: 1.05;
    margin-bottom: 0.5rem;
  }
  .f1-hero-desc {
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 0.8rem;
    max-width: 90%;
  }
  .hero-stage-cta {
    margin-bottom: 0.6rem;
    gap: 0.5rem;
    justify-content: center;
  }
  .hero-stage-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.76rem;
    min-height: 38px;
  }
  .f1-scroll-prompt {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    gap: 0.2rem;
  }

  /* Spec Panels */
  .spec-panel {
    padding: 1.15rem 1rem;
    border-radius: 14px;
    width: 100%;
    box-sizing: border-box;
  }
  .spec-panel-title {
    font-size: 1.08rem;
    margin-bottom: 0.45rem;
  }
  .spec-panel-desc {
    font-size: 0.8rem;
    line-height: 1.42;
    margin-bottom: 0.85rem;
  }
  .spec-grid {
    gap: 1px;
    border-radius: 10px;
  }
  .spec-item {
    padding: 0.6rem 0.5rem;
  }
  .spec-val {
    font-size: 0.94rem;
  }
  .spec-lbl {
    font-size: 0.58rem;
  }

  /* Stage 4 Telemetry */
  .telemetry-hero-title {
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
    margin-bottom: 0.85rem;
  }
  .f1-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem;
  }
  .f1-telemetry-box {
    padding: 0.7rem 0.5rem;
  }
  .telemetry-val {
    font-size: 1.15rem;
  }
  .telemetry-lbl {
    font-size: 0.62rem;
  }

  /* Stage 5 Launch */
  .f1-launch-title {
    font-size: clamp(1.7rem, 7.5vw, 2.3rem);
    margin-bottom: 0.45rem;
  }
  .f1-launch-desc {
    font-size: 0.82rem;
    line-height: 1.42;
    margin-bottom: 0.9rem;
  }
  .f1-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }
  .f1-btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
    min-height: 44px;
  }

  /* MOBILE INTERACTIVE STAGE STEPPER */
  .mobile-stage-nav {
    display: flex !important;
    position: absolute;
    bottom: calc(44px + var(--sab));
    left: 12px;
    right: 12px;
    z-index: 26;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: auto;
  }
  .m-stage-arrow {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .m-stage-arrow:active {
    transform: scale(0.9);
    background: rgba(0, 242, 254, 0.2);
  }
  .m-stage-pills-scroll {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    max-width: calc(100% - 80px);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 4px;
  }
  .m-stage-pills-scroll::-webkit-scrollbar {
    display: none;
  }
  .m-stage-pill {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .m-stage-pill.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
  }

  /* HUD Footer & Ticker */
  .luau-hud-footer {
    padding-bottom: var(--sab);
    width: 100%;
    overflow: hidden;
  }
  .hud-ticker-wrap {
    padding: 0.45rem 1rem;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
  .hud-ticker-content {
    font-size: 0.66rem;
  }

  /* ========================================================================
     UNIVERSAL GRID & OVERFLOW FIXES FOR MOBILE
     (Ensures pre/code blocks and grids NEVER expand or clip content)
     ======================================================================== */
  .hero-container,
  .systems-grid,
  .services-grid,
  .standards-grid,
  .tech-grid,
  .contact-box,
  .external-links-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-content,
  .hero-terminal-wrapper,
  .system-card,
  .service-card,
  .tech-card,
  .contact-card,
  .standards-banner,
  .proof-bar,
  .code-panel,
  .code-panel-meta,
  .featured-video-card,
  .featured-video-wrapper,
  .featured-video-info {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO SECTION */
  .hero-section {
    padding-top: 40px !important;
    padding-bottom: 35px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .hero-container {
    gap: 28px !important;
  }
  .hero-badge {
    font-size: 0.66rem !important;
    padding: 5px 12px !important;
    white-space: normal !important;
    text-align: left !important;
    max-width: 100% !important;
    line-height: 1.4 !important;
  }
  .hero-title {
    font-size: clamp(1.5rem, 6.6vw, 2.1rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 14px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  .hero-title .gradient-text {
    display: inline !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .hero-subtitle {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    margin-bottom: 22px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  .hero-cta-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
  }
  .hero-cta-group .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 0.82rem !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }
  .proof-bar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    gap: 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Terminal Card */
  .hero-terminal-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .terminal-card {
    border-radius: var(--radius-md) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .terminal-header {
    padding: 10px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .terminal-title {
    font-size: 0.68rem !important;
    max-width: 65% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  .terminal-title span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .terminal-badge {
    font-size: 0.58rem !important;
    flex-shrink: 0 !important;
  }
  .terminal-code {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    font-size: 0.72rem !important;
    line-height: 1.65 !important;
    max-height: 320px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .terminal-code pre,
  .terminal-code code {
    white-space: pre !important;
    max-width: 100% !important;
    display: block !important;
  }

  /* SYSTEMS SECTION & VIDEO SHOWCASE */
  .video-showcase-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
    border-radius: 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .video-showcase-tabs::-webkit-scrollbar {
    display: none;
  }
  .v-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.75rem;
    min-height: 40px;
  }

  .featured-video-card {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 10px;
    border-radius: 16px;
    margin-bottom: 24px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .featured-video-wrapper {
    min-height: 190px;
    max-height: 250px;
    aspect-ratio: 16 / 9;
    width: 100% !important;
    max-width: 100% !important;
  }
  .featured-video-info {
    padding: 16px 6px 8px;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .fv-title {
    font-size: 1.15rem;
  }
  .fv-desc {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .fv-actions {
    gap: 8px;
    width: 100% !important;
  }
  .fv-actions .btn {
    width: 100%;
    min-height: 42px;
  }

  .systems-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    width: 100% !important;
  }
  .system-card {
    padding: 10px;
    border-radius: 16px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .system-card-content {
    padding: 14px 6px 8px;
  }
  .system-title {
    font-size: 1.05rem;
  }
  .system-text {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }
  .system-media {
    max-height: 200px;
    aspect-ratio: 16 / 9;
    width: 100% !important;
  }

  /* CODE SHOWROOM */
  .code-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .code-tabs::-webkit-scrollbar {
    display: none;
  }
  .code-tab {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 0.76rem;
    min-height: 44px;
  }
  .code-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .code-panel-meta {
    padding: 10px 14px;
    font-size: 0.72rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100% !important;
  }
  .btn-copy-code {
    align-self: flex-start;
    padding: 6px 14px;
    min-height: 36px;
  }
  .code-panel pre {
    padding: 14px !important;
    font-size: 0.73rem !important;
    line-height: 1.7 !important;
    max-height: 360px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .code-panel pre code {
    white-space: pre !important;
    display: block !important;
  }

  /* SERVICES & STANDARDS */
  .services-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    margin-bottom: 28px;
    width: 100% !important;
  }
  .service-card {
    padding: 18px 16px;
    gap: 14px;
    width: 100% !important;
  }
  .service-icon {
    font-size: 1.6rem;
  }
  .service-title {
    font-size: 1.05rem;
  }
  .service-desc {
    font-size: 0.84rem;
  }
  .standards-banner {
    padding: 20px 16px;
    width: 100% !important;
  }
  .standards-title {
    font-size: 1.15rem;
  }
  .standards-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100% !important;
  }

  /* TECH STACK */
  .tech-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100% !important;
  }
  .tech-card {
    padding: 18px 16px;
    width: 100% !important;
  }

  /* CONTACT SECTION */
  .contact-box {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 22px 16px;
    gap: 22px;
    width: 100% !important;
  }
  .contact-title {
    font-size: 1.75rem;
  }
  .contact-desc {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }
  .discord-card, .crypto-card {
    padding: 16px 14px;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .c-card-header {
    gap: 10px;
    margin-bottom: 14px;
  }
  .c-card-icon {
    width: 40px;
    height: 40px;
  }
  .c-card-value {
    font-size: 1rem;
  }
  .crypto-address {
    font-size: 0.72rem;
    word-break: break-all;
  }
  .external-links-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    width: 100% !important;
  }
  .ext-link-card {
    padding: 12px 14px;
    min-height: 44px;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* FOOTER */
  .footer {
    padding: 24px 0 calc(24px + var(--sab));
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* TOAST */
  .toast-container {
    bottom: calc(14px + var(--sab));
    left: 14px;
    right: 14px;
    align-items: center;
  }
  .toast {
    max-width: 95%;
    font-size: 0.74rem;
    padding: 8px 14px;
  }
}

@media (max-width: 360px) {
  .nav-logo {
    font-size: 0.92rem;
  }
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .f1-telemetry-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Obsidian Scroll-Triggered Reveal Choreography */
.scroll-reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition:
    opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .bg-grid-pattern,
  .bg-glow-orb,
  .luau-stage-card.active .spec-panel::after {
    animation: none !important;
  }
  .scroll-reveal,
  .luau-stage-card {
    transition: none !important;
    filter: none !important;
  }
}
