/* The look of the public site. tools/build-site.py copies this file to site/style.css.
   The colors are the 16 colors of PICO-8. */
:root {
  --paper: #fff1e8;
  --ink: #1d2b53;
  --soft: #5f574f;
  --orange: #ffa300;
  --yellow: #ffec27;
  --pink: #ff77a8;
  --red: #ff004d;
  --blue: #29adff;
  --green: #00e436;
  --white: #ffffff;
  --round: 22px;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(29, 43, 83, 0.07) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  font-size: 18px;
  line-height: 1.5;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

/* top */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 0;
}
.home {
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  background: var(--yellow);
  padding: 4px 14px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.tag { color: var(--soft); font-size: 16px; }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.name { padding: 34px 0 22px; }
.name h1 { font-size: clamp(44px, 8vw, 84px); line-height: 1; letter-spacing: -1px; }
.name .line { font-size: clamp(19px, 2.4vw, 24px); margin-top: 10px; max-width: 30em; }
.name .date { color: var(--soft); font-size: 15px; margin-top: 6px; }

/* the two sides */
.two {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px;
  align-items: start;
}

/* left: the drawing, like a sheet of paper on the wall */
.drawing {
  margin: 8px 0 0;
  position: relative;
  background: var(--white);
  padding: 12px 12px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(29, 43, 83, 0.15), 0 14px 30px rgba(29, 43, 83, 0.18);
  transform: rotate(-1.6deg);
}
.drawing::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 30px;
  margin-left: -55px;
  background: rgba(255, 163, 0, 0.75);
  transform: rotate(2deg);
}
.drawing img { display: block; width: 100%; height: auto; border-radius: 3px; }
.drawing figcaption { text-align: center; color: var(--soft); font-size: 15px; padding-top: 6px; }

.words { margin-top: 34px; }
.words h2, .how h2, .shelf h2 { font-size: 24px; margin-bottom: 12px; }

.ask { margin-bottom: 22px; }
.ask .when { font-size: 14px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.06em; }
.ask .who { font-size: 16px; color: var(--soft); margin: 2px 0 10px; }
.ask blockquote {
  margin: 0;
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--round);
  padding: 16px 20px;
  font-size: 18px;
}
.ask blockquote::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 34px;
  width: 22px;
  height: 22px;
  background: var(--white);
  border-left: 3px solid var(--ink);
  border-top: 3px solid var(--ink);
  transform: rotate(45deg);
}
.ask blockquote p + p { margin-top: 10px; }
.long { max-height: 266px; overflow: hidden; position: relative; padding-top: 16px; margin-top: -16px;
  border-bottom: 3px solid var(--ink); border-radius: 0 0 var(--round) var(--round); }
.long::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; bottom: 0;
  height: 90px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--white) 75%);
  pointer-events: none;
}
.long.open { max-height: none; border-bottom: 0; }
.long.open::after { display: none; }
.more, .pill {
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}
.more { margin-top: 10px; padding: 3px 16px; font-size: 16px; font-weight: 700; }

.changes {
  background: #e7f6ff;
  border: 3px dashed var(--blue);
  border-radius: var(--round);
  padding: 14px 18px;
}
.changes h3 { font-size: 18px; margin-bottom: 6px; }
ul { margin: 0; padding-left: 1.2em; }
li + li { margin-top: 6px; }
li::marker { color: var(--orange); }

/* right: the game */
.right { position: sticky; top: 16px; }
.console {
  background: var(--ink);
  border-radius: 30px;
  padding: 14px;
  box-shadow: 0 8px 0 #0e1630, 0 22px 40px rgba(29, 43, 83, 0.28);
}
.console iframe {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
}

.versions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: center; }
.versions::before { content: "Versions:"; font-weight: 700; margin-right: 2px; }
.pill { padding: 4px 22px; font-size: 20px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); }
.pill.on { background: var(--orange); }
.pill:active, .more:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.how {
  margin-top: 26px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--round);
  padding: 16px 20px;
  box-shadow: 4px 4px 0 var(--ink);
}
.how li::marker { color: var(--ink); }
.keys { margin-top: 10px; font-size: 15px; color: var(--soft); }
kbd {
  font: inherit;
  font-weight: 800;
  background: var(--white);
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 8px;
  padding: 0 8px;
}
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; background: rgba(29, 43, 83, 0.08); padding: 1px 5px; border-radius: 5px; }

/* the shelf with all the games */
.shelf { max-width: 1180px; margin: 70px auto 0; padding: 0 16px; }
.cards { display: flex; gap: 22px; overflow-x: auto; padding: 14px 4px 22px; scroll-snap-type: x proximity; }
.card {
  flex: 0 0 170px;
  scroll-snap-align: start;
  text-decoration: none;
  background: var(--white);
  padding: 9px 9px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(29, 43, 83, 0.15), 0 8px 18px rgba(29, 43, 83, 0.16);
  transition: transform 0.15s;
}
.card:nth-child(odd) { transform: rotate(-2deg); }
.card:nth-child(even) { transform: rotate(1.5deg); }
.card:hover, .card:focus-visible { transform: rotate(0) translateY(-6px); }
.card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; }
.card-title { display: block; font-weight: 800; font-size: 20px; margin-top: 8px; }
.card-date { display: block; font-size: 14px; color: var(--soft); }
.card.here { outline: 4px solid var(--orange); outline-offset: 3px; }

footer { text-align: center; padding: 50px 16px 44px; color: var(--soft); }
.heart { color: var(--red); }

:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }

/* a phone: the drawing, then the words, then the game, then how to play */
@media (max-width: 860px) {
  .two { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .right { position: static; }
  .name { padding: 24px 0 16px; }
  .drawing { max-width: 420px; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
