/* Critter Jam site. Layout modelled on candycrushsaga.com (full-bleed key art, bold rounded title, big store badges, chunky
   rounded tiles) with the sticky-note support card of unpackinggame.com. Palette from the game (plum board background,
   six critter colors, cream tiles). Fonts self-hosted from Google Fonts (OFL, see fonts/OFL.txt). */
@font-face { font-family: "Lilita One"; src: url(/fonts/lilita-one-latin.woff2?v=9a95c766) format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(/fonts/fredoka-latin.woff2?v=9591efe1) format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --plum: #2a1446;
  --plum-2: #3d1f63;
  --grape: #6a3dc8;
  --berry: #d42f63;
  --tangerine: #ffa43a;
  --lemon: #ffd93d;
  --leaf: #3fae58;
  --sky: #2f7fe0;
  --rose: #ff6fa3;
  --cream: #fff7e8;
  --lilac: #f3e9ff;
  --ink: #2a1446;
  --ink-soft: #5d4a78;
  --display: "Lilita One", "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--lilac); color: var(--ink); font: 400 17px/1.55 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--grape); text-underline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wave { display: block; width: 100%; height: 48px; }
@media (min-width: 900px) { .wave { height: 80px; } }

/* ---------- header (all pages) ---------- */
.bar {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.bar.solid { position: relative; background: var(--plum); }
.brand {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: rgba(42, 20, 70, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; text-decoration: none; font: 400 19px/1 var(--display); letter-spacing: .3px;
}
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.bar nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; margin-left: 8px; padding: 8px 12px; border-radius: 999px;
  background: rgba(42, 20, 70, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--plum); }
.hero picture img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 700px) { .hero picture img { aspect-ratio: 3 / 2; max-height: 78vh; min-height: 420px; object-position: 50% 40%; } }
.hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; }

.intro { position: relative; z-index: 1; text-align: center; background: var(--lilac); padding: 1px 0 34px; } /* 1px top padding stops the icon margin from collapsing through */
.intro .icon {
  width: 112px; height: 112px; border-radius: 28px; margin: -60px auto 12px; position: relative; z-index: 2;
  border: 5px solid #fff; box-shadow: 0 14px 28px rgba(42, 20, 70, .35); transform: rotate(-4deg);
}
.title {
  margin: 0; font: 400 60px/1 var(--display); letter-spacing: .5px; color: var(--lemon);
  -webkit-text-stroke: 3px var(--plum); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--plum), 0 10px 18px rgba(42, 20, 70, .35);
}
.kicker { display: inline-block; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--grape); color: #fff; font-weight: 600; font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase; }
.lead { font: 600 21px/1.4 var(--body); max-width: 30em; margin: 14px auto 22px; color: var(--plum-2); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; min-width: 180px; height: 60px; padding: 0 18px;
  border-radius: 16px; background: #000; color: #fff; text-decoration: none; text-align: left;
  border: 2px solid #a6a6a6; box-shadow: 0 6px 0 rgba(42, 20, 70, .25); transition: transform .15s;
}
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 28px; height: 28px; flex: none; fill: #fff; }
.badge small { display: block; font: 500 11px/1.1 var(--body); letter-spacing: .2px; }
.badge b { display: block; font: 600 21px/1.1 var(--body); }
.soon { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); font-weight: 500; }

/* bouncing critters */
.critters { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 26px 0 0; }
.critters img { width: 50px; height: auto; animation: hop 2.4s ease-in-out infinite; }
.critters img:nth-child(2) { animation-delay: .2s; } .critters img:nth-child(3) { animation-delay: .4s; }
.critters img:nth-child(4) { animation-delay: .6s; } .critters img:nth-child(5) { animation-delay: .8s; }
.critters img:nth-child(6) { animation-delay: 1s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(-14px) scale(.94, 1.06); } 40% { transform: translateY(0) scale(1.08, .92); } }
@media (prefers-reduced-motion: reduce) { .critters img { animation: none; } html { scroll-behavior: auto; } }

