/* =========================================================
   MoonCat character
   ========================================================= */
.cat {
  position: absolute;
  inset: 0;
  z-index: var(--z-cat);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(3%) scale(0.98);
  transition: opacity 900ms var(--ease-out), transform 1200ms var(--ease-out);
}
.cat.is-ready { opacity: 1; transform: none; }

.cat__rig { position: absolute; inset: 0; }

.cat__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cat__body { transform-origin: 50% 92%; will-change: transform; }
.cat__head { position: absolute; inset: 0; will-change: transform; }
.cat__head .cat__layer { z-index: 2; }

/* ---------- Eyes ---------- */
.cat__eye {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background: #1c2a10;
}

/* Iris + pupil move together; the iris is oversized so edges never show. */
.cat__iris {
  position: absolute;
  left: 50%; top: 50%;
  width: 170%;
  aspect-ratio: 1;
  margin-left: -85%;
  margin-top: -85%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    #d7ef9a 0%,
    #b4d97a 18%,
    #8fbf55 31%,
    #5f8a30 42%,
    #34501a 52%,
    #1c2a10 64%);
  will-change: transform;
}
.cat__pupil {
  position: absolute;
  left: 50%; top: 50%;
  width: 35%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 46% 44%, #141414 0%, #050505 55%, #000 100%);
  box-shadow: 0 0 0 1.5px rgb(30 50 10 / 0.7);
}
.cat__glint {
  position: absolute;
  left: 41%; top: 41%;
  width: 6%;
  aspect-ratio: 1.3;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  filter: blur(0.4px);
  box-shadow: 8px 6px 0 -3px rgb(255 255 255 / 0.35);
}

/* Shadow cast by the upper lid + glassy reflection. */
.cat__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.75) 0%, rgb(0 0 0 / 0.25) 30%, transparent 55%),
    linear-gradient(0deg, rgb(0 0 0 / 0.35) 0%, transparent 30%),
    radial-gradient(ellipse at 70% 78%, rgb(210 255 160 / 0.18), transparent 45%);
  pointer-events: none;
}

/* Eyelid for blinking — fur-coloured, closes from the top. */
.cat__lid {
  position: absolute;
  inset: -4% 0 0 0;
  transform: scaleY(0);
  transform-origin: 50% 0;
  background: linear-gradient(180deg, #2a272c 0%, #1f1d22 70%, #151317 100%);
  border-bottom: 1px solid #0a090b;
  will-change: transform;
}

/* Fallback when artwork can't load */
.cat-stage--fallback::after {
  content: "";
  position: absolute;
  inset: 0;
}
