/* Silkscreen for single big words, Jersey 15 for headings and buttons, VT323 for text (SIL Open Font License, see fonts/OFL-*.txt) */
@font-face {
  font-family: "SV Word";
  src: url("../fonts/Silkscreen-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  size-adjust: 88%;
}
@font-face {
  font-family: "SV Word";
  src: url("../fonts/Silkscreen-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  size-adjust: 88%;
}
@font-face {
  font-family: "SV Word";
  src: url("../fonts/Silkscreen-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  size-adjust: 88%;
}
@font-face {
  font-family: "SV Word";
  src: url("../fonts/Silkscreen-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  size-adjust: 88%;
}
@font-face {
  font-family: "SV Head";
  src: url("../fonts/Jersey15-400-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  size-adjust: 118%;
}
@font-face {
  font-family: "SV Head";
  src: url("../fonts/Jersey15-400-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  size-adjust: 118%;
}
@font-face {
  font-family: "SV Text";
  src: url("../fonts/VT323-400-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  size-adjust: 122%;
}
@font-face {
  font-family: "SV Text";
  src: url("../fonts/VT323-400-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  size-adjust: 122%;
}

:root {
  --ink: #24201c;
  --outline: #3b2a3a;
  --paper: #fbf1d9;
  --paper-dark: #f1e8d2;
  --muted: #7a6a58;
  --wall: #55534e;
  --orange: #ef8b3a;
  --orange-light: #ffc26b;
  --red: #e2333b;
  --gold: #ffd27a;
  --green: #5aa04a;
  --discord: #5865f2;

  --font-display: "SV Head", ui-monospace, monospace;
  --font-dot: "SV Word", ui-monospace, monospace;
  --font-body: "SV Text", ui-monospace, Menlo, monospace;

  --cursor: url("../img/cursor.png") 1 1, default;
  --cursor-pointer: url("../img/cursor-pointer.png") 1 1, pointer;
  --cursor-build: url("../img/cursor-build.png") 15 15, crosshair;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--wall) url("../img/art-wall.png") repeat;
  background-size: 936px 624px;
  image-rendering: pixelated;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  cursor: var(--cursor);
}

/* darken the art wall so the cards read */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(14, 12, 16, 0.42);
  pointer-events: none;
  z-index: 0;
}

a,
button,
select,
label[for],
.shot,
.swatch,
.tool {
  cursor: var(--cursor-pointer);
}

img,
video,
canvas {
  max-width: 100%;
  image-rendering: pixelated;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  letter-spacing: 0.5px;
}

h3 {
  font-size: 21px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.note {
  font-size: 15px;
  color: var(--muted);
}

.note a {
  color: var(--ink);
  font-weight: 700;
}

/* Panels and buttons look like the game: cream, dark outline, thick bottom edge */

.panel {
  background: var(--paper);
  border: 3px solid var(--outline);
  border-bottom-width: 6px;
  border-radius: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 8px;
  font: 400 17px/1 var(--font-display);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--paper-dark);
  border: 3px solid var(--outline);
  border-bottom-width: 6px;
  border-radius: 5px;
}

.btn:hover {
  background: var(--orange-light);
}

.btn:active {
  border-bottom-width: 3px;
  transform: translateY(3px);
}

.btn:focus-visible,
.tool:focus-visible,
.swatch:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.btn--green {
  background: var(--green);
  color: #fff;
}
.btn--green:hover {
  background: #6cb85a;
}

.btn--orange {
  background: var(--orange);
}

.btn--discord {
  background: var(--discord);
  color: #fff;
}
.btn--discord:hover {
  background: #6f7bf5;
}

.btn--small {
  padding: 6px 10px 5px;
  font-size: 14px;
  border-width: 2px;
  border-bottom-width: 4px;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 4px solid var(--outline);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-block: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  image-rendering: auto;
}

.brand span {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  padding: 7px 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-radius: 4px;
}

.site-nav a:hover {
  background: var(--orange-light);
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  z-index: 1;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(28px, 6vw, 72px);
}

.pitch {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 30px);
}

.pitch h1 {
  font-family: var(--font-dot);
  font-size: clamp(30px, 4vw, 48px);
}

.pitch p {
  max-width: 52ch;
  font-size: 18px;
}

.cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 440px;
}

.wishlist {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 18px 12px;
  color: #fff;
  text-decoration: none;
  background: var(--red);
  border: 3px solid var(--outline);
  border-bottom-width: 7px;
  border-radius: 6px;
}

.wishlist small {
  font: 400 15px/1 var(--font-display);
  letter-spacing: 2px;
  color: var(--gold);
}

.wishlist strong {
  font: 700 clamp(26px, 3.4vw, 36px)/1 var(--font-display);
  letter-spacing: 1px;
}

.wishlist:hover {
  background: #f04a50;
}

.wishlist:active {
  border-bottom-width: 4px;
  transform: translateY(3px);
}

.emblem {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.emblem img {
  width: min(100%, 520px);
  image-rendering: auto;
  filter: drop-shadow(0 8px 0 rgba(20, 16, 24, 0.45)) drop-shadow(0 8px 26px rgba(8, 6, 10, 0.6));
  animation: emblem-in 0.6s ease-out both;
}

.tagline {
  margin-top: -6px;
  padding: 6px 16px;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: var(--gold);
  background: var(--ink);
  border-radius: 5px;
}

@keyframes emblem-in {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .emblem {
    order: -1;
  }
  .emblem img {
    width: min(100%, 380px);
  }
}

@media (max-width: 420px) {
  .cta {
    grid-template-columns: 1fr;
  }
}

/* Sections */

section {
  position: relative;
  z-index: 1;
  padding-block: clamp(24px, 4vw, 44px);
}

.card {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.section-head p {
  max-width: 60ch;
}

/* Gameplay */

.film {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1b1b1b;
  border: 3px solid var(--outline);
  border-radius: 4px;
}

.film ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.film li {
  padding-left: 12px;
  border-left: 4px solid var(--orange);
}

@media (max-width: 820px) {
  .film {
    grid-template-columns: 1fr;
  }
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}

.feature {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  background: var(--paper-dark);
  border: 3px solid var(--outline);
  border-radius: 5px;
}

.feature p {
  font-size: 16px;
}

.stamp {
  justify-self: start;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 3px;
  transform: rotate(-3deg);
}

/* Factions */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 10px;
  background: var(--paper-dark);
  border: 3px solid var(--outline);
  border-radius: 5px;
}

.person img {
  width: 96px;
  height: 120px;
  background: #b9c2b0;
  border: 3px solid var(--outline);
  border-radius: 3px;
}

.person h3 {
  font-size: 19px;
}

.person small {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}

.person .faction {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 3px;
}

.person q {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

/* Screenshots */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.shot {
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  background: #1b1b1b;
  border: 3px solid var(--outline);
  border-radius: 4px;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  transition: transform 0.25s;
}

.shot:hover img {
  transform: scale(1.04);
}

.lightbox {
  max-width: min(96vw, 1600px);
  padding: 0;
  background: #1b1b1b;
  border: 4px solid var(--outline);
  border-radius: 6px;
}

.lightbox::backdrop {
  background: rgba(14, 12, 16, 0.85);
}

.lightbox img {
  display: block;
  width: auto;
  max-height: 86vh;
  image-rendering: auto;
}

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

/* Art editor */

.bench {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

@media (max-width: 900px) {
  .bench {
    grid-template-columns: 1fr;
  }
}

.easel {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.easel canvas {
  max-width: min(100%, 560px);
  height: auto;
  background: #9a978f;
  border: 3px solid var(--outline);
  border-radius: 4px;
  touch-action: none;
  cursor: var(--cursor-build);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool {
  padding: 7px 10px 6px;
  font: 400 14px/1 var(--font-display);
  color: var(--ink);
  background: var(--paper-dark);
  border: 2px solid var(--outline);
  border-bottom-width: 4px;
  border-radius: 4px;
}

.tool[aria-pressed="true"] {
  background: var(--orange);
}

.controls {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, 28px);
  gap: 4px;
}

.frames {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--outline);
  border-radius: 3px;
}

.frames .swatch {
  width: 34px;
}

.swatch[aria-pressed="true"] {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}

.swatch--clear {
  background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 10px 10px;
}

.previews {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}

.previews figure {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.previews canvas {
  background: #9a978f;
  border: 2px solid var(--outline);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.field {
  display: grid;
  flex: 1 1 200px;
  gap: 4px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"],
select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font: 400 18px var(--font-body);
  color: var(--ink);
  background: #fffaf0;
  border: 3px solid var(--outline);
  border-radius: 4px;
}

.message {
  font-weight: 700;
}
.message--ok {
  color: #2f7a2a;
}
.message--error {
  color: var(--red);
}

.art-code {
  max-height: 96px;
  overflow: auto;
  padding: 8px;
  font: 400 13px/1.35 ui-monospace, Menlo, monospace;
  word-break: break-all;
  background: #fffaf0;
  border: 2px dashed var(--outline);
  border-radius: 4px;
}

/* Community gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.piece {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  background: var(--paper-dark);
  border: 3px solid var(--outline);
  border-radius: 5px;
}

.piece canvas {
  width: 104px;
  height: 104px;
}

.piece strong {
  font-size: 15px;
  line-height: 1.15;
}

.piece small {
  font-size: 13px;
  color: var(--muted);
}

.empty {
  padding: 22px;
  text-align: center;
  background: rgba(251, 241, 217, 0.6);
  border: 3px dashed var(--outline);
  border-radius: 5px;
}

/* Footer */

.site-footer {
  position: relative;
  z-index: 1;
  padding-block: 28px 40px;
  color: var(--paper);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer img {
  width: 64px;
  image-rendering: auto;
}

.studio {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.studio span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
}

.studio img {
  width: 150px;
  height: auto;
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
