/* Monsters & Meaning encounters — isolated from the page, cabinet and Passport. */
.mme-encounter-layer {
  position: fixed;
  z-index: 780;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

body.menu-open .mme-encounter-layer {
  opacity: 0;
  visibility: hidden;
}

.mme-encounter-status {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mme-peripheral {
  --mme-peripheral-y: 48%;
  position: absolute;
  top: var(--mme-peripheral-y);
  width: clamp(145px, 16vw, 235px);
  height: clamp(300px, 47vh, 490px);
  opacity: 0;
  filter: blur(.2px);
  transform: translateY(-50%);
  visibility: hidden;
}

.mme-peripheral::before,
.mme-peripheral::after {
  position: absolute;
  content: "";
}

.mme-peripheral::before {
  inset: 0;
  border-radius: 51% 49% 14% 11% / 19% 18% 8% 7%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(6, 5, 9, .99) 0 21%, transparent 22%),
    radial-gradient(ellipse at 50% 70%, rgba(4, 4, 7, .98) 0 46%, transparent 47%);
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, .95));
}

.mme-peripheral::after {
  width: 120%;
  height: 38%;
  left: -10%;
  bottom: -7%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .88), transparent 70%);
  filter: blur(13px);
}

.mme-peripheral.is-left {
  left: 0;
  transform: translate(-72%, -50%);
}

.mme-peripheral.is-right {
  right: 0;
  transform: translate(72%, -50%);
}

.mme-peripheral.is-seen {
  visibility: visible;
  animation: mme-peripheral-left 4.7s cubic-bezier(.24, .77, .2, 1) both;
}

.mme-peripheral.is-right.is-seen {
  animation-name: mme-peripheral-right;
}

.mme-peripheral-eyes {
  position: absolute;
  z-index: 3;
  top: 17%;
  left: 50%;
  width: 64px;
  height: 15px;
  transform: translateX(-50%);
}

.mme-peripheral-eyes i,
.mme-card-eyes i {
  position: absolute;
  top: 0;
  left: auto;
  right: auto;
  width: 19px;
  height: 7px;
  margin: 0;
  border-radius: 80% 15% 80% 15%;
  background: #e6975d;
  box-shadow: 0 0 7px #d54d2f, 0 0 18px rgba(222, 80, 43, .85), 0 0 35px rgba(190, 43, 31, .5);
  animation: none;
}

.mme-peripheral-eyes i:first-child,
.mme-card-eyes i:first-child {
  left: 0;
  transform: rotate(10deg);
}

.mme-peripheral-eyes i:last-child,
.mme-card-eyes i:last-child {
  right: 0;
  transform: scaleX(-1) rotate(10deg);
}

.mme-breach {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background: rgba(1, 2, 5, .86);
}

.mme-breach::before,
.mme-breach::after {
  position: absolute;
  inset: -8%;
  content: "";
}

.mme-breach::before {
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 66% 18%, transparent 0 7%, rgba(0, 0, 0, .08) 18%, rgba(0, 0, 0, .88) 61%),
    url("../images/monsters-meaning-hero.webp") 67% 18% / cover no-repeat;
  filter: saturate(.55) contrast(1.45) brightness(.42);
  transform: scale(1.34) translate3d(7%, -3%, 0);
}

.mme-breach::after {
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(circle at 67% 20%, rgba(206, 82, 43, .17), transparent 11%),
    radial-gradient(ellipse at center, transparent 18%, rgba(0, 0, 0, .86) 82%);
}

.mme-breach.is-active {
  visibility: visible;
  animation: mme-breach-veil 3.2s ease-in-out both;
}

.mme-breach.is-active::before {
  animation: mme-breach-lunge 3.2s cubic-bezier(.15, .74, .24, 1) both;
}

.mme-jump-monster {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 51%;
  width: auto;
  height: min(116vh, 1180px);
  max-width: none;
  opacity: 0;
  filter: drop-shadow(0 25px 45px rgba(0, 0, 0, .9)) drop-shadow(0 0 32px rgba(187, 61, 31, .28));
  transform: translate(-50%, -50%) scale(.12) translateY(34vh);
  transform-origin: 50% 36%;
  will-change: transform, opacity, filter;
}

.mme-breach.is-active .mme-jump-monster {
  animation: mme-monster-lunge 3.2s cubic-bezier(.14, .77, .2, 1) both;
}

