/* Wubblegum's look, taken from the game: the end card (cream, pink border, ribbon), gold buttons,
   white words with a thick purple outline, the logo's purple and the gumball globe's floating bubbles. */
@font-face { font-family: "Bowlby One SC"; src: url(/fonts/BowlbyOneSC-Regular.ttf); font-display: swap; }
@font-face { font-family: "Anton"; src: url(/fonts/Anton-Regular.ttf); font-display: swap; }

:root {
  --purple: #9f3fed; --purple-deep: #6e1fc4; --purple-dot: #b55cff;
  --cream: #fff7e6; --border: #ff63b0; --ribbon: #ff4f86; --ribbon-dark: #e23a72;
  --ink: #3d1458; --white: #fff;
  --gold: #ffc928; --gold-dark: #e09a00;
  --lime: #b8ff3c; --pink: #ff59b3; --cherry: #eb1a40; --blue: #008cf2;
  --perfect: #e6a000; --good: #2fa84f; --ok: #3b8fe0; --miss: #d6405a;
  --display: "Bowlby One SC", "Arial Black", Impact, sans-serif;
  --tall: "Anton", "Arial Narrow", sans-serif;
  --shadow: 0 8px 0 rgba(61, 20, 88, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--purple);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 18px; line-height: 1.55;
  overflow-x: hidden;
  /* the polka dots from the banners */
  background-image: radial-gradient(circle, var(--purple-dot) 0 5px, transparent 6px),
                    radial-gradient(circle, var(--purple-dot) 0 5px, transparent 6px);
  background-size: 64px 56px; background-position: 0 0, 32px 28px;
}
/* Floating bubbles, like the gumball globe. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5; z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 3px, transparent 4px) 0 0 / 160px 170px,
    radial-gradient(circle at 70% 60%, #fff 0 2px, transparent 3px) 40px 60px / 230px 210px,
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 0 9px, rgba(255,255,255,0) 10px) 90px 20px / 380px 330px;
  animation: drift 40s linear infinite;
}
@keyframes drift { to { background-position: 0 -1700px, 40px -1890px, 90px -3280px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

main, header, footer { position: relative; z-index: 1; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: .01em; }

/* White words with a thick purple outline, as the game's labels. */
.outlined { color: var(--white); -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; }

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

