/* lazynop.dev: one stylesheet for every page, in Ikat's palette, on the reader's own system fonts. */

:root {
  color-scheme: light;
  --page: #e4dfd3;
  --cloth: #eeebe3;
  --ink: #2d2823;
  /* A shade darker than the game's #776d61, so small text reads at 4.5:1 on the page. */
  --ink2: #675d52;
  --rule: #cec6b7;
  --dot: rgb(70 58 44 / 0.26);
  --indaco: #33508e;
  /* The distance between a board's dots, and the width of a thread across them, as in the game. */
  --grid: 2rem;
  --thread: 0.4375rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 1.125rem;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--indaco);
  text-decoration-color: currentColor;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.125rem;
  margin: 1.25rem 0 0.25rem;
}

p {
  margin: 0 0 1rem;
  max-width: 36em;
}

/* The column every page's content keeps to; a width rather than padding, so rules such as the footer's line up with the text. */
.wrap {
  width: min(60rem, 100% - 2.5rem);
  margin-inline: auto;
}

/* The way back to lazynop.dev, quiet at the top of each game page. */
.top {
  padding-block: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink2);
}

.top a {
  text-decoration: none;
}

/* A board: the game's cloth and its dots, counted from the bottom edge so a thread can lie on a row of them. */
.board {
  position: relative;
  overflow: hidden;
  background-color: var(--cloth);
  background-image: radial-gradient(circle, var(--dot) 1.5px, transparent 2px);
  background-size: var(--grid) var(--grid);
  background-position: 0 100%;
  border-block: 1px solid var(--rule);
}

/* One indigo thread across the whole board, on the fifth row of dots up, which the phone's screen lies over. */
.board .thread {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--grid) * 4 + (var(--grid) - var(--thread)) / 2);
  height: var(--thread);
  background: var(--indaco);
}

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: calc(var(--grid) * 2);
}

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1fr auto;
  }
}

.wordmark {
  margin: 0 0 1.5rem -0.04em;
  font-size: clamp(4rem, 13vw, 7.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}

.lead {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.35;
}

/* Drawn like the game's outlined pills; a status, not a button. */
.status {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--cloth);
  font-size: 0.875rem;
  font-weight: 500;
}

/* A phone's screen: the recording, with the status bar and the gesture bar it was made with. */
.screen {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(18rem, 72vw);
  aspect-ratio: 9 / 20;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 1.75rem;
  background: var(--page);
}

.screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main > section {
  padding-top: 4.5rem;
}

.figures,
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

figcaption {
  max-width: 26em;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink2);
}

/* Whole screens, framed like the one above. */
.modes img {
  width: 100%;
  max-width: 17rem;
  border: 1px solid var(--rule);
  border-radius: 1.5rem;
}

.modes p {
  font-size: 1rem;
}

footer {
  margin-top: 5rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink2);
}

footer p {
  margin: 0;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* Long text, such as the privacy policy. */
.prose {
  padding-block: 2rem 0;
}

.prose h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}

.prose .date {
  color: var(--ink2);
  font-size: 1rem;
}

/* The developer's page: the name, then each game with its board. */
.studio {
  padding-block: 4rem 0;
}

.studio h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.games {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.games a {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
  align-items: center;
  text-decoration: none;
}

.games img {
  border-radius: 1rem;
}

.games h2 {
  margin-bottom: 0.25rem;
}

.games p {
  margin: 0;
  color: var(--ink2);
}
