/* Original Red Reaper mascots: decorative signatures, separate from the RR logo. */
.rrm-mascot-host {
  isolation: isolate;
  position: relative;
}

.rrm-mascot {
  --rrm-mascot-flip: 1;
  -webkit-mask-image: var(--rrm-mascot-image);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  animation: none;
  aspect-ratio: 1;
  background-color: currentColor;
  color: #fff;
  display: block;
  height: auto;
  mask-image: var(--rrm-mascot-image);
  mask-mode: alpha;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  opacity: .05;
  pointer-events: none;
  position: absolute;
  transition: none;
  transform: scaleX(var(--rrm-mascot-flip));
  user-select: none;
  -webkit-user-select: none;
  width: 120px;
  z-index: -1;
}

.rrm-mascot--mirrored {
  --rrm-mascot-flip: -1;
}

/* Clip the artwork within its own visual sections, never across forms or the page. */
.rrm-hero.rrm-mascot-host,
.rrm-final.rrm-mascot-host,
.rrm-mascot-page-host {
  overflow: clip;
}

.rrm-hero > .rrm-mascot--hero {
  opacity: .055;
  right: var(--rrm-gutter);
  top: clamp(160px, 18vh, 220px);
  transform: scaleX(var(--rrm-mascot-flip));
  width: clamp(350px, 36vw, 550px);
  z-index: 0;
}

.rrm-card > .rrm-mascot--card {
  opacity: .05;
  right: 20px;
  top: 72px;
  width: 190px;
}

.rrm-card-red > .rrm-mascot--card {
  color: #000;
  opacity: .10;
}

/* These selectors override the existing generic relative-position child rules. */
.rrm-terminal-screen > .rrm-mascot--terminal {
  opacity: .055;
  position: absolute;
  right: 12px;
  top: 34px;
  width: 180px;
}

.rrm-final > .rrm-mascot--final {
  opacity: .09;
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%) scaleX(var(--rrm-mascot-flip));
  width: 300px;
}

body.rr-modern-active .rr-page .rrm-mascot-page-host > .rrm-mascot--page {
  color: #fff;
  max-width: calc(100% - 32px);
  opacity: .05;
  position: absolute;
  right: clamp(16px, 5vw, 72px);
  top: 28px;
  width: 230px;
  z-index: 0;
}

/* The signature below the footer logo is in the normal document flow. */
.rrm-mascot--footer,
body.rr-modern-active .rr-site-footer .rrm-mascot--footer {
  color: #fff;
  height: 36px;
  margin-top: 18px;
  opacity: .45;
  position: static;
  width: 36px;
  z-index: auto;
}

/* Keep the preview footer's original 42px mark and 14px logo gap. */
.rrm-footer-brand.rrm-mascot-host {
  align-content: start;
  align-items: start;
  column-gap: 14px;
  display: grid;
  grid-template-columns: 42px max-content;
  row-gap: 0;
}

.rrm-footer-brand > .rrm-mascot--footer {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .rrm-hero > .rrm-mascot--hero {
    right: 5%;
    top: 180px;
    transform: scaleX(var(--rrm-mascot-flip));
    width: 360px;
  }
}

@media (max-width: 680px) {
  .rrm-hero > .rrm-mascot--hero {
    opacity: .035;
    right: 0;
    top: 140px;
    width: 260px;
  }

  .rrm-card > .rrm-mascot--card {
    right: 16px;
    top: 65px;
    width: 150px;
  }

  .rrm-terminal-screen > .rrm-mascot--terminal {
    right: 0;
    top: 20px;
    width: 150px;
  }

  .rrm-final > .rrm-mascot--final {
    opacity: .06;
    right: 0;
    width: 230px;
  }

  body.rr-modern-active .rr-page .rrm-mascot-page-host > .rrm-mascot--page {
    opacity: .04;
    right: 16px;
    top: 24px;
    width: 150px;
  }

  .rrm-mascot--footer,
  body.rr-modern-active .rr-site-footer .rrm-mascot--footer {
    height: 32px;
    width: 32px;
  }
}
