:root {
  --bg: #fbf6ec;
  --ink: #1f1d1a;
  --muted: #6b645a;
  --card: #fff;
  --line: #e7dcc8;
  --accent: #e2452b;
  --bubble: #fff;
  --halo: #f3e6cb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a;
    --ink: #f1ece2;
    --muted: #a59e92;
    --card: #222127;
    --line: #34323a;
    --accent: #f28c28;
    --bubble: #2b2a31;
    --halo: #e8dec8; /* a moon, so the black bird doesn't vanish into the night */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }

header { padding: 20px 24px; }
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.logo::after { content: "."; color: var(--accent); }

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  text-align: center;
}

.stage { position: relative; isolation: isolate; margin: 8px auto 4px; max-width: 360px; }
.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 56%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--halo);
  transform: translate(-50%, -50%);
}
.bird { width: 100%; height: auto; cursor: pointer; user-select: none; -webkit-user-drag: none; }
.stage.small { max-width: 260px; }
.stage.small .bird { cursor: default; }

/* comic speech bubble, pointing down-right at the hornbill's head */
.bubble {
  position: absolute;
  top: -6px;
  left: 0;
  max-width: 62%;
  margin: 0;
  padding: 10px 14px;
  background: var(--bubble);
  border: 3px solid var(--ink);
  border-radius: 18px;
  font: 700 17px/1.25 "Chalkboard SE", "Comic Sans MS", "Comic Neue", ui-rounded, cursive;
  text-align: left;
  box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 80% 100%;
  animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -15px;
  width: 18px;
  height: 18px;
  background: var(--bubble);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: skewX(35deg) rotate(45deg);
}
.bubble.pop { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }

h1 { margin: 12px 0 4px; font-size: clamp(30px, 7vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.lede { margin: 0 auto 24px; color: var(--muted); max-width: 30em; }

.fact {
  margin: 0 auto;
  max-width: 30em;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 15px;
  text-align: left;
}

footer { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .bubble, .bubble.pop { animation: none; } }
