:root {
  --ink: #111;
  --paper: #fbf8f3;
  --card: #fff;
  --rust: #af3d23;
  --ember: #eb9324;
  --muted: #5e5a55;
  --line: 3px;
  --shadow: 6px 6px 0 var(--ink);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Mulish", "Muli", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(17, 17, 17, .07) 1px, transparent 0) 0 0 / 22px 22px,
    var(--paper);
  line-height: 1.5;
}

a { color: var(--rust); }
a:hover { color: var(--ember); }

/* ---------- hero ---------- */
.hero {
  padding: clamp(40px, 8vw, 96px) 20px clamp(24px, 5vw, 56px);
}
.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 64px);
}
.face {
  flex: none;
  width: clamp(150px, 26vw, 240px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform .12s ease;
}
.face img { width: 100%; height: auto; display: block; border-radius: 50%; }
.face:hover { transform: rotate(-4deg) scale(1.03); }
.face:active { transform: scale(.94); }
.face:focus-visible { outline: 4px dashed var(--rust); outline-offset: 6px; }
.face.bonk { animation: bonk .25s ease; }
@keyframes bonk {
  40% { transform: scale(.9) rotate(6deg); }
  100% { transform: scale(1); }
}

.hero-text { min-width: 0; }
.wordmark { width: clamp(180px, 30vw, 265px); height: auto; display: block; }
.bubble {
  position: relative;
  margin: 18px 0 0;
  padding: 16px 20px;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 700;
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 3.6em;
}
/* Comic-style tail: a black triangle for the outline with a white one inside it.
   The white one also covers the bubble's border where the tail joins, so the
   tail opens into the bubble instead of sitting against a line. */
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
}
.bubble::before {
  left: -22px;
  margin-top: -13px;
  border-width: 13px 22px 13px 0;
  border-color: transparent var(--ink) transparent transparent;
}
.bubble::after {
  left: -16px;
  margin-top: -9px;
  border-width: 9px 16px 9px 0;
  border-color: transparent var(--card) transparent transparent;
}
.bubble .hot { color: var(--rust); }
.bubble s { color: var(--muted); }
.points {
  margin: 14px 0 0;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .85rem;
  animation: slideIn .4s ease;
}
.points span { color: var(--rust); font-size: 1.1rem; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } }

/* ---------- sections ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { margin: 32px 0 56px; }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  margin: 0 0 24px;
  text-align: center;
}
.section-title.small { font-size: 1.3rem; }
.squiggle {
  color: var(--rust);
  text-decoration: underline wavy var(--ember);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}

.grid {
  display: grid;
  /* fixed-width columns centered as a group, so 2 cards don't leave an empty 3rd column */
  grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
  justify-content: center;
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  color: inherit;
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}
.card:focus-visible { outline: 4px dashed var(--rust); outline-offset: 4px; }
.card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: var(--line) solid var(--ink);
  background: repeating-linear-gradient(-45deg, #f3ece2 0 14px, #ece3d6 14px 28px);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--rust);
}
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kind {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--ember);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.kind.app { background: #fff; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card h3 { margin: 0; font-size: 1.35rem; font-weight: 900; }
.status { font-size: .75rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.card p { margin: 10px 0 14px; color: #2b2926; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li { font-size: .75rem; padding: 2px 8px; border: 1.5px solid var(--ink); border-radius: 6px; }
.cta {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 900;
  padding: 8px 16px;
  background: var(--rust);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.card:hover .cta { background: var(--ink); }

.older {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.older a {
  display: block;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.older a:hover { background: var(--ink); color: #fff; }
.older small { display: block; font-weight: 400; color: var(--muted); }
.older a:hover small { color: #ddd; }

.footer {
  border-top: var(--line) solid var(--ink);
  padding: 22px 20px 32px;
  text-align: center;
  font-size: .95rem;
}
.footer .dot { margin: 0 8px; color: var(--rust); }

/* the 57 prize */
.confetti {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 14px;
  pointer-events: none;
  z-index: 50;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 640px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .wordmark { margin: 0 auto; }
  .bubble { margin: 18px auto 0; }
  /* tail points up at the face */
  .bubble::before {
    left: 50%; top: -22px; margin: 0 0 0 -13px;
    border-width: 0 13px 22px 13px;
    border-color: transparent transparent var(--ink) transparent;
  }
  .bubble::after {
    left: 50%; top: -16px; margin: 0 0 0 -9px;
    border-width: 0 9px 16px 9px;
    border-color: transparent transparent var(--card) transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
