/* ============================================================
   Decorative sleeping cat - no functional purpose, purely for fun.
   Fully self-contained and safe to delete: remove this file, the
   <link> to it in templates/index.html, and the .catnap-widget
   markup block in that same file's footer, and it's gone with no
   trace left in the main stylesheet.
   All classes are prefixed catnap- so nothing here can collide
   with the site's real styles.
   ============================================================ */

.page {
    overflow: hidden;
}

.catnap-widget {
  --catnap-grey-base: #462a18;
  --catnap-grey-dark: #0E0800;
  --catnap-inner-ear: #956C54;
  --catnap-ink: #dfd9d5;
  --catnap-nose: #773F20;
  display: flex;
  justify-content: center;
  /* padding: 1.5rem 0 -0.5rem; */
  padding-bottom: 0%;
  margin-bottom: -3rem;
  transform: translateY(40px);
}

.catnap-cat {
  position: relative;
  width: 170px;
  height: 150px;
}

/* The body is a wide, flat-bottomed "loaf" shape instead of a sitting pose -
   this is the main silhouette change from the original cat. */
.catnap-body {
  background: var(--catnap-grey-base);
  width: 160px;
  height: 95px;
  border-radius: 50% 50% 40% 40% / 85% 85% 15% 15%;
  box-shadow: inset -16px -12px 0 -6px var(--catnap-grey-dark);
  position: absolute;
  bottom: 0;
  left: 5px;
}

.catnap-head {
  background: var(--catnap-grey-base);
  width: 95px;
  height: 85px;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 30px;
  z-index: 25;
  transform-origin: bottom center;
  animation: catnap-bob 4s ease-in-out infinite;
}

/* A gentle breathing scale instead of the original bounce. */
@keyframes catnap-bob {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.04, 0.96); }
}

.catnap-ears > div:nth-child(1),
.catnap-ears > div:nth-child(2) {
  position: absolute;
  top: -8px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 22px solid var(--catnap-grey-base);
}

.catnap-ears > div:nth-child(1) {
  left: 0px;
  transform: rotate(-30deg);
}

.catnap-ears > div:nth-child(2) {
  left: 60px;
  transform: rotate(30deg);
}

.catnap-ears > div:nth-child(1):before,
.catnap-ears > div:nth-child(2):before {
  content: '';
  position: absolute;
  top: 7px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid var(--catnap-inner-ear);
}

.catnap-sleep > div {
  position: absolute;
  top: -6px;
  right: 6px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--catnap-grey-dark);
  z-index: 30;
  opacity: 0;
}

.catnap-sleep > div:nth-child(1) { animation: catnap-zzz 4s 0.5s ease-in-out infinite; right: 34px; font-size: 1.4rem; }
.catnap-sleep > div:nth-child(2) { animation: catnap-zzz 4s 1.7s ease-in-out infinite; right: 18px; font-size: 1.3rem; }
.catnap-sleep > div:nth-child(4) { animation: catnap-zzz 4s 2.9s ease-in-out infinite; right: 40px; font-size: 1.2rem; }
.catnap-sleep > div:nth-child(5) { animation: catnap-zzz 4s 4.1s ease-in-out infinite; right: 10px; font-size: 1.9rem; }

@keyframes catnap-zzz {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(18px, -70px); opacity: 0; }
}

.catnap-face {
  display: flex;
  align-items: center;
  padding-top: 30px;
  height: 100%;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Closed, sleepy crescent eyes instead of the original almond shape. */
.catnap-eyes {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.catnap-eyes > div {
  height: 8px;
  width: 15px;
  background: transparent;
  border-bottom: 3px solid var(--catnap-ink);
  border-radius: 0 0 50% 50%;
  box-shadow: none;
  transform: none;
}

.catnap-nose {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.catnap-nose:before {
  content: '';
  height: 6px;
  width: 8px;
  background: var(--catnap-nose);
  border: none;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  margin-top: 2px;
  display: inline-block;
}

.catnap-mustache {
  width: 26px;
  position: absolute;
  top: 44px;
  left: -6px;
}

.catnap-mustache > div {
  height: 1px;
  width: 100%;
  background: var(--catnap-inner-ear);
  transform: none;
  margin-bottom: 5px;
}

.catnap-nose > div:nth-child(2) {
  transform: translateX(75px);
}

/* Tail is tucked into a small curled shape against the loaf rather than
   trailing out to the side. */
.catnap-tail {
  width: 46px;
  height: 24px;
  position: absolute;
  right: 6px;
  bottom: -2px;
  border-radius: 50%;
  background: var(--catnap-grey-dark);
  box-shadow: none;
  transform: rotate(-10deg);
}

.catnap-tail:after {
  content: none;
}
