:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #999999;
  --pink: #e58bb0;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(2rem, 6vw, 5rem) 1.5rem;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--pink);
}

/* ---- Desktop: player on the left, static logo in the negative space at right ---- */
.stage-desktop {
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
}

/* Crop the player gif's empty right side, then center the visible sketch */
.stage-desktop .player-wrap {
  width: clamp(320px, 46vw, 640px);
  overflow: hidden;
  line-height: 0;
}

.stage-desktop .player {
  width: 140.8%; /* show the left ~71% — the sketch — and clip the right negative space */
  max-width: none;
  display: block;
}

/* ---- Mobile: single centered element, tap to swap gifs ---- */
.stage-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stage-mobile .frame {
  display: none;
}

.stage-mobile .frame.is-active {
  display: block;
}

/* Wordmark: crop the gif's asymmetric whitespace so the mark centers, ~10% larger.
   Content spans 17.4%–58.6% of the gif (center 38%); window 10.5%–65.5% gives
   symmetric margins so the mark sits dead-center. */
.stage-mobile .frame-wordmark {
  width: min(56vw, 380px);
  overflow: hidden;
  line-height: 0;
  transform: translateX(-3vw); /* nudge slightly left of center */
}

.stage-mobile .frame-wordmark img {
  width: 181.8%; /* show a 55% window of the gif width */
  max-width: none;
  margin-left: -19.1%; /* slide window start to gif 10.5% */
  display: block;
}

/* Player: crop the gif's right negative space, then center the visible sketch */
.stage-mobile .frame-player {
  width: 92vw;
  overflow: hidden;
  line-height: 0;
}

.stage-mobile .frame-player img {
  width: 140.8%; /* show the left ~71% — the sketch — and clip the negative space */
  max-width: none;
  display: block;
}

/* Contact link: Minion Pro serif, no frame.
   Desktop: always shown below the images.
   Mobile: hidden on the wordmark landing, shown only on the player screen. */
.contact {
  display: none;
  font-family: "Minion Pro", Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--pink);
  text-decoration: none;
}

.contact:hover {
  text-decoration: underline;
}

main.is-player .contact {
  display: inline-block;
}

/* Mobile: fill exactly the visible viewport (no scroll), keep content centered */
@media (max-width: 600px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }
  main {
    padding: 1rem;
  }
}

@media (min-width: 601px) {
  .stage-desktop {
    display: flex;
  }
  .stage-mobile {
    display: none;
  }
  .contact {
    display: inline-block;
  }
}
