/* wasd.fly: paper, ink and one signal colour; the keys of the name are the only ornament */
@font-face { font-family: Bricolage; src: url(/fonts/bricolage-grotesque.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: JBMono; src: url(/fonts/jetbrains-mono.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --paper: #ece7db; --ink: #15140f; --soft: #5d594d; --line: #15140f24; --signal: #ff4a1c; --on-signal: #15140f;
  --key: #fbf8f1; --key-side: #c9c2b0; --card: #f5f1e7;
  --display: Bricolage, 'Arial Narrow', sans-serif; --mono: JBMono, ui-monospace, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #12110d; --ink: #ece7db; --soft: #a39d8c; --line: #ece7db26; --key: #2a2822; --key-side: #05050480; --card: #1a1914; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--display);
  /* a faint grid of dots, like a cutting mat */
  background-image: radial-gradient(var(--line) 1px, transparent 1.5px); background-size: 22px 22px;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.mono { font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* ---- header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: -.02em; }
.brand i { font-style: normal; color: var(--signal); }
.top nav { display: flex; gap: 1.4rem; }
.top nav a { text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.top nav a:hover, .top nav a[aria-current] { border-color: var(--signal); }

/* ---- keys: W over A S D */
.keys { display: inline-grid; grid-template-columns: repeat(3, var(--k)); gap: calc(var(--k) * .12); --k: 3.4rem; }
.keys kbd {
  display: grid; place-items: center; width: var(--k); height: var(--k); border-radius: calc(var(--k) * .18);
  font: 700 calc(var(--k) * .4)/1 var(--mono); color: var(--ink); background: var(--key);
  border: 2px solid var(--ink); box-shadow: 0 calc(var(--k) * .13) 0 var(--key-side), 0 calc(var(--k) * .13) 0 2px var(--ink);
  transition: transform .07s, box-shadow .07s, background .15s; user-select: none;
}
.keys kbd:first-child { grid-column: 2; }
.keys kbd:nth-child(2) { grid-column: 1; }
.keys kbd.on { transform: translateY(calc(var(--k) * .1)); box-shadow: 0 calc(var(--k) * .03) 0 var(--key-side), 0 calc(var(--k) * .03) 0 2px var(--ink); background: var(--signal); color: var(--on-signal); }
.keys.s { --k: .82rem; gap: 2px; margin-bottom: 3px; }
.keys.s kbd { font-size: 0; border-width: 1.5px; box-shadow: none; background: var(--ink); }
.keys.s kbd:first-child { background: var(--signal); border-color: var(--signal); }

/* ---- the opening of the front page */
.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem 3rem; padding: clamp(2rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero h1 { margin: 0; font: 800 clamp(2.7rem, 8.4vw, 6.6rem)/.92 var(--display); letter-spacing: -.045em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero p { margin: 1.4rem 0 0; max-width: 34ch; font-size: 1.2rem; color: var(--soft); }
.hero .keys { margin-bottom: 1rem; }
.hint { display: block; margin-top: 1.1rem; color: var(--soft); text-align: center; }

/* ---- the list of games */
.shelf { border-top: 2px solid var(--ink); padding: 0 0 4rem; }
.shelf > h2 { margin: 0; padding: .8rem 0 1.6rem; display: flex; justify-content: space-between; }
.game { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.6rem); align-items: center; }
.game + .game, .soon { margin-top: 3rem; }
.shot { position: relative; display: block; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--ink); box-shadow: 10px 10px 0 var(--ink); transition: transform .18s, box-shadow .18s; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
a.shot:hover { transform: translate(-3px, -3px); box-shadow: 13px 13px 0 var(--signal); }
.game .n { color: var(--signal); }
.game h3 { margin: .3rem 0 .7rem; font: 800 clamp(2rem, 4.4vw, 3.3rem)/.95 var(--display); letter-spacing: -.035em; }
.game h3 a { text-decoration: none; }
.game p { margin: 0 0 1.1rem; color: var(--soft); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tags li { padding: .28rem .6rem; border: 1.5px solid var(--line); border-radius: 99px; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.35rem; border-radius: 12px; text-decoration: none;
  font: 800 1.1rem/1 var(--display); background: var(--signal); color: var(--on-signal); border: 2px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink); transition: transform .07s, box-shadow .07s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.more { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.more:hover { text-decoration-color: var(--signal); }
.soon { display: grid; place-items: center; min-height: 9rem; padding: 1.5rem; border: 2px dashed var(--line); border-radius: 14px; color: var(--soft); text-align: center; }

/* ---- a game's own page */
.back { display: inline-block; margin: 1rem 0 0; text-decoration: none; color: var(--soft); }
.back:hover { color: var(--ink); }
.title { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1.5rem 3rem; padding: 1.2rem 0 2.2rem; }
.title h1 { margin: 0; font: 800 clamp(2.8rem, 9vw, 7rem)/.9 var(--display); letter-spacing: -.05em; }
.title p { margin: 1.1rem 0 0; max-width: 44ch; font-size: 1.25rem; color: var(--soft); }
.shot.big { box-shadow: 14px 14px 0 var(--ink); }
.shot.big img { aspect-ratio: 16 / 9; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4rem 0 0; border-top: 2px solid var(--ink); }
.facts div { padding: 1rem 1.2rem 1.2rem 0; border-bottom: 1.5px solid var(--line); }
.facts dt { color: var(--soft); margin-bottom: .35rem; }
.facts dd { margin: 0; font-weight: 600; line-height: 1.3; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2rem 4rem; padding: 4rem 0; }
.cols h2 { margin: 0; font: 800 clamp(1.8rem, 3.6vw, 2.7rem)/1 var(--display); letter-spacing: -.035em; }
.points { margin: 0; padding: 0; list-style: none; counter-reset: p; }
.points li { counter-increment: p; display: grid; grid-template-columns: 2.6rem 1fr; padding: 1rem 0; border-top: 1.5px solid var(--line); }
.points li:first-child { border-top: 0; padding-top: 0; }
.points li::before { content: counter(p, decimal-leading-zero); font: 500 .78rem/1.9 var(--mono); color: var(--signal); }
.points b { display: block; font-weight: 800; }
.points span { color: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.grid .shot { box-shadow: none; grid-column: span 2; }
.grid .shot:nth-child(-n+2) { grid-column: span 3; }
.grid .shot img { aspect-ratio: 4 / 3; height: 100%; }
.credit { margin: 3rem 0 0; padding: 1.2rem 1.4rem; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; color: var(--soft); }
.credit a { color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 4rem 0; padding: 2rem; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.cta strong { font: 800 clamp(1.5rem, 3.4vw, 2.3rem)/1.05 var(--display); letter-spacing: -.03em; }

/* ---- not found */
.lost { min-height: 62vh; display: grid; align-content: center; justify-items: start; gap: 1.2rem; padding: 3rem 0; }
.lost .code { color: var(--signal); }
.lost h1 { margin: 0; font: 800 clamp(3rem, 12vw, 9rem)/.86 var(--display); letter-spacing: -.055em; }
.lost p { margin: 0; max-width: 40ch; font-size: 1.2rem; color: var(--soft); }
.lost ul { margin: 0 0 .6rem; padding: 0; list-style: none; }
.lost li a { font-weight: 800; font-size: 1.3rem; text-underline-offset: 5px; }

/* ---- footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding: 1.4rem 0 2.4rem; border-top: 2px solid var(--ink); color: var(--soft); }
.foot a { text-underline-offset: 3px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero > *, .title > *, .game, .lost > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero > :nth-child(2), .title > :nth-child(2), .lost > :nth-child(2) { animation-delay: .08s; }
.game, .lost > :nth-child(3) { animation-delay: .16s; }
.lost > :nth-child(n+4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 820px) {
  .hero, .title, .game, .cols { grid-template-columns: 1fr; }
  .hero .side { justify-self: start; }
  .hint { text-align: left; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot.big { box-shadow: 6px 6px 0 var(--ink); }
  .grid .shot, .grid .shot:nth-child(-n+2) { grid-column: span 3; }
  .keys { --k: 2.9rem; }
  .keys.s { --k: .82rem; }
}
@media (max-width: 480px) {
  .top nav { gap: 1rem; }
  .grid .shot, .grid .shot:nth-child(-n+2) { grid-column: span 6; }
}

/* ---- pictures, and the longer sections of a game's page */
picture { display: contents; }
figure.shot { margin: 0; }
.news { display: grid; grid-template-columns: auto 1fr; gap: 1rem 2rem; align-items: start; margin: 3rem 0 0; padding: 1.6rem 1.8rem; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 8px 8px 0 var(--signal); }
.news > .mono { padding: .3rem .6rem; border-radius: 99px; background: var(--signal); color: var(--on-signal); }
.news h2 { margin: 0 0 .6rem; font: 800 clamp(1.5rem, 3vw, 2.1rem)/1.05 var(--display); letter-spacing: -.03em; }
.news p { margin: 0; color: var(--soft); max-width: 70ch; }
.cols + .cols { padding-top: 0; }
.grid + .cols { padding-top: 4rem; }
.prose p { margin: 0 0 1rem; color: var(--soft); }
.prose p:last-child { margin: 0; }
.ctl { width: 100%; border-collapse: collapse; }
.ctl th, .ctl td { padding: .7rem 0; border-top: 1.5px solid var(--line); text-align: left; vertical-align: top; }
.ctl tr:first-child th, .ctl tr:first-child td { border-top: 0; padding-top: 0; }
.ctl th { width: 42%; padding-right: 1rem; font-weight: 800; }
.ctl td { color: var(--soft); }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 4rem; padding: 3rem 0 4rem; border-top: 2px solid var(--ink); }
.about h2 { margin: 0; font: 800 clamp(1.8rem, 3.6vw, 2.7rem)/1 var(--display); letter-spacing: -.035em; }
.about p { margin: 0 0 1rem; color: var(--soft); }
.shelf { padding-bottom: 3rem; }
@media (max-width: 820px) { .news, .about { grid-template-columns: 1fr; } .news { box-shadow: 5px 5px 0 var(--signal); } .news > .mono { justify-self: start; } }
