:root {
  --sky-top: #0277BD;
  --sky: #29B6F6;
  --sky-low: #B3E5FC;
  --paper: #F4FBFF;
  --ink: #1a1a2e;
  --flame: #FF6B35;
  --flame-dark: #D9481A;
  --gold: #FFC93C;
  --leaf: #5B9A2E;
  --white: #ffffff;
  --radius: 18px;
  --shadow-hard: 0 6px 0 var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

h1, h2, h3, .brand, .btn, .chip, kbd, .hud, .marquee, .board-list, .live-dot, .tap-hint {
  font-family: 'Righteous', system-ui, sans-serif;
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  height: 3.5rem;
  padding: 0 1.9rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-size: 1.25rem;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn svg { width: 1.3em; height: 1.3em; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .flyguy:focus-visible, a:focus-visible { outline: 3px dashed var(--gold); outline-offset: 4px; }

.btn-play { background: var(--flame); color: var(--white); }
.btn-play:hover { background: #ff7c4d; }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-small { height: 3rem; font-size: 1.05rem; padding: 0 1.5rem; }
.btn-big { height: 4.25rem; font-size: 1.6rem; padding: 0 2.6rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 55%, var(--sky-low) 100%);
  color: var(--white);
  overflow: hidden;
}

.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute;
  image-rendering: pixelated;
  left: -30%;
  animation: drift linear infinite;
  opacity: .95;
}
.c1 { top: 12%; width: 230px; animation-duration: 48s; animation-delay: -10s; }
.c2 { top: 58%; width: 180px; animation-duration: 38s; animation-delay: -25s; }
.c3 { top: 30%; width: 120px; animation-duration: 30s; animation-delay: -4s; opacity: .8; }
.c4 { top: 78%; width: 280px; animation-duration: 60s; animation-delay: -40s; }
.c5 { top: 4%;  width: 150px; animation-duration: 42s; animation-delay: -30s; opacity: .85; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(170vw); } }

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(16px, 4vw, 48px);
}
.brand {
  font-size: 1.6rem;
  letter-spacing: .08em;
  color: var(--white);
  text-decoration: none;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.brand-dark { color: var(--gold); }

.hud {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
}
.hud > span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(26, 26, 46, .55);
  border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .3rem .75rem;
  backdrop-filter: blur(4px);
}
.hud img { width: 22px; height: 22px; image-rendering: pixelated; }
.hud-score b { min-width: 4ch; text-align: right; font-weight: 400; }
.hud-score::before { content: 'SCORE'; font-size: .7em; opacity: .75; margin-right: .35rem; }
.hud b { font-weight: 400; }
.hud .pop { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.35); color: var(--gold); } }

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem clamp(16px, 4vw, 48px) 5rem;
}

.kicker {
  display: inline-block;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .35rem .9rem;
  box-shadow: 0 3px 0 var(--ink);
  transform: rotate(-2deg);
}

.logo {
  margin-top: 1rem;
  font-size: clamp(5rem, 15vw, 10.5rem);
  line-height: .86;
  letter-spacing: .03em;
  color: var(--white);
  -webkit-text-stroke: 10px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 10px 0 var(--ink);
  animation: wobble 5s ease-in-out infinite;
  transform-origin: left bottom;
}
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(1deg); } }

.lede {
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
  text-shadow: 0 2px 0 rgba(26, 26, 46, .35);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.flyguy {
  position: relative;
  z-index: 2;
  background: none;
  border: 0;
  cursor: crosshair;
  width: min(100%, 400px);
  animation: bob 3.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.flyguy img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(255, 140, 50, .55));
  animation: thrust .18s steps(2) infinite;
  transition: transform .1s;
}
.flyguy.recoil img { transform: translateY(8px) scale(.98); }
@keyframes bob {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  25% { transform: translate(-10px, -18px) rotate(-6deg); }
  75% { transform: translate(10px, -8px) rotate(1deg); }
}
@keyframes thrust {
  0% { filter: drop-shadow(0 0 18px rgba(255, 140, 50, .45)); }
  100% { filter: drop-shadow(0 0 28px rgba(255, 110, 40, .7)); }
}

