/* Dead Dice website. The look is the game's (src/app/ui/theme.css): dark teal panels, 2px frames with pixel notches,
   no rounded corners, chunky buttons, crisp pixel art. Colours come from store/brand.json (build.mjs fills them in);
   url()s are repo paths, published by the build. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/pixelify-sans-latin.woff2?v=63df77cc") format("woff2");
  font-weight: 400 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;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/pixelify-sans-latin-ext.woff2?v=089e3b44") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Pixel Square";
  src: url("assets/fonts/geist-pixel-square.woff2?v=2105f292") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tiny5";
  src: url("assets/fonts/tiny5-latin.woff2?v=0d6c45e0") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Tiny5";
  src: url("assets/fonts/tiny5-latin-ext.woff2?v=eb6423dc") format("woff2");
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+A720-A7FF;
}

:root {
  --bg: #1d2226;
  --panel: #232c2d;
  --line: #5e5b4e;
  --text: #f0d8bb;
  --text-soft: #d7c3a1;
  --gold: #b18857;
  --gold-bright: #dcae5c;
  --curse: #a878d8;
  --moon: #f1e3a6;
  --danger: #ec7f72;
  --panel-hi: #2e3838;
  --panel-deep: #1a2426;
  --line-dark: #121819;
  --line-hi: #6f6a58;
  --text-muted: #9a8e78;
  --primary: #7e6042;
  --primary-hi: #a67b4c;
  --primary-lo: #4d3824;
  --primary-edge: #2e2014;
  --secondary: #4a5e6e;
  --secondary-hi: #6c8294;
  --secondary-lo: #2f3c47;
  --secondary-edge: #1a232b;
  --die: #edd8b7;
  --die-edge: #c9ae86;
  --die-ink: #1f2527;
  --void: #0d1112;

  /* Pixelify Sans closes its lowercase "c" at 21-24px (theme.css, .btn): display sizes skip that range. */
  --font-display: "Pixelify Sans", ui-monospace, Menlo, monospace;
  --font-body: "Geist Pixel Square", ui-monospace, Menlo, monospace;
  --font-tiny: "Tiny5", var(--font-display);

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 40rem;

  /* 1px outer notch at each corner: a pixel-art corner (theme.css). */
  --notch: polygon(
    -1px 1px, 1px 1px, 1px -1px,
    calc(100% - 1px) -1px, calc(100% - 1px) 1px, calc(100% + 1px) 1px,
    calc(100% + 1px) calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) calc(100% + 1px),
    1px calc(100% + 1px), 1px calc(100% - 1px), -1px calc(100% - 1px)
  );
}

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

html {
  background: var(--void);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.6 var(--font-body);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* Pixelify Sans at bold sets "fi" so tight it reads as "A": display text keeps 1px between letters, as the game's
   buttons do. */
h1,
h2,
h3,
.sign,
.end-tags,
.card span,
.boss strong,
.faq-item summary,
.topbar-nav,
.footer-nav {
  letter-spacing: 1px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold-bright);
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

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

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

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

strong {
  color: var(--moon);
  font-weight: normal;
}

mark.blank {
  padding: 0 4px;
  background: transparent;
  color: var(--danger);
  outline: 2px dashed var(--danger);
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--panel);
  color: var(--text);
}

.skip:focus {
  top: 8px;
}

/* --- The game's frames --------------------------------------------------------------------------------------- */

.panel {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow:
    0 0 0 1px var(--line-dark),
    inset 0 0 0 1px var(--line-dark),
    inset 0 2px 0 1px var(--panel-hi);
  clip-path: var(--notch);
}

.btn {
  --btn-face: var(--primary);
  --btn-hi: var(--primary-hi);
  --btn-lo: var(--primary-lo);
  --btn-edge: var(--primary-edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 24px 12px;
  font: 700 25px/1.1 var(--font-display);
  letter-spacing: 1px;
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 2px 0 rgb(0 0 0 / 0.35);
  background: var(--btn-face);
  border: 2px solid var(--btn-edge);
  box-shadow:
    0 0 0 1px var(--line-dark),
    inset 0 0 0 2px var(--btn-hi),
    inset 0 0 0 3px var(--btn-lo),
    inset 0 -5px 0 3px var(--btn-lo);
  clip-path: var(--notch);
  cursor: pointer;
}

.btn:hover {
  color: var(--moon);
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 0 0 1px var(--line-dark),
    inset 0 0 0 2px var(--btn-lo),
    inset 0 3px 0 2px var(--btn-lo);
}

.btn-secondary {
  --btn-face: var(--secondary);
  --btn-hi: var(--secondary-hi);
  --btn-lo: var(--secondary-lo);
  --btn-edge: var(--secondary-edge);
  min-height: 52px;
  font-size: 20px;
}

.btn.is-soon {
  cursor: default;
}

.btn.is-soon:active {
  transform: none;
}

.btn-icon {
  flex: none;
  width: 24px;
  height: 24px;
}

/* --- Gus ----------------------------------------------------------------------------------------------------- */

.gus {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  max-width: 36rem;
}

.gus-who {
  flex: none;
  display: grid;
  justify-items: center;
}

.gus-portrait {
  width: 128px;
  height: 128px;
  background: var(--panel-deep);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark);
}

