:root {
  --cream: #f3e4b0;
  --cream-dark: #e6d18a;
  --ink: #1a1a1a;
  --paper: #fff8e0;
  --orange: #e07a28;
  --red: #c62828;
  --steel: #6b7480;
  --sky: #7eb7d9;
  --grass: #4f8f4a;
  --shadow: 4px 4px 0 var(--ink);
  --radius: 0;
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  body::after {
    display: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(26, 26, 26, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.045) 1px, transparent 1px);
  background-size: 16px 16px;
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(26, 26, 26, 0.035) 2px,
    rgba(26, 26, 26, 0.035) 3px
  );
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--red);
}

a:hover {
  color: var(--orange);
}

a:focus-visible,
.play-btn:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--cream);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-dev {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--steel);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-link {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 8px 10px;
}

.nav-link:hover {
  color: var(--red);
}

.play-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.play-btn:hover {
  color: var(--cream);
  background: var(--red);
  border-color: var(--ink);
}

.play-btn--header {
  padding: 7px 10px;
  font-size: 0.72rem;
}

.play-btn--hero {
  padding: 12px 16px;
  font-size: 0.95rem;
}

.play-btn small {
  display: block;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.play-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

.hero {
  padding: 28px 0 8px;
}

.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 8px;
  background: var(--sky);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 8vw, 4.2rem);
  text-shadow: 3px 3px 0 var(--cream-dark);
}

.tagline {
  margin: 14px 0 20px;
  max-width: 34ch;
  font-size: 1.15rem;
  font-weight: 700;
}

.hero-art {
  margin: 0;
}

.hero-art img {
  width: 100%;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--sky);
}

.loop {
  display: grid;
  gap: 10px;
  margin: 28px 0 8px;
}

.loop-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.loop-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 3px solid var(--ink);
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
  font-weight: 700;
}

.loop-item strong {
  display: block;
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
}

.loop-item p {
  margin: 2px 0 0;
  font-size: 0.95rem;
}

.section {
  padding: 36px 0;
}

.section h2 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin-bottom: 16px;
}

.lede {
  margin: 0 0 20px;
  max-width: 62ch;
}

.features {
  display: grid;
  gap: 12px;
}

.feature {
  padding: 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.feature h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.feature p {
  margin: 0;
  font-size: 0.98rem;
}

.worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.worlds li {
  padding: 8px 12px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
  font-size: 0.95rem;
}

.worlds .countryside { background: #8fce6b; }
.worlds .farmland { background: #e6c15a; }
.worlds .track { background: #c5ccd3; }
.worlds .polar { background: #d7eef7; }
.worlds .desert { background: #e8c988; }
.worlds .neptune { background: #6ea7d4; }
.worlds .volcan { background: #e07a54; }

.cta-band {
  margin: 8px 0 28px;
  padding: 20px;
  background: var(--orange);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  display: grid;
  gap: 14px;
  justify-items: start;
}

.cta-band p {
  margin: 0;
  font-weight: 800;
  font-size: 1.1rem;
}

.site-footer {
  border-top: 4px solid var(--ink);
  background: var(--paper);
  padding: 24px 0 32px;
}

.footer-grid {
  display: grid;
  gap: 16px;
}

.footer-brand {
  font-family: "Pixelify Sans", ui-rounded, sans-serif;
  font-size: 1.2rem;
}

.footer-meta,
.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--red);
}

.legal {
  max-width: 720px;
  padding: 32px 0 48px;
}

.legal h1 {
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  margin-bottom: 8px;
}

.legal .dev {
  margin: 0 0 8px;
  font-weight: 800;
}

.updated {
  margin: 0 0 24px;
  color: var(--steel);
  font-size: 0.95rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  margin: 0 0 10px;
}

.legal ul {
  padding-left: 1.2rem;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

.back:hover {
  color: var(--red);
}

@media (min-width: 640px) {
  .play-btn--header {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .play-btn--header .play-copy span {
    display: inline;
  }

  .loop {
    grid-template-columns: repeat(3, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 40px;
    min-height: 420px;
  }

  .hero {
    padding-top: 40px;
  }

  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 520px) {
  .play-btn--header .play-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .play-btn--header {
    padding: 8px;
  }

  .nav-link {
    padding: 8px 6px;
  }
}