.bullets { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bullet {
  position: absolute;
  width: 16px;
  image-rendering: pixelated;
  animation: fire .75s cubic-bezier(.3, .7, .4, 1) forwards;
}
@keyframes fire {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-110vh); opacity: 1; }
}
.plus {
  position: absolute;
  font-family: 'Righteous', sans-serif;
  font-size: 1.5rem;
  color: var(--gold);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  animation: rise .8s ease-out forwards;
  pointer-events: none;
}
@keyframes rise { to { transform: translateY(-60px); opacity: 0; } }

.tap-hint {
  position: absolute;
  bottom: 4%;
  right: 8%;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: .2rem .7rem;
  transform: rotate(6deg);
  box-shadow: 0 3px 0 var(--ink);
  transition: opacity .4s;
}
.tap-hint.gone { opacity: 0; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  z-index: 4;
  margin-top: -2.2rem;
  background: var(--flame);
  color: var(--white);
  border-block: 4px solid var(--ink);
  transform: rotate(-2deg);
  overflow: hidden;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: .08em;
  padding: .55rem 0;
}
.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scroll 22s linear infinite;
}
.marquee i { font-style: normal; color: var(--gold); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) clamp(16px, 4vw, 48px);
}
.section-title {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  text-align: center;
  color: var(--ink);
  text-shadow: 3px 4px 0 var(--gold), 6px 8px 0 var(--flame);
  letter-spacing: .02em;
}
.section-title.left { text-align: left; }
.section-sub {
  text-align: center;
  margin-top: .8rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a5068;
}

/* How to play */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
}
.card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--ink);
  padding: 1.5rem 1.5rem 1.6rem;
  transition: transform .2s ease;
}
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1.2deg); }
.card:hover { transform: rotate(0) translateY(-6px); }
.card-art {
  height: 130px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-low) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.art-guy { height: 115px; width: auto; animation: sway 2.4s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateX(-26px) rotate(-8deg); } 50% { transform: translateX(26px) rotate(6deg); } }
.art-blast { position: relative; }
.mini-walls { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; }
.mini-walls img { width: 48px; height: 24px; image-rendering: pixelated; }
.mini-walls .target { animation: crack 1.2s linear infinite; }
@keyframes crack {
  0%, 68%, 100% { transform: none; filter: none; }
  72% { transform: translateY(-3px) rotate(-3deg); filter: brightness(1.6); }
  80% { transform: translateY(1px) rotate(2deg); filter: brightness(1.2); }
}
.art-bullet { width: 18px; margin-top: 30px; image-rendering: pixelated; animation: zip 1.2s linear infinite; }
@keyframes zip {
  0% { transform: translateY(60px); opacity: 1; }
  70% { transform: translateY(-22px); opacity: 1; }
  71%, 100% { transform: translateY(-22px); opacity: 0; }
}
.art-pick { width: 52px; image-rendering: pixelated; animation: float 2s ease-in-out infinite; }
.art-pick + .art-pick { animation-delay: -1s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(8deg); } }

