:root {
  color-scheme: dark;
  --bg: #0d1118;
  --ink: #f4efe7;
  --muted: rgba(244, 239, 231, 0.68);
  --dim: rgba(244, 239, 231, 0.42);
  --gold: #d7b46a;
  --rose: #bb6f77;
  --teal: #6db7b5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(109, 183, 181, 0.16), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(187, 111, 119, 0.16), transparent 30%),
    linear-gradient(180deg, #111724 0%, #0d1118 58%, #090b10 100%);
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  animation: twinkle 3.2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.16;
    transform: scale(0.72);
  }
  to {
    opacity: 0.78;
    transform: scale(1.18);
  }
}

.scene {
  width: min(760px, 100%);
  position: relative;
  z-index: 1;
  text-align: center;
}

.brand {
  width: fit-content;
  margin: 0 auto 18px;
  padding: 8px 14px;
  border: 1px solid rgba(215, 180, 106, 0.34);
  border-radius: 999px;
  color: rgba(244, 239, 231, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cat-button {
  width: min(620px, 96vw);
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  filter: drop-shadow(0 32px 80px rgba(0, 0, 0, 0.48));
}

.cat-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 8px;
  border-radius: 20px;
}

.desk {
  width: 100%;
  display: block;
}

.code-lines rect {
  fill: var(--teal);
  opacity: 0.24;
}

.keys rect {
  fill: #35374b;
  opacity: 0.56;
}

.body {
  transform-origin: 260px 324px;
  animation: breathe 3.2s ease-in-out infinite;
}

.tail {
  transform-origin: 322px 314px;
  animation: tail-sleep 4.6s ease-in-out infinite;
}

.eyes-open {
  opacity: 0;
  transition: opacity 180ms ease;
}

.eyes-closed {
  opacity: 1;
  transition: opacity 180ms ease;
}

.pupil {
  transition: transform 120ms ease-out;
}

.zzz text {
  fill: rgba(215, 180, 106, 0.72);
  font: 700 22px ui-sans-serif, system-ui, sans-serif;
  animation: float-up 3.2s ease-in-out infinite;
}

.zzz text:nth-child(2) {
  animation-delay: 0.8s;
}

.zzz text:nth-child(3) {
  animation-delay: 1.6s;
}

.awake .body {
  animation: none;
}

.awake .tail {
  animation: tail-awake 1.35s ease-in-out infinite;
}

.awake .eyes-open {
  opacity: 1;
}

.awake .eyes-closed,
.awake .zzz {
  opacity: 0;
}

@keyframes breathe {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.035);
  }
}

@keyframes tail-sleep {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-3deg);
  }
}

@keyframes tail-awake {
  0%,
  100% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(5deg);
  }
  70% {
    transform: rotate(-5deg);
  }
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translate(0, 8px) scale(0.75);
  }
  18% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
    transform: translate(12px, -36px) scale(1.1);
  }
}

.copy {
  max-width: 620px;
  margin: 12px auto 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.14rem);
  line-height: 1.7;
}

.status {
  display: block;
  min-height: 1.4em;
  margin-top: 22px;
  color: var(--dim);
  font-size: 0.92rem;
}

@media (max-width: 520px) {
  .page {
    padding: 22px 14px;
  }

  .brand {
    margin-bottom: 10px;
    font-size: 0.68rem;
  }

  .cat-button {
    width: 104vw;
    margin-left: -2vw;
  }

  .copy {
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
