@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-1: #0a0a14;
  --bg-2: #12111f;
  --cyan: #00f0ff;
  --magenta: #ff2ecb;
  --acid: #d4ff3d;
  --text: #e6e6f0;
  --text-muted: #9797ab;
  --border: rgba(230, 230, 240, 0.1);
  --gradient-cta: linear-gradient(90deg, var(--cyan), var(--magenta));
  --font-head: 'Space Grotesk', 'Arial', sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  background-image: repeating-linear-gradient(0deg, #fff 0px, transparent 1px, transparent 2px);
  mix-blend-mode: overlay;
}

body.fixed { overflow: hidden; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

p { margin: 0 0 16px; color: var(--text-muted); }

a { color: var(--cyan); text-decoration: none; }

img { max-width: 100%; display: block; }

section { position: relative; padding: 110px 0; }

.section-alt { background: var(--bg-2); }

.section-title {
  font-size: 34px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-title.center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  position: relative;
  background: var(--acid);
  color: var(--bg-1);
  border: 2px solid var(--acid);
  font-weight: 700;
  font-size: 17px;
  padding: 22px 60px;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 0 20px rgba(212, 255, 61, 0.25);
}

.btn-primary span {
  position: relative;
  z-index: 2;
}

.btn-primary::before,
.btn-primary::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  letter-spacing: inherit;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.btn-primary:hover {
  background: var(--bg-1);
  color: var(--acid);
  box-shadow: 0 0 36px rgba(212, 255, 61, 0.45);
}

.btn-primary:hover::before {
  opacity: 0.85;
  color: var(--cyan);
  transform: translate(2px, 0);
  animation: glitch-shift 0.4s steps(2, end) infinite;
}

.btn-primary:hover::after {
  opacity: 0.85;
  color: var(--magenta);
  transform: translate(-2px, 0);
  animation: glitch-shift 0.4s steps(2, end) infinite reverse;
}

@keyframes levitate {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

.hero-cta {
  animation: levitate 3s ease-in-out infinite;
}

.hero-cta:hover {
  animation-play-state: paused;
}

@media (max-width: 640px) {
  .btn-primary {
    width: 100%;
    text-align: center;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ---------- Preloader ---------- */

html.hide #preloader { display: none; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-spinner { width: 64px; height: 64px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img { height: 26px; width: auto; }

.nav-desktop { display: flex; gap: 34px; }

.nav-desktop .nav-link,
.mobile-menu .nav-link {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
}

.nav-desktop .nav-link:hover,
.mobile-menu .nav-link:hover {
  color: var(--cyan);
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 600;
}

.burger-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.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 {
  position: fixed;
  inset: 0;
  z-index: 490;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--bg-1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#mobile-menu.opened {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu .nav-link { font-size: 20px; }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-bg.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 20, 0.55) 0%, var(--bg-1) 92%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--acid);
  text-transform: uppercase;
  letter-spacing: 1px;
  max-width: 480px;
}

.hero-title {
  font-size: 68px;
  line-height: 1.02;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.glitch-text {
  animation: jitter 6s infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
}

.glitch-text:hover::before {
  opacity: 0.7;
  color: var(--cyan);
  transform: translate(2px, 0);
  animation: glitch-shift 0.4s steps(2, end) infinite;
}

.glitch-text:hover::after {
  opacity: 0.7;
  color: var(--magenta);
  transform: translate(-2px, 0);
  animation: glitch-shift 0.4s steps(2, end) infinite reverse;
}

@keyframes glitch-shift {
  0% { transform: translate(2px, 0); }
  100% { transform: translate(-2px, 1px); }
}

@keyframes jitter {
  0%, 96%, 100% { transform: translate(0, 0); }
  97% { transform: translate(-1px, 1px); }
  98% { transform: translate(1px, -1px); }
  99% { transform: translate(-1px, 0); }
}

.hero-subtitle { font-size: 18px; max-width: 480px; }

.hero-visual { position: relative; text-align: center; }

.hero-character { max-height: 760px; width: 100%; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 20px 60px rgba(0, 240, 255, 0.15)); }

@media (min-width: 1025px) {
  .hero-visual { transform: translateY(60px); }
}

/* ---------- About ---------- */

.about-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-visual img {
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- How to Play ---------- */

.action-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.action-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--acid);
  border: 1px solid rgba(212, 255, 61, 0.35);
  border-radius: 3px;
  padding: 8px 18px;
}

.how-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-4px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--cyan);
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.feature-card p { font-size: 14.5px; margin: 0; }

/* ---------- Worlds ---------- */

.worlds-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 50px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--acid);
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.world-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 360px;
  display: flex;
  align-items: flex-end;
}

.world-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.world-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(160% 140% at 100% 100%, rgba(8, 8, 16, 1) 0%, rgba(8, 8, 16, 0.75) 40%, rgba(8, 8, 16, 0) 75%),
    linear-gradient(180deg, rgba(8, 8, 16, 0.1) 0%, rgba(8, 8, 16, 0.4) 35%, rgba(8, 8, 16, 0.98) 100%);
  z-index: 1;
}

.world-card > h3,
.world-card > p {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.world-card h3 {
  font-size: 17px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.world-card p {
  font-size: 13.5px;
  margin-bottom: 20px;
}

.worlds-closing {
  max-width: 720px;
  margin: 50px auto 0;
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

/* ---------- Contact ---------- */

.contact-inner { text-align: center; max-width: 640px; margin: 0 auto; }

.contact-question { font-size: 19px; color: var(--text); }

.contact-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.contact-email {
  font-family: var(--font-mono);
  margin-bottom: 30px;
}

.contact-note { font-size: 14px; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  flex-shrink: 0;
  padding: 60px 0 30px;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/footer-bg.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.footer-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-1);
  opacity: 0.75;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-links { display: flex; align-items: center; gap: 12px; }

.footer-links a { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

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

.footer-sep { color: var(--border); }

.footer-copy { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ---------- Legal pages ---------- */

.legal-page {
  flex: 1 0 auto;
  padding: 160px 0 100px;
}

.legal-content { max-width: 820px; margin: 0 auto; }

.legal-content h1 {
  font-size: 40px;
  text-transform: uppercase;
  margin-bottom: 34px;
}

.legal-content p { color: var(--text-muted); font-size: 15px; }

.legal-content strong { color: var(--text); }

.legal-content ul { color: var(--text-muted); font-size: 15px; padding-left: 22px; }

.legal-content li { margin-bottom: 10px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-title { font-size: 54px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .worlds-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
}

@media (max-width: 768px) {
  section { padding: 80px 0; }
  .nav-desktop { display: none; }
  .burger-btn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .eyebrow, .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-character { max-height: 420px; }
  .hero-title { font-size: 44px; }
  .section-title { font-size: 28px; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .worlds-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .legal-content h1 { font-size: 30px; }
}
