:root {
  --ink: #34304a;
  --ink-soft: #5c5674;
  --paper: #f4efe4;
  --cream: #fffbea;
  --mint: #7ed6aa;
  --mint-deep: #3e9a72;
  --lilac: #c4b0ea;
  --line: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(196, 176, 234, 0.45), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(126, 214, 170, 0.35), transparent 26%),
    var(--paper);
  color: var(--ink);
  font: 18px/1.5 ui-rounded, "SF Pro Rounded", "Avenir Next", "Segoe UI", sans-serif;
}

img { max-width: 100%; }

a { color: inherit; }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand .mark {
  width: 36px;
  height: 36px;
  border: var(--line);
  border-radius: 10px;
  background: var(--cream) url("pets/dragon.png") 0 0 / 144px 180px no-repeat;
  box-shadow: 3px 3px 0 var(--ink);
  image-rendering: pixelated;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-weight: 700;
  font-size: 15px;
}

.nav-links a { text-decoration: none; }

.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: end;
  padding: 28px 0 12px;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 0; }

h1 { font-size: clamp(46px, 7vw, 76px); }

.lede {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 16px 0 0;
}

.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.button {
  display: inline-block;
  border: var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--mint);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-decoration: none;
}

.button.quiet { background: var(--cream); }

.desk {
  position: relative;
  min-height: 360px;
  border: var(--line);
  border-radius: 28px;
  background:
    linear-gradient(#efe7d4, #efe7d4) 0 78% / 100% 22% no-repeat,
    var(--cream);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bubble {
  position: absolute;
  top: 28px;
  left: 24px;
  right: 24px;
  max-width: 280px;
  margin: 0;
  padding: 14px 16px;
  border: var(--line);
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(52, 48, 74, 0.18);
  font-weight: 700;
}

.pets-on-desk {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  height: 150px;
}

.sprite {
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
  background-size: 160px 200px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sprite.walk {
  animation: walk 0.55s steps(4) infinite;
}

@keyframes walk {
  from { background-position: 0 -40px; }
  to { background-position: -160px -40px; }
}

.stand {
  position: absolute;
  bottom: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.stand span {
  font-size: 12px;
  font-weight: 800;
}

.stand .sprite { transform: scale(var(--s)); transform-origin: bottom center; }

section { padding: 54px 0; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

h2 { font-size: clamp(32px, 4vw, 46px); }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
}

.card h3 { font-size: 22px; margin-bottom: 8px; }

.card p { margin: 0; color: var(--ink-soft); }

.phrases {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.phrases li {
  margin-top: 6px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
}

.card .again { margin-top: 12px; }

.card.wide { grid-column: span 2; background: #fff; }

.card.mint { background: var(--mint); }
.card.lilac { background: var(--lilac); }

.roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pet-card {
  border: var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 12px 12px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.pet-card .stage {
  height: 108px;
  display: grid;
  align-items: end;
  justify-items: center;
}

.pet-card .sprite { transform: scale(var(--s)); transform-origin: bottom center; }

.pet-card strong { font-size: 16px; }

.pet-card em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}

.keys {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.key-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.key {
  border: var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.key b { display: block; font-size: 18px; }
.key span { color: var(--ink-soft); font-size: 14px; font-weight: 700; }

.note {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--cream);
  padding: 18px;
  box-shadow: var(--shadow);
}

.note p { margin: 8px 0 0; }

footer {
  padding: 10px 0 36px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero, .features, .roster, .keys, .key-list { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: span 2; }
  .desk { min-height: 320px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero, .features, .roster, .keys, .key-list { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .section-title { flex-direction: column; align-items: start; }
  .actions { flex-direction: column; align-items: stretch; }
  .button { text-align: center; }
  h1 { font-size: 40px; }
}
