/* Mulancio Studios. The colours are the logo's: night, the sunset's pinks and the
   yellow-to-orange of the M. Pixum is the 5x7 alphabet the games draw their text
   with; its sizes are multiples of 10px so each of its pixels is a whole number
   of screen pixels. */

@font-face {
  font-family: "Pixum";
  src: url("/assets/fonts/pixum.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0a0230;
  --night-2: #120641;
  --dusk: #2a1672;
  --plum: #54086c;
  --red: #e02a68;
  --pink: #f8489c;
  --pink-soft: #f8a0dc;
  --coral: #ff7a6a;
  --yellow: #ffe63c;
  --gold: #ffc021;
  --orange: #ff8c14;
  --cream: #ffeed2;
  --text: #efe6ff;
  --muted: #b9addf;
  --hud: #1b1736;
  --hud-deep: #100d25;
  --hud-key: #353058;
  --hud-text: #bfe3ff;
  --accent: var(--gold);
  --gutter: clamp(20px, 5vw, 48px);
  --pixel: "Pixum", ui-monospace, "Courier New", monospace;
  --body: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 var(--body);
}

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

a {
  color: var(--cream);
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

h2 {
  font-size: 30px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--plum);
}

p {
  margin: 0;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lead {
  margin-top: 18px;
  max-width: 60ch;
  font-size: 19px;
  color: var(--text);
}

.eyebrow {
  font: 20px/1 var(--pixel);
  color: var(--pink-soft);
}

.tagline {
  font-size: 20px;
  font-style: italic;
  line-height: 1.4;
  color: var(--cream);
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--yellow);
  color: var(--night);
}

.skip:focus {
  top: 12px;
}

/* Buttons: the gold one is the one thing to press; the others stay in the night. */

.btn {
  display: inline-block;
  padding: 13px 18px 9px;
  border: 0;
  background: var(--dusk);
  color: var(--cream);
  font: 20px/1 var(--pixel);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 0.16), inset -2px -2px 0 rgb(0 0 0 / 0.35), 4px 4px 0 var(--plum);
  transition: transform 80ms, box-shadow 80ms;
}

.btn:hover {
  color: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 0.16), inset -2px -2px 0 rgb(0 0 0 / 0.35), 6px 6px 0 var(--plum);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: inset 2px 2px 0 rgb(0 0 0 / 0.35), 1px 1px 0 var(--plum);
}

.btn-go,
.btn-go:hover {
  background: linear-gradient(var(--yellow), var(--orange));
  color: #2c0838;
  box-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--plum);
}

.btn-go:hover {
  box-shadow: 5px 5px 0 var(--red), 8px 8px 0 var(--plum);
}

.btn-go:active {
  box-shadow: 1px 1px 0 var(--red), 3px 3px 0 var(--plum);
}

.btn-small {
  padding: 10px 12px 6px;
}

.btn[aria-disabled="true"] {
  background: var(--hud-key);
  color: var(--muted);
  box-shadow: 4px 4px 0 var(--hud-deep);
  cursor: not-allowed;
  transform: none;
}

.soon {
  display: inline-block;
  padding: 11px 14px 7px;
  border: 2px dashed var(--hud-key);
  font: 20px/1 var(--pixel);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

/* Top bar: lies over the sky. */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  font: 20px/1 var(--pixel);
}

.top a {
  text-decoration: none;
}

.top-home {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-home img {
  width: 48px;
}

.top-home span {
  padding-top: 4px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
}

.top-nav a {
  padding-top: 4px;
}

.top-lang {
  padding: 8px 8px 4px !important;
  border: 2px solid var(--pink);
  color: var(--pink-soft);
}

/* The sky and the horizon: the stripes under the logo's sun. */

.stars {
  position: absolute;
  inset: 0;
  background: url("/assets/stars.svg") 0 0 / 480px 480px;
  animation: drift 240s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  to {
    background-position: -480px 240px;
  }
}

.horizon {
  position: relative;
  height: 72px;
  background: linear-gradient(
    transparent 0 2px,
    #6a52d8 0 4px,
    transparent 0 14px,
    #a044cc 0 17px,
    transparent 0 26px,
    #c849bc 0 30px,
    transparent 0 38px,
    #e84cac 0 44px,
    transparent 0 50px,
    var(--pink) 0 58px,
    transparent 0 62px,
    var(--coral) 0 72px
  );
}

.horizon-up {
  transform: scaleY(-1);
}

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(100svh, 900px);
  background: radial-gradient(90% 55% at 50% 100%, #54086c 0%, transparent 70%), var(--night);
  overflow: hidden;
}

.hero-small {
  min-height: 70svh;
}

.hero-in {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 96px var(--gutter) 56px;
  text-align: center;
}

.hero-logo {
  display: block;
  width: min(480px, 78vw);
  animation: rise 900ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
}

.hero-lead,
.hero-title {
  margin-top: 26px;
  font: 30px/1.1 var(--pixel);
  color: var(--cream);
}

.hero-title {
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--plum);
}

