:root {
  --bg: #080a12;
  --panel: rgba(16, 19, 31, 0.78);
  --panel-strong: #10131f;
  --text: #f6f2df;
  --muted: #8a91a8;
  --line: rgba(246, 242, 223, 0.12);
  --green: #7cffb2;
  --yellow: #f7e66b;
  --pink: #ff5fab;
  --blue: #7da4ff;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(124, 255, 178, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(255, 95, 171, 0.12), transparent 30rem),
    radial-gradient(circle at 50% 90%, rgba(125, 164, 255, 0.12), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.noise,
.scanline,
.cursor-glow { pointer-events: none; position: fixed; inset: 0; z-index: 50; }
.noise {
  opacity: 0.08;
  mix-blend-mode: screen;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.24) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.16) 25%, transparent 25%);
  background-size: 6px 6px;
}
.scanline {
  opacity: 0.13;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(255,255,255,.04) 8px);
}
.cursor-glow {
  width: 28rem;
  height: 28rem;
  inset: auto;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 255, 178, .16), transparent 65%);
  transform: translate(-50%, -50%);
  filter: blur(12px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: linear-gradient(to bottom, rgba(8, 10, 18, 0.88), rgba(8, 10, 18, 0.55));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: .75rem; font-weight: 800; letter-spacing: .02em; }
.brand img { width: 1.75rem; height: 1.75rem; max-width: none; display: block; object-fit: contain; }
.brand span { display: inline; font-size: 1rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: .4rem; }
.nav a {
  color: var(--muted);
  padding: .7rem .9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: .22s ease;
}
.nav a:hover { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.04); }
.menu-btn { display: none; }

