@font-face {
  font-family: 'DogeSans';
  src: url('/assets/dogesans-regular-webfont.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #082454;
  --blue: #124795;
  --gold: #ffd363;
  --white: #fff6dc;
  --muted: #b7cee9;
  --brown: #442507;
  --radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--navy);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  padding: 30px 32px 20px;
  color: var(--white);
  background: radial-gradient(ellipse at 50% 32%, #1854a8 0%, #0b326d 48%, var(--navy) 85%);
  font-family: 'DogeSans', 'Comic Sans MS', cursive;
  font-size: 18px;
  line-height: 1.4;
}

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

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-weight: 400;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid #fff9e6;
  outline-offset: 5px;
}

/* Keep the scenery out of the content flow, and out of the accessibility tree. */
.space {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18px 23px, #c0dcff90 0 1px, transparent 1.6px),
    radial-gradient(circle at 63px 71px, #e5d8a860 0 1px, transparent 1.5px),
    radial-gradient(circle at 121px 51px, #95c3ff50 0 .7px, transparent 1.3px);
  background-size: 231px 207px, 347px 281px, 163px 179px;
}

.space::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 440px;
  left: -25%;
  bottom: -402px;
  border-radius: 50%;
  border-top: 2px solid #66cfff80;
  background: #0e3372;
  box-shadow: 0 -8px 32px #2a9bda25;
}

.space__stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 44px 36px, #eaf6ff 0 1px, transparent 2px);
  background-size: 433px 307px;
  animation: twinkle 7s ease-in-out infinite alternate;
}

.space__earth,
.space__moon {
  position: absolute;
  border-radius: 50%;
}

.space__earth {
  width: 100px;
  top: 118px;
  left: max(20px, calc(50% - 613px));
  transform: rotate(-16deg);
  box-shadow: 0 0 0 2px #71d9fd80, 0 0 32px #49bbf94d;
}

.space__moon {
  width: 72px;
  top: 37px;
  right: max(20px, calc(50% - 565px));
  box-shadow: 0 0 24px #a9d9ff24;
  animation: float 9s ease-in-out infinite;
}

.masthead {
  position: relative;
  max-width: 1040px;
  margin: 0 auto 26px;
  text-align: center;
}

.masthead h1 {
  color: var(--gold);
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: .09em;
  text-shadow: 0 3px 0 #59351b, 0 5px 12px #03143380;
}

.masthead p {
  margin-top: 8px;
  color: #d6e7fb;
  font-size: 18px;
}

.hub {
  max-width: 1040px;
  margin: 0 auto;
}

.destinations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.destinations > li {
  min-width: 0;
}

.browser-game,
.steam-game {
  grid-column: 1 / -1;
}

/* A single painted destination, edged like the game's gold UI. */
.game {
  position: relative;
  isolation: isolate;
  min-height: 338px;
  overflow: hidden;
  border: 3px solid #f5be4c;
  border-radius: var(--radius);
  background: #103d87;
  box-shadow: 0 5px 0 #956024, 0 9px 0 #051b4280, 0 16px 32px #03163260;
}

.game::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 16px;
  box-shadow: inset 0 2px 0 #fff3ba70, inset 0 -3px 0 #cc942748;
  background: linear-gradient(90deg, #123f8c 0%, #123f8c 32%, #123f8cef 40%, #123f8c45 59%, #10316d00 76%);
  pointer-events: none;
}