.hero-sub {
  margin-top: 14px;
  max-width: 44ch;
  font-size: 19px;
  color: var(--muted);
  text-wrap: balance;
}

.hero .actions {
  justify-content: center;
}

/* The games. */

.games {
  padding-block: 96px 40px;
  background: var(--night-2);
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  margin-top: 96px;
  scroll-margin-top: 32px;
}

.game:nth-of-type(even) .game-art {
  order: 2;
}

.game-art {
  position: relative;
}

.game-shot,
.player,
.shots a,
.more a {
  border: 3px solid var(--accent);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--accent) 32%, var(--night));
}

.game-shot {
  position: relative;
  display: block;
  transition: transform 120ms, box-shadow 120ms;
}

.game-shot:hover {
  transform: translate(-4px, -4px);
  box-shadow: 14px 14px 0 color-mix(in srgb, var(--accent) 32%, var(--night));
}

.game-shot img,
.player-poster img,
.shots img,
.more img,
.strip,
.lightbox img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}

.game-shot-go {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(10 2 48 / 0.55);
  color: var(--yellow);
  font: 40px/1 var(--pixel);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--plum);
  opacity: 0;
  transition: opacity 120ms;
}

.game-shot:hover .game-shot-go,
.game-shot:focus-visible .game-shot-go {
  opacity: 1;
}

.game-stamp {
  position: absolute;
  top: -44px;
  right: -28px;
  width: 120px;
  transform: rotate(8deg);
  filter: drop-shadow(5px 6px 0 rgb(0 0 0 / 0.4));
  pointer-events: none;
}

.game:nth-of-type(even) .game-stamp {
  right: auto;
  left: -28px;
  transform: rotate(-7deg);
}

.game-text h3 {
  margin-top: 14px;
  font-size: 40px;
  color: var(--accent);
  text-shadow: 3px 3px 0 var(--plum);
}

.game-text h3 a {
  color: inherit;
  text-decoration: none;
}

.game-text .tagline {
  margin-top: 16px;
}

.game-text .tagline + p {
  margin-top: 14px;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 3px 10px;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
}

/* What's new: a short dated list between the games and the tip jar. */

.news {
  padding-block: 56px 24px;
  background: var(--night-2);
}

.news-list {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  padding: 18px 20px 16px;
  border-left: 4px solid var(--accent);
  background: var(--hud);
}

.news-list time {
  font: 20px/1 var(--pixel);
  color: var(--pink-soft);
}

.news-list h3 {
  margin-top: 10px;
  font-size: 20px;
  color: var(--accent);
}

.news-list h3 a {
  color: inherit;
}

.news-list p {
  margin-top: 6px;
  color: var(--muted);
}

/* The tip jar: the verb panel of the games, with one jar to use them on. */

.support {
  position: relative;
  padding-block: 120px 110px;
  background: linear-gradient(var(--night-2), var(--night) 320px);
}

.scumm {
  max-width: 880px;
  margin-top: 40px;
  border: 4px solid var(--hud-deep);
  outline: 3px solid var(--hud-key);
  background: var(--hud);
  box-shadow: 14px 14px 0 var(--plum);
}

.scumm-sentence {
  min-height: 52px;
  padding: 18px 12px 12px;
  background: var(--hud-deep);
  color: var(--hud-text);
  font: 20px/1.1 var(--pixel);
  text-align: center;
}

.scumm-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
}

.scumm-verbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.scumm-verbs button {
  padding: 18px 2px 14px;
  border: 0;
  background: var(--hud-key);
  color: var(--hud-text);
  font: 20px/1 var(--pixel);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 0.14), inset -2px -2px 0 rgb(0 0 0 / 0.4);
}

.scumm-verbs button:hover {
  color: #fff;
}

.scumm-verbs button[aria-pressed="true"] {
  background: #4b447c;
  color: var(--yellow);
}

.scumm-jar {
  display: grid;
  place-items: center;
  padding-inline: 22px;
  background: var(--hud-deep);
  border: 2px solid var(--hud-key);
}

.scumm-jar .pixel-icon {
  width: 88px;
  height: 88px;
}

.pixel-ink {
  fill: var(--hud-text);
}

.pixel-fill {
  fill: var(--gold);
}

.scumm-reply {
  display: grid;
  justify-items: start;
  gap: 18px;
  padding: 22px 24px 28px;
  border-top: 4px solid var(--hud-deep);
}

.scumm-line {
  min-height: 2.9em;
  font-size: 20px;
  line-height: 1.45;
  color: var(--cream);
}

.scumm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.scumm-note {
  flex: 1 1 24ch;
  font-size: 15px;
  color: var(--muted);
}

/* A game's page. */