.gus-name {
  margin-top: -12px;
  padding: 2px 10px 3px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 1px var(--line-dark);
  font: 12px/1 var(--font-tiny);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.gus-talk {
  flex: 1;
  display: grid;
  gap: 12px;
  margin: 0;
}

.gus-bubble {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  background: var(--die);
  color: var(--die-ink);
  border: 2px solid var(--die-edge);
  box-shadow: 0 0 0 2px var(--line-dark), 0 6px 0 0 rgb(0 0 0 / 0.35);
  font-size: 17px;
  line-height: 1.5;
}

/* The tail points at Gus from the first bubble. */
.gus-bubble:first-child::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 22px;
  width: 14px;
  height: 14px;
  background: var(--die);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.gus-bubble a {
  color: var(--primary-lo);
}

/* --- Top bar and footer ------------------------------------------------------------------------------------- */

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
}

.topbar-logo-img {
  width: 195px;
  height: auto;
}

.topbar-nav {
  display: flex;
  gap: 12px;
  font: 700 18px/1 var(--font-display);
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 2px 0 var(--void);
}

.topbar-nav a:hover,
.topbar-nav a[aria-current] {
  color: var(--gold-bright);
}

.footer {
  border-top: 2px solid var(--line);
  box-shadow: 0 -1px 0 var(--line-dark);
  background: var(--void);
  padding: 40px var(--gutter) 48px;
}

.footer-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  width: 150px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  font: 700 18px/1 var(--font-display);
}

.footer-nav a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--gold-bright);
}

.footer-small {
  margin: 0;
  max-width: 44rem;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.footer-small a {
  color: var(--text-soft);
}

/* --- Document pages (support, privacy, terms, 404) ---------------------------------------------------------- */

.page-doc main {
  padding: 104px var(--gutter) 72px;
  background: linear-gradient(var(--void), var(--bg) 320px);
}

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 48px) 40px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow:
    0 0 0 1px var(--line-dark),
    inset 0 0 0 1px var(--line-dark),
    inset 0 2px 0 1px var(--panel-hi);
  clip-path: var(--notch);
}

.doc h1 {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gold);
  font-size: clamp(32px, 6vw, 44px);
}

.doc h2 {
  margin: 32px 0 8px;
  font-size: 26px;
}

.doc ul {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.doc li::marker {
  color: var(--gold);
}

.doc-lead {
  font-size: 19px;
  color: var(--text-soft);
}

.doc-note {
  padding: 10px 14px;
  background: var(--panel-deep);
  border-left: 4px solid var(--curse);
  color: var(--text-soft);
  font-size: 15px;
}

.faq-item {
  border-top: 2px solid var(--panel-hi);
}

.faq-item:last-child {
  border-bottom: 2px solid var(--panel-hi);
}

.faq-item summary {
  position: relative;
  padding: 16px 36px 16px 0;
  font: 700 20px/1.3 var(--font-display);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 28px;
  color: var(--gold);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--gold-bright);
}

.faq-item p {
  color: var(--text-soft);
}

.doc-center {
  text-align: center;
}

.doc-center .gus {
  margin: 32px auto;
  text-align: left;
}

.doc-other {
  font-size: 15px;
}

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }

  .topbar-logo-img {
    width: 137px;
  }

  .page-doc main {
    padding: 84px 0 0;
  }

  .doc {
    border-width: 2px 0;
    clip-path: none;
  }

}

@media print {
  html,
  body,
  .doc {
    background: #fff;
    color: #000;
    box-shadow: none;
    border: 0;
  }

  .topbar,
  .footer {
    display: none;
  }
}

/* === The home page: the trip down ============================================================================ */

.page-home .topbar-logo {
  visibility: hidden;
}

/* --- The header: the key art, and the release loop over it once it plays. Both cover the screen. --- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: 1100px;
  overflow: hidden;
  background: var(--void);
}

.hero-media,
.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-poster,
.hero-video {
  object-fit: cover;
  object-position: 50% 40%;
  /* The key art is drawn for 1920 px: shrunk, it scales smoothly rather than dropping pixel rows. */
  image-rendering: auto;
}