.game__scene {
  position: absolute;
  z-index: -2;
  right: 0;
  top: 0;
  width: 71%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.game__content {
  position: relative;
  width: 51%;
  padding: 34px 0 32px 38px;
}

.game__logo {
  width: 432px;
  filter: drop-shadow(0 4px 1px #041c4260);
}

.game__title {
  line-height: 1;
}

.game p {
  margin: 18px 0 12px;
  color: #e2edfc;
  font-size: 19px;
}

.gold-button {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: fit-content;
  min-height: 68px;
  padding: 9px 25px 9px 15px;
  border: 2px solid #ffe39b;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff0a9 0%, #ffdb66 12%, #ffc139 62%, #f3a629 100%);
  box-shadow: inset 0 2px 0 #fff8d0, inset 0 -3px 0 #c78325, 0 5px 0 #92501e, 0 8px 0 #071b4580;
  color: var(--brown);
  font-size: 30px;
  line-height: 1.15;
  text-decoration: none;
  text-shadow: 0 1px #fff1b3;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.coin {
  position: relative;
  flex: 0 0 43px;
  width: 43px;
  overflow: hidden;
  border-radius: 50%;
  transform: rotate(-12deg);
}

.coin::after {
  content: '';
  position: absolute;
  inset: -30%;
  background: linear-gradient(110deg, transparent 36%, #fff9dfbd 48%, transparent 61%);
  transform: translateX(-110%);
}

.arrow {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
  flex: 0 0 24px;
}

.arrow::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 1px;
  width: 19px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.arrow::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
}

.steam-button {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr) 184px 24px;
  align-items: center;
  gap: 28px;
  min-height: 104px;
  padding: 18px 26px;
  border: 2px solid #4e9bd8;
  border-radius: var(--radius);
  background: linear-gradient(110deg, #155698, #123d79 65%, #12366b);
  box-shadow: inset 0 2px 0 #9dcefa2e, 0 4px 0 #041b42, 0 9px 16px #041a3633;
  color: #f2f7ff;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

/* Original Valve file. Preserve its proportions and at least 18px clear space. */
.steam-button__logo {
  width: 164px;
  height: 50px;
  object-fit: contain;
}

.steam-button__capsule {
  width: 184px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px #badbff45;
}

.steam-button h2 {
  min-width: 0;
  font-size: 24px;
  letter-spacing: .035em;
}

.steam-button .arrow {
  color: #b3dfff;
}

.destination {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  min-height: 114px;
  padding: 18px 22px;
  border: 1px solid #4c7db5;
  border-radius: 16px;
  background: #092958;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.destination__icon {
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 1px solid #366796;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #174c82, #0b2d5d 85%);
  box-shadow: inset 0 1px 0 #82c2f026;
}

.destination__art {
  width: 40px;
  max-height: 48px;
  object-fit: contain;
}

.destination--original .destination__art {
  width: 34px;
  transform: rotate(18deg);
  filter: drop-shadow(2px 3px 0 #021733);
}

.destination__copy {
  min-width: 0;
}

.destination h2 {
  color: #ffe098;
  font-size: 22px;
  line-height: 1.25;
}

.destination p {
  margin-top: 5px;
  color: #c4d8ef;
  font-size: 15px;
  line-height: 1.4;
}

.destination .arrow {
  margin-left: auto;
  color: #e4c582;
}

.destination--mirror[aria-disabled='true'] {
  border-style: dashed;
  border-color: #6484ab;
  background: #0a2b5b;
}

.destination--mirror[aria-disabled='true'] h2 {
  color: #d3e1f1;
}

.destination--mirror .destination__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 12px;
  flex: 1;
}

.destination--mirror h2 {
  grid-column: 1;
  grid-row: 1;
}

.destination--mirror p {
  grid-column: 1 / -1;
  grid-row: 2;
}

.badge {
  grid-column: 2;
  grid-row: 1;
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid #6e91b9;
  border-radius: 6px;
  background: #224b78;
  color: #f0e6bd;
  font-size: 12px;
  line-height: 1.4;
}

.destination--mirror:not([aria-disabled='true']) .badge {
  display: none;
}

.footer {
  max-width: 820px;
  margin: 24px auto 0;
  padding-bottom: 24px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.footer__by {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: -10px 0 -4px;
  font-family: 'DogeSans', 'Comic Sans MS', cursive;
  font-size: 16px;
}

.footer__by a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  color: var(--gold);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.footer__legal {
  max-width: 760px;
  margin: 10px auto 0;
  font-size: 11px;
}

.error-page {
  display: grid;
  align-items: center;
  min-height: 100svh;
}

.notfound {
  width: min(100%, 680px);
  margin: 50px auto;
  text-align: center;
}

.notfound__porthole {
  width: 238px;
  height: 238px;
  margin: 0 auto 32px;
  padding: 24px;
  border: 4px solid #edb447;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #267ac0, #082859 80%);
  box-shadow: inset 0 2px 0 #fff0b6, 0 4px 0 #8d5c25, 0 0 0 12px #3e9cd614;
}

.notfound__porthole img {
  animation: float 9s ease-in-out infinite;
}

.notfound h1 {
  color: var(--gold);
  font-size: 42px;
  line-height: 1.15;
  text-shadow: 0 3px #543719;
}

.notfound p {
  margin-top: 12px;
  color: #d5e5f6;
  font-size: 20px;
}

.notfound .gold-button {
  width: fit-content;
  min-width: 180px;
  margin: 28px auto 0;
  padding: 14px 24px;
  font-size: 22px;
}

.steam-button:focus-visible {
  border-color: #a0daff;
}

.destination[href]:focus-visible {
  border-color: #e5bc67;
  background: #113b72;
}

@media (hover: hover) {
  .gold-button:hover {
    background: linear-gradient(180deg, #fff5cb, #ffe17b 12%, #ffcb4a 62%, #ffb638);
    transform: translateY(-2px);
    box-shadow: inset 0 2px 0 #fff8d0, inset 0 -3px 0 #c78325, 0 7px 0 #92501e, 0 10px 0 #071b4580;
  }

  .gold-button:hover .coin::after {
    animation: coin-shine 650ms ease-out;
  }

  .steam-button:hover {
    border-color: #a0daff;
    transform: translateY(-2px);
    box-shadow: inset 0 2px 0 #9dcefa2e, 0 6px 0 #041b42, 0 11px 16px #041a3633;
  }

  .destination[href]:hover {
    border-color: #e5bc67;
    background: #113b72;
  }

  .footer a:hover {
    color: #fff3c9;
  }
}

.gold-button:active {
  transform: translateY(4px) scale(.985);
  box-shadow: inset 0 2px 3px #b6773240, 0 1px 0 #92501e;
}

.steam-button:active {
  transform: translateY(3px) scale(.994);
  box-shadow: inset 0 2px 5px #031a4533, 0 1px 0 #041b42;
}

.destination[href]:active {
  transform: translateY(2px);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-6px) rotate(0); }
}

@keyframes twinkle {
  from { opacity: .25; }
  to { opacity: .8; }
}

@keyframes coin-shine {
  to { transform: translateX(110%); }
}

/* Stack the status above its title once the lower tile gets narrow. */
@media (max-width: 1000px) {
  .destination--mirror .destination__copy {
    grid-template-columns: minmax(0, 1fr);
  }

  .badge {
    grid-column: 1;
    justify-self: start;
    margin-bottom: 6px;
  }

  .destination--mirror h2 {
    grid-row: 2;
  }

  .destination--mirror p {
    grid-row: 3;
  }
}

@media (max-width: 760px) {
  body {
    padding: 24px 16px 20px;
  }

  .masthead {
    margin-bottom: 24px;
  }

  .masthead h1 {
    font-size: 32px;
  }

  .masthead p {
    font-size: 16px;
  }

  .space__earth {
    width: 60px;
    left: -24px;
    top: 112px;
  }

  .space__moon {
    width: 44px;
    top: 10px;
    right: -14px;
  }

  .destinations {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .game {
    min-height: 0;
  }

  .game__scene {
    top: 0;
    width: 100%;
    height: 270px;
    object-position: 68% 48%;
  }

  .game::after {
    background: linear-gradient(180deg, #17478b12 0, #123f8c00 125px, #123f8c9c 193px, #123f8c 265px);
  }

  .game__content {
    width: 100%;
    padding: 205px 23px 26px;
    text-align: center;
  }

  .game__logo {
    width: 380px;
    margin: 0 auto;
  }

  .game p {
    margin: 16px 0 12px;
    font-size: 17px;
  }

  .gold-button {
    width: 100%;
    min-height: 66px;
    padding-left: 12px;
    padding-right: 18px;
    font-size: 29px;
  }

  .steam-button {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 18px;
    padding: 18px 20px;
    border-radius: 16px;
  }

  .steam-button__logo {
    grid-column: 1;
    grid-row: 1;
    width: 144px;
    height: auto;
  }

  .steam-button__capsule {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 154px;
  }

  .steam-button h2 {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-right: 36px;
    font-size: 18px;
  }

  .steam-button .arrow {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .destination {
    gap: 12px;
    padding: 18px;
  }

  .destination h2 {
    font-size: 22px;
  }

  .destination p {
    font-size: 15px;
  }

  .destination--original .arrow {
    display: none;
  }

  .footer {
    margin-top: 24px;
    padding: 0 8px 24px;
  }

  .footer__legal {
    margin-top: 14px;
    font-size: 11px;
  }

  .notfound {
    margin: 54px auto;
  }

  .notfound__porthole {
    width: 204px;
    height: 204px;
    margin-bottom: 30px;
    padding: 18px;
  }

  .notfound h1 {
    font-size: 34px;
    text-wrap: balance;
  }

  .notfound .gold-button {
    max-width: 100%;
    padding: 15px 28px;
    font-size: 20px;
  }
}

/* Keep the primary action on one line on narrow phones. */
@media (max-width: 360px) {
  .game__content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .game .gold-button {
    gap: 12px;
    padding-right: 12px;
    font-size: 26px;
  }

  .coin {
    flex-basis: 38px;
    width: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .gold-button:hover,
  .gold-button:active,
  .steam-button:hover,
  .steam-button:active,
  .destination[href]:active {
    transform: none;
  }
}
