:root {
  color-scheme: light;
  --ink: #262339;
  --page-blue: #25243c;
  --rule: #d7cfd2;
  --mono: "Courier New", monospace;
  --sans: "Trebuchet MS", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page-blue);
  color: #fff;
  font: 16px/1.45 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid #5895d9;
  outline-offset: 4px;
}
.mast,
.investments,
.site-footer {
  width: min(1160px, 90%);
  margin: auto;
}
.mast {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-star {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #333049;
  color: #cbdcfd;
  font:
    25px/1 Georgia,
    serif;
}
nav {
  display: flex;
  gap: clamp(15px, 3vw, 42px);
  font: 600 0.88rem var(--mono);
}
nav a:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero {
  background: var(--page-blue);
  color: #fff7f0;
}
.sky {
  position: relative;
  height: clamp(350px, 36vw, 500px);
  overflow: hidden;
  isolation: isolate;
  background: #4b406c url("/art/rooftops-night.png") center bottom/100% 100%
    no-repeat;
  image-rendering: pixelated;
}
:root[data-time="sunrise"] .sky {
  background-image: url("/art/rooftops-sunrise.png");
}
:root[data-time="day"] .sky {
  background-image: url("/art/rooftops-day.png");
}
:root[data-time="sunset"] .sky {
  background-image: url("/art/rooftops-sunset.png");
}
.lockup {
  position: absolute;
  top: 41%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.sign {
  --unit: clamp(7px, 0.9vw, 13px);
  display: flex;
  align-items: center;
  gap: var(--unit);
  margin: 0;
  padding: calc(var(--unit) * 1.4) calc(var(--unit) * 1.8);
  border: 3px solid #fff4ee;
  background: #25243b;
  box-shadow:
    0 0 0 4px #423957,
    6px 8px 0 2px #211f37;
  position: relative;
}
.glyph,
.slot {
  display: block;
  height: calc(var(--unit) * 7);
  position: relative;
}
.glyph {
  width: calc(var(--unit) * 5);
  background: center/100% 100% no-repeat;
  image-rendering: pixelated;
}
.e {
  background-image: url("/art/e.png");
}
.u {
  background-image: url("/art/u.png");
}
.m {
  width: calc(var(--unit) * 7);
  background-image: url("/art/m.png");
}
.productions {
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.36em;
  padding-left: 0.36em;
  font: bold clamp(12px, 1vw, 16px) var(--mono);
  letter-spacing: 0.36em;
  text-shadow: 1px 2px #423957;
}
.slot {
  overflow: hidden;
}
.m::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 32%;
  height: 25%;
  background: url("/art/blue-bow.png") center / contain no-repeat;
  image-rendering: pixelated;
}
:root:is([data-playing="loading"], [data-playing="true"]) .slot::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: var(--unit);
  background: #fff9fa;
  transform-origin: bottom;
}
.sky[data-pressed="true"] .slot::after {
  transform: scaleY(0.48);
}
:root:is([data-playing="loading"], [data-playing="true"]) .m {
  visibility: hidden;
}
:root[data-playing="reveal"] .m {
  animation: pop-letter 0.42s cubic-bezier(0.35, 0.08, 0.22, 1) both;
}
:root[data-playing="reveal"] .m::after {
  animation: ribbon-settle 0.2s ease-out 0.18s both;
}
@keyframes ribbon-settle {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pop-letter {
  0% {
    transform: translateY(96%);
  }
  72% {
    transform: translateY(-2%);
  }
  100% {
    transform: translateY(0);
  }
}
.sky {
  --sheet: url("/art/cat-poses.png");
}
.cat {
  position: absolute;
  top: 0;
  left: 0;
  width: 112px;
  height: 112px;
  transform-origin: 50% 100%;
  pointer-events: none;
  visibility: hidden;
}
:root:is([data-playing="true"], [data-playing="reveal"]) .cat {
  visibility: visible;
}
.sprite {
  width: 100%;
  height: 100%;
  background: var(--sheet) 0 0/600% 100% no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 1px #382d46);
}
.sign .perch {
  position: absolute;
  width: calc(var(--unit) * 6.8);
  height: calc(var(--unit) * 6.8);
  bottom: calc(100% - 1px);
  right: 0;
  background-position: 100% 0;
}
:root:is(
    [data-playing="loading"],
    [data-playing="true"],
    [data-playing="reveal"]
  )
  .perch {
  visibility: hidden;
}
.cat canvas {
  display: block;
  background: none;
}
.vase-scene {
  position: absolute;
  pointer-events: none;
  width: 64px;
  height: 86px;
  translate: -50% -100%;
  transform-origin: 50% 100%;
  image-rendering: pixelated;
}
.vase {
  position: absolute;
  inset: 0;
  background: url("/art/flower-vase.png") no-repeat;
  transform-origin: 39px 85px;
}
.loose-flower {
  position: absolute;
  left: 22.5px;
  top: 77px;
  width: 19px;
  height: 18px;
  background: url("/art/loose-poppy.png") no-repeat;
}

/* Each row contains one registered movement. Row zero moves only the eyelids.
   A blink takes 225ms; longer holds happen with open eyes or asleep. */
@media (prefers-reduced-motion: no-preference) {
  :root[data-playing="false"] .perch {
    background-image: url("/art/cat-perch.webp");
    background-size: 1300% 600%;
    transform-origin: center 96%;
    animation:
      perch-life 30s infinite,
      breathe 3.6s ease-in-out infinite;
  }
}
@keyframes breathe {
  50% {
    transform: scaleY(0.985);
  }
}
@keyframes perch-life {
  0%,
  8% {
    background-position: 0 0;
    animation-timing-function: steps(5, end);
  }
  8.25%,
  8.35% {
    background-position: 41.6667% 0;
    animation-timing-function: steps(5, end);
  }
  8.75%,
  19.999% {
    background-position: 0 0;
    animation-timing-function: step-end;
  }
  20% {
    background-position: 0 20%;
    animation-timing-function: steps(12, end);
  }
  21.8%,
  29% {
    background-position: 100% 20%;
    animation-timing-function: steps(12, end);
  }
  31%,
  38.999% {
    background-position: 0 20%;
    animation-timing-function: step-end;
  }
  39% {
    background-position: 0 0;
    animation-timing-function: steps(5, end);
  }
  39.25%,
  39.35% {
    background-position: 41.6667% 0;
    animation-timing-function: steps(5, end);
  }
  39.75%,
  47.999% {
    background-position: 0 0;
    animation-timing-function: step-end;
  }
  48% {
    background-position: 0 40%;
    animation-timing-function: steps(12, end);
  }
  50.4%,
  52.999% {
    background-position: 100% 40%;
    animation-timing-function: step-end;
  }
  53% {
    background-position: 0 60%;
    animation-timing-function: steps(12, end);
  }
  55.4%,
  79.999% {
    background-position: 100% 60%;
    animation-timing-function: step-end;
  }
  80% {
    background-position: 0 80%;
    animation-timing-function: steps(12, end);
  }
  83.2%,
  87.999% {
    background-position: 100% 80%;
    animation-timing-function: step-end;
  }
  88% {
    background-position: 0 100%;
    animation-timing-function: steps(12, end);
  }
  91%,
  100% {
    background-position: 100% 100%;
    animation-timing-function: step-end;
  }
}
.sky-traffic {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.flock,
.airplane {
  position: absolute;
  left: 0;
  opacity: 0;
}
.flock {
  top: 16%;
  width: 50px;
  height: 30px;
  animation: birds-cross 72s linear 8s infinite;
}
.flock i {
  position: absolute;
  top: 9px;
  width: 16px;
  height: 8px;
  background: url("/art/gull.png") 0 0 / 300% 100%;
  animation: flap 0.9s step-end infinite;
}
.flock i:nth-child(2) {
  left: 16px;
  top: 3px;
  animation-delay: -0.3s;
}
.flock i:last-child {
  left: 35px;
  top: 12px;
  animation-delay: -0.6s;
}
@keyframes flap {
  30% {
    background-position: 50% 0;
  }
  60% {
    background-position: 100% 0;
  }
}
@keyframes birds-cross {
  0% {
    left: -60px;
    opacity: 0.9;
  }
  10% {
    top: 10%;
  }
  22% {
    left: 102%;
    top: 17%;
    opacity: 0.9;
  }
  22.01%,
  100% {
    left: 102%;
    opacity: 0;
  }
}
.airplane {
  top: 12%;
  width: 27px;
  height: 13px;
  background: url("/art/plane.png") center / contain no-repeat;
  animation: plane-cross 102s linear 38s infinite;
}
@keyframes plane-cross {
  0% {
    left: 102%;
    opacity: 0.85;
  }
  22% {
    left: -40px;
    top: 7%;
    opacity: 0.85;
  }
  22.01%,
  100% {
    left: -40px;
    opacity: 0;
  }
}
:root[data-time="night"] .sky .flock {
  visibility: hidden;
}
/* Two short passes through different parts of the night sky, with quiet gaps. */
@media (prefers-reduced-motion: no-preference) {
  :root[data-time="night"] .sky-traffic::before,
  :root[data-time="night"] .sky-traffic::after {
    content: "";
    position: absolute;
    left: 32%;
    top: 5%;
    width: 3px;
    height: 3px;
    background: #fff9df;
    box-shadow:
      3px -1px #dde9ff,
      6px -2px #bacfee,
      9px -3px #95acd8,
      12px -4px #8193bc,
      15px -5px 0 -1px #7e8eb0,
      18px -6px 0 -1px #657596;
    opacity: 0;
    animation: shooting-star 57s linear 8s infinite;
  }
  :root[data-time="night"] .sky-traffic::after {
    left: 73%;
    top: 12%;
    animation-delay: 34s;
  }
}
@keyframes shooting-star {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  0.2% {
    opacity: 1;
  }
  1.1% {
    opacity: 0.9;
  }
  1.6%, 100% {
    transform: translate(-24vw, 8vw);
    opacity: 0;
  }
}
#replay-btn {
  position: absolute;
  bottom: 18px;
  right: 5%;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #b9a9c5;
  border-radius: 3px;
  color: #faf1f5;
  background: #28253e;
  font: 600 0.78rem var(--mono);
  cursor: pointer;
}
#replay-btn:hover {
  background: #443953;
}
#replay-btn span {
  font-size: 18px;
  line-height: 1;
}
.scene-bar {
  width: min(1160px, 90%);
  margin: auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.caption {
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  font-size: 0.98rem;
  color: #f4e7ee;
  text-align: center;
}
.caption span {
  color: #abbfec;
}
.investments {
  padding: clamp(35px, 5vw, 72px) 0;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 23px;
}
h2 {
  font:
    500 clamp(32px, 4vw, 58px) / 1.05 Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0;
}
.section-rule {
  height: 1px;
  background: var(--rule);
  flex: 1;
}
.investments-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.investment-card {
  color: var(--ink);
  padding: 22px 10px;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #cfc6ca;
  border-radius: 5px;
  background: #fffdf9;
  box-shadow: 0 3px 0 #e6dfe0;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.investment-card--active:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 0 #d5cddd;
  border-color: #8a7c9e;
}
.investment-card--stealth {
  background: transparent;
  border-style: dashed;
  color: #fff;
  box-shadow: none;
}
.card-title {
  margin: 0;
  font: 700 clamp(0.95rem, 1.3vw, 1.16rem) / 1.2 var(--sans);
  letter-spacing: -0.035em;
}
.card-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.site-footer {
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 23px 0 32px;
  font: 0.8rem var(--mono);
  color: #fff;
}
@media (max-width: 840px) {
  .investments-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sky {
    background-size: auto 100%;
  }
}
@media (max-width: 560px) {
  .mast {
    min-height: 58px;
  }
  .brand {
    font-size: 0.92rem;
    gap: 6px;
  }
  nav {
    font-size: 0.75rem;
    gap: 12px;
  }
  .sky {
    height: 350px;
    background-position: 63% bottom;
  }
  :root[data-time="sunrise"] .sky {
    background-position: 17% bottom;
  }
  .cat {
    width: 88px;
    height: 88px;
  }
  .investments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .investment-card {
    min-height: 80px;
  }
  .caption {
    font-size: 0.85rem;
  }
  #replay-btn {
    top: 12px;
    bottom: auto;
  }
  .site-footer {
    font-size: 0.71rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  #replay-btn {
    display: none;
  }
}
