/* Same flat sticker palette as the game: no gradients, depth from ink and hard shadows. */
@font-face {
  font-family: 'Luckiest Guy';
  src: url('/fonts/luckiest-guy-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Patrick Hand';
  src: url('/fonts/patrick-hand-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Permanent Marker';
  src: url('/fonts/permanent-marker-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #1d1534;
  --paper: #fff4dc;
  --bg: #6a4cff;
  --shadow: #4a2fd0;
  --yellow: #ffd23f;
  --pink: #ff6fae;
  --mint: #46e3b7;
  --display: 'Luckiest Guy', Impact, sans-serif;
  --hand: 'Patrick Hand', 'Comic Sans MS', sans-serif;
  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg) url('/img/doodles.png') 0 0 / 520px repeat;
  color: #fff;
  font: 22px/1.35 var(--hand);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* Die-cut sticker: flat fill, ink outline, white margin, thin ink edge, hard shadow.
   The look lives on ::before so the wobble filter never blurs the text. */
.sticker {
  position: relative;
  isolation: isolate;
  color: var(--ink);
}
.sticker::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill, var(--paper));
  border: 4px solid var(--ink);
  border-radius: var(--radius, 22px);
  box-shadow:
    0 0 0 6px #fff,
    0 0 0 7.5px var(--ink),
    6px 10px 0 7.5px var(--shadow);
  filter: url(#wobble);
}

.page {
  /* The mascot and tilted stickers poke past the edges; never scroll sideways.
     clip (not hidden) keeps vertical overflow, so the mascot's drop-in still shows. */
  overflow-x: clip;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr) 360px;
    column-gap: 72px;
    padding-top: 64px;
  }
  .about,
  .how {
    grid-column: 1 / -1;
  }
}

/* ---------- hero ---------- */

.brand {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

h1 {
  margin: 0;
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
}

.mascot {
  position: absolute;
  width: 34%;
  height: auto;
  right: -6%;
  top: -14%;
  animation:
    drop 900ms cubic-bezier(0.3, 1.5, 0.55, 1) both,
    bob 3.2s 1s ease-in-out infinite;
}

@keyframes drop {
  from {
    transform: translateY(-120vh) rotate(-30deg);
  }
  to {
    transform: translateY(0) rotate(-6deg);
  }
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.soon {
  --fill: var(--pink);
  --radius: 16px;
  display: table;
  margin: -6% auto 0;
  padding: 10px 22px 6px;
  font: 36px/1 var(--display);
  transform: rotate(-3deg);
  animation: wiggle 6s 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  88%,
  100% {
    transform: rotate(-3deg);
  }
  91% {
    transform: rotate(3deg);
  }
  94% {
    transform: rotate(-6deg);
  }
  97% {
    transform: rotate(1deg);
  }
}

.pitch {
  max-width: 560px;
  margin: 36px auto 0;
  font-size: 28px;
  text-align: center;
  text-shadow: 0 2px 0 var(--shadow);
}

.follow {
  margin: 28px 0 18px;
  text-align: center;
}

/* Handle in marker on a highlighter swipe, like viewer names in the game. */
.handle {
  position: relative;
  z-index: 0;
  font-family: var(--marker);
  color: var(--ink);
  padding: 0 4px;
  white-space: nowrap;
}
.handle::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -2px;
  right: -2px;
  top: 0.32em;
  bottom: 0.02em;
  background: var(--yellow);
  border-radius: 6px;
  transform: rotate(-1.5deg);
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 16px;
}

.social {
  --radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px 6px 10px;
  font: 18px/1 var(--display);
  text-decoration: none;
  transition: transform 150ms ease;
}
.social:hover,
.social:focus-visible {
  transform: rotate(-4deg) scale(1.06);
  outline: none;
}
.social svg {
  width: 28px;
  height: 28px;
  margin-top: -3px;
}

/* SVG icons: a thin white die-cut edge under the ink outline. */
.cut {
  fill: #fff;
  stroke: #fff;
  stroke-width: 5.5;
  stroke-linejoin: round;
}
.ink {
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
}

/* ---------- live preview ---------- */

.preview {
  margin: 0 auto;
  width: min(360px, 82vw);
}

.phone {
  --fill: var(--ink);
  --radius: 34px;
  padding: 12px;
  transform: rotate(2deg);
}

.phone iframe {
  /* Watch-only demo: never takes clicks, taps or scrolls. */
  pointer-events: none;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 24px;
  background: var(--ink);
}

.caption {
  margin: 22px 0 0;
  text-align: center;
  font-size: 19px;
  opacity: 0.9;
}

/* ---------- about ---------- */

.about {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.about p {
  margin: 0;
  font-size: 24px;
}

/* ---------- how to play ---------- */

.about h2,
.how h2 {
  margin: 0 0 30px;
  font: 40px/1 var(--display);
  text-align: center;
  text-shadow: 0 4px 0 var(--shadow);
  letter-spacing: 0.5px;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 34px 26px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  padding: 22px 22px 18px;
}
.card:nth-child(1) {
  --fill: var(--yellow);
  transform: rotate(-1.5deg);
}
.card:nth-child(2) {
  --fill: var(--pink);
  transform: rotate(1deg);
}
.card:nth-child(3) {
  --fill: var(--mint);
  transform: rotate(-0.8deg);
}
.card svg {
  width: 48px;
  height: 48px;
  float: left;
  margin: -2px 12px 0 0;
}
.card h3 {
  margin: 4px 0 8px;
  font: 30px/1 var(--display);
  text-transform: uppercase;
}
.card p {
  margin: 0;
  clear: both;
}

.win {
  margin: 34px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 24px;
}

/* ---------- music button ---------- */

.sound {
  --fill: var(--paper);
  --radius: 50%;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 150ms ease;
}
.sound svg {
  width: 38px;
  height: 38px;
  margin-top: 3px;
}
.sound:hover,
.sound:focus-visible {
  transform: rotate(-8deg) scale(1.08);
  outline: none;
}
.sound .waves {
  display: none;
}
/* Rocks in place while playing, so it stays an easy target to tap off. */
.sound[aria-pressed='true'] {
  --fill: var(--yellow);
  animation: rock 1.4s ease-in-out infinite;
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}
.sound[aria-pressed='true'] .waves {
  display: inline;
  animation: pulse 0.8s ease-in-out infinite alternate;
  transform-origin: 2px 0;
}
.sound[aria-pressed='true'] .muted {
  display: none;
}

@keyframes pulse {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1.08);
  }
}

/* ---------- footer ---------- */

.footer {
  padding: 24px;
  text-align: center;
  font-size: 18px;
  opacity: 0.85;
}
.footer p {
  margin: 4px 0;
}

@media (max-width: 520px) {
  html {
    font-size: 20px;
  }
  .socials {
    display: grid;
    grid-template-columns: repeat(2, max-content);
  }
  .pitch {
    font-size: 24px;
  }
  .soon {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot,
  .soon,
  .sound,
  .sound .waves {
    animation: none !important;
  }
}

/* ---------- 404 ---------- */

.missed {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.missed-mascot {
  width: 180px;
  height: auto;
  transform: rotate(160deg);
  animation: none;
}
.missed h1 {
  margin: 8px 0 0;
  font: 64px/1 var(--display);
  color: var(--yellow);
  text-shadow: 0 5px 0 var(--shadow);
}
.missed p {
  margin: 0 0 18px;
  font-size: 26px;
}