.card h3 { font-size: 1.9rem; letter-spacing: .03em; }
.card p { margin-top: .4rem; line-height: 1.55; color: #3c4257; }
.controls { list-style: none; margin-top: 1rem; display: grid; gap: .45rem; font-weight: 700; }
.controls li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.chip {
  font-size: .8rem;
  letter-spacing: .05em;
  background: var(--sky-low);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .1rem .55rem;
}
kbd {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  font-size: .95rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 8px;
  padding: .05rem .45rem;
}

/* Leaderboard */
.board-wrap { padding-top: 1rem; }
.board {
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--white);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 10px 0 #0b0b16, inset 0 0 0 3px #2d2d4a;
  padding: 1.75rem 1.5rem 1.75rem;
  text-align: center;
}
.board-head { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.board-head h2 { font-size: clamp(2rem, 5vw, 2.6rem); color: var(--gold); letter-spacing: .04em; }
.live-dot {
  font-size: .8rem;
  letter-spacing: .1em;
  color: #ff5a5a;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.live-dot::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ff5a5a;
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

.board-list { list-style: none; margin: 1.4rem 0 1.6rem; display: grid; gap: .5rem; font-size: 1.2rem; }
.board-list li {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: .75rem;
  text-align: left;
  background: #25253d;
  border-radius: 12px;
  padding: .6rem .9rem;
}
.board-list .rank {
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: #3a3a5c;
  font-size: 1rem;
}
.board-list li:nth-child(1) .rank { background: var(--gold); color: var(--ink); }
.board-list li:nth-child(2) .rank { background: #cfd8dc; color: var(--ink); }
.board-list li:nth-child(3) .rank { background: #e0915a; color: var(--ink); }
.board-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .pts { color: var(--gold); font-variant-numeric: tabular-nums; }
.board-list .board-msg { display: block; text-align: center; background: none; color: #b8bdd6; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1rem; }

/* Story */
.story {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.story-art {
  position: relative;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--gold) 0%, var(--flame) 70%);
  box-shadow: 0 10px 0 var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.story-art img { width: 70%; transform: rotate(-12deg); animation: bob 3.6s ease-in-out infinite; }
.bubble {
  position: relative;
  margin-top: 1.6rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink);
  padding: 1.4rem 1.5rem;
  font-size: 1.12rem;
  line-height: 1.6;
}
.bubble p + p { margin-top: .7rem; }
.bubble em { font-style: normal; color: var(--flame-dark); font-weight: 800; }
.bubble::before {
  content: '';
  position: absolute;
  left: -18px; top: 38px;
  border: 16px solid transparent;
  border-right-color: var(--ink);
  border-left: 0;
}
.bubble::after {
  content: '';
  position: absolute;
  left: -12px; top: 41px;
  border: 13px solid transparent;
  border-right-color: var(--white);
  border-left: 0;
}
.socials { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.social {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: var(--sky-low);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.social svg { width: 1.2rem; height: 1.2rem; }
.social:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.social:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* Final CTA */
.final {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--white);
  background: linear-gradient(180deg, var(--sky-low) 0%, var(--sky) 45%, var(--sky-top) 100%);
  padding: clamp(5rem, 10vw, 8rem) 16px;
  border-top: 4px solid var(--ink);
}
.final > *:not(.sky) { position: relative; z-index: 2; }
.final-title {
  font-size: clamp(3rem, 9vw, 6rem);
  -webkit-text-stroke: 9px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink);
}
.final p { margin: 1rem 0 2.2rem; font-size: 1.2rem; font-weight: 800; text-shadow: 0 2px 0 rgba(26, 26, 46, .4); }

/* Footer */
.footer { background: var(--ink); color: #c7cbe0; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.2rem clamp(16px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer a { color: #e6e9f5; text-decoration: none; font-weight: 700; }
.footer a:hover { color: var(--gold); }
.fine { font-size: .9rem; }
.fine a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-bottom: 4.5rem; gap: .5rem; }
  .hero-copy { order: 2; }
  .hero-art { order: 1; }
  .flyguy { width: min(62vw, 280px); }
  .logo { transform-origin: center bottom; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .cards { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .story { grid-template-columns: 1fr; text-align: center; }
  .story-art { max-width: 280px; margin: 0 auto; }
  .section-title.left { text-align: center; }
  .bubble { text-align: left; }
  .bubble::before, .bubble::after { display: none; }
  .socials { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer nav { justify-content: center; }
}

@media (max-width: 520px) {
  .hud { gap: .35rem; font-size: 1rem; }
  .hud > span { padding: .25rem .55rem; }
  .hud-lives img + img { display: none; }
  .hud-score::before { display: none; }
  .brand { font-size: 1.3rem; }
  .logo { -webkit-text-stroke-width: 7px; text-shadow: 0 7px 0 var(--ink); }
  .cta-row .btn { width: 100%; }
  .tap-hint { right: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cloud { left: auto; }
  .c1 { left: 5%; } .c2 { left: 70%; } .c3 { left: 45%; } .c4 { left: 20%; } .c5 { left: 80%; }
  html { scroll-behavior: auto; }
}
