/* ── Design Tokens ── */
:root {
  --bg-900: #07080d;
  --bg-800: #0d0f1a;
  --bg-700: #11141f;
  --bg-600: #161924;
  --bg-500: #1c2030;
  --surface: #1e2235;
  --surface-2: #242840;
  --border: rgba(99,115,255,0.13);
  --border-2: rgba(99,115,255,0.22);

  --accent: #6b7eff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(107,126,255,0.25);
  --green: #34d399;
  --amber: #fbbf24;
  
  --text-primary: #eef0ff;
  --text-secondary: #9299c5;
  --text-muted: #5a6090;

  --radius: 12px;
  --radius-lg: 24px;
  --header-h: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-900);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Topbar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(7,8,13,0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-size: 16px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 14px; font-weight: 600; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important; padding: 8px 18px; border-radius: 8px;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s !important;
  display: flex; align-items: center; gap: 6px;
}
.nav-cta:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(107,126,255,0.4);
}
.nav-cta-yt {
  background: linear-gradient(135deg, #ff4b4b, #cc0000);
  color: #fff !important; padding: 8px 18px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(204, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s !important;
  display: flex; align-items: center; gap: 6px;
}
.nav-cta-yt:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4);
}

/* ── Main Layout ── */
main { padding-top: var(--header-h); padding-bottom: 60px; /* Space for fixed footer */ }

section {
  min-height: 80vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 100px 20px;
  position: relative;
}

/* ── Section Titles ── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent); margin-bottom: 12px;
  padding: 6px 16px; border-radius: 20px; background: var(--accent-glow);
  border: 1px solid var(--border-2);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px;
  color: var(--text-primary); margin-bottom: 16px;
}
.section-desc { font-size: 17px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ── Hero ── */
#hero {
  text-align: center;
  position: relative;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(107,126,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(107,126,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,115,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,115,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 0%, transparent 70%);
  pointer-events: none;
}
#hero h1 {
  font-size: clamp(3rem, 7vw, 5rem); font-weight: 900; letter-spacing: -2px;
  line-height: 1.05; margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 10%, var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#hero p {
  font-size: 19px; color: var(--text-secondary); max-width: 650px; margin: 0 auto 40px;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 32px; border-radius: 12px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 8px 32px rgba(107,126,255,0.4); filter: brightness(1.1);
}
.btn-secondary {
  background: var(--surface); color: var(--text-primary); border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent); background: var(--surface-2); transform: translateY(-2px);
}
.btn-yt {
  background: linear-gradient(135deg, #ff4b4b, #cc0000);
  color: #fff; box-shadow: 0 4px 24px rgba(204, 0, 0, 0.25);
}
.btn-yt:hover {
  transform: translateY(-2px); box-shadow: 0 8px 32px rgba(204, 0, 0, 0.4); filter: brightness(1.1);
}

/* ── Games Section ── */
#games { background: var(--bg-800); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.game-card {
  background: var(--bg-900); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  max-width: 1000px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; gap: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.game-info { text-align: center; }
.game-title { font-size: 2.5rem; font-weight: 900; color: #fff; letter-spacing: -1px; margin-bottom: 8px; }
.game-tagline { font-size: 16px; color: var(--text-secondary); }

.video-thumbnail {
  width: 100%; border-radius: var(--radius); overflow: hidden; position: relative;
  cursor: pointer; border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  transition: all 0.3s;
}
.video-thumbnail img { width: 100%; display: block; transition: transform 0.5s ease; }
.video-thumbnail:hover img { transform: scale(1.03); }
.video-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(107,126,255,0.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; box-shadow: 0 0 30px var(--accent-glow);
  transition: all 0.3s;
}
.video-thumbnail:hover .video-play-btn { background: var(--accent); transform: translate(-50%, -50%) scale(1.1); }

.steam-widget-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.4); border: 1px solid var(--border); }

/* ── Ecosystem Hub ── */
#ecosystem { position: relative; }
.eco-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px; max-width: 1100px; width: 100%; margin: 0 auto;
}
.eco-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  text-decoration: none; display: flex; flex-direction: column; align-items: flex-start;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.eco-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.eco-card:hover { transform: translateY(-5px); border-color: var(--border-2); box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.eco-card:hover::before { opacity: 1; }

.eco-icon {
  width: 64px; height: 64px; border-radius: 16px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  position: relative; z-index: 1;
}
.eco-icon.playtest { background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(248,113,113,0.2)); border: 1px solid rgba(251,191,36,0.25); color: var(--amber); }
.eco-icon.docs { background: linear-gradient(135deg, rgba(52,211,153,0.2), rgba(56,189,248,0.2)); border: 1px solid rgba(52,211,153,0.25); color: var(--green); }

.eco-title { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 12px; position: relative; z-index: 1; }
.eco-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 30px; position: relative; z-index: 1; flex: 1; }

.eco-link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  color: var(--accent); position: relative; z-index: 1;
}
.eco-card:hover .eco-link { color: var(--text-primary); }

/* ── Community Section ── */
#community { background: var(--bg-800); border-top: 1px solid var(--border); }
.discord-wrap {
  background: var(--bg-900); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); max-width: 400px; width: 100%;
  margin: 0 auto;
}
.discord-wrap iframe { border-radius: var(--radius); width: 100%; }

/* ── Footer ── */
footer {
  position: fixed; bottom: 0; width: 100%; z-index: 1000;
  padding: 16px 40px; text-align: center; border-top: 1px solid var(--border);
  background: rgba(7,8,13,0.85); backdrop-filter: blur(10px);
}
.easter-egg-text {
  font-size: 14px; color: var(--text-muted); cursor: pointer; user-select: none;
  transition: color 0.2s;
}
.easter-egg-text:hover { color: var(--text-secondary); }

/* ── Video Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  width: 90%; max-width: 1200px; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,1); border: 1px solid var(--border);
  transform: scale(0.95); transition: transform 0.3s ease;
  position: relative;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close {
  position: absolute; top: -50px; right: 0; color: #fff; font-size: 40px; cursor: pointer;
  opacity: 0.7; transition: opacity 0.2s; background: none; border: none; padding: 0;
}
.modal-close:hover { opacity: 1; }

@media (max-width: 768px) {
  #hero h1 { font-size: 2.8rem; }
  .nav-links { display: none; }
  section { padding: 80px 20px; }
  .game-card { padding: 20px; }
}