.mme-breach-eyes {
  position: absolute;
  z-index: 3;
  top: 19.5%;
  left: 66.8%;
  width: clamp(70px, 8vw, 125px);
  height: 20px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.mme-breach-eyes i {
  position: absolute;
  width: 32%;
  height: 8px;
  border-radius: 70% 10% 70% 10%;
  background: #f2a260;
  box-shadow: 0 0 9px #df4d2e, 0 0 24px #a52025, 0 0 52px rgba(199, 38, 33, .8);
}

.mme-breach-eyes i:first-child { left: 0; transform: rotate(8deg); }
.mme-breach-eyes i:last-child { right: 0; transform: scaleX(-1) rotate(8deg); }
.mme-breach.is-active .mme-breach-eyes { animation: mme-breach-eyes 1.32s ease-in-out both; }

.mme-encounter-whisper {
  position: absolute;
  left: 50%;
  bottom: 9vh;
  z-index: 5;
  opacity: 0;
  color: #efcfaa;
  font: italic clamp(18px, 2vw, 27px)/1.3 Georgia, "Times New Roman", serif;
  letter-spacing: .04em;
  text-shadow: 0 2px 18px #000, 0 0 30px rgba(193, 65, 39, .55);
  transform: translate(-50%, 15px);
  white-space: nowrap;
}

.mme-encounter-whisper.is-speaking {
  animation: mme-whisper 3.8s ease both;
}

.monster-compass.mme-is-wakeable {
  cursor: pointer;
  outline: none;
}

.monster-compass.mme-is-wakeable::after {
  position: absolute;
  left: 50%;
  bottom: -52px;
  content: "Touch the unknown";
  color: rgba(222, 160, 104, .7);
  font: 700 9px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: color .25s ease, text-shadow .25s ease;
}

.monster-compass.mme-is-wakeable:hover::after,
.monster-compass.mme-is-wakeable:focus-visible::after {
  color: #efbd88;
  text-shadow: 0 0 17px rgba(216, 91, 50, .7);
}

.monster-compass.mme-is-wakeable:focus-visible {
  outline: 1px solid rgba(232, 167, 103, .7);
  outline-offset: 14px;
  border-radius: 50%;
}

.mme-card-eyes {
  position: absolute;
  z-index: 5;
  top: 40%;
  left: 50%;
  width: 55px;
  height: 10px;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.shadow-card.mme-wakeable {
  cursor: pointer;
  outline: none;
}

.shadow-card.mme-wakeable:focus-visible {
  outline: 1px solid rgba(232, 154, 88, .78);
  outline-offset: 4px;
}

.shadow-card.mme-awake {
  animation: mme-card-startle .68s cubic-bezier(.23, .77, .23, 1) both;
}

.shadow-card.mme-awake .mme-card-eyes {
  animation: mme-card-eyes 1.65s ease both;
}

body.mme-encounter-active {
  cursor: default;
}

@keyframes mme-peripheral-left {
  0% { opacity: 0; transform: translate(-78%, -50%); }
  10% { opacity: .92; transform: translate(-38%, -50%); }
  77% { opacity: .88; transform: translate(-33%, -50%); }
  89% { opacity: .38; }
  100% { opacity: 0; transform: translate(-88%, -50%); }
}

@keyframes mme-peripheral-right {
  0% { opacity: 0; transform: translate(78%, -50%); }
  10% { opacity: .92; transform: translate(38%, -50%); }
  77% { opacity: .88; transform: translate(33%, -50%); }
  89% { opacity: .38; }
  100% { opacity: 0; transform: translate(88%, -50%); }
}

@keyframes mme-breach-veil {
  0%, 100% { opacity: 0; }
  5% { opacity: .24; }
  13%, 82% { opacity: 1; }
  92% { opacity: .7; }
}

@keyframes mme-breach-lunge {
  0% { opacity: 0; transform: scale(1.35) translate3d(9%, -3%, 0); }
  12% { opacity: .55; }
  25% { opacity: .92; transform: scale(1.07) translate3d(1.5%, 0, 0); }
  80% { opacity: .92; transform: scale(1.015) translate3d(0, 0, 0); }
  100% { opacity: 0; transform: scale(.98) translate3d(-1%, 0, 0); }
}

@keyframes mme-monster-lunge {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(.12) translateY(34vh); filter: blur(6px) brightness(.42); }
  8% { opacity: .2; }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) translateY(0); filter: blur(0) brightness(1.14); }
  29% { opacity: 1; transform: translate(-50%, -50%) scale(.98) translateY(0); filter: blur(0) brightness(1); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1.01) translateY(-.5vh); filter: blur(0) brightness(1); }
  84% { opacity: .96; transform: translate(-50%, -50%) scale(1.07) translateY(-1vh); filter: blur(0) brightness(.92); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.22) translateY(-2vh); filter: blur(2px) brightness(.45); }
}

@keyframes mme-breach-eyes {
  0%, 15%, 100% { opacity: 0; }
  26%, 63% { opacity: 1; }
  70% { opacity: .18; }
}

@keyframes mme-whisper {
  0%, 100% { opacity: 0; transform: translate(-50%, 15px); }
  19%, 72% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes mme-card-startle {
  0%, 100% { transform: translateY(0); }
  22% { transform: translate(-3px, -2px); border-color: rgba(234, 134, 78, .75); }
  39% { transform: translate(3px, 1px); }
  56% { transform: translate(-1px, 0); }
}

@keyframes mme-card-eyes {
  0%, 12%, 100% { opacity: 0; }
  22%, 65% { opacity: 1; }
  73% { opacity: .08; }
  79% { opacity: .9; }
}

@media (max-width: 900px) {
  .mme-breach::before { background-position: 72% 20%; }
  .mme-breach-eyes { left: 71%; top: 21%; }
  .mme-encounter-whisper { width: calc(100% - 44px); text-align: center; white-space: normal; }
}

@media (max-width: 620px) {
  .mme-peripheral { width: 125px; height: 300px; }
  .mme-breach::before { inset: -4% -30%; background-position: 69% 20%; }
  .mme-breach-eyes { left: 69%; top: 21%; width: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .mme-breach { display: none !important; }
  .mme-peripheral.is-seen,
  .mme-peripheral.is-right.is-seen {
    visibility: visible;
    animation: mme-reduced-sighting 2.5s ease both;
  }
  .shadow-card.mme-awake { animation: none; }
  .shadow-card.mme-awake .mme-card-eyes { animation: mme-reduced-sighting 2s ease both; }
}

@keyframes mme-reduced-sighting {
  0%, 100% { opacity: 0; }
  25%, 72% { opacity: .8; }
}

@media (forced-colors: active) {
  .mme-encounter-layer { display: none; }
  .monster-compass.mme-is-wakeable:focus-visible,
  .shadow-card.mme-wakeable:focus-visible { outline: 2px solid CanvasText; }
}
