:root {
  color-scheme: dark;
  --ink: #09090d;
  --panel: #111117;
  --panel-2: #181820;
  --line: #2b2b35;
  --text: #f1efe7;
  --muted: #b4b0a3;
  --green: #95ff5f;
  --cyan: #39d8ff;
  --amber: #ffd166;
  --coral: #ff6b5f;
  --violet: #b58cff;
  --shadow: rgba(0, 0, 0, .46);
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-pixel: "Lucida Console", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 4px,
    radial-gradient(circle at 12% 10%, rgba(149,255,95,.14), transparent 26rem),
    radial-gradient(circle at 83% 18%, rgba(255,107,95,.16), transparent 28rem),
    radial-gradient(circle at 70% 84%, rgba(57,216,255,.12), transparent 30rem),
    var(--ink);
  line-height: 1.6;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: .75rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--amber);
  color: #17120a;
  padding: .55rem .8rem;
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(241,239,231,.14);
  background: rgba(9,9,13,.82);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-grid;
  grid-template-columns: 38px auto;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--text);
  color: var(--green);
  background:
    linear-gradient(90deg, transparent 45%, rgba(255,255,255,.16) 45% 55%, transparent 55%),
    linear-gradient(transparent 45%, rgba(255,255,255,.16) 45% 55%, transparent 55%),
    #15151d;
  box-shadow: 5px 5px 0 var(--coral);
  font-family: var(--font-pixel);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .55rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: .45rem .72rem;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(149,255,95,.45);
  background: rgba(149,255,95,.08);
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 0 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.1rem;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: .82rem;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 3.35rem;
  height: .85rem;
  flex: 0 0 3.35rem;
  background:
    linear-gradient(var(--green) 0 0) 0 0 / .85rem .85rem no-repeat,
    linear-gradient(var(--cyan) 0 0) 1.25rem 0 / .85rem .85rem no-repeat,
    linear-gradient(var(--coral) 0 0) 2.5rem 0 / .85rem .85rem no-repeat;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 9vw, 7.2rem);
  text-transform: uppercase;
}

h1 span {
  display: block;
  color: var(--amber);
  text-shadow: 4px 4px 0 #2a1b00, 8px 8px 0 rgba(255,107,95,.45);
}

.hero-text {
  max-width: 680px;
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  color: var(--muted);
}

.actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .8rem 1rem;
  border: 2px solid var(--text);
  background: var(--green);
  color: #102008;
  box-shadow: 6px 6px 0 var(--shadow);
  text-decoration: none;
  font-weight: 900;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--shadow);
}

.console {
  position: relative;
  min-height: 520px;
  border: 2px solid rgba(241,239,231,.78);
  background: linear-gradient(145deg, #202028, #111118);
  box-shadow: 18px 20px 0 rgba(0,0,0,.35);
  padding: 1.2rem;
}

.screen {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 2px solid #050507;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 100% 6px,
    linear-gradient(90deg, rgba(57,216,255,.12), rgba(149,255,95,.09)),
    #061011;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 13%, rgba(255,209,102,.72) 13% 22%, transparent 22% 35%, rgba(149,255,95,.7) 35% 47%, transparent 47% 59%, rgba(57,216,255,.75) 59% 68%, transparent 68%),
    linear-gradient(transparent 0 68%, #121217 68%);
  clip-path: polygon(0 80%, 12% 52%, 24% 66%, 35% 38%, 47% 50%, 58% 24%, 70% 44%, 82% 18%, 100% 36%, 100% 100%, 0 100%);
}

.screen::after {
  content: "MINERVA READY";
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: .9rem;
  text-shadow: 0 0 12px rgba(149,255,95,.7);
}

.sprite-bird {
  position: absolute;
  left: 22%;
  top: 37%;
  width: 56px;
  height: 42px;
  background:
    linear-gradient(var(--amber) 0 0) 8px 0 / 32px 8px no-repeat,
    linear-gradient(var(--amber) 0 0) 0 8px / 48px 16px no-repeat,
    linear-gradient(var(--amber) 0 0) 8px 24px / 32px 8px no-repeat,
    linear-gradient(var(--coral) 0 0) 40px 16px / 16px 8px no-repeat,
    linear-gradient(#17120a 0 0) 32px 8px / 8px 8px no-repeat;
  image-rendering: pixelated;
}

.console-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-top: 1.1rem;
  align-items: end;
}

.dpad {
  width: 106px;
  height: 106px;
  position: relative;
}

.dpad::before,
.dpad::after {
  content: "";
  position: absolute;
  background: #0b0b0f;
  border: 2px solid #34343e;
}

.dpad::before {
  width: 34px;
  height: 106px;
  left: 36px;
}

.dpad::after {
  width: 106px;
  height: 34px;
  top: 36px;
}

.console-copy {
  border-left: 4px solid var(--cyan);
  padding-left: .9rem;
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: .84rem;
}

.buttons {
  display: flex;
  gap: .8rem;
  align-items: center;
}

.button-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #320a07;
  background: var(--coral);
  box-shadow: inset -5px -7px 0 rgba(0,0,0,.28);
}

.button-dot.alt { background: var(--cyan); border-color: #05313c; }

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4rem 0;
}

.section h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4.5vw, 4.2rem);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature {
  min-height: 220px;
  background: rgba(17,17,23,.92);
  padding: 1.25rem;
}

