/* Six Shooter — sixshooter.dev
 *
 * A gunsmith's bench at night: ink and a pencil grid, brass for what you press,
 * steel for the mark. Every colour is from Let 'er Ride's palette ("Dust &
 * Denim", assets/palette.gpl) and both faces are the game's pixel faces; type
 * sits on their grids (Slab 24/36/48/72, Sans 16/24/32) so every font pixel
 * lands on whole screen pixels.
 */

@font-face {
  font-family: "LER Slab";
  src: url("../fonts/ler-slab.woff") format("woff"), url("../fonts/ler-slab.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "LER Sans";
  src: url("../fonts/ler-sans.woff") format("woff"), url("../fonts/ler-sans.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LER Sans";
  src: url("../fonts/ler-sans-bold.woff") format("woff"), url("../fonts/ler-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #1a1410;
  --shadow: #2e241c;
  --leather: #4a3628;
  --saddle: #6e4f33;
  --cream: #f2ead8;
  --parchment: #d9cbb0;
  --dust: #b5aa98;
  --oxblood: #8e2f2f;
  --ember: #b04a3a;
  --gold: #c9a227;
  --pale-gold: #e2c96a;
  --sage: #8fa578;
  --gunmetal: #3a4a58;
  --slate: #5d707f;
  --denim-light: #7b93ad;

  --slab: "LER Slab", "Rockwell", "Courier New", monospace;
  --sans: "LER Sans", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --k: 8; /* the mark's pixel scale */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--cream);
  font: 16px/26px var(--sans);
  -webkit-font-smoothing: none;
  font-synthesis: none;
  overflow-x: hidden;
  /* The bench's pencil grid. */
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--shadow) 1px, transparent 1px),
    linear-gradient(90deg, var(--shadow) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
img,
canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
}
a {
  color: var(--pale-gold);
}
:focus-visible {
  outline: 3px solid var(--pale-gold);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--slab);
  font-weight: 400;
  text-wrap: balance;
}
.wrap {
  max-width: 1152px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 16px/18px var(--sans);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--pale-gold);
}
.eyebrow img {
  width: 24px;
  height: 24px;
}
.no-js .js-only {
  display: none;
}

/* ---------------------------------------------------------------- bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ink);
  border-bottom: 3px solid var(--leather);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font: 24px/24px var(--slab);
  letter-spacing: 2px;
}
.brand img {
  width: 48px;
  height: 48px;
}
.bar nav {
  display: flex;
  gap: 4px;
}
.bar nav a {
  font: 24px/24px var(--slab);
  color: var(--parchment);
  text-decoration: none;
  padding: 8px 10px 6px;
}
.bar nav a:hover {
  color: var(--pale-gold);
}
@media (max-width: 520px) {
  .brand span {
    display: none;
  }
}

/* --------------------------------------------------------------- hero */

