:root {
  /* all lifted straight from the logo */
  --red: #e62c35;      /* the field */
  --shadow: #af0e12;   /* the egg's shadow */
  --ink: #000;         /* the line work */
  --shell: #f4f2f3;    /* the egg */
  --white: #fefefe;    /* eye whites */

  --font: "M PLUS Rounded 1c", ui-rounded, "Hiragino Maru Gothic ProN", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--red);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--red);
  text-align: center;
}

main { flex: 1; }

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

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(1.5rem, 5vh, 4rem) 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.egg {
  position: relative;
  /* about half the viewport tall, never wider than the screen allows */
  width: min(78vw, clamp(170px, 36.7vh, 352px));
  aspect-ratio: 705 / 1000;
}

.egg img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  /* the image is transparent where the eye whites are; the eyes below show through */
  user-select: none;
  -webkit-user-drag: none;
}

.eye {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 2px var(--white);
}

.eye-left  { left: 17.642%; top: 34.979%; width: 9.804%;  height: 9.24%; }
.eye-right { left: 39.651%; top: 37.37%;  width: 11.52%;  height: 8.722%; }

.pupil {
  position: absolute;
  top: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
}

/* resting gaze matches the drawing: both pupils sit a touch left of center */
.eye-left .pupil  { width: 43.75%; left: calc(50% - 5.58%); }
.eye-right .pupil { width: 40.96%; left: calc(50% - 3.21%); }

h1 {
  margin-top: clamp(0.75rem, 2.5vh, 1.5rem);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.tagline {
  margin-top: 0.6rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.35;
  text-wrap: balance;
}

.socials {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  font-weight: 800;
  font-size: 1.0625rem;
}

.socials a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.socials a:hover { color: var(--white); }

/* ---------- games ---------- */

.games {
  margin: clamp(3.5rem, 9vh, 6rem) auto 0;
  padding: 0 16px;
  max-width: calc(560px + 32px);
}

h2 {
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.game {
  /* room for the napping cat to sit on top of the screenshot */
  margin-top: 5rem;
}

.shot {
  position: relative;
}

.shot a { display: block; }

.shot-img {
  width: 100%;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  background: #7fa8f5;
}

.napper {
  position: absolute;
  right: 9%;
  bottom: 100%;
  margin-bottom: -2px; /* tuck the cat's belly onto the frame */
  /* he can be picked up (napper.js): a press on him is a grab, not a scroll or an image drag */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.napper img {
  width: 144px;
  height: 128px;
  image-rendering: pixelated;
  -webkit-user-drag: none;
}

h3 {
  margin-top: 1.75rem;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
}

.game p {
  margin: 0.5rem auto 0;
  max-width: 34em;
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.game-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.presskit {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.presskit:hover { color: var(--white); }

.steam {
  display: inline-block;
  padding: 0.8em 1.5em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--shell);
  font-weight: 800;
  text-decoration: none;
}

.steam:hover { box-shadow: 4px 4px 0 var(--shadow); transform: translate(-2px, -2px); }
.steam:active { box-shadow: none; transform: none; }

/* ---------- footer ---------- */

footer {
  padding: clamp(4rem, 10vh, 6rem) 16px 2rem;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .napper img { width: 108px; height: 96px; } /* 1.5x still lands on whole pixels at 2x DPR */
  .shot-img { box-shadow: 6px 6px 0 var(--shadow); }
}