.feature strong {
  display: block;
  margin-bottom: .7rem;
  color: var(--amber);
  font-family: var(--font-pixel);
  text-transform: uppercase;
}

.feature p { color: var(--muted); margin: 0; }

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.spec {
  border-top: 3px solid var(--green);
  background: rgba(255,255,255,.045);
  padding: 1rem;
}

.spec:nth-child(2) { border-color: var(--cyan); }
.spec:nth-child(3) { border-color: var(--amber); }
.spec:nth-child(4) { border-color: var(--coral); }

.spec b {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
}

.spec span { color: var(--muted); }

.console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.console-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  background: rgba(17,17,23,.94);
  padding: 1.35rem;
}

.console-card h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.05;
  color: var(--amber);
}

.console-card p {
  color: var(--muted);
}

.console-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.console-card .console-meta {
  margin: 0 0 .85rem;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: .78rem;
  text-transform: uppercase;
}

.clean-list {
  margin: 0 0 1.6rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.clean-list li + li { margin-top: .45rem; }

.comparison-table {
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(17,17,23,.92);
}

.comparison-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  color: var(--amber);
  font-family: var(--font-pixel);
  font-size: .82rem;
  text-transform: uppercase;
}

.comparison-table td {
  color: var(--muted);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

.page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.page h1 {
  max-width: none;
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.document {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: rgba(17,17,23,.88);
}

.document h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
  color: var(--amber);
}

.document h2:first-child { margin-top: 0; }

.document p,
.document li { color: var(--muted); }

.document a { color: var(--cyan); }

.games-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.games-page h1 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 8vw, 5.7rem);
}

.games-intro {
  max-width: 720px;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: rgba(17,17,23,.94);
}

.game-shot {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #050507;
  image-rendering: pixelated;
}

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.game-body h2 {
  font-size: 1.4rem;
  color: var(--amber);
}

.game-body p {
  flex: 1;
  color: var(--muted);
}

.game-meta {
  margin-top: .2rem;
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: .78rem;
  text-transform: uppercase;
}

.console-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.console-page h1 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 8vw, 5.7rem);
}

.page-intro {
  max-width: 820px;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.detail-card {
  background: rgba(17,17,23,.94);
  padding: 1.25rem;
}

.detail-card h2 {
  font-size: 1.45rem;
  color: var(--amber);
}

.detail-card p {
  color: var(--muted);
}

.detail-band {
  padding-top: 4rem;
}

.detail-band h2 {
  max-width: 780px;
  font-size: clamp(2rem, 4.5vw, 3.7rem);
}

.site-footer {
  border-top: 1px solid rgba(241,239,231,.14);
  background: #0b0b10;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: .9rem 0;
  }

  .nav-links { justify-content: flex-start; }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .console { min-height: 440px; }

  .console-grid,
  .detail-grid,
  .feature-grid,
  .game-list,
  .spec-strip { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .sprite-bird {
    animation: hover-bird 1.6s steps(2, end) infinite;
  }

  @keyframes hover-bird {
    50% { transform: translateY(-12px); }
  }
}
