* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: #111821;
  scroll-behavior: smooth;
  /* The decorative earth bleeds past narrow screens; never let it widen the
     phone layout viewport (body overflow alone does not on mobile). */
  overflow-x: clip;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(126deg, transparent 0 48%, rgba(102, 112, 95, .08) 48% 49%, transparent 49% 100%),
    linear-gradient(170deg, #111821 0 64%, #0d1418 64% 100%);
  color: #e7e3d5;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  font-weight: 400;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(231, 227, 213, .34) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(131, 144, 154, .26) 0 1px, transparent 1.4px);
  background-position: 18px 28px, 63px 71px;
  background-size: 113px 127px, 167px 149px;
  content: "";
  opacity: .32;
  pointer-events: none;
}

.page-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 77% 34%, rgba(102, 112, 95, .2), transparent 24%),
    linear-gradient(90deg, rgba(17, 24, 33, .12), rgba(17, 24, 33, .72));
  pointer-events: none;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid rgba(131, 144, 154, .24);
}

.site-header p,
.site-footer p,
.earth-label,
.premise,
.journey-note,
.story-heading > p {
  margin: 0;
}

.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  padding-block: 10px;
}

/* Profile (card 42c5a4e6): sign in, create, passkeys, recovery and switch
   moved here from the in-game settings. */
.profile-label,
.profile-note {
  color: #83909a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.profile-note {
  flex-basis: 100%;
  text-align: right;
  letter-spacing: .06em;
  text-transform: none;
}

.account-bar [hidden] {
  display: none !important;
}

.account-signed-out,
.account-signed-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-link {
  color: #e0a24b;
}

.account-name {
  color: #e7e3d5;
  font-size: 13px;
  letter-spacing: .04em;
}

.account-name strong {
  color: #e0a24b;
  font-weight: 700;
}

.account-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(131, 144, 154, .5);
  background: transparent;
  color: #e7e3d5;
  font: 700 12px/1 "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.account-action-primary {
  border-color: #e0a24b;
  color: #e0a24b;
}

.account-action:hover {
  background: #e7e3d5;
  color: #111821;
}

.account-action:focus-visible {
  outline: 2px solid #e0a24b;
  outline-offset: 3px;
}

.wordmark {
  color: #e0a24b;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .36em;
  line-height: 1;
}

.world-state,
.premise,
.journey-note,
.earth-label,
.story-heading > p,
.footer-mark {
  color: #83909a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .15em;
  line-height: 1.5;
}

.world-state span,
.earth-label span,
.footer-mark span {
  color: #e0a24b;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(420px, 1.18fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  min-height: min(760px, calc(100vh - 92px));
  padding-block: 74px 84px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  animation: arrive .7s ease both;
}

.premise {
  color: #e0a24b;
}

h1,
h2,
h3 {
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-weight: 400;
}

h1 {
  max-width: 690px;
  margin: 18px 0 22px;
  font-size: clamp(58px, 8vw, 112px);
  letter-spacing: -.045em;
  line-height: .9;
  text-wrap: balance;
}

.introduction {
  max-width: 51ch;
  margin: 0 0 34px;
  color: #c6cbc4;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
}

.enter-world {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 188px;
  min-height: 52px;
  padding: 13px 28px;
  border: 1px solid #e0a24b;
  border-radius: 2px;
  background: rgba(224, 162, 75, .1);
  color: #e7e3d5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.enter-world:hover {
  background: #e0a24b;
  color: #111821;
}

.enter-world:focus-visible {
  outline: 2px solid #e7e3d5;
  outline-offset: 5px;
}

.journey-note {
  margin-top: 17px;
}

.earth-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  animation: arrive .9s .08s ease both;
}

.earth {
  position: relative;
  width: 76%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(231, 227, 213, .78);
  border-radius: 50%;
  background:
    linear-gradient(133deg, transparent 0 44%, rgba(131, 144, 154, .12) 44% 58%, transparent 58%),
    #24292c;
  box-shadow: inset 28px -35px 0 rgba(7, 12, 16, .24);
}

.earth::before,
.earth::after,
.grid-line,
.orbit {
  position: absolute;
  border: 1px solid rgba(231, 227, 213, .24);
  border-radius: 50%;
  content: "";
}

.earth::before {
  inset: 4% 29%;
}

.earth::after {
  inset: 14% 8%;
  transform: rotate(90deg);
}

.latitude {
  left: 4%;
  width: 92%;
  height: 26%;
}

.latitude-north {
  top: 24%;
}

.latitude-south {
  bottom: 22%;
}

.longitude {
  top: -8%;
  width: 42%;
  height: 116%;
}

.longitude-west {
  left: 8%;
}

.longitude-east {
  right: 8%;
}

