@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/dm-serif-display-subset.woff") format("woff");
  font-display: swap;
}

/* Colors are the game's own Dusk and Daylight schemes, so the two sites read as one family. */
:root {
  --bg: #1e2947;
  --ink: #f4efe6;
  --muted: #b3bfdc;
  --accent: #f2b134;
  --on-accent: #2a1f1a;
  --roof: #4a3a38;
  --facade: #a85d44;
  --off: #27384d;
  --on: #ffd479;
  --trim: #d8c4a0;
  --edge: #7d4232;
  --ground: #3a3f57;
  --panel: rgba(244, 239, 230, 0.08);
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3ece0;
    --ink: #2a1f1a;
    --muted: #5e5146;
    --accent: #b8500a;
    --on-accent: #fff;
    --roof: #8a6a5a;
    --facade: #bd6a46;
    --off: #cfdfec;
    --on: #ffd479;
    --trim: #f0e4cc;
    --edge: #6e3320;
    --ground: #b8a98f;
    --panel: rgba(255, 255, 255, 0.5);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 1.125rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1,
h2 {
  font: 400 1rem/1.2 var(--serif);
  margin: 0;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

/* A light, see-through band across the top behind the studio name. It sits above the building, so the chimney smoke rises up behind it. */
header {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--panel);
  text-align: center;
}

h1 {
  /* Scales down so the name stays on one line on a phone. */
  font-size: clamp(2rem, 11vw, 3.5rem);
  text-wrap: balance;
}

/* The game: one big link. The building stands on a full-width street, as it does in the game. */
.game {
  width: fit-content;
  max-width: 100%;
  /* The side room shrinks with the screen; a fixed 5rem pushed the block off-center and made the page scroll sideways. */
  padding: 0 clamp(1rem, 8vw, 5rem) 2rem;
  /* Pulled up under the card above, so the smoke has the card to rise behind. */
  margin: -4.5rem auto 1.5rem;
  display: block;
  color: inherit;
  text-decoration: none;
}

.stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 6.5rem;
  border-bottom: 10px solid var(--ground);
}

.mark {
  display: block;
  width: min(18rem, 72vw);
  height: auto;
  overflow: visible;
}

.mark .roof {
  fill: var(--roof);
}

.mark .trim {
  fill: var(--trim);
}

.mark .edge {
  fill: var(--edge);
}

.mark .facade {
  fill: var(--facade);
  stroke: var(--edge);
  stroke-width: 1;
}

.mark .frame {
  fill: var(--trim);
  stroke: var(--edge);
  stroke-width: 1;
}

.mark .w {
  fill: var(--on);
  animation: light 1.6s ease-out backwards;
  animation-delay: calc(var(--i) * 0.15s);
}

.mark .w.off {
  fill: var(--off);
  animation: none;
  transition: fill 0.4s ease;
}

.game:hover .w.off,
.game:focus-visible .w.off {
  fill: var(--on);
}

@keyframes light {
  from {
    fill: var(--off);
  }
}

.smoke circle {
  fill: var(--muted);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: puff 5s linear infinite;
}

@keyframes puff {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }

  12% {
    opacity: 0.62;
  }

  100% {
    opacity: 0;
    transform: translate(14px, -44px) scale(3.5);
  }
}

.caption {
  padding: 1.75rem 1.5rem 0;
  text-align: center;
}

.caption h2 {
  font-size: clamp(2.5rem, 9vw, 3.5rem);
}

.caption p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: 0 3px 0 var(--edge);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.game:hover .cta {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--edge);
}

.game:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.about {
  margin-top: 0.25rem;
  padding: 0;
  text-align: center;
  color: var(--muted);
}

footer {
  margin-top: auto;
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .mark .w {
    animation: none;
  }

  .mark .w.off {
    transition: none;
  }

  .smoke circle {
    animation-play-state: paused;
  }

  .cta {
    transition: none;
  }
}