.hero-video {
  opacity: 0;
  transition: opacity 0.4s;
}

.hero-video.is-playing {
  opacity: 1;
}

/* Portrait: the art first, the words under it, over the dark the art fades into. */
@media (max-aspect-ratio: 4/5) {
  .hero {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero-media {
    position: relative;
    height: min(78svh, 135vw);
  }

  .hero-poster,
  .hero-video {
    object-position: 50% 12%;
  }
}

/* Words over the art: on the left on wide screens, at the bottom in portrait. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(13 17 18 / 0.88) 0%, rgb(13 17 18 / 0.55) 30%, transparent 55%),
    linear-gradient(transparent 70%, var(--void));
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: max(var(--gutter), 6cqw);
  top: 50%;
  transform: translateY(-46%);
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: min(36rem, 44cqw);
}

.hero-logo {
  margin: 0 0 6px;
}

.hero-logo-img {
  width: min(390px, 100%);
  height: auto;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.45));
}

.hero-tagline {
  margin: 0;
  font: 700 32px/1.15 var(--font-display);
  color: var(--text);
  text-shadow: 0 3px 0 var(--void);
}

.hero-line {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--text);
  text-shadow: 0 2px 0 var(--void);
}

@media (max-aspect-ratio: 4/5) {
  .hero::after {
    background: linear-gradient(transparent 40%, rgb(13 17 18 / 0.8) 58%, var(--void) 70%);
  }

  .hero-copy {
    position: relative;
    inset: auto;
    margin-top: -26vw;
    padding: 0 var(--gutter) 40px;
    transform: none;
    justify-items: center;
    max-width: none;
    text-align: center;
  }

  .hero-actions {
    display: grid;
    width: min(100%, 360px);
  }

  .hero-actions > * {
    width: 100%;
  }

  .hero-logo-img {
    width: min(292px, 72vw);
  }

  .hero-tagline {
    font-size: 26px;
  }

  .hero-line {
    font-size: 16px;
  }
}

/* The store button: gold, the one thing to press. */
.btn-store {
  --btn-face: var(--gold);
  --btn-hi: var(--gold-bright);
  --btn-lo: #7e6042;
  --btn-edge: #2e2014;
  margin: 0;
  color: #1d1408;
  text-shadow: 0 1px 0 rgb(255 240 200 / 0.4);
}

.btn-store:hover {
  color: #1d1408;
}

.btn-store .btn-icon {
  width: 20px;
  height: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: inherit;
}

.btn-watch {
  min-height: 60px;
}

/* --- The trailer and the store's shots: the release kit, right under the header ------------------------------- */

.showcase {
  display: grid;
  justify-items: center;
  gap: 40px;
  padding: 16px var(--gutter) 88px;
  background: linear-gradient(var(--void), var(--bg));
}

.film {
  width: min(100%, 960px);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark), 0 12px 0 rgb(0 0 0 / 0.4);
  clip-path: var(--notch);
  background: #000;
}

.film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.shots {
  display: flex;
  gap: 16px;
  width: min(100%, 1180px);
  margin: 0;
  padding: 4px 4px 16px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line) transparent;
}

.shots li {
  flex: none;
  width: 64vw;
  max-width: 270px;
  scroll-snap-align: center;
}

/* Wide screens see all eight at once, four by two. */
@media (min-width: 1000px) {
  .shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: min(100%, 1040px);
    overflow: visible;
  }

  .shots li {
    width: auto;
    max-width: none;
  }
}

.shots img {
  width: 100%;
  height: auto;
  image-rendering: auto;
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark);
}

/* --- The descent: a rope down the left, one band per place ------------------------------------------------------- */

.page-home {
  background: var(--void);
}

/* The rope runs over the bands and under their signs. */
.descent {
  --rope-x: clamp(20px, 4vw, 56px);
  position: relative;
}

.descent::before {
  content: "";
  position: absolute;
  top: -40px;
  bottom: 120px;
  z-index: 1;
  left: var(--rope-x);
  width: 10px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.35), transparent 30%, transparent 70%, rgb(0 0 0 / 0.45)),
    repeating-linear-gradient(160deg, #c99a5b 0 4px, #9c6c38 4px 8px, #6f4a22 8px 10px);
  box-shadow: 0 0 0 2px var(--line-dark);
}

.band {
  position: relative;
  padding: 112px var(--gutter) 88px calc(var(--rope-x) + 72px);
  overflow: hidden;
  background: linear-gradient(var(--band-top, var(--bg)), var(--band-bottom, var(--void)));
}

