@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #05060f;
  --bg-2: #090c1c;
  --bg-3: #0d1130;
  --panel: rgba(18, 22, 48, 0.55);
  --line: rgba(120, 140, 255, 0.16);
  --primary: #3d7bff;
  --accent: #8b5cff;
  --accent-2: #22e6a3;
  --text: #eaf0ff;
  --muted: #9aa6cf;
  --grad: linear-gradient(120deg, #3d7bff 0%, #8b5cff 52%, #22e6a3 100%);
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 76px;
}

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

html { font-size: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: 0.5px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.preloader img { width: 72px; height: 72px; }
html.hide .preloader { display: none; }

/* ---------- Cosmic background ---------- */
.starfield, .grid-overlay {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
}
.starfield {
  background-color: var(--bg);
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(160,190,255,0.7), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(180,150,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 10% 65%, rgba(120,230,190,0.6), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 33% 50%, rgba(200,210,255,0.6), transparent);
  background-size: 100% 100%;
  animation: starDrift 120s linear infinite;
}
.grid-overlay {
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 85%);
  opacity: 0.6;
}
@keyframes starDrift {
  from { background-position: 0 0; }
  to { background-position: 0 -600px; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 6, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo img { height: 34px; width: auto; }
.desktop-nav { display: flex; align-items: center; gap: 34px; }
.nav-link {
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  position: relative; padding: 4px 0; transition: color 0.25s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad); transition: width 0.28s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.header-cta {
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--text);
  padding: 10px 22px; border-radius: 40px; border: 1px solid rgba(120,140,255,0.35);
  background: rgba(120,140,255,0.08); transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.header-cta:hover { border-color: var(--accent); box-shadow: 0 0 24px rgba(139,92,255,0.35); transform: translateY(-1px); }

/* ---------- Burger ---------- */
.burger-btn {
  display: none; background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 120;
}
.burger-btn span {
  display: block; width: 24px; height: 2px; margin: 5px auto; border-radius: 2px;
  background: var(--text); transition: transform 0.3s, opacity 0.3s;
}
.burger-btn.act span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
#mobile-menu {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(5, 6, 15, 0.97); backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.32s ease;
}
#mobile-menu.opened { opacity: 1; pointer-events: auto; }
#mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 30px; }
#mobile-menu .nav-link { font-size: 1.15rem; }
#mobile-menu .mobile-cta {
  font-family: var(--font-head); font-size: 1rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: #050810;
  padding: 14px 40px; border-radius: 40px; background: var(--grad);
}
body.fixed { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  border: 0; border-radius: 44px; transition: transform 0.25s, box-shadow 0.25s;
}
.btn-primary {
  background: var(--grad); color: #050810; font-size: 0.95rem;
  padding: 16px 42px; box-shadow: 0 10px 40px rgba(61,123,255,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(139,92,255,0.45); }

.hero-cta { animation: levitate 3s ease-in-out infinite; }
.hero-cta:hover { animation-play-state: paused; }
@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: 0.72rem;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 22px; padding: 6px 16px; border: 1px solid rgba(34,230,163,0.3);
  border-radius: 40px; background: rgba(34,230,163,0.06);
}
.section-head { max-width: 780px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { margin-bottom: 24px; }
.section-head p { color: var(--muted); margin-bottom: 16px; }
.section-head p:last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 60px) 0 90px;
  background:
    linear-gradient(90deg, rgba(5,6,15,0.92) 0%, rgba(5,6,15,0.72) 34%, rgba(5,6,15,0.2) 64%, rgba(5,6,15,0) 100%),
    linear-gradient(180deg, rgba(5,6,15,0.4) 0%, rgba(5,6,15,0.25) 45%, rgba(5,6,15,0.92) 100%),
    url('../img/hero-bg.webp') center / cover no-repeat;
  position: relative;
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: 48px;
}
.hero-content { max-width: 640px; }
.hero-visual { justify-self: end; }
.hero-visual img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 20px 44px rgba(61, 123, 255, 0.3));
  animation: levitate 6s ease-in-out infinite;
}
.hero h1 {
  font-size: 3.6rem; font-weight: 800; margin-bottom: 24px;
  background: linear-gradient(120deg, #ffffff 0%, #b9c6ff 55%, #22e6a3 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.25rem; color: #cdd6f5; margin-bottom: 22px; font-weight: 500; }
.hero-body { font-size: 1.02rem; color: var(--muted); margin-bottom: 40px; max-width: 640px; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.about-media { position: relative; }
.about-media img {
  width: 100%; border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.media-frame {
  position: absolute; inset: -12px; border-radius: 20px; pointer-events: none;
  border: 1px solid rgba(139,92,255,0.25);
  clip-path: polygon(0 0, 40% 0, 40% 6px, 6px 6px, 6px 40%, 0 40%);
}
.about-text h2 { margin-bottom: 26px; }
.about-text p { color: var(--muted); margin-bottom: 18px; }
.feature-list { margin-top: 30px; display: grid; gap: 14px; }
.feature-list li {
  position: relative; padding-left: 30px; color: #c3ccec; font-size: 0.98rem;
}
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 12px; height: 12px;
  background: var(--grad); border-radius: 3px; transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(61,123,255,0.6);
}

/* ---------- Gameplay ---------- */
.gameplay { background: linear-gradient(180deg, transparent, rgba(13,17,48,0.5), transparent); }
.gameplay-band {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  margin-bottom: 64px; box-shadow: 0 24px 70px rgba(0,0,0,0.55); position: relative;
}
.gameplay-band img { width: 100%; }
.node-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.node-grid li {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 30px 28px; backdrop-filter: blur(6px); position: relative;
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}
.node-grid li:hover { transform: translateY(-6px); border-color: rgba(139,92,255,0.45); box-shadow: 0 18px 44px rgba(61,123,255,0.2); }
.node-dot {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad); margin-bottom: 20px; position: relative;
}
.node-dot::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(34,230,163,0.4);
}
.node-grid h3 { font-size: 1.12rem; margin-bottom: 12px; }
.node-grid p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Community ---------- */
.community-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.community-inner h2 { margin-bottom: 26px; }
.community-inner > p { color: var(--muted); margin-bottom: 18px; }
.contact-card {
  margin-top: 40px; display: inline-flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 34px 56px; border-radius: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,92,255,0.14), transparent 70%), var(--panel);
  border: 1px solid var(--line);
}
.contact-label { font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.contact-email {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; transition: opacity 0.25s;
}
.contact-email:hover { opacity: 0.8; }

/* ---------- Signup ---------- */
.signup { text-align: center; }
.signup-inner { max-width: 700px; margin: 0 auto; }
.signup-inner h2 { font-size: 2.4rem; margin-bottom: 24px; }
.signup-inner > p { color: var(--muted); margin-bottom: 40px; }
.signup-form {
  display: flex; gap: 14px; max-width: 560px; margin: 0 auto 22px;
  padding: 10px; border-radius: 50px; border: 1px solid var(--line);
  background: var(--panel);
}
.signup-form input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text); font-family: var(--font-body); font-size: 1rem; padding: 0 22px;
}
.signup-form input::placeholder { color: var(--muted); }
.signup-form:focus-within { border-color: var(--accent); box-shadow: 0 0 30px rgba(139,92,255,0.22); }
.signup-form .btn-primary { padding: 15px 34px; white-space: nowrap; }
.privacy-note { color: var(--muted); font-size: 0.85rem; max-width: 480px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0; background: rgba(5,6,15,0.6); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.footer-inner .logo img { height: 30px; }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.25s; }
.footer-links a:hover { color: var(--accent-2); }
.copyright { color: #66739c; font-size: 0.85rem; }

/* ---------- Legal ---------- */
.legal-page { padding: calc(var(--header-h) + 70px) 0 100px; }
.legal-content { max-width: 900px; margin: 0 auto; }
.legal-content h1 {
  font-size: 2.6rem; margin-bottom: 34px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-content h2 { font-family: var(--font-head); font-size: 1.35rem; color: var(--text); margin: 40px 0 16px; }
.legal-content h4 { font-family: var(--font-head); font-size: 1.15rem; color: var(--text); margin: 34px 0 14px; }
.legal-content h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--text); margin: 28px 0 12px; }
.legal-content p { color: var(--muted); margin-bottom: 14px; }
.legal-content ul { margin: 0 0 16px 22px; list-style: disc; color: var(--muted); }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--primary); word-break: break-word; }
.legal-content .name { color: var(--accent-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .about-inner { gap: 44px; }
  .node-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 100px 0; }
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .burger-btn { display: block; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 70px) 0 80px; }
  .hero {
    background:
      linear-gradient(180deg, rgba(5,6,15,0.7) 0%, rgba(5,6,15,0.55) 40%, rgba(5,6,15,0.95) 100%),
      url('../img/hero-bg.webp') center / cover no-repeat;
  }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { order: -1; justify-self: center; max-width: 360px; }
  .hero h1 { font-size: 2.5rem; }
  .hero-sub { font-size: 1.12rem; }
  .about-inner { grid-template-columns: 1fr; }
  .about-media { max-width: 480px; margin: 0 auto; }
  .node-grid { grid-template-columns: 1fr; }
  .signup-inner h2 { font-size: 2rem; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 80px 0; }
  .hero h1 { font-size: 2.1rem; }
  .hero-body { font-size: 0.96rem; }
  .contact-card { padding: 28px 30px; }
  .contact-email { font-size: 1.1rem; }
  .signup-form { flex-direction: column; border-radius: 20px; padding: 16px; }
  .signup-form input { text-align: center; padding: 8px 0; }
  .signup-form .btn-primary { width: 100%; }
  .legal-content h1 { font-size: 2rem; }
}