/* ── Nav ── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.nav .mark { height: 52px; width: auto; filter: drop-shadow(0 4px 0 rgba(61,20,88,.25)); }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a.link { font-family: var(--display); font-size: 15px; text-decoration: none; color: #fff; padding: 8px 12px; border-radius: 14px; }
.nav a.link:hover { background: rgba(255,255,255,.18); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .55em 1.3em; border-radius: 22px; border: 0;
  font-family: var(--display); font-size: clamp(17px, 2vw, 24px); text-decoration: none; cursor: pointer;
  background: var(--gold); color: var(--ink); box-shadow: 0 7px 0 var(--gold-dark);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 10px 0 var(--gold-dark); }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--gold-dark); }
.btn.discord { background: #5865f2; color: #fff; box-shadow: 0 7px 0 #3c45b8; }
.btn.discord:hover { box-shadow: 0 10px 0 #3c45b8; }
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.pill {
  display: inline-block; padding: .35em 1em; border-radius: 999px; background: #fff; color: var(--ink);
  font-family: var(--display); font-size: 15px; box-shadow: var(--shadow);
}

/* ── Hero ── */
.hero { text-align: center; padding: 24px 0 0; }
.hero .logo { width: min(640px, 92%); margin: 8px auto 0; animation: bounce 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(61,20,88,.25)); }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.hero .tag { font-family: var(--display); font-size: clamp(22px, 3.4vw, 42px); margin: 14px auto 8px; max-width: 24ch; }
.hero .sub { color: #fff; font-size: clamp(17px, 1.9vw, 22px); max-width: 38ch; margin: 0 auto 26px; }
.hero .ctas { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; align-items: center; }

/* Ponies galloping along the bottom of the hero (the companion app's run sprites). */
.track { position: relative; height: 150px; margin-top: 34px; overflow: hidden; }
.track::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: #73b359; border-top: 6px solid #5a9a44; }
.runner { position: absolute; bottom: 14px; width: 150px; height: 150px; animation: gallop 13s linear infinite; }
.runner .sprite { width: 100%; height: 100%; background-repeat: no-repeat; background-size: 800% 100%; animation: run .5s steps(8) infinite; }
/* 8 frames in a strip: 8/7 of the strip's travel lands back on frame 1 */
@keyframes run { to { background-position-x: 114.2857%; } }
@keyframes gallop { from { left: -180px; } to { left: 100%; } }

/* ── Sections ── */
section { padding: 70px 0 10px; }
.heading { text-align: center; margin-bottom: 34px; }
.ribbon {
  position: relative; display: inline-block; padding: .18em 1.1em .22em; background: var(--ribbon); color: #fff;
  font-family: var(--display); font-size: clamp(26px, 4vw, 48px); filter: drop-shadow(0 6px 0 rgba(61,20,88,.2));
}
.ribbon::before, .ribbon::after { content: ""; position: absolute; top: 18%; bottom: -18%; width: 1.1em; background: var(--ribbon-dark); z-index: -1; }
.ribbon::before { left: -.8em; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 35% 50%); }
.ribbon::after { right: -.8em; clip-path: polygon(0 0, 100% 0, 65% 50%, 100% 100%, 0 100%); }
.heading p { color: #fff; margin: 16px auto 0; max-width: 44ch; font-size: 19px; }

/* The end card */
.card {
  position: relative; background: var(--cream); border: 8px solid var(--border); border-radius: 34px;
  box-shadow: 0 10px 0 rgba(61,20,88,.18), 0 20px 50px rgba(61,20,88,.2); padding: 26px;
}

/* How it plays: three steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; }
.step .num { width: 54px; height: 54px; border-radius: 50%; background: var(--gold); box-shadow: 0 5px 0 var(--gold-dark);
  display: grid; place-items: center; margin: -54px auto 10px; font-family: var(--display); font-size: 26px; }
.step h3 { font-size: 32px; margin-bottom: 8px; }
.step .art { height: 150px; display: grid; place-items: center; margin-bottom: 8px; }
.step .art img { height: 150px; width: auto; animation: bob 1.8s ease-in-out infinite; }
.step p { margin: 0; }
.stars { display: flex; gap: 6px; justify-content: center; }
.stars svg { width: 58px; height: 58px; animation: pop 2.4s ease-in-out infinite; }
.stars svg:nth-child(2) { animation-delay: .2s; } .stars svg:nth-child(3) { animation-delay: .4s; }
@keyframes pop { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.25) rotate(8deg); } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1deg); } }
.timing { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-family: var(--display); font-size: 15px; margin-top: 10px; }

/* Worlds: glass bubbles like the gumball menu */
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.world { text-align: center; }
.bubble {
  position: relative; aspect-ratio: 1; border-radius: 50%; margin: 0 auto 16px; width: 82%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.9) 0 6%, rgba(255,255,255,0) 7%),
              radial-gradient(circle at 50% 55%, var(--c1) 0 55%, var(--c2) 100%);
  border: 6px solid rgba(255,255,255,.85); box-shadow: 0 0 0 5px var(--border), 0 14px 30px rgba(61,20,88,.3);
  display: grid; place-items: center; overflow: hidden;
}
.bubble img { width: 74%; animation: bob 2s ease-in-out infinite; }
.bubble .trio { display: flex; width: 92%; justify-content: center; }
.bubble .trio img { width: 46%; margin: 0 -8%; }
.bubble .trio img:nth-child(2) { animation-delay: -.6s; transform-origin: bottom; z-index: 1; }
.bubble .trio img:nth-child(3) { animation-delay: -1.2s; }
.bubble.locked { --c1: #d9c7f2; --c2: #a98bd6; }
.bubble .q { font-family: var(--display); font-size: 120px; color: #fff; -webkit-text-stroke: 12px var(--ink); paint-order: stroke fill; }
.bubble .lock { position: absolute; bottom: 14%; font-size: 40px; }
.world h3 { font-size: 30px; margin-bottom: 10px; }
.world .blurb { color: #fff; margin: 0 0 14px; }
.games { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.games li { background: #fff; border-radius: 12px; padding: 3px 10px; font-family: var(--tall); font-size: 17px; letter-spacing: .02em; box-shadow: 0 3px 0 rgba(61,20,88,.15); }
.games li.mix { background: var(--gold); }

/* Why it's different */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature { text-align: center; padding: 22px 18px; }
.feature .icon { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.feature h3 { font-size: 21px; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 16px; }

/* Join */
.join { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.join img { width: 230px; animation: bob 1.8s ease-in-out infinite; }
.join h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 10px; }
.join p { margin: 0 0 22px; }

/* Press */
.press { display: grid; gap: 26px; }
.press h2 { font-size: 30px; margin-bottom: 12px; }
.press dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.press dt { font-family: var(--display); }
.press dd { margin: 0; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.download { display: block; text-decoration: none; background: #fff; border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.download .thumb { height: 130px; border-radius: 12px; display: grid; place-items: center; background: var(--purple); overflow: hidden; }
.download .thumb img { max-height: 120px; width: auto; }
.download span { display: block; font-family: var(--display); font-size: 15px; margin-top: 8px; }
.download small { opacity: .7; }

/* ── Footer ── */
footer { padding: 70px 0 40px; text-align: center; color: #fff; }
footer .w { width: 70px; margin: 0 auto 12px; }
footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-family: var(--display); font-size: 15px; margin-bottom: 10px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer small { opacity: .85; }

@media (max-width: 900px) {
  .steps, .worlds { grid-template-columns: 1fr; gap: 54px; }
  .worlds { gap: 34px; } .bubble { width: min(320px, 80%); }
  .join { grid-template-columns: 1fr; text-align: center; } .join img { margin: 0 auto; width: 180px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .features { grid-template-columns: 1fr; }
  .nav ul { display: none; }
  .runner { width: 110px; height: 110px; }
  .press dl { grid-template-columns: 1fr; } .press dt { margin-top: 8px; }
}

/* Social links (@wubblegumvr) */
.socials { display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.socials a { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink);
  box-shadow: 0 5px 0 rgba(61,20,88,.3); transition: transform .12s ease; }
.socials a:hover { transform: translateY(-3px) rotate(-6deg); color: var(--ribbon); }
.socials svg { width: 24px; height: 24px; fill: currentColor; }
.socials.dark { justify-content: flex-start; margin-top: 10px; }
.socials.dark a { background: var(--ink); color: #fff; }
.socials.dark a:hover { color: var(--gold); }
.hero .handle { color: #fff; font-family: var(--display); font-size: 16px; margin: 8px 0 0; opacity: .9; }
.join .follow { margin: 22px 0 0; }
footer .socials { margin: 0 0 18px; }
.flip { transform: scaleX(-1); }
.bubble img.flip { animation: bobflip 2s ease-in-out infinite; }
@keyframes bobflip { 0%, 100% { transform: scaleX(-1); } 50% { transform: scaleX(-1) translateY(-8px) rotate(1deg); } }
@media (max-width: 900px) { .socials.dark { justify-content: center; } }

/* plain text under the Discord button, not a button */
.hero .platform { color: #fff; font-family: var(--display); font-size: clamp(16px, 1.8vw, 20px); margin: 18px 0 0; letter-spacing: .02em; }
.hero .socials { margin-top: 16px; }