.hero {
  padding-block: 64px 80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 32px 64px;
}
.drum-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  width: calc(48px * var(--k));
  max-width: 100%;
}
/* A lamp on the bench: hard rings of lamplight, no blur. */
.drum-halo {
  position: absolute;
  inset: -40px -40px auto;
  aspect-ratio: 1;
  background: repeating-radial-gradient(circle, rgba(201, 162, 39, 0.1) 0 24px, rgba(201, 162, 39, 0.05) 24px 48px);
  -webkit-mask: radial-gradient(circle, #000 0 40%, transparent 70%);
  mask: radial-gradient(circle, #000 0 40%, transparent 70%);
  pointer-events: none;
}
.drum-button {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  width: calc(48px * var(--k));
  height: calc(48px * var(--k));
  filter: drop-shadow(0 calc(1px * var(--k)) 0 var(--ink));
}
.drum-button img,
.drum-button canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.js .drum-still {
  visibility: hidden;
}
.no-js .drum {
  display: none;
}
.hero-copy {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.hero h1 {
  font-size: 60px;
  line-height: 64px;
  color: var(--cream);
  text-shadow: 0 6px 0 var(--ink);
}
.lede {
  max-width: 28em;
  font-size: 24px;
  line-height: 34px;
  color: var(--parchment);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

@media (max-width: 1060px) {
  :root {
    --k: 6;
  }
  .hero h1 {
    font-size: 48px;
    line-height: 52px;
  }
}
@media (max-width: 820px) {
  .hero {
    padding-block: 40px 56px;
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .hero-copy {
    justify-items: center;
  }
  .hero-copy .eyebrow {
    justify-content: center;
  }
  .actions {
    justify-content: center;
  }
}
@media (max-width: 420px) {
  :root {
    --k: 5;
  }
  .hero h1 {
    font-size: 36px;
    line-height: 40px;
  }
  .lede {
    font-size: 16px;
    line-height: 26px;
  }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 24px/24px var(--slab);
  padding: 14px 20px 12px;
  color: var(--ink);
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 var(--pale-gold), 0 6px 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms steps(2, end), box-shadow 80ms steps(2, end), background 80ms;
}
.btn:hover {
  background: var(--pale-gold);
  transform: translateY(-2px);
  box-shadow: inset 0 3px 0 var(--cream), 0 8px 0 var(--ink);
}
.btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 3px 0 var(--pale-gold), 0 2px 0 var(--ink);
}
.btn.ghost {
  color: var(--cream);
  background: var(--shadow);
  border-color: var(--cream);
  box-shadow: 0 6px 0 var(--ink);
}
.btn.ghost:hover {
  background: var(--leather);
}
.note {
  font: 700 16px/18px var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dust);
}

/* ------------------------------------------------------------ sections */

.games {
  padding-block: 72px;
  border-top: 3px solid var(--leather);
}
.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-size: 48px;
  line-height: 52px;
}
@media (max-width: 520px) {
  .section-head h2 {
    font-size: 36px;
    line-height: 40px;
  }
}

/* The loaded chamber: Let 'er Ride. */
.game {
  background: var(--shadow);
  border: 3px solid var(--leather);
  box-shadow: 0 0 0 3px var(--ink), 0 9px 0 3px var(--ink);
}
.game-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-bottom: 3px solid var(--leather);
}
.game-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 40px;
  padding: 32px clamp(16px, 4vw, 40px) 40px;
}
.game-copy {
  display: grid;
  gap: 20px;
  align-content: start;
}
.game-copy h3 {
  line-height: 0;
}
.game-logo {
  width: 320px;
  height: 96px;
}
.game-copy p {
  color: var(--parchment);
  max-width: 34em;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  font: 24px/24px var(--slab);
  padding: 6px 12px 4px;
  color: var(--parchment);
  border: 2px solid var(--saddle);
  background: var(--ink);
}
.game-clip {
  margin: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}
.game-clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 3px solid var(--ink);
}
.game-clip figcaption {
  color: var(--dust);
}
@media (max-width: 860px) {
  .game-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The five empty chambers. */
.empties {
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: 56px;
  text-align: center;
}
.chambers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chambers li {
  display: grid;
  justify-items: center;
  gap: 8px;
  font: 24px/24px var(--slab);
  color: var(--dust);
}
.chambers img {
  width: 96px;
  height: 96px;
}
.empties-line {
  font: 24px/32px var(--slab);
  color: var(--parchment);
  max-width: 30em;
}
@media (max-width: 520px) {
  .chambers {
    gap: 10px;
  }
  .chambers img {
    width: 56px;
    height: 56px;
  }
  .empties-line {
    font: 16px/24px var(--sans);
  }
}

/* -------------------------------------------------------------- footer */

.foot {
  padding-block: 32px calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--leather);
  border-top: 3px solid var(--ink);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.foot-copy {
  display: grid;
  gap: 6px;
  color: var(--parchment);
}
.fine {
  color: var(--dust);
  max-width: 40em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .btn:hover,
  .btn:active {
    transition: none;
    transform: none;
  }
}