.land,
.night-line,
.signal {
  position: absolute;
  display: block;
}

.land {
  background: #66705f;
  opacity: .62;
}

.land-one {
  top: 17%;
  left: 12%;
  width: 35%;
  height: 30%;
  clip-path: polygon(8% 20%, 43% 0, 96% 19%, 73% 48%, 92% 76%, 51% 100%, 26% 76%, 0 51%);
}

.land-two {
  top: 48%;
  left: 34%;
  width: 21%;
  height: 35%;
  clip-path: polygon(21% 0, 100% 20%, 76% 56%, 54% 100%, 17% 79%, 0 35%);
}

.land-three {
  top: 20%;
  right: 8%;
  width: 40%;
  height: 35%;
  clip-path: polygon(0 25%, 31% 0, 68% 14%, 100% 45%, 78% 83%, 38% 100%, 25% 62%);
}

.land-four {
  right: 18%;
  bottom: 15%;
  width: 23%;
  height: 19%;
  clip-path: polygon(4% 31%, 42% 0, 100% 17%, 82% 80%, 36% 100%, 0 69%);
}

.night-line {
  inset: -18% -20% -18% 52%;
  background: rgba(6, 10, 14, .45);
  transform: rotate(18deg);
}

.signal {
  top: 39%;
  left: 44%;
  width: 9px;
  height: 9px;
  background: #e0a24b;
  box-shadow: 0 0 0 7px rgba(224, 162, 75, .12);
  transform: rotate(45deg);
}

.orbit {
  pointer-events: none;
}

.orbit-wide {
  inset: 12% -2%;
  transform: rotate(-13deg);
}

.orbit-tight {
  inset: 28% 6%;
  border-color: rgba(224, 162, 75, .18);
  transform: rotate(19deg);
}

.earth-label {
  position: absolute;
  right: 5%;
  bottom: 10%;
  padding: 7px 10px;
  border-top: 1px solid rgba(224, 162, 75, .54);
  background: #111821;
}

.story {
  display: grid;
  grid-template-columns: minmax(220px, .68fr) minmax(0, 1.32fr);
  gap: clamp(36px, 8vw, 120px);
  padding-block: 96px 110px;
  border-top: 1px solid rgba(131, 144, 154, .32);
}

.story-heading > p {
  color: #e0a24b;
}

.story-heading h2 {
  max-width: 420px;
  margin: 16px 0 0;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -.035em;
  line-height: 1;
}

.story-beats {
  border-top: 1px solid rgba(131, 144, 154, .32);
}

.story-beats article {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(0, 1.2fr);
  gap: 30px;
  padding-block: 27px 30px;
  border-bottom: 1px solid rgba(131, 144, 154, .24);
}

.story-beats h3 {
  margin: 0;
  color: #e7e3d5;
  font-size: clamp(23px, 2.3vw, 31px);
  line-height: 1.1;
}

.story-beats p {
  max-width: 49ch;
  margin: 0;
  color: #aeb7b3;
  font-size: 15px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
  border-top: 1px solid rgba(131, 144, 154, .24);
  color: #83909a;
  font-size: 13px;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  .site-header,
  .hero,
  .story,
  .site-footer {
    width: min(100% - 32px, 620px);
  }

  .site-header {
    min-height: 78px;
  }

  .world-state {
    max-width: 150px;
    text-align: right;
  }

  .site-header {
    gap: 12px;
  }

  .world-state {
    display: none;
  }

  .account-action {
    padding: 10px 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
    padding-block: 70px 78px;
  }

  h1 {
    margin-top: 16px;
    font-size: clamp(60px, 19vw, 88px);
  }

  .introduction {
    font-size: 17px;
  }

  .enter-world {
    width: 100%;
  }

  .earth-stage {
    width: min(124%, 590px);
    margin-left: -12%;
  }

  .earth-label {
    right: 1%;
  }

  .story {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-block: 78px 88px;
  }

  .story-heading h2 {
    max-width: 360px;
  }

  .story-beats article {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 24px;
  }
}

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

  .hero-copy,
  .earth-stage {
    animation: none;
  }

  .enter-world {
    transition: none;
  }
}

/* Credits page (card 42c5a4e6): the map and sky credits moved here from the
   in-game settings. The pause menu and the front page footer link to it. */
.credits {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  padding-block: 48px 72px;
  color: #e7e3d5;
  line-height: 1.6;
}
.credits h1 { margin: 0 0 12px; }
.credits h2 {
  margin: 36px 0 8px;
  color: #e0a24b;
  font-size: 16px;
  letter-spacing: .08em;
}
.credits a { color: #f5ce96; }
.credits li { margin-block: 6px; }
.credits-page .wordmark { text-decoration: none; }
