:root {
  --ink: #0b0c13;
  --paper: #fffaf0;
  --coral: #e9472e;
  --mint: #72f58a;
  --gold: #f6c744;
  --screen: #292a58;
  --muted: #686571;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.site-nav a {
  text-decoration: none;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.wordmark {
  font-size: 18px;
}

.nav-download {
  border: 2px solid #fff;
  border-radius: 5px;
  padding: 9px 13px;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 78svh;
  min-height: 440px;
  max-height: 720px;
  overflow: hidden;
  background-color: var(--screen);
  background-image: url("assets/era-2000s.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
}

.hero::before {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 12, 0.48);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--mint);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 88px;
  line-height: 0.92;
}

h2 {
  margin-bottom: 16px;
  font-size: 46px;
  line-height: 1.02;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.45;
}

.hero-actions,
.download-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 11px 17px;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.button-primary {
  background: var(--mint);
  color: var(--ink);
}

.button-secondary {
  border-color: #fff;
  color: #fff;
}

.button-dark {
  background: var(--ink);
  color: #fff;
}

.button:hover,
.button:focus-visible,
.nav-download:hover,
.nav-download:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.build-line {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.era-band,
.sprite-band,
.effect-band,
.download-band {
  padding: 80px max(24px, calc((100% - 1180px) / 2));
}

.era-band {
  background: var(--paper);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-heading > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.era-grid,
.effect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.era-grid figure,
.effect-grid figure {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #000;
}

.era-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.era-grid figcaption,
.effect-grid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.era-grid figcaption span {
  color: var(--mint);
}

.effect-band {
  background: var(--ink);
  color: #fff;
}

.section-heading-light > p:last-child {
  color: #b9b8c1;
}

.effect-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--screen) !important;
  background-image: url("assets/era-modern.webp") !important;
  background-position: center !important;
  background-size: cover !important;
}

.effect-stage figcaption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  justify-content: flex-start;
  background: rgba(11, 12, 19, 0.9);
  font-weight: 850;
}

.effect-art {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 88%;
  max-height: 82%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  transform-origin: center;
  animation: effect-pop 4.2s steps(1, end) infinite;
}

.effect-good {
  animation-delay: 1.2s;
}

@keyframes effect-pop {
  0%, 6% { transform: translate(-50%, -50%) scale(0.38); }
  12% { transform: translate(-50%, -50%) scale(0.62); }
  18% { transform: translate(-50%, -50%) scale(0.9); }
  24% { transform: translate(-50%, -50%) scale(1.14); }
  30% { transform: translate(-50%, -50%) scale(1); }
  82% { transform: translate(-50%, -50%) scale(1); }
  88%, 100% { transform: translate(-50%, -50%) scale(0); }
}

.sprite-band {
  background: var(--coral);
}

.sprite-band .eyebrow {
  color: var(--ink);
}

.sprite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sprite-grid article {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #1b1d28;
}

.sprite-grid article span {
  display: block;
  background: var(--mint);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sprite-grid img {
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  image-rendering: pixelated;
}

.download-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 48px;
  background: var(--mint);
}

.download-band > div:first-child {
  max-width: 680px;
}

.download-band p {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.55;
}

.download-actions {
  justify-content: flex-start;
}

.download-actions > a:not(.button) {
  font-size: 14px;
  font-weight: 800;
}

code {
  border-radius: 3px;
  background: rgba(11, 12, 19, 0.12);
  padding: 2px 5px;
  font-size: 0.9em;
}

footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  padding: 28px max(24px, calc((100% - 1180px) / 2));
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.footer-brand {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
}

.footer-brand span,
.footer-credit {
  color: #aaa8b4;
}

.footer-credit {
  max-width: 690px;
  margin: 0;
  line-height: 1.55;
  text-align: right;
}

.footer-credit a {
  color: #fff;
  font-weight: 750;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--mint);
}

@media (max-width: 760px) {
  .site-nav {
    width: calc(100% - 32px);
  }

  .site-nav nav > a:first-child {
    display: none;
  }

  .hero {
    min-height: 500px;
    background-size: auto 100%;
  }

  .hero-copy {
    width: calc(100% - 32px);
    padding-bottom: 38px;
  }

  h1 {
    font-size: 54px;
  }

  h2 {
    font-size: 34px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .era-band,
  .sprite-band,
  .effect-band,
  .download-band {
    padding: 58px 16px;
  }

  .era-grid,
  .effect-grid,
  .sprite-grid,
  .download-band {
    grid-template-columns: 1fr;
  }

  .download-band {
    gap: 28px;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
  }

  .footer-credit {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .effect-art {
    animation: none;
  }
}
