:root {
  --bg: #07070d;
  --bg-2: #11111c;
  --text: #f2f2f7;
  --muted: #9a9ab0;
  --red: #ff2e63;
  --cyan: #08d9d6;
  --yellow: #ffd319;
  --purple: #a855f7;
  --radius: 18px;
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

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

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(7,7,13,.9), rgba(7,7,13,.35));
}

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: .08em;
}
.logo span { color: var(--red); margin-left: .2em; }

.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  display: block;
  transition: transform .3s, opacity .3s;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
  font-size: 1rem;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(120deg, var(--red), #ff7a45);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--red);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px var(--red); }
.btn-ghost {
  border-color: rgba(255,255,255,.25);
  color: var(--text);
  background: rgba(255,255,255,.03);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- HERO ---------- */
main { position: relative; }

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 2rem;
  padding: 8rem clamp(1.25rem, 6vw, 6rem) 4rem;
  position: relative;
}

.eyebrow {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  position: relative;
}

/* glitch effect */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}
.glitch::before {
  color: var(--cyan);
  transform: translate(-3px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  animation: glitch-a 3s infinite steps(2);
  opacity: .7;
}
.glitch::after {
  color: var(--red);
  transform: translate(3px, 0);
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  animation: glitch-b 3s infinite steps(2);
  opacity: .7;
}
@keyframes glitch-a {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-6px, 0); }
  94% { transform: translate(5px, 0); }
  96% { transform: translate(-2px, 0); }
}
@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(6px, 0); }
  93% { transform: translate(-5px, 0); }
  97% { transform: translate(3px, 0); }
}

.lead {
  color: var(--muted);
  max-width: 34rem;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.stats { list-style: none; display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--yellow);
}
.stats span { color: var(--muted); font-size: .9rem; }

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: min(480px, 100%);
  justify-self: center;
}
.orb {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff7a45, var(--red) 40%, #5b0f2b 75%);
  filter: blur(2px);
  box-shadow: 0 0 120px rgba(255,46,99,.5);
  animation: float 6s ease-in-out infinite;
}
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(8,217,214,.5);
  animation: spin 20s linear infinite;
}
.ring.r2 {
  inset: -8%;
  border-color: rgba(168,85,247,.4);
  animation-duration: 32s;
  animation-direction: reverse;
}
.logo-big {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6rem, 14vw, 9rem);
  color: rgba(255,255,255,.92);
  text-shadow: 0 0 30px rgba(255,255,255,.4);
  animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--muted);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 6rem clamp(1.25rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: .5rem;
}
.section-title span { color: var(--red); }
.section-sub { color: var(--muted); margin-bottom: 3rem; max-width: 40rem; }

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- GAME CARDS ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card {
  background: linear-gradient(160deg, var(--bg-2), #0b0b14);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s, box-shadow .35s, border-color .35s;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-8px) rotate(-.3deg);
  border-color: var(--accent);
  box-shadow: 0 25px 60px -20px var(--accent);
}
.card:hover::before { opacity: .18; }

.card-art {
  height: 170px;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  transition: transform .4s;
}
.card:hover .card-art { transform: scale(1.12); }

.card-body { padding: 1.5rem; position: relative; }
.tag {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }
.card-foot {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: .9rem;
}
.rating { color: var(--yellow); font-weight: 600; }

/* ---------- ARCADE ---------- */
.arcade {
  background: var(--bg-2);
  border: 1px solid rgba(8,217,214,.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 0 60px -20px rgba(8,217,214,.4);
}
.arcade-hud {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
  text-align: center;
}
.arcade-hud small { color: var(--muted); letter-spacing: .15em; font-size: .7rem; }
.arcade-hud strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--cyan);
}
.arcade-field {
  position: relative;
  height: 340px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(8,217,214,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(8,217,214,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    #05050a;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}
.target {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 35%, #fff, var(--yellow) 35%, var(--red) 90%);
  box-shadow: 0 0 25px var(--red);
  cursor: pointer;
  display: none;
  transform: scale(0);
  transition: transform .15s;
}
.target.show { display: block; transform: scale(1); }
.target span { /* inner ring */
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7);
}
.target.hit { animation: pop .25s forwards; }
@keyframes pop {
  to { transform: scale(1.8); opacity: 0; }
}
.arcade-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  pointer-events: none;
  transition: opacity .3s;
}
.arcade-msg.hidden { opacity: 0; }
.arcade-start { display: block; margin: 1.25rem auto 0; }

/* ---------- ABOUT ---------- */
.about { max-width: 720px; }
.about p { color: var(--muted); font-size: 1.05rem; margin-bottom: 1rem; }
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.value {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--bg-2);
  border-left: 4px solid var(--red);
  transition: transform .3s;
}
.value:nth-child(2) { border-color: var(--cyan); }
.value:nth-child(3) { border-color: var(--yellow); }
.value:hover { transform: translateY(-5px); }
.value h4 { font-family: var(--font-display); margin-bottom: .4rem; }
.value p { color: var(--muted); font-size: .95rem; }

/* ---------- CONTACT ---------- */
.contact { max-width: 620px; display: grid; gap: 1.5rem; }
.field { position: relative; }
.field input,
.field textarea {
  width: 100%;
  padding: 1.1rem 1rem .6rem;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8,217,214,.15);
}
.field label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--muted);
  pointer-events: none;
  transition: all .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: .3rem;
  font-size: .72rem;
  color: var(--cyan);
}
.contact .btn { justify-self: start; }
.form-status { color: var(--cyan); min-height: 1.5rem; }

/* ---------- FOOTER ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2.5rem clamp(1.25rem, 6vw, 6rem);
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .9rem;
}
.socials { display: flex; gap: 1.25rem; }
.socials a:hover { color: var(--cyan); }
.inline-link { color: var(--cyan); }
.inline-link:hover { text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 7rem; }
  .lead { margin-inline: auto; }
  .hero-cta, .stats { justify-content: center; }
  .hero-visual { width: min(320px, 80%); order: -1; }
  .scroll-hint { display: none; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(7,7,13,.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 1.4rem;
    transform: translateX(100%);
    transition: transform .4s ease;
  }
  .nav.open .nav-links { transform: none; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
