/* ============================================
   XENO — Shared Design System
   ============================================ */

:root {
  --bg: #030303;
  --bg-elevated: #070707;
  --surface: #0c0c0c;
  --surface-2: #111111;
  --surface-hover: #151515;
  --border: rgba(255, 255, 255, 0.055);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ffffff;
  --success: #ffffff;
  --success-dim: rgba(255, 255, 255, 0.08);
  --warning: #a1a1aa;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% -10%, black 15%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.035) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.bg-noise {
  position: fixed;
  inset: 0;
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-sm {
  max-width: 720px;
}

.container-md {
  max-width: 900px;
}

section {
  padding: 96px 0;
}

.page-header {
  padding: 140px 0 64px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 16px rgba(0,0,0,0.35);
}

.btn-primary:hover {
  background: #f2f2f2;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 8px 28px rgba(0,0,0,0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255,255,255,0.035);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1rem;
  border-radius: 13px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 9px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-lg svg {
  width: 20px;
  height: 20px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(3, 3, 3, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.logo-icon img,
.logo-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-icon img {
  border-radius: 6px;
}

/* Custom image helpers */
.custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.img-slot {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-slot .img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  gap: 8px;
  pointer-events: none;
}

.img-slot .img-fallback svg {
  width: 40px;
  height: 40px;
  opacity: 0.45;
}

/* Hide fallback when image loads successfully */
.img-slot img[src]:not([src=""]) + .img-fallback,
.img-slot.has-image .img-fallback {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--border-hover);
}

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.025) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--text);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 9px;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.935rem;
  line-height: 1.65;
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 460px;
  margin: 0 auto;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-item {
  background: var(--surface);
  padding: 32px 20px;
  text-align: center;
}

.stat-item .value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.stat-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-left span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ */
.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

.faq-question:hover {
  color: #fff;
}

.faq-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 220px;
  padding-bottom: 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.28s;
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.28s;
  position: relative;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.93rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 6px 14px 6px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.badge-success {
  background: var(--success-dim);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--success);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
}

/* Responsive */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  section {
    padding: 64px 0;
  }
  .page-header {
    padding: 120px 0 48px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}


/* ===== Discord / Download CTAs ===== */
.btn-discord-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000 !important;
  border: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 4px 16px rgba(0,0,0,0.4);
  font-weight: 600;
}
.btn-discord-nav:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 8px 24px rgba(0,0,0,0.45);
  color: #000 !important;
}
.btn-discord-nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #000;
  fill: #000;
}

.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 4px 18px rgba(255,255,255,0.08), 0 4px 16px rgba(0,0,0,0.4);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 8px 28px rgba(255,255,255,0.12), 0 8px 24px rgba(0,0,0,0.45);
}

/* ===== Mobile drawer ===== */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.mobile-drawer.open {
  pointer-events: auto;
  visibility: visible;
}
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-drawer.open .mobile-drawer-backdrop {
  opacity: 1;
}
.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 86vw);
  height: 100%;
  background: #0a0a0a;
  border-left: 1px solid var(--border);
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}
.mobile-drawer-close {
  align-self: flex-end;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 12px;
}
.mobile-drawer-panel a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 12px;
  transition: all 0.2s;
}
.mobile-drawer-panel a:hover,
.mobile-drawer-panel a.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.mobile-drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mobile-drawer-actions .btn {
  width: 100%;
  justify-content: center;
}


/* ===== Background (B&W) ===== */
.bg-glow {
  background: radial-gradient(ellipse, rgba(255,255,255,0.045) 0%, transparent 60%);
}
.bg-orbs { display: none; }

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 35%, transparent 25%, rgba(0,0,0,0.65) 100%);
}

.bg-aurora { display: none; }
.cursor-spotlight { display: none; }

.bg-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: star-twinkle linear infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: var(--star-o, 0.45); transform: scale(1); }
}

.navbar, .container, section, footer, .mobile-drawer, .modal-overlay, .page-header, .hero {
  position: relative;
  z-index: 1;
}
.navbar { z-index: 100; }
.mobile-drawer { z-index: 200; }
.modal-overlay { z-index: 200; }
