:root {
  --cat-size: 400px;
  --easing-duration: 0.15s;
  --easing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.light-mode {
  --bg-color: #ffffff;
  --text-color: #000000;
  --spotlight-color-1: #1a9bf2;
  --spotlight-color-2: #d70036;
}

.dark-mode {
  --bg-color: #000000;
  --text-color: #ffffff;
  --spotlight-color-1: #207ebd;
  --spotlight-color-2: #25a558;
}


@media (prefers-reduced-motion: reduce) {
  :root {
    --easing-duration: 0s;
  }

  * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  user-select: none;
  transition: 0.6s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: "Permanent Marker", cursive;
  color: var(--text-color);
}

.spotlight {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0%);
  width: 100vw;
  height: 50vh;
  min-width: 800px;
  max-width: 1200px;
  background: radial-gradient(circle at 50% 70%, var(--spotlight-color-1) 0%, var(--spotlight-color-2) 70%);
  -webkit-mask: url("/images/spotlight.webp") no-repeat center / 100% 100%;
  mask: url("/images/spotlight.webp") no-repeat center / 100% 100%;
}

.cat-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--cat-size);
  height: var(--cat-size);
  z-index: 10;
  cursor: pointer;
}

.cat-head {
  position: relative;
  width: 100%;
  height: 100%;
}

.cat-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--easing-duration) var(--easing-function);
}

.cat-base {
  z-index: 1;
}

.cat-face {
  z-index: 2;
}

.cat-nose {
  z-index: 3;
}

.pupil-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  mask: url('images/pupil-mask.webp') no-repeat center / contain;
  -webkit-mask: url('images/pupil-mask.webp') no-repeat center / contain;
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  transition: transform var(--easing-duration) var(--easing-function);
}

.cat-pupils {
  z-index: 1;
}

.cat-pupil-mask {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --cat-size: 300px;
  }
}

@media (max-width: 480px) {
  :root {
    --cat-size: 250px;
  }
}

@media (max-height: 600px) {
  :root {
    --cat-size: 200px;
  }
}

.cat-layer {
  opacity: 0;
  animation: fadeIn 0.6s ease-in-out forwards;
}

.cat-layer:nth-child(1) {
  animation-delay: 0.1s;
}

.cat-layer:nth-child(2) {
  animation-delay: 0.2s;
}

.cat-layer:nth-child(3) {
  animation-delay: 0.3s;
}

.pupil-container .cat-layer:nth-child(1) {
  animation-delay: 0.1s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.text-sir-gibblets {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6.5rem;
  font-weight: bold;
  text-align: center;
  background: linear-gradient(90deg, var(--spotlight-color-1), var(--spotlight-color-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.08em;
  top: calc((100vh - var(--cat-size)) * 0.4);
  width: 100vw;
  transition: font-size 0.3s ease, transform 0.3s ease, opacity 1s ease, filter 0.6s ease;
  text-wrap: nowrap;
  opacity: 0;
  filter: blur(1.5rem);
}

.text-doesnt-like,
.text-your-face {
  position: absolute;
  bottom: calc(var(--cat-size) / 2);
  text-wrap: nowrap;
  transition: font-size 0.3s ease, left 0.3s ease, transform 0.3s ease, opacity 1s ease, filter 0.6s ease;
  font-size: 2.5rem;
  opacity: 0;
  filter: blur(1.5rem);
}

.text-doesnt-like {
  left: calc(50% - var(--cat-size) / 2 + 1rem);
  transform: translate(-100%, 50%);
}

.text-your-face {
  left: calc(50% + var(--cat-size) / 2 - 1rem);
  transform: translateY(50%);
}

.revealed {
  opacity: 1.0;
  filter: blur(0);
}

@media (max-width: 900px) {
  .text-sir-gibblets {
    font-size: 5rem;
  }

  .text-doesnt-like,
  .text-your-face {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .text-sir-gibblets {
    font-size: 3.5rem;
    transform: translate(calc(-50% - 0.1rem), calc(-50% - 4.2rem));
  }

  .text-doesnt-like,
  .text-your-face {
    position: absolute;
    bottom: unset;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    top: calc((100vh - var(--cat-size)) * 0.4);
    width: 100vw;
    text-align: center;
  }

  .text-doesnt-like {
    font-size: 3.1rem;
    font-weight: 100;
  }

  .text-your-face {
    font-size: 4rem;
    transform: translate(-50%, calc(-50% + 4rem));
  }
}