/* Bounce Party website: one stylesheet, no external requests. It dresses the pages like the game's
   night parlor: deep ink, chalk text, Bungee titles with a hard pixel drop, neon accents (gold, mint,
   cyan) and the game's own pixel art, scaled up without smoothing. Palette: lib/core/palette.dart. */

@font-face {
  font-family: "Bungee";
  src: url("../fonts/Bungee-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #120e26;
  --ink-raised: #1c1738;
  --ink-soft: #241d47;
  --ink-line: #2e2752;
  --ink-deep: #07051a;
  --chalk: #f3eeff;
  --chalk-dim: #a9a1cf;
  --gold: #ffc93c;
  --gold-deep: #e59a12;
  --gold-shade: #8a4b00;
  --mint: #3df5b0;
  --cyan: #2fd3f0;
  --magenta: #d23bff;
  --danger: #ff3d7f;
  --link: var(--cyan);
  --link-hover: var(--gold);
  --focus: var(--gold);
  --pixel-shadow: 6px 6px 0 var(--ink-deep);
  --font-display: "Bungee", "Arial Black", Impact, system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* The grid every page lines up on: the header, the hero and the document share its edges. */
  --page: 64rem;
  --sidebar: 15rem;
  --gutter: 1.5rem;
  --measure: 46rem;
}

/* Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink);
  background-image:
    radial-gradient(60rem 30rem at 50% -8rem, rgb(124 58 237 / 32%), rgb(124 58 237 / 0%)),
    url("../img/stars.svg");
  background-size: auto, 160px 160px;
  background-attachment: fixed, fixed;
  color: var(--chalk);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

img, svg { max-width: 100%; }

/* The game's art is pixel art: never smooth it when it is scaled up. */
.pixel,
.brand-logo,
.home-wordmark,
.city img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: var(--link);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

code {
  padding: .05em .35em;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  font: .875em/1.4 var(--font-mono);
}

.wrap {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

mark.todo {
  background: var(--danger);
  color: var(--ink);
  padding: .05em .35em;
  font-weight: 800;
}

/* Local builds only: what is still a placeholder. */
.preview-banner {
  padding: .6rem 1rem;
  background: repeating-linear-gradient(-45deg, var(--danger) 0 18px, #e8306f 18px 36px);
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.45;
  text-align: center;
}
.preview-banner p,
.preview-banner ul { display: inline; margin: 0; padding: 0; }
.preview-banner li { display: inline; }
.preview-banner li + li::before { content: " · "; }
.preview-banner strong { font-family: var(--font-display); font-weight: 400; letter-spacing: .03em; }

/* Header and hero ------------------------------------------------------- */

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-block: 1.1rem .5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }

/* The game's wordmark (assets/brand/wordmark.png) at 2x. */
.brand-logo { display: block; width: 168px; height: auto; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.site-nav a {
  display: inline-block;
  padding: .35rem .8rem .3rem;
  border: 3px solid var(--ink-line);
  background: var(--ink-raised);
  color: var(--chalk);
  font-family: var(--font-display);
  font-size: .9375rem;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink-deep);
}
.site-nav a:hover { border-color: var(--cyan); color: var(--chalk); }
.site-nav a[aria-current="page"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

@media (max-width: 30rem) {
  img.brand-logo { width: 126px; }
  .site-nav a { padding: .3rem .55rem .25rem; font-size: .875rem; }
}

.hero { padding-block: 1.75rem 1.5rem; }

.hero h1 {
  margin: .35rem 0 .9rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  line-height: 1.1;
  text-shadow: 3px 3px 0 var(--gold-shade), 6px 6px 0 var(--ink-deep);
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: .9375rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.1875rem;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .3rem .8rem;
  border: 3px solid var(--ink-line);
  background: var(--ink-raised);
  color: var(--chalk);
  font-size: .9375rem;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--ink-deep);
}

/* Home ------------------------------------------------------------------ */

.home-hero {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding-block: 2.5rem 2rem;
  text-align: center;
}

.home-title { margin: 0; line-height: 0; }

/* The app icon's coin above the wordmark (assets/brand/wordmark.png at 4x, or
   3x on narrow phones). */
.home-logo { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.home-coin { display: block; width: 128px; height: auto; }
.home-wordmark { display: block; width: 336px; height: auto; }
@media (max-width: 26rem) { .home-coin { width: 96px; } .home-wordmark { width: 252px; } }

.home-tagline {
  max-width: 34rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.store-block { display: grid; gap: .9rem; justify-items: center; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem;
}

/* The official artwork as it comes: no frame of our own. */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge--soon { opacity: .55; }

.store-status {
  margin: 0;
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .03em;
}

.cities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.city { margin: 0; }
.city img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink-line);
  box-shadow: var(--pixel-shadow);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}
.feature h2 {
  margin: 0 0 .5rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.25;
}
.feature p { margin: 0; }
.feature p + p { margin-top: .6rem; }

.trademarks {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--chalk-dim);
  font-size: .75rem;
  text-align: center;
}

/* Panels: the game's raised ink cards with a hard pixel shadow -------- */

.panel,
.summary,
.toc,
.prose {
  background: var(--ink-raised);
  color: var(--chalk);
  border: 3px solid var(--ink-line);
  box-shadow: var(--pixel-shadow);
}
.panel { padding: 1.1rem 1.25rem 1.25rem; }

/* Buttons: a gold block, like the game's Play button ------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.3rem .55rem;
  border: 3px solid var(--ink-deep);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: inset 0 -4px 0 var(--gold-deep), 4px 4px 0 var(--ink-deep);
}
.button:hover { color: var(--ink); filter: brightness(1.06); }
.button:active { transform: translate(2px, 2px); box-shadow: inset 0 -4px 0 var(--gold-deep), 2px 2px 0 var(--ink-deep); }

/* Documents (legal pages, support) ------------------------------------- */

.doc {
  display: grid;
  gap: 1.25rem;
  padding-block: .5rem 4rem;
}

.doc > * { min-width: 0; }

.doc--single > * { max-width: var(--measure); }

@media (min-width: 64rem) {
  .doc--toc {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    column-gap: var(--gutter);
    align-items: start;
  }
  .doc--toc .summary,
  .doc--toc .prose { grid-column: 2; }
  .doc--toc .toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow: auto;
  }
}

/* The panel titles: a mint label, like the game's tags. */
.summary h2,
.toc h2 {
  display: inline-block;
  margin: 0 0 .75rem;
  padding: .3rem .75rem .2rem;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: .03em;
  box-shadow: 3px 3px 0 var(--ink-deep);
}

.summary { padding: 1.1rem 1.5rem 1.35rem; }
.summary ul { margin: 0; padding-left: 1.2rem; }
.summary li + li { margin-top: .35rem; }
.summary p { margin: 0; }
.summary p + p { margin-top: .5rem; }

.toc {
  padding: 1rem 1.1rem 1.1rem;
  font-size: .9375rem;
  line-height: 1.45;
}
.toc h2 { font-size: .9375rem; }

.toc-list { margin: 0; padding-left: 1.3rem; }
.toc-list li { margin: .3rem 0; }
.toc-list a { text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }

.prose { padding: clamp(1.25rem, .9rem + 1.6vw, 2.25rem); }

.prose h2 {
  margin: 2.5rem 0 .75rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.15rem + .7vw, 1.65rem);
  line-height: 1.25;
  scroll-margin-top: 1rem;
}
.prose > h2:first-child { margin-top: 0; }

.prose h3 {
  margin: 1.75rem 0 .5rem;
  color: var(--mint);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.35;
  scroll-margin-top: 1rem;
}

.prose p,
.prose ul,
.prose ol,
.prose dl { margin: 0 0 1rem; }
.prose > :last-child { margin-bottom: 0; }

.prose ul,
.prose ol { padding-left: 1.4rem; }

.prose li + li { margin-top: .35rem; }

.prose strong { font-weight: 800; }

.table-wrap {
  margin: 0 0 1.25rem;
  overflow-x: auto;
  border: 2px solid var(--ink-line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: .65rem .8rem;
  border-bottom: 2px solid var(--ink-line);
  text-align: left;
  vertical-align: top;
}

.prose thead th { background: var(--ink); color: var(--cyan); font-weight: 800; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose tbody th { font-weight: 800; }

.callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--mint);
  background: var(--ink-soft);
}
.callout > :last-child { margin-bottom: 0; }

.steps {
  list-style: none;
  counter-reset: step;
  padding-left: 0 !important;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  min-height: 2rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink-deep);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .95rem;
  line-height: 1;
}

.contact-card {
  display: grid;
  gap: .75rem;
  justify-items: start;
}
.contact-card h2 { margin-bottom: 0; }
.contact-card .email { font-size: 1.25rem; font-weight: 800; }

/* Third-party notices */

.notice-list {
  list-style: none;
  padding: 0 !important;
  display: grid;
  gap: .75rem;
}
.notice-list li + li { margin-top: 0; }

.notice {
  padding: .85rem 1rem;
  border: 2px solid var(--ink-line);
  background: var(--ink-soft);
}
.notice h3 { margin: 0 0 .25rem !important; color: var(--chalk) !important; font-size: 1.0625rem; }
.notice p { margin: 0 !important; color: var(--chalk-dim); font-size: .9375rem; overflow-wrap: anywhere; }
.notice-detail { color: var(--chalk-dim); font-weight: 600; font-size: .9375rem; }

.license h3 { margin-top: 2rem; }

.license-text {
  max-height: 28rem;
  margin: 0 0 1rem;
  padding: 1rem;
  overflow: auto;
  border: 2px solid var(--ink-line);
  background: var(--ink);
  color: var(--chalk-dim);
  font: .8125rem/1.5 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 3px solid var(--ink-line);
  background: rgb(7 5 26 / 55%);
  color: var(--chalk-dim);
  font-size: .9375rem;
}

.site-footer a { color: var(--chalk); }
.site-footer a:hover { color: var(--gold); }

.footer-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}
.footer-links a {
  font-family: var(--font-display);
  font-size: .875rem;
  letter-spacing: .02em;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--gold); }

.footer-contact,
.footer-note,
.footer-copy { margin: .3rem 0; }

.page-index .site-footer { text-align: center; }
.page-index .footer-links { justify-content: center; }

/* Motion and print ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #ffffff; color: #000000; }
  .site-header, .skip-link, .toc, .site-footer nav, .preview-banner, .cities { display: none !important; }
  .hero { padding: 0; }
  .hero h1, .eyebrow, .prose h2, .prose h3 { color: #000000; text-shadow: none; }
  .chip, .summary, .prose, .panel { background: none; color: #000000; border: 0; box-shadow: none; padding: 0; }
  .doc--toc { display: block; }
  .license-text { max-height: none; overflow: visible; background: none; color: #000000; }
  a { color: #000000; }
}

/* Cookie banner for Google Analytics (static/js/consent.js): Accept and Reject
   look the same; nothing loads until one is pressed. */
.consent-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.25rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: .9rem 1.1rem;
  border: 3px solid var(--gold-deep);
  background: var(--ink-raised);
  box-shadow: var(--pixel-shadow);
}
.consent-text { margin: 0; flex: 1 1 18rem; font-size: .9375rem; }
.consent-actions { display: flex; gap: .6rem; }
.consent-button {
  min-width: 6.5rem;
  padding: .5rem 1rem;
  border: 3px solid var(--gold-deep);
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.consent-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
