@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --limestone: #efe6d5;
  --basalt: #2a2522;
  --terracotta: #c4552d;
  --terracotta-ink: #a6431f; /* terracotta dark enough for small text */
  --olive: #6b7a3a;
  --sky: #56a0d3;
  --measure: 34rem;
  --gutter: clamp(1rem, 5vw, 4rem);
}

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

html {
  background: var(--limestone);
  color: var(--basalt);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--basalt);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--basalt);
  color: var(--limestone);
  padding: 0.5rem 0.75rem;
}

/* Hero: a slab of noon sky with the rock standing on the horizon line. */

.sky {
  background: var(--sky);
  border-bottom: 6px solid var(--basalt);
  overflow: hidden;
}

.sky-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--gutter);
}

.sky h1 {
  margin: 0;
}

.sky h1 img {
  width: min(100%, 30rem);
}

.tagline {
  margin: 1.5rem 0 clamp(2.5rem, 7vw, 5rem);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.15;
  max-width: 22ch;
}

.rock {
  justify-self: end;
  width: min(100%, 30rem);
  /* the base of the crag sits on the border, like it grew there */
  margin-bottom: -2px;
}

/* Sections */

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 0;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.1;
}

p {
  max-width: var(--measure);
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

.game {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
  max-width: 48rem;
}

.game img {
  width: 7.5rem;
  border-radius: 22%;
}

.game h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.15;
}

.game .pitch {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.15rem 0.6rem;
  border: 2px solid var(--olive);
  border-radius: 999px;
  color: var(--olive);
  font-size: 0.9375rem;
  font-weight: 700;
}

.cta {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--basalt);
  color: var(--limestone);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}

.cta:hover {
  background: var(--terracotta-ink);
}

.next {
  margin-top: 2.5rem;
  color: #5c534d;
}

/* Footer */

.foot {
  margin-top: clamp(4rem, 10vw, 7rem);
  background: var(--basalt);
  color: var(--limestone);
}

.foot-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
  justify-content: space-between;
}

.foot img {
  width: 13rem;
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.foot :focus-visible {
  outline-color: var(--limestone);
}

/* Plain pages: privacy, 404 */

.bar {
  border-bottom: 6px solid var(--basalt);
  background: var(--sky);
}

.bar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

.bar img {
  width: 11rem;
}

.prose h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.1;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.prose .updated {
  color: #5c534d;
  margin-bottom: 2rem;
}

.lost {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: center;
}

.lost img {
  width: 100%;
}

@media (max-width: 44rem) {
  .sky-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tagline {
    margin-bottom: 2rem;
  }

  .rock {
    width: 70%;
  }

  .game {
    grid-template-columns: 1fr;
  }

  .game img {
    width: 5.5rem;
  }

  .lost {
    grid-template-columns: 1fr;
  }

  .lost img {
    width: 11rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rock {
    animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @keyframes rise {
    from {
      transform: translateY(18%);
    }
  }
}
