/* Eord. The page is the game's dark: true black, and colour only where light falls. */

:root {
  --void: #000000;
  --bone: #ece4d2;
  --ash: #c9c1b2;
  --remembered: #6b7180;
  --torch: #e9a23b;
  --ember: #d4502c;
  --glow: #6fe3e0;

  --fell: 'IM Fell English', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* A modular scale on a perfect fourth (1.333) from a 16px mono body. */
  --step-0: 1rem;
  --step-1: 1.333rem;
  --step-2: 1.777rem;
  --step-3: 2.369rem;
  --step-4: 3.157rem;

  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 62ch;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--void);
  color: var(--ash);
  font: 400 var(--step-0) / 1.75 var(--mono);
  font-feature-settings: 'calt' 0;
}

h1,
h2 {
  font-family: var(--fell);
  font-weight: 400;
  color: var(--bone);
  margin: 0;
  letter-spacing: 0;
}

p {
  margin: 0;
}

a {
  color: var(--torch);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--bone);
}

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

/* ---------- The hero: a patch of the world at night ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: var(--gutter);
  padding-bottom: clamp(2.5rem, 8vh, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  touch-action: manipulation;
}

/* A pool of dark behind the words, so the world never sits on top of the reading. */
.hero::before {
  content: '';
  position: absolute;
  inset: auto auto 0 0;
  width: min(60rem, 100%);
  height: min(36rem, 80%);
  background: radial-gradient(ellipse at 18% 78%, #000 38%, rgb(0 0 0 / 0.85) 55%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

.log {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  right: var(--gutter);
  max-width: 52ch;
  color: var(--remembered);
  font-size: 0.875rem;
  line-height: 1.6;
}

.hero-text {
  max-width: 40rem;
}

.hero h1 {
  font-size: clamp(6.5rem, 22vw, 16rem);
  line-height: 0.8;
  margin-left: -0.04em;
  margin-bottom: 0.1em;
}

.lede {
  max-width: 50ch;
  color: var(--bone);
}

/* The one lit control on the page: a torch-coloured cell, square like the game's grid. */
.play {
  display: inline-block;
  padding: 0.75em 1.25em;
  background: var(--torch);
  color: #000;
  font: 600 var(--step-0) / 1 var(--mono);
  text-decoration: none;
  border-radius: 2px;
}

.play:hover {
  background: var(--bone);
  color: #000;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.actions span {
  max-width: 34ch;
  color: var(--remembered);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hint {
  margin-top: 1.25rem;
  color: var(--remembered);
  font-size: 0.875rem;
}

/* ---------- Features ---------- */

main {
  padding: 0 var(--gutter);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  max-width: 76rem;
  margin: 0;
  padding: clamp(4rem, 12vh, 8rem) 0;
}

@media (min-width: 60rem) {
  .feature {
    grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
    gap: 4rem;
  }
}

.feature h2,
.ahead h2,
.latest h2 {
  font-size: var(--step-4);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.copy p + p {
  margin-top: 1em;
}

.copy {
  max-width: var(--measure);
}

/* Screenshots have no frame: their black is the page's black, so the glyphs just float. */
.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
}

.shot figcaption {
  margin-top: 0.75rem;
  color: var(--remembered);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Where it's going ---------- */

.ahead {
  max-width: 76rem;
  margin: 0;
  padding: clamp(4rem, 12vh, 8rem) 0;
}

.intro {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.ahead dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  max-width: 64rem;
}

@media (min-width: 48rem) {
  .ahead dl {
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    column-gap: 3rem;
  }
}

.ahead dt {
  font-family: var(--fell);
  font-size: var(--step-2);
  line-height: 1.2;
  color: var(--bone);
  padding-top: 1.5rem;
}

.ahead dd {
  margin: 0;
  max-width: var(--measure);
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1d1d1d;
}

@media (min-width: 48rem) {
  .ahead dt {
    border-bottom: 1px solid #1d1d1d;
    padding-bottom: 1.5rem;
  }

  .ahead dd {
    padding-top: 1.85rem;
  }
}

/* ---------- Latest updates ---------- */

.latest {
  max-width: 76rem;
  margin: 0;
  padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem);
}

.recent {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.recent li + li {
  margin-top: 2rem;
}

.recent time,
.update time {
  display: block;
  color: var(--remembered);
  font-size: 0.875rem;
}

.recent a {
  font-family: var(--fell);
  font-size: var(--step-2);
  line-height: 1.25;
  text-decoration: none;
  color: var(--bone);
}

.recent a:hover {
  color: var(--torch);
}

.recent p {
  margin-top: 0.4rem;
}

.more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
}

/* ---------- The updates page ---------- */

/* Same box as .updates below it, so the wordmark lines up with the entries. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 64rem;
  margin: 0;
  padding: var(--gutter) var(--gutter) 0;
}

.bar .play {
  font-size: 0.875rem;
}

.mark {
  font-family: var(--fell);
  font-size: var(--step-3);
  color: var(--bone);
  text-decoration: none;
}

.updates {
  max-width: 64rem;
  margin: 0;
  padding-top: clamp(2rem, 8vh, 5rem);
}

.updates h1 {
  font-size: clamp(4rem, 14vw, 8rem);
  line-height: 0.9;
  margin-bottom: 1.5rem;
}

/* Releases in order: dates down the left, each release under its own rule. */
.update {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid #1d1d1d;
  scroll-margin-top: 1rem;
}

@media (min-width: 48rem) {
  .update {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 2.5rem;
  }

  .update time {
    padding-top: 0.9rem;
  }
}

.entry {
  max-width: var(--measure);
}

.entry h2 {
  font-size: var(--step-3);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.entry h2 a {
  color: inherit;
  text-decoration: none;
}

.entry h2 a:hover {
  color: var(--torch);
}

.summary {
  color: var(--bone);
}

.entry ul {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
}

.entry li {
  padding-left: 0.5rem;
}

.entry li + li {
  margin-top: 0.6rem;
}

.entry li::marker {
  content: '·';
  color: var(--torch);
}

.entry .shot {
  margin-top: 2rem;
  max-width: 34rem;
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 3rem var(--gutter) calc(3rem + env(safe-area-inset-bottom));
  color: var(--remembered);
  font-size: 0.875rem;
  border-top: 1px solid #1d1d1d;
  margin-top: 4rem;
}

.foot p:last-child {
  display: flex;
  gap: 1.5rem;
}

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