/* balagangames.com look (mockup approved 2026-10-30, game repo docs/superpowers/mockups/2026-10-30-site/) — Bubble Party tokens from docs/design-language.md §3-4. */
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("/fonts/Baloo2-ExtraBold.woff2") format("woff2"); }
/* One Quicksand weight ships with the game (SemiBold); it serves every text weight here. */
@font-face { font-family: "Quicksand"; font-weight: 100 900; font-display: swap; src: url("/fonts/Quicksand-SemiBold.woff2") format("woff2"); }
:root {
  --ground: #ECE7FD;
  --paper: #F8F6FF;
  --ink: #322A5E;
  --ink-sub: #7D76A3;
  --primary: #FF4D9D;
  --secondary: #35D0FF;
  --accent: #FFD23F;
  --reward: #7C4DFF;
  --oob: #2C2556;
  --radius: 22px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--ground); }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: "Quicksand", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.5;
}
h1, h2, h3, .display { font-family: "Baloo 2", "Quicksand", sans-serif; font-weight: 800; line-height: 1.1; }
a { color: inherit; }
img { height: auto; }
h1 .logo { margin: 0; }

/* The game's out-of-bounds table: deep lavender with faint Ground dots. */
.table {
  background-color: var(--oob);
  background-image: radial-gradient(rgba(236, 231, 253, 0.075) 3px, transparent 3.5px);
  background-size: 28px 28px;
  color: var(--paper);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { padding: 14px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; }

/* The studio logo (approved 2026-11-07, game repo docs/superpowers/mockups/2026-11-07-balagan-brand/): the coloured
   BALAGAN inlined from balagan-feet.svg, so CSS can move each letter (.l0-.l6) and its feet, then GAMES in Quicksand
   in the bar's own colour. 30px tall, held to the old text's 27px line so the bar stays 55px. */
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar .brand { height: 27px; }
.brand .games { font-family: "Quicksand", system-ui, sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.32em; opacity: 0.85; margin-top: 3px; }
.wm { height: 30px; width: auto; display: block; overflow: visible; }
.wm svg { height: 100%; width: auto; overflow: visible; display: block; }
/* The hover gag: the feet pop out, the letters shuffle (40ms apart), then the feet tuck back in. Mouse only, never with reduced motion. */
.wm .feet { transform: scale(0); transform-box: fill-box; transform-origin: 50% 0%; transition: transform .16s ease-in; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gag .wm:hover .feet { transform: scale(1); transition: transform .14s cubic-bezier(.3, 1.6, .6, 1); }
  .gag .wm:hover .l0 { animation: shuffle .5s ease-in-out; }
  .gag .wm:hover .l1 { animation: shuffle .5s ease-in-out .04s; }
  .gag .wm:hover .l2 { animation: shuffle .5s ease-in-out .08s; }
  .gag .wm:hover .l3 { animation: shuffle .5s ease-in-out .12s; }
  .gag .wm:hover .l4 { animation: shuffle .5s ease-in-out .16s; }
  .gag .wm:hover .l5 { animation: shuffle .5s ease-in-out .20s; }
  .gag .wm:hover .l6 { animation: shuffle .5s ease-in-out .24s; }
}
@keyframes shuffle { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-280px); } 60% { transform: translateY(0); } 78% { transform: translateY(-90px); } }

/* Hero */
.hero { padding: 8px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; text-align: center; }
.hero .logo { width: min(520px, 92%); margin: 0 auto; display: block; filter: drop-shadow(0 10px 0 rgba(0,0,0,0.18)); }
.hero .pitch { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(26px, 4.2vw, 40px); max-width: 640px; margin: 0 auto; }
.hero .sub { color: #CFC8F2; font-size: 17px; max-width: 520px; margin: 8px auto 0; }
.shots { display: flex; gap: 14px; justify-content: center; min-width: 0; }
.shots img { width: calc((100% - 28px) / 3); max-width: 132px; min-width: 0; border-radius: 18px; border: 4px solid var(--paper); box-shadow: 0 10px 0 rgba(0,0,0,0.25); }
.shots img:nth-child(1) { transform: rotate(-5deg) translateY(10px); }
.shots img:nth-child(3) { transform: rotate(5deg) translateY(10px); }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; text-align: left; }
  .hero .logo { margin: 0; }
  .hero .pitch, .hero .sub { margin-left: 0; }
  .stores { justify-content: flex-start !important; }
  .shots img { max-width: 170px; }
}

/* Store buttons: official-badge shaped (final site uses the stores' own badge art). */
.stores { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  border-radius: 12px; padding: 8px 16px 8px 12px; min-height: 52px;
  border: 1.5px solid #8a8a8a;
}
.badge .glyph { width: 26px; height: 26px; border-radius: 6px; background: var(--g, #fff); flex: none; }
.badge small { display: block; font-size: 11px; font-weight: 600; opacity: 0.85; line-height: 1; }
.badge b { display: block; font-size: 19px; font-weight: 700; line-height: 1.15; font-family: system-ui, sans-serif; }
.badge.soon { background: transparent; border: 2px dashed rgba(236,231,253,0.45); color: #CFC8F2; }
.badge.soon .glyph { opacity: 0.4; }

/* Candy button (the game's glossy CTA) */
.candy {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.02em;
  color: var(--paper); background: var(--primary);
  border-radius: 999px; padding: 12px 28px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.18), inset 0 4px 0 rgba(255,255,255,0.35), 0 6px 0 rgba(50,42,94,0.35);
}

/* Sections */
section.block { padding: 56px 0; }
.block h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; margin-bottom: 8px; }
.block .lead { text-align: center; color: var(--ink-sub); max-width: 560px; margin: 0 auto 28px; }

.trailer {
  aspect-ratio: 16 / 9; max-width: 880px; margin: 0 auto; border-radius: var(--radius);
  background: var(--oob) url("img/hunt.jpg") center 30% / cover;
  display: grid; place-items: center; border: 6px solid var(--paper);
  box-shadow: 0 10px 0 rgba(50,42,94,0.15);
}
.trailer .play { width: 84px; height: 84px; border-radius: 50%; background: var(--primary); display: grid; place-items: center;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.2), 0 6px 0 rgba(0,0,0,0.3); }
.trailer .play::after { content: ""; border-left: 26px solid var(--paper); border-top: 16px solid transparent; border-bottom: 16px solid transparent; margin-left: 8px; }

.steps { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: 0 6px 0 rgba(50,42,94,0.10); }
.step img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; border-radius: 14px; display: block; margin-bottom: 14px; }
.step .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); font-family: "Baloo 2"; font-weight: 800; margin-right: 8px; }
.step h3 { font-size: 24px; display: flex; align-items: center; margin-bottom: 4px; }
.step p { color: var(--ink-sub); }

.friends { text-align: center; }
.friends .code { display: inline-flex; gap: 8px; margin: 10px 0 18px; }

/* The game's 4 code boxes */
.box {
  width: 64px; height: 76px; border-radius: 14px; background: var(--paper); color: var(--ink);
  display: grid; place-items: center; font-family: "Baloo 2"; font-weight: 800; font-size: 46px;
  box-shadow: inset 0 0 0 3px var(--ink), 0 5px 0 rgba(50,42,94,0.25);
}

footer.site { padding: 28px 0 36px; color: #CFC8F2; font-size: 15px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site a { text-decoration: none; }
footer.site a:hover { text-decoration: underline; }

/* Invite page */
.invite { min-height: 100vh; display: flex; flex-direction: column; }
.invite main { flex: 1; display: grid; place-items: center; padding: 8px 16px 24px; }
.invite .card { width: 100%; max-width: 460px; text-align: center; padding: 26px 22px 24px; position: relative; color: var(--ink); }
.invite .card .logo { width: 220px; margin: -4px auto 6px; display: block; }
.invite .eyebrow { color: var(--ink-sub); font-size: 18px; }
.invite h1 { font-size: 40px; margin: 2px 0 2px; }
.invite .code { display: inline-flex; gap: 8px; margin: 12px 0 20px; }
.invite .stores { margin-top: 0; }
.invite .stores .badge { min-width: 210px; justify-content: center; }
.invite .have { margin-top: 18px; color: var(--ink-sub); font-size: 16px; }
.invite .have b { color: var(--ink); }
.invite .scan { display: flex; gap: 14px; align-items: center; text-align: left; margin-top: 18px; padding-top: 18px; border-top: 2px dashed #DCD5F5; }
.invite .scan .qr { width: 96px; height: 96px; flex: none; border-radius: 10px; background: #fff; padding: 6px; box-shadow: inset 0 0 0 2px #DCD5F5; }
.invite .scan p { color: var(--ink-sub); font-size: 15px; }
.invite .soon-note { color: var(--ink-sub); font-size: 15px; margin-bottom: 10px; }
.invite .badge.soon { border-color: #C9C1EE; color: var(--ink-sub); }

/* Trailer: a poster until clicked, then the YouTube player (nothing loads from YouTube before). */
button.trailer { width: 100%; cursor: pointer; padding: 0; font: inherit; }
.trailer iframe { width: 100%; height: 100%; border: 0; border-radius: calc(var(--radius) - 6px); display: block; }
.trailer:focus-visible, .badge:focus-visible, a:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }

/* Legal pages: the policy text on a Paper card, unchanged wording. */
.legal main { max-width: 760px; margin: 0 auto 48px; padding: 0 16px; }
.legal article { background: var(--paper); border-radius: var(--radius); padding: 28px 22px 32px; box-shadow: 0 6px 0 rgba(50,42,94,0.10); line-height: 1.7; font-weight: 500; }
@media (min-width: 640px) { .legal article { padding: 40px 48px 44px; } }
.legal h1 { font-size: 2.2rem; margin-bottom: 6px; }
.legal h2 { font-size: 1.45rem; margin: 30px 0 8px; }
.legal p, .legal li { margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.legal .meta { color: var(--ink-sub); margin-bottom: 28px; }
.legal article a { color: #C2186B; }
.legal .back { display: none; }
.legal strong { font-weight: 700; }

/* Official store badges: same visible height. Google's PNG carries its own clear space
   (about a sixth of its height on each side), Apple's SVG none, so the Play image is drawn
   taller and pulled in by that margin. */
.store-badge { display: inline-flex; align-items: center; line-height: 0; }
.store-badge.appstore img { height: 52px; width: auto; }
.store-badge.play img { height: 77px; width: auto; margin: -12.5px -9px; }
.badge.steam { background: #171a21; border-color: #66c0f4; }
.legal-marks { width: 100%; font-size: 12px; opacity: 0.75; }

/* Press kit page (sketch approved 2026-11-03, game repo docs/superpowers/mockups/2026-11-03-creator-pages/). */
.press .wrap { max-width: 1000px; }
.press .hero .wrap { align-items: center; }
.press .hero h1 { font-size: clamp(34px, 6vw, 56px); }
.press .hero .sub { font-size: 18px; max-width: 34em; margin-left: 0; text-align: left; }
.press .hero .candy { margin-top: 18px; border: 0; cursor: pointer; font-size: 20px; }
.press section.block { padding: 44px 0 0; }
.press section.block:last-of-type { padding-bottom: 56px; }
.press .block h2 { text-align: left; }
.press .block .lead { text-align: left; margin-left: 0; margin-bottom: 18px; }
.press .grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.press .card { display: grid; gap: 8px; align-content: start; min-width: 0; }
.press .card h2 { font-size: 26px; margin-bottom: 0; }
.press .card p, .press .card li { color: var(--ink-sub); }
.press .card b { color: var(--ink); }
.press .card ul { padding-left: 18px; display: grid; gap: 6px; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { padding: 9px 0; border-bottom: 2px dashed #DCD5F5; text-align: left; vertical-align: top; font-size: 15.5px; font-weight: 600; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { color: var(--ink-sub); padding-right: 16px; white-space: nowrap; }
.facts td { overflow-wrap: anywhere; }
.press-shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.press-shots img { width: 100%; border-radius: 14px; display: block; box-shadow: 0 6px 0 rgba(50,42,94,0.10); }
.press-files { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); margin-top: 16px; }
.press-file { background: var(--paper); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; text-decoration: none; min-height: 44px; }
.press-file small { display: block; color: var(--ink-sub); font-size: 13px; }
.press-file .get { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 15px; color: #C81E6E; white-space: nowrap; }
/* A file in two formats: each format is its own link, padded out to a 44px tap target. */
.press-file .get a { display: inline-block; padding: 12px 9px; margin: -12px 0; text-decoration: none; }
.press-file .get a:last-child { margin-right: -9px; }
.press-file .get a:hover { text-decoration: underline; }
.press .block h3.press-group { font-size: 22px; margin-top: 28px; }

/* Streamer guide page (sketch approved 2026-11-03, same mockup as the press kit). Shares the press page's layout. */
.guide .hero .candy { text-decoration: none; }
.join { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 18px; display: grid; justify-items: center; gap: 12px; box-shadow: 0 10px 0 rgba(0,0,0,0.2); transform: rotate(1.5deg); max-width: 340px; justify-self: center; width: 100%; }
.join small { color: var(--ink-sub); font-size: 15px; }
.join .code { display: inline-flex; gap: 6px; }
.join .box { width: 48px; height: 58px; font-size: 34px; }
.join .qr { width: 132px; height: 132px; border-radius: 10px; background: #fff; padding: 8px; box-shadow: inset 0 0 0 2px #DCD5F5; display: block; }
.table { overflow-x: clip; }
.guide .card h3 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.guide .n { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 19px; }
.seats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.seat { width: 26px; height: 26px; border-radius: 50%; background: var(--secondary); display: grid; place-items: center; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 10px; color: var(--ink); }
.seat.you { background: var(--primary); color: var(--paper); }
.seat.wait { background: transparent; box-shadow: inset 0 0 0 2px #DCD5F5; width: 20px; height: 20px; }
.seats-gap { width: 100%; font-size: 14px; color: var(--ink-sub); }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stamp { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 16px; padding: 5px 12px; border-radius: 8px; background: var(--primary); color: var(--paper); transform: rotate(-2deg); }
.stamp:nth-child(2) { background: var(--reward); transform: rotate(1.5deg); }
.stamp:nth-child(3) { background: var(--accent); color: var(--ink); }
.stamp:nth-child(4) { background: var(--secondary); color: var(--ink); transform: rotate(2deg); }
.shots-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.shots-3 img { width: 100%; border-radius: 14px; border: 4px solid var(--paper); display: block; }