/* ---------- features ---------- */
.features { background: var(--lilac); padding: 10px 0 40px; }
.h2 { font: 400 40px/1.05 var(--display); text-align: center; margin: 0 0 8px; color: var(--plum); letter-spacing: .3px; }
.h2-sub { text-align: center; color: var(--ink-soft); margin: 0 0 26px; font-weight: 500; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.tile {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 14px; border-radius: 28px; color: #fff;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .14), 0 10px 22px rgba(42, 20, 70, .14);
}
.tile img { width: 76px; height: 76px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18)); }
.tile h3 { margin: 0 0 2px; font: 400 23px/1.1 var(--display); letter-spacing: .3px; }
.tile p { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 500; opacity: .95; }
.t-berry { background: linear-gradient(160deg, #ec4f7f, var(--berry)); }
.t-tangerine { background: linear-gradient(160deg, #ffb75c, #f28a1c); }
.t-lemon { background: linear-gradient(160deg, #ffe46b, #f5c21b); color: var(--plum); }
.t-leaf { background: linear-gradient(160deg, #5cc873, var(--leaf)); }
.t-sky { background: linear-gradient(160deg, #4d98f0, var(--sky)); }
.t-grape { background: linear-gradient(160deg, #8a5ce0, var(--grape)); }
@media (min-width: 700px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tiles { grid-template-columns: 1fr 1fr 1fr; } .tile { flex-direction: column; text-align: center; padding: 26px 22px 24px; } .tile img { width: 96px; height: 96px; } }

/* ---------- screenshots ---------- */
.shots-sec { background: var(--plum); color: #fff; padding: 22px 0 30px; position: relative; }
.shots-sec .h2 { color: #fff; }
.shots-sec .h2-sub { color: #d9c8f2; }
.shots {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 16px 18px; margin: 0 -16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.phone { flex: 0 0 64%; max-width: 260px; margin: 0; scroll-snap-align: center; }
/* The frame keeps the screenshot's own ratio (430 x 932): only the width is set, height follows the image. */
.phone .frame { padding: 9px; border-radius: 38px; background: linear-gradient(145deg, #4b2f73, #1b0c30); box-shadow: 0 0 0 2px #6b4a99, 0 18px 36px rgba(0, 0, 0, .45); }
.phone img { width: 100%; height: auto; aspect-ratio: 430 / 932; border-radius: 30px; background: #3a2160; }
.phone figcaption { text-align: center; margin-top: 12px; font: 400 19px/1.2 var(--display); letter-spacing: .3px; color: var(--lemon); }
@media (min-width: 900px) { .shots { justify-content: center; overflow: visible; } .phone { flex: 0 0 230px; } .phone:nth-child(odd) { transform: translateY(18px) rotate(-2deg); } .phone:nth-child(even) { transform: rotate(2deg); } }

/* ---------- support sticky note ---------- */
.support-sec { background: var(--lilac); padding: 20px 0 50px; }
.note {
  position: relative; max-width: 560px; margin: 0 auto; padding: 30px 24px 26px; background: #fff3a8; border-radius: 6px 6px 22px 6px;
  box-shadow: 0 16px 30px rgba(42, 20, 70, .18); transform: rotate(-1.2deg);
}
.note::before { content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 26px; margin-left: -60px; background: rgba(255, 255, 255, .6); transform: rotate(2deg); border-radius: 3px; }
.note .gloop { position: absolute; right: 4px; top: -58px; width: 120px; transform: rotate(6deg); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .15)); }
.note h2 { font: 400 32px/1.1 var(--display); margin: 0 0 10px; color: var(--plum); }
.note p { margin: 0 0 10px; font-weight: 500; color: #4a3a2a; }
.mail { display: inline-block; margin: 4px 0 12px; padding: 12px 20px; border-radius: 999px; background: var(--plum); color: #fff; text-decoration: none; font: 600 18px/1 var(--body); box-shadow: 0 5px 0 rgba(0, 0, 0, .2); }

/* ---------- footer (all pages) ---------- */
footer { background: var(--plum); color: #d9c8f2; text-align: center; padding: 0 0 calc(30px + env(safe-area-inset-bottom)); font-size: 15px; }
footer .wave { margin-top: -1px; }
footer .studio { width: 132px; margin: 18px auto 14px; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; }
footer nav a { color: #fff; font-weight: 600; text-decoration: none; }
footer .fmail { color: var(--lemon); font-weight: 600; }
footer p { margin: 6px 0; }

/* ---------- legal pages ---------- */
.legal-head { background: var(--plum); color: #fff; text-align: center; padding: 18px 16px 4px; }
.legal-head h1 { margin: 0; font: 400 40px/1.1 var(--display); letter-spacing: .3px; color: var(--lemon); -webkit-text-stroke: 2px var(--plum); paint-order: stroke fill; }
.legal-head p { margin: 6px 0 0; color: #d9c8f2; font-weight: 500; }
.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; font-size: 17px; line-height: 1.65; }
.legal h2 { font: 600 22px/1.3 var(--body); margin: 32px 0 8px; color: var(--plum); }
.legal p, .legal li { color: #3b2d52; }
.legal ul { padding-left: 22px; } .legal li { margin: 5px 0; }
.legal .box { background: #fff; border-radius: 20px; padding: 16px 20px; margin: 18px 0; box-shadow: 0 6px 16px rgba(42, 20, 70, .08); }
.toc { background: #fff; border-radius: 20px; padding: 16px 20px 16px 40px; margin: 18px 0; box-shadow: 0 6px 16px rgba(42, 20, 70, .08); }
.toc li { margin: 3px 0; }
@media (min-width: 700px) { .toc { columns: 2; column-gap: 40px; } .title { font-size: 92px; } .intro .icon { width: 140px; height: 140px; margin-top: -110px; border-radius: 34px; } .h2 { font-size: 52px; } }
