:root {
  --paper: #fff8ec;
  --ink: #1d1a2f;
  --line: #1d1a2f;
  --shadow: 6px 6px 0 var(--line);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background-color: var(--paper);
  background-image: radial-gradient(#1d1a2f14 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */
.top {
  text-align: center;
  padding: 44px 16px 10px;
}

.logo {
  margin: 0;
  font-family: "Bungee", "Fredoka", sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .25em;
  letter-spacing: .02em;
}

.logo-word {
  color: #fff;
  -webkit-text-stroke: 3px var(--line);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--line);
}
.logo-word:first-child { color: #4cc9f0; }
.logo-word:last-child  { color: #ff5d8f; }

.logo-joy {
  font-size: .8em;
  display: inline-block;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-8px) rotate(8deg); }
}

.tagline {
  margin: 14px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: .75;
}

/* ---------- grid ---------- */
main { flex: 1; }

.grid {
  list-style: none;
  margin: 0 auto;
  padding: 28px 24px 56px;
  max-width: 1260px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  aspect-ratio: 8 / 3;
  padding: 14px 20px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--bg, #fff);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

a.card:hover,
a.card:focus-visible {
  transform: translate(-3px, -3px) rotate(var(--tilt, -1deg));
  box-shadow: 9px 9px 0 var(--line);
  outline: none;
}

a.card:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--line);
}

a.card:focus-visible { outline: 3px dashed var(--line); outline-offset: 5px; }

.card.has-img { padding: 0; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-icon {
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
  filter: drop-shadow(2px 2px 0 #0002);
  transition: transform .2s ease;
}
a.card:hover .card-icon { transform: scale(1.15) rotate(-10deg); }

.card-title {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  line-height: 1.05;
  text-align: center;
}

/* title fonts */
.f-chunky .card-title { font-family: "Bungee", sans-serif; }
.f-round  .card-title { font-family: "Fredoka", sans-serif; font-weight: 700; }
.f-serif  .card-title { font-family: "Fraunces", Georgia, serif; }
.f-pixel  .card-title { font-family: "Press Start 2P", monospace; font-size: clamp(1rem, 2.2vw, 1.35rem); line-height: 1.4; }
.f-hand   .card-title { font-family: "Caveat Brush", cursive; font-size: clamp(2rem, 4.4vw, 2.8rem); }

.sticker {
  position: absolute;
  top: 10px;
  right: -30px;
  transform: rotate(35deg);
  background: #ff5d8f;
  color: #fff;
  font-family: "Bungee", sans-serif;
  font-size: .8rem;
  padding: 4px 34px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

/* coming soon slots */
.card.soon {
  flex-direction: column;
  gap: 4px;
  border-style: dashed;
  box-shadow: none;
  opacity: .85;
}
.soon-q {
  font-family: "Bungee", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  opacity: .45;
}
.soon-text {
  font-weight: 600;
  font-size: .95rem;
  opacity: .6;
  text-transform: lowercase;
}

/* ---------- footer ---------- */
.foot {
  text-align: center;
  padding: 18px 16px 28px;
  font-weight: 600;
  opacity: .6;
}
.foot p { margin: 0; }

.noscript { text-align: center; font-weight: 600; }

@media (max-width: 520px) {
  .grid { padding: 20px 16px 40px; gap: 20px; grid-template-columns: 1fr; }
  .logo-word { -webkit-text-stroke-width: 2px; text-shadow: 3px 3px 0 var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-joy { animation: none; }
  .card, .card-icon { transition: none; }
}
