:root {
  color-scheme: dark;
  --bg: #090a10;
  --panel: #11131d;
  --panel-2: #171a28;
  --line: #2b3044;
  --text: #f5f3ff;
  --muted: #a8aec2;
  --purple: #8b5cf6;
  --purple-light: #c4b5fd;
  --green: #8ee3b5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 78% 12%,
      rgba(124, 58, 237, 0.18),
      transparent 30rem
    ),
    linear-gradient(180deg, #0d0f18 0%, var(--bg) 62%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 8px 15px rgba(124, 58, 237, 0.3));
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}
nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 670px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 76px;
  padding: 88px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--purple-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}
h1 span {
  color: var(--purple-light);
}
h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.lede {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.primary-button {
  background: var(--purple);
  box-shadow: 0 12px 34px rgba(124, 58, 237, 0.3);
}
.secondary-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.console-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, #1d2030, #10121a);
  box-shadow: var(--shadow);
}
.console-screen {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 12px solid #08090e;
  border-radius: 13px;
  background: linear-gradient(#392768 0 52%, #31285c 52% 100%);
  image-rendering: pixelated;
}
.pixel-sun {
  position: absolute;
  top: 17%;
  right: 18%;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd48a;
  box-shadow: 0 0 44px rgba(255, 212, 138, 0.5);
}
.pixel-ground {
  position: absolute;
  inset: 57% -10% -20%;
  background: repeating-linear-gradient(
    135deg,
    #4d8c75 0 18px,
    #3d735f 18px 36px
  );
  transform: skewY(-6deg);
}
.pixel-actor {
  position: absolute;
  left: 43%;
  top: 48%;
  width: 11%;
  aspect-ratio: 0.8;
  background: linear-gradient(#edd9ff 0 25%, #7c3aed 25% 70%, #36205f 70%);
  box-shadow: 0 14px 0 -5px rgba(0, 0, 0, 0.28);
}
.console-meta {
  display: flex;
  justify-content: space-between;
  padding: 16px 4px 0;
  color: var(--muted);
  font:
    700 0.74rem ui-monospace,
    monospace;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.feature-section {
  padding: 70px 0 110px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 44px 0 22px;
}
.feature-grid,
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature-grid article,
.demo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 19, 29, 0.8);
}
.feature-grid article {
  min-height: 220px;
  padding: 24px;
}
.feature-grid p,
.demo-card span {
  color: var(--muted);
  line-height: 1.6;
}
.feature-number {
  display: block;
  margin-bottom: 54px;
  color: var(--purple-light);
  font:
    700 0.76rem ui-monospace,
    monospace;
}

.player-main {
  max-width: 980px;
  padding: 72px 0 96px;
}
.player-intro > h1 {
  max-width: 800px;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}
.drop-zone {
  width: 100%;
  margin-top: 28px;
  padding: 32px;
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 1px dashed #555d7d;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.055);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.drop-zone:hover,
.drop-zone.drag-over,
.drop-zone:focus-visible {
  border-color: var(--purple-light);
  background: rgba(139, 92, 246, 0.11);
}
.drop-zone span {
  color: var(--muted);
}
.drop-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.5rem;
}
#rom-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.status {
  min-height: 24px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.status.error {
  color: #ff9f9f;
}
.build-badge,
.demo-tag {
  border: 1px solid rgba(142, 227, 181, 0.25);
  border-radius: 999px;
  background: rgba(142, 227, 181, 0.07);
  color: var(--green);
  font:
    700 0.7rem ui-monospace,
    monospace;
}
.build-badge {
  padding: 7px 10px;
}
.demo-grid {
  grid-template-columns: repeat(2, 1fr);
}
.demo-card {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.demo-card:hover,
.demo-card:focus-visible {
  border-color: var(--purple);
  transform: translateY(-2px);
}
.demo-card strong {
  font-size: 1.04rem;
}
.demo-tag {
  padding: 4px 7px;
  color: var(--green) !important;
}
.emulator-wrap {
  display: none;
}
.emulator-wrap.visible {
  display: block;
}
.emulator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
#game {
  width: min(100%, 760px);
  height: min(64vh, 520px);
  min-height: 240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
  box-shadow: var(--shadow);
}
.emulator-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}
.controls {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }
  nav {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  nav a {
    font-size: 0.76rem;
  }
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 64px 0 80px;
  }
  .feature-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .section-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .secondary-button,
  .demo-card {
    transition:
      transform 150ms ease,
      border-color 150ms ease,
      background 150ms ease;
  }
}
:root {
  --handheld-purple: #7652ba;
}
.demo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 6px;
  margin-bottom: 12px;
}