/* It gets darker on the way down. */
.band-village { --band-top: #22302c; --band-bottom: #1c2526; }
.band-dice { --band-top: #1c2526; --band-bottom: #192122; }
.band-monsters { --band-top: #192122; --band-bottom: #171e20; }
.band-choices { --band-top: #171e20; --band-bottom: #151b1d; }
.band-home { --band-top: #151b1d; --band-bottom: #13181a; }
.band-death { --band-top: #13181a; --band-bottom: #111517; }
.band-bottom { --band-top: #111517; --band-bottom: var(--void); }

/* A wooden sign hanging off the rope: where you are. */
.sign {
  position: absolute;
  z-index: 2;
  top: 56px;
  left: calc(var(--rope-x) - 18px);
  padding: 8px 18px 10px;
  font: 700 26px/1 var(--font-display);
  color: var(--text);
  text-shadow: 0 2px 0 rgb(0 0 0 / 0.5);
  background: #6b4627;
  border: 2px solid #2e1d0e;
  box-shadow:
    0 0 0 1px var(--line-dark),
    inset 0 0 0 2px #87603a,
    inset 0 -4px 0 2px #4f331b,
    0 6px 0 rgb(0 0 0 / 0.4);
  clip-path: var(--notch);
}

.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
}

.band-stage {
  display: grid;
  justify-items: center;
  gap: 24px;
}

.band-talk .gus {
  max-width: 34rem;
}

/* Sprites: the game's pixel art at whole multiples of its size. */
.sprite-hero,
.sprite-enemy {
  width: 128px;
  height: 128px;
}

.sprite-boss {
  width: 128px;
  height: 128px;
}

.crew {
  display: flex;
  gap: 8px;
  justify-self: end;
}

.crew .sprite-enemy {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.4));
}

/* A window onto a place: the backdrop at exactly 2x, never stretched. */
.scene {
  width: min(100%, var(--art-w));
  height: 312px;
  background: var(--art) 50% 86% / var(--art-w) auto no-repeat;
  image-rendering: pixelated;
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark), 0 10px 0 rgb(0 0 0 / 0.35);
  clip-path: var(--notch);
}

/* A real screen of the game in a phone. */
.phone {
  width: min(300px, 80vw);
  padding: 12px 8px;
  background: #0b0e0f;
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark), inset 0 0 0 2px #22292b, 0 12px 0 rgb(0 0 0 / 0.35);
  clip-path: var(--notch);
}

.phone-screen {
  width: 100%;
  height: auto;
  image-rendering: auto;
}

/* Pixel art drawn at 1:1 is the only kind left to scale up; photos of screens scale smoothly. */

/* The dice: cream squares edged in the hero's colour, the side's icon and its number, like in a fight. */
.tray {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.party {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-die {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.hero-die .sprite-hero {
  width: 96px;
  height: 96px;
  margin-bottom: -6px;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.4));
}

.hero-grey { --hero: #9aa3ad; }
.hero-orange { --hero: #e07a2a; }
.hero-yellow { --hero: #e8c547; }
.hero-red { --hero: #d04040; }
.hero-blue { --hero: #3f6fd0; }

.die {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  background: var(--die);
  border: 4px solid var(--hero);
  box-shadow: 0 0 0 2px var(--line-dark), inset 0 -4px 0 #d6bf98, 0 6px 0 rgb(0 0 0 / 0.4);
}

.die-icon {
  width: 48px;
  height: 48px;
}

.die-pips {
  position: absolute;
  right: 6px;
  bottom: 0;
  font: 700 28px/1 var(--font-display);
  color: var(--die-ink);
}

.die-marks {
  position: absolute;
  left: 4px;
  top: 4px;
  display: flex;
  gap: 2px;
}

.die-marks img {
  width: 16px;
  height: 16px;
}

.die.is-rolling {
  animation: roll 0.42s steps(6);
}

@keyframes roll {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-18px) rotate(-8deg); }
  60% { transform: translateY(-6px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0); }
}

.hero-name {
  font: 12px/1.2 var(--font-tiny);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
}

.roll {
  min-width: 200px;
}

/* The game's path cards. */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: grid;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 2px var(--line-dark), 0 8px 0 rgb(0 0 0 / 0.35);
  clip-path: var(--notch);
}

.card-img {
  width: 176px;
  height: 128px;
}

.band-home .card-img {
  width: 264px;
  height: 192px;
}

.card span {
  padding: 8px 10px 10px;
  text-align: center;
  font: 700 20px/1 var(--font-display);
  color: var(--text);
  border-top: 2px solid var(--line);
}

/* The crypt's bestiary: the bosses, their story when you point at one. */
.bestiary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}

.boss {
  position: relative;
  display: grid;
  justify-items: center;
  margin: 0;
  outline: none;
}

.boss .sprite-boss {
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.45));
}

.boss figcaption {
  display: grid;
  justify-items: center;
  text-align: center;
}

.boss strong {
  padding: 2px 8px 4px;
  background: rgb(13 17 18 / 0.75);
  font: 700 18px/1.2 var(--font-display);
  color: var(--text);
}

.boss figcaption span {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(100% - 8px);
  width: 15rem;
  padding: 10px 12px;
  transform: translateX(-50%);
  background: var(--die);
  color: var(--die-ink);
  border: 2px solid var(--die-edge);
  box-shadow: 0 0 0 2px var(--line-dark);
  font-size: 15px;
  line-height: 1.4;
  visibility: hidden;
}

.boss:hover figcaption span,
.boss:focus-visible figcaption span,
.boss:focus figcaption span {
  visibility: visible;
}

.boss:focus-visible .sprite-boss {
  outline: 2px solid var(--moon);
  outline-offset: 4px;
}

/* The bottom: the Sleeper's eyes, cut from the key art, and the four final enemies as shadows. */
.sleeper {
  width: 371px;
  height: 160px;
  max-width: 100%;
  background: var(--eyes) -1080px -948px / 2112px auto no-repeat;
  image-rendering: pixelated;
}

.finales {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.finale {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
}

.sprite-finale {
  width: 128px;
  height: 128px;
  filter: brightness(0) drop-shadow(2px 0 0 #a878d8) drop-shadow(-2px 0 0 #a878d8) drop-shadow(0 2px 0 #a878d8) drop-shadow(0 -2px 0 #a878d8);
}

.finale figcaption {
  padding: 3px 10px 4px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 1px var(--line-dark);
  font: 12px/1 var(--font-tiny);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--curse);
}

/* --- The end: the free trips and the button ------------------------------------------------------------------- */

.band-end {
  padding: 96px var(--gutter) 120px;
  background: radial-gradient(ellipse at 50% 30%, #1b1a2a 0%, var(--void) 70%);
}

.end {
  display: grid;
  justify-items: center;
  gap: 22px;
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.page-home .footer-logo {
  display: none;
}

.end-logo {
  width: min(292px, 70vw);
  height: auto;
}

.end-title {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text);
}

.end-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.end-tags li {
  padding: 6px 14px 8px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 0 0 1px var(--line-dark), inset 0 2px 0 var(--panel-hi);
  clip-path: var(--notch);
  font: 700 18px/1.1 var(--font-display);
  color: var(--gold-bright);
}

/* --- Narrow screens: one column, the rope to the edge ------------------------------------------------------------ */

@media (max-width: 900px) {
  .band {
    padding: 104px var(--gutter) 72px calc(var(--rope-x) + 28px);
  }

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

  .band-talk {
    order: -1;
  }

  .sign {
    top: 40px;
    font-size: 20px;
  }

  .bestiary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .descent {
    --rope-x: 10px;
  }

  .descent::before {
    width: 6px;
  }

  .band {
    padding-right: 14px;
    padding-left: 30px;
  }

  .gus {
    column-gap: 10px;
  }

  .gus-portrait {
    width: 64px;
    height: 64px;
  }

  .gus-bubble {
    padding: 10px 12px;
    font-size: 15px;
  }

  .gus-bubble:first-child::before {
    top: 14px;
  }

  .sign {
    left: 2px;
  }

  .hero-die .sprite-hero {
    width: 64px;
    height: 64px;
  }

  .party {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .hero-die {
    width: 58px;
  }

  .hero-name {
    font-size: 9px;
  }

  .die {
    width: 54px;
    height: 54px;
    border-width: 3px;
  }

  .btn {
    font-size: 18px;
    padding: 8px 14px 12px;
    white-space: nowrap;
  }

  .die-icon {
    width: 32px;
    height: 32px;
  }

  .die-pips {
    right: 3px;
    font-size: 20px;
  }

  .die-marks img {
    width: 8px;
    height: 8px;
  }

  .card-img,
  .band-home .card-img {
    width: 132px;
    height: 96px;
  }

  .card span {
    font-size: 16px;
  }

  .crew .sprite-enemy {
    width: 64px;
    height: 64px;
  }

  .sprite-boss,
  .sprite-finale {
    width: 96px;
    height: 96px;
  }

  .sleeper {
    width: 260px;
    height: 112px;
    background-position: -756px -664px;
    background-size: 1478px auto;
  }

  .boss figcaption span {
    width: 12rem;
  }
}
