
:root {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #123440;
  background: #f4f3eb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
select:focus-visible {
  outline: 3px solid #a94014;
  outline-offset: 4px;
}

.site-header,
main,
footer {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: #123440;
  color: white;
  z-index: 2;
}

.skip-link:focus {
  top: 12px;
}

/* HEADER */

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d4d9ce;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  border-radius: 10px;
}

.brand > span {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.4px;
  margin-top: 6px;
}

.site-header nav {
  font-size: 13px;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.site-header nav span {
  margin-left: 8px;
}

/* DOWNLOAD SECTION */

.downloads-section {
  padding: 42px 0 26px;
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

h1 {
  font-size: 38px;
  letter-spacing: -1.4px;
  margin: 0;
  font-weight: 750;
}

.release-version {
  font-size: 12px;
  color: #54656a;
  border: 1px solid #d4d9ce;
  padding: 6px 10px;
  border-radius: 20px;
}

/* FOUR PLATFORM CARDS */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.platform-card {
  padding: 23px 22px 8px;
  background: #fffef9;
  border: 1px solid #d4d9ce;
  border-radius: 9px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.platform-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
  margin-bottom: 16px;
}

.platform-heading svg {
  fill: currentColor;
  flex-shrink: 0;
}

.platform-label {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
  color: #366c53;
  border: 1px solid #a8b7a1;
  border-radius: 3px;
  padding: 5px 7px;
}

.platform-label:empty {
  display: none;
}

h3 {
  margin: 0 0 21px;
  font-size: 24px;
  letter-spacing: -.6px;
}

/* DOWNLOAD BUTTONS */

.download-list {
  border-top: 1px solid #d4d9ce;
  flex: 1;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 110px;
  padding: 18px 0;
}

.download + .download {
  border-top: 1px solid #d4d9ce;
}

.download-copy {
  min-width: 0;
}

.download strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.download-copy > span {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  color: #54656a;
  margin-top: 5px;
}

.download small {
  display: block;
  font-size: 10px;
  color: #54656a;
  margin-top: 8px;
}

.download-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid #d4d9ce;
  border-radius: 50%;
  background: #edf0e7;
  font-size: 22px;
  transition: background .18s ease, color .18s ease;
}

.download:hover .download-arrow,
.download.device-recommended .download-arrow {
  background: #123440;
  color: white;
}

.download:hover strong {
  color: #a94014;
}

/* FOOTNOTE */

.download-footnote {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #54656a;
  padding-top: 22px;
}

.download-footnote a:hover {
  text-decoration: underline;
}

/* DEVICE DETECTION PANEL */

.device-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 20px;
  margin-bottom: 24px;
  background: #e8eddf;
  border: 1px solid #b6c4af;
  border-radius: 8px;
}

.device-copy {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

#device-status {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.device-download {
  display: inline-block;
  background: #123440;
  color: white;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 650;
  border-radius: 4px;
  line-height: 1.5;
  text-align: center;
  transition: background .18s ease;
}

.device-download:hover {
  background: #24515d;
}

.device-download[hidden] {
  display: none;
}

.device-picker {
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 225px;
}

.device-picker select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 8px;
  font: inherit;
  font-weight: 400;
  min-height: 40px;
  background: #fffef9;
  color: #123440;
  border: 1px solid #a8b7a1;
  border-radius: 4px;
}

/* RECOMMENDED PLATFORM */

.device-platform {
  border-color: #63836b;
  box-shadow: 0 0 0 1px #63836b;
}

.download-copy > .device-match {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  color: #366c53;
  background: #e8eddf;
  border-radius: 3px;
  padding: 3px 6px;
  width: fit-content;
  margin-top: 8px;
}

/* SCREENSHOTS */

.game-screenshots {
  padding: 8px 0 34px;
}

.game-screenshots h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.4px;
  margin: 0 0 16px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.screenshot-grid a {
  display: block;
  border: 1px solid #d4d9ce;
  border-radius: 8px;
  overflow: hidden;
  background: #123440;
  line-height: 0;
}

.screenshot-grid img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .2s ease;
}

.screenshot-grid a:hover {
  border-color: #63836b;
}

.screenshot-grid a:hover img {
  transform: scale(1.02);
}

/* FOOTER */

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #d4d9ce;
  font-size: 11px;
  color: #54656a;
  padding: 22px 0 30px;
}

/* TABLETS */

@media (max-width: 800px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }

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

  .download + .download {
    border-top: 0;
  }

  .platform-heading {
    margin-bottom: 10px;
  }

  h3 {
    margin-bottom: 16px;
  }

  .device-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .device-picker {
    flex-basis: auto;
    max-width: 340px;
  }

  .device-picker select {
    font-size: 14px;
  }

  .downloads-section {
    padding-top: 30px;
  }
}

/* PHONES */

@media (max-width: 480px) {
  .site-header,
  main,
  footer {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 76px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand > span {
    font-size: 20px;
  }

  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .site-header nav {
    font-size: 11px;
  }

  .page-heading {
    gap: 12px;
    margin-bottom: 22px;
  }

  h1 {
    font-size: 32px;
  }

  .release-version {
    font-size: 10px;
  }

  .platform-card {
    padding-inline: 20px;
  }

  .download-list {
    display: block;
  }

  .download + .download {
    border-top: 1px solid #d4d9ce;
  }

  .download {
    min-height: 103px;
  }

  .device-panel {
    padding: 16px;
  }

  .device-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .device-download {
    max-width: 100%;
  }

  .download-footnote {
    justify-content: flex-start;
    font-size: 11px;
  }
}

/* MOBILE SCREENSHOTS */

@media (max-width: 700px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .game-screenshots {
    padding-top: 2px;
  }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  .download-arrow,
  .device-download,
  .screenshot-grid img {
    transition: none;
  }
}