.section-pad { padding: clamp(4.5rem, 8vw, 8rem) clamp(1rem, 4vw, 4rem); }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 38% 36%, black, transparent 72%);
  z-index: -2;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.pixel-orbit {
  position: absolute;
  border: 1px dashed rgba(124,255,178,.28);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.pixel-orbit::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--yellow);
  box-shadow: 20px 20px 0 var(--green), -26px 34px 0 var(--pink);
}
.orbit-one { width: 34rem; height: 34rem; right: 4%; top: 11%; }
.orbit-two { width: 20rem; height: 20rem; right: 24%; bottom: 10%; animation-duration: 12s; animation-direction: reverse; }
.orbit-three { width: 12rem; height: 12rem; left: 8%; bottom: 18%; animation-duration: 24s; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--green);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3.1rem, 8vw, 8rem);
  line-height: .94;
  letter-spacing: -.08em;
}
h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(246,242,223,.78);
  text-shadow: 0 0 32px rgba(124,255,178,.22);
}
.hero-text {
  max-width: 42rem;
  color: #c7ccdb;
  font-size: clamp(1.04rem, 1.6vw, 1.28rem);
  line-height: 1.9;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin: 2rem 0 1.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  color: #071008;
  background: var(--green);
  border-color: transparent;
  font-weight: 900;
  box-shadow: 0 16px 50px rgba(124,255,178,.22);
}
.btn.ghost { color: var(--text); background: rgba(255,255,255,.045); }
.hero-meta { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-meta span {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  border-radius: 999px;
  padding: .45rem .72rem;
  font-size: .9rem;
}

.hero-console { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.console-window {
  min-height: 28rem;
  background: rgba(7, 9, 15, .72);
  border: 1px solid rgba(124,255,178,.2);
  border-radius: 1.5rem;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  transform: rotate(2deg);
}
.console-top { display: flex; gap: .5rem; padding: 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.04); }
.console-top span { width: .8rem; height: .8rem; border-radius: 999px; background: var(--pink); }
.console-top span:nth-child(2) { background: var(--yellow); }
.console-top span:nth-child(3) { background: var(--green); }
pre {
  margin: 0;
  padding: 1.5rem;
  color: var(--green);
  font-size: clamp(.86rem, 1.2vw, 1rem);
  line-height: 1.8;
  white-space: pre-wrap;
}
.sound-toggle {
  align-self: flex-end;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius: 999px;
  padding: .7rem 1rem;
  cursor: pointer;
}
.sound-toggle[aria-pressed="true"] { color: var(--green); border-color: rgba(124,255,178,.5); }

.ticker { border-block: 1px solid var(--line); overflow: hidden; background: rgba(255,255,255,.04); }
.ticker-track { display: flex; width: max-content; gap: 2.4rem; padding: .85rem 0; animation: ticker 22s linear infinite; }
.ticker span { color: var(--yellow); font-weight: 900; letter-spacing: .14em; white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }

.section-heading { max-width: 52rem; margin-bottom: 2rem; }
.section-heading h2, .manifesto h2, .press h2, .join h2 {
  font-size: clamp(2.2rem, 4.8vw, 5rem);
  line-height: 1;
  letter-spacing: -.06em;
  margin-bottom: 1rem;
}
.section-heading p, .manifesto-card p, .press p, .join p { color: #c7ccdb; line-height: 1.85; }
.game-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem; }
.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 31rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}
.game-card.featured { grid-row: span 2; }
.game-art { min-height: 16rem; position: relative; background: #131726; overflow: hidden; }
.game-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .42;
}
.game-art span {
  position: absolute;
  width: 9rem;
  height: 9rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--green);
  clip-path: polygon(50% 0, 100% 28%, 88% 100%, 12% 100%, 0 28%);
  filter: drop-shadow(0 0 50px rgba(124,255,178,.42));
}
.art-a { background: radial-gradient(circle at 42% 40%, rgba(124,255,178,.28), transparent 30%), linear-gradient(135deg, #171a2b, #080a12); }
.art-b { background: radial-gradient(circle at 70% 20%, rgba(247,230,107,.28), transparent 28%), linear-gradient(135deg, #241a0f, #10131f); }
.art-b span { background: var(--yellow); border-radius: 45% 45% 22% 22%; clip-path: none; }
.art-c { background: radial-gradient(circle at 35% 50%, rgba(255,95,171,.28), transparent 28%), linear-gradient(135deg, #250f24, #10131f); }
.art-c span { background: var(--pink); clip-path: polygon(50% 0, 65% 35%, 100% 38%, 73% 60%, 82% 100%, 50% 78%, 18% 100%, 27% 60%, 0 38%, 35% 35%); }
.game-content { padding: 1.4rem; }
.tag { color: var(--green); font-weight: 900; font-size: .82rem; letter-spacing: .08em; }
.game-content h3 { font-size: clamp(1.6rem, 3vw, 2.8rem); margin-bottom: .8rem; }
.game-content p, .game-content li { color: #c7ccdb; line-height: 1.75; }
ul { margin: 1rem 0 0; padding-left: 1.15rem; }

.game-grid.two-games {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.showcase-game {
  min-height: 0;
}
.game-cover {
  position: relative;
  margin: 0;
  min-height: 18rem;
  aspect-ratio: 21 / 9;
  background:
    radial-gradient(circle at 20% 10%, rgba(124,255,178,.16), transparent 18rem),
    radial-gradient(circle at 86% 35%, rgba(255,95,171,.13), transparent 20rem),
    #080a12;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 52%, rgba(8,10,18,.26)),
    linear-gradient(90deg, rgba(124,255,178,.18), transparent 18%, transparent 82%, rgba(255,95,171,.14));
  pointer-events: none;
}
.game-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: saturate(1.04) contrast(1.02);
  transition: transform .45s ease, filter .45s ease;
}
.showcase-game:hover .game-cover img {
  transform: scale(1.025);
  filter: saturate(1.12) contrast(1.05);
}
.showcase-game .game-content {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
}
.showcase-game .game-content ul {
  margin-top: auto;
}


.manifesto { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; align-items: stretch; }
.manifesto-card, .principle, .press-inner, .contact-card, .log-list article {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}
.manifesto-card { padding: clamp(1.4rem, 4vw, 3rem); }
.principles { display: grid; gap: 1rem; }
.principle { padding: 1.5rem; }
.principle span { color: var(--yellow); font-size: 2.2rem; font-weight: 900; }
.principle h3 { font-size: 1.5rem; margin: .5rem 0; }
.principle p { color: var(--muted); line-height: 1.75; margin-bottom: 0; }

.devlog { padding-top: 2rem; }
.log-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.log-list article { padding: 1.3rem; }
time { color: var(--green); font-weight: 900; }
.log-list h3 { margin: .8rem 0; font-size: 1.35rem; }
.log-list p { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.press-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 85% 22%, rgba(124,255,178,.18), transparent 22rem),
    var(--panel);
}
.press-inner > div { max-width: 56rem; }

.join { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1rem; align-items: start; }
.contact-card { padding: 1.3rem; display: grid; gap: 1rem; }
label { display: grid; gap: .45rem; color: var(--muted); font-weight: 800; }
input, textarea, select {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(8,10,18,.72);
  border-radius: .9rem;
  padding: .9rem 1rem;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: rgba(124,255,178,.58); box-shadow: 0 0 0 4px rgba(124,255,178,.08); }
.form-note { color: var(--muted); font-size: .9rem; margin: 0; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer strong { color: var(--text); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a:hover { color: var(--green); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 80;
  transform: translate(-50%, 120%);
  border: 1px solid rgba(124,255,178,.38);
  border-radius: 999px;
  padding: .8rem 1.2rem;
  color: var(--green);
  background: rgba(8,10,18,.9);
  box-shadow: var(--shadow);
  transition: transform .25s ease;
}
.toast.show { transform: translate(-50%, 0); }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero, .game-grid, .game-grid.two-games, .manifesto, .log-list, .join { grid-template-columns: 1fr; }
  .console-window { min-height: 20rem; transform: none; }
  .nav {
    position: fixed;
    top: 4.5rem;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    background: rgba(8,10,18,.95);
  }
  .nav.open { display: flex; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: rgba(255,255,255,.04);
  }
  .press-inner, .site-footer { flex-direction: column; align-items: flex-start; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
