:root {
  color-scheme: dark;
  --text: #ececec;
  --muted: #a3a3a3;
  --gutter: clamp(1.5rem, 7vw, 7rem);
}

* { box-sizing: border-box; }

html { background: #000; }

body {
  margin: 0;
  background: #000;
  color: var(--text);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover { color: #fff; text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Sized to the largest viewport, so the planet does not jump when a phone's address bar collapses. */
#planet {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  opacity: 0;
  transition: opacity 1.4s ease;
}

#planet.is-ready { opacity: 1; }

main {
  position: relative;
  max-width: calc(30rem + 2 * var(--gutter));
  padding: 0 var(--gutter);
  /* A dark halo, so a star beside a letter does not read as punctuation. */
  text-shadow: 0 0 0.3rem #000, 0 0 0.3rem #000, 0 0 0.6rem #000, 0 0 0.6rem #000;
}

.top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
}

h1 { margin: 0; }

h1 img {
  display: block;
  width: min(22rem, 100%);
  height: auto;
}

.tagline {
  margin: 1.25rem 0 0;
  color: var(--muted);
}

section { padding-bottom: clamp(9rem, 32vh, 18rem); }

h2 {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

p { margin: 0 0 1rem; }

address { font-style: normal; }

footer {
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* The text is in the sky and the planet lies below it. */
.horizon main {
  max-width: 68rem;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 9vh, 6rem);
  text-align: center;
}

.horizon h1 img { margin: 0 auto; }

.horizon .top {
  display: block;
  min-height: 0;
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

/* Without JavaScript the sections stand side by side. */
.horizon .columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 5vw, 4.5rem);
}

.horizon .intro { grid-column: 1 / -1; }

.horizon .tagline {
  margin: 0;
  color: #fff;
}

.horizon .intro a {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 500;
  text-decoration: none;
}

.horizon .intro a:hover {
  color: #00edff; /* the game's HUD accent */
  text-decoration: none;
}

.horizon address a { text-decoration: none; }

.horizon address a:hover { color: #00edff; }

.horizon .tagline + p { margin: 0.75rem 0 0; }

.horizon section { padding-bottom: 0; }

/* With JavaScript the sections are portions in one shared cell, and portions.js fades them. */
.stepped,
.stepped body {
  height: 100%;
  overflow: hidden;
  touch-action: pinch-zoom;
}

.stepped .columns {
  grid-template-columns: minmax(0, 34rem);
  justify-content: center;
}

.stepped .columns > section {
  grid-area: 1 / 1;
  opacity: 0;
}

.stepped .columns > section:first-child { opacity: 1; }

.stepped .columns p,
.stepped .columns address { font-size: 1.1875rem; }

.portion-nav { display: none; }

.stepped .portion-nav {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  gap: 0.125rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
}

.portion-nav button {
  padding: 0.35rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.portion-nav button:hover { color: #fff; }

.portion-nav button[aria-current="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.portion-nav button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

/* Compact on phones, so the text stays in the sky and the planet still shows. */
@media (max-width: 760px) {
  .horizon main {
    padding-top: 2.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .horizon h1 img { width: min(14rem, 100%); }

  .horizon .top { padding-bottom: 1.5rem; }

  .horizon .columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .horizon h2 { margin-bottom: 0.3rem; }

  .horizon p { margin-bottom: 0.4rem; }

  .stepped .columns p,
  .stepped .columns address { font-size: 1rem; }

  .horizon .intro a { font-size: 1.5rem; }

  .portion-nav button { padding: 0.35rem 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  #planet { transition: none; }
}