.page {
  position: relative;
  padding-block: 110px 96px;
  --accent-soft: color-mix(in srgb, var(--accent) 32%, var(--night));
}

.page > .stars {
  height: 520px;
  mask-image: linear-gradient(#000 40%, transparent);
}

.page .wrap {
  position: relative;
  max-width: calc(1286px + 2 * var(--gutter));
}

.page .wrap > * {
  max-width: 1120px;
  margin-inline: auto;
}

.page .wrap > section {
  margin-top: 80px;
}

.page-back {
  font: 20px/1 var(--pixel);
}

.page-back a {
  color: var(--pink-soft);
  text-decoration: none;
}

.page-head {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 36px);
  margin-top: 28px;
}

.page-emblem {
  flex: none;
  width: clamp(110px, 18vw, 200px);
}

.page-head h1 {
  margin-top: 14px;
  font-size: 50px;
  color: var(--accent);
  text-shadow: 3px 3px 0 var(--plum);
}

.page-head .tagline {
  margin-top: 16px;
}

.page .wrap > .player,
.page .wrap > .player-bar {
  max-width: min(1286px, (100svh - 150px) * 16 / 9);
}

.player {
  position: relative;
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: #000;
  scroll-margin-top: 24px;
}

.player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player:fullscreen {
  max-width: none;
  border: 0;
}

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
}

.player-poster img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  transition: filter 160ms;
}

.player-poster:hover img {
  filter: brightness(0.8);
}

.player-go {
  position: relative;
  padding: 22px 30px 14px;
  background: linear-gradient(var(--yellow), var(--orange));
  color: #2c0838;
  font: 40px/1 var(--pixel);
  box-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--plum);
}

.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 26px !important;
  font-size: 15px;
  color: var(--muted);
}

.page-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  margin-top: 80px !important;
}

.points,
.howto ol {
  margin: 22px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.points li,
.howto li {
  margin-top: 8px;
}

.points li::marker {
  color: var(--accent);
}

.howto ol {
  font-size: 16px;
}

.howto li::marker {
  font-family: var(--pixel);
  font-size: 20px;
  color: var(--pink-soft);
}

.shots,
.more {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.shots a,
.more a {
  display: block;
  box-shadow: 6px 6px 0 var(--accent-soft);
  transition: transform 120ms;
}

.more a {
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--accent) 32%, var(--night));
  text-decoration: none;
}

.shots a:hover,
.more a:hover {
  transform: translate(-3px, -3px);
}

.more {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.more span {
  display: block;
  padding: 14px 12px 10px;
  background: var(--hud);
  color: var(--accent);
  font: 20px/1.1 var(--pixel);
}

.strip {
  margin-top: 44px;
  padding: 16px;
  background: #d9d3c4;
}

.lightbox {
  width: min(1280px, 96vw);
  max-width: none;
  padding: 0;
  border: 3px solid var(--accent);
  background: #000;
}

.lightbox::backdrop {
  background: rgb(10 2 48 / 0.88);
}

.lightbox form {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Foot. */

.foot {
  background: var(--night);
}

.foot-in {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1120px;
  margin-inline: auto;
  padding: 44px var(--gutter) 64px;
  color: var(--muted);
  font-size: 15px;
}

.foot-stamp {
  flex: none;
  width: 100px;
  transform: rotate(-5deg);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
  font: 20px/1 var(--pixel);
}

.foot-links a {
  text-decoration: none;
}

.foot-small {
  margin-top: 14px;
}

@media (min-width: 760px) {
  h2 {
    font-size: 40px;
  }

  .scumm-sentence {
    font-size: 30px;
    min-height: 68px;
  }

}

@media (max-width: 860px) {
  .game {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 88px;
  }

  .game:nth-of-type(even) .game-art {
    order: 0;
  }

  .game-stamp,
  .game:nth-of-type(even) .game-stamp {
    top: -40px;
    right: -8px;
    left: auto;
    width: 92px;
  }

  .game-text h3,
  .page-head h1 {
    font-size: 30px;
  }

  .page-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .top-home span {
    display: none;
  }

  .hero-lead,
  .hero-title {
    font-size: 20px;
  }

  .scumm-verbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scumm-verbs button {
    padding-block: 14px 10px;
  }

  .scumm-jar {
    display: none;
  }

  .scumm {
    box-shadow: 8px 8px 0 var(--plum);
  }

  .game-shot,
  .player {
    box-shadow: 6px 6px 0 color-mix(in srgb, var(--accent) 32%, var(--night));
  }

  .player-go,
  .game-shot-go {
    font-size: 30px;
  }

  .foot-in {
    align-items: flex-start;
  }

  .foot-stamp {
    width: 72px;
  }
}

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

  .stars,
  .hero-logo {
    animation: none;
  }

  .btn,
  .game-shot,
  .shots a,
  .more a {
    transition: none;
  }
}
