/* Balloonatic - balloonatic.deyapps.com
   One stylesheet for the whole site. Palette and type come straight from the
   game (lib/game/palette.dart, lib/ui/theme.dart): a sky that fades from
   #4FA9D6 to #BFE8F2 over navy rooftops with lit windows, a coral balloon,
   mustard roof caps, and the game's two faces, Lilita One and Nunito.
   Like the game's menu, the hero is sky and everything below is the navy
   panel. */

/* ---------- fonts (self-hosted: no third-party request on a site whose
   main obligation is a privacy policy) ---------- */
@font-face {
  font-family: 'Lilita One';
  src: url('fonts/LilitaOne-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito-Variable.ttf') format('truetype');
  font-weight: 200 1000; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --sky-top:    #4fa9d6;
  --sky-bottom: #bfe8f2;
  --sun:        #ffe3a3;

  --frame:  #141d33;   /* page */
  --card:   #1e2a49;
  --raised: #26355c;
  --line:   #33456f;
  --roof:   #2b3a5c;
  --outline:#1b2540;

  --ink:   #f5f7ff;
  --muted: #b8c5e6;
  --dim:   #8d9cc2;

  --coral:   #ff5a5f;
  --coral-dk:#c9393f;
  --coral-ink:#2a0d10;
  --mustard: #f2b134;
  --window:  #ffd56b;
  --wind:    #7cc8ff;

  --radius: 22px;
  --radius-sm: 14px;
  --shell: 1140px;
  --pad: clamp(16px, 5vw, 40px);
  --shadow-lift: 0 18px 40px rgba(4,8,20,.45);
  --shadow-deep: 0 30px 70px rgba(4,8,20,.55);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: 'Nunito', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--frame);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mustard); text-decoration-color: rgba(242,177,52,.45); text-underline-offset: 3px; }
a:hover { color: #ffc95a; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .display {
  font-family: 'Lilita One', 'Nunito', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .3px;
  line-height: 1.06;
  margin: 0;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--mustard); color: var(--outline); padding: 10px 16px; border-radius: 0 0 10px 0;
  font-family: 'Lilita One', sans-serif; text-decoration: none;
}
.skip:focus { left: 0; }

/* The game's title treatment: coral "Balloon", white "atic", navy outline. */
.wordmark { white-space: nowrap; }
.wordmark .b, .wordmark .a {
  -webkit-text-stroke: .14em var(--outline);
  paint-order: stroke fill;
}
.wordmark .b { color: var(--coral); }
.wordmark .a { color: #fff; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(20,29,51,.86);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-head .shell { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand img {
  width: 38px; height: 38px; border-radius: 11px;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.28), 0 6px 16px rgba(0,0,0,.45);
}
.brand span { font-family: 'Lilita One', sans-serif; font-size: 22px; line-height: 1; letter-spacing: .4px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(12px, 2.6vw, 26px); }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 700;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--coral); }
@media (max-width: 640px) { .nav a.hide-xs { display: none; } }

/* ---------- buttons (the game's: rounded, a darker "pressable" bottom edge) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Lilita One', sans-serif; font-size: 19px; letter-spacing: .4px;
  text-decoration: none; white-space: nowrap;
  padding: 14px 26px; border-radius: 18px; border: 0;
  color: var(--coral-ink); background: var(--coral);
  box-shadow: 0 5px 0 var(--coral-dk), 0 14px 28px rgba(255,90,95,.28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  cursor: pointer;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { color: var(--coral-ink); filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 7px 0 var(--coral-dk), 0 18px 32px rgba(255,90,95,.34); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--coral-dk), 0 8px 16px rgba(255,90,95,.24); }
.btn.ghost {
  color: var(--ink); background: var(--raised);
  box-shadow: 0 5px 0 #18213a, 0 14px 28px rgba(4,8,20,.25);
}
.btn.ghost:hover { color: var(--ink); box-shadow: 0 7px 0 #18213a, 0 18px 32px rgba(4,8,20,.3); }
.btn.locked { cursor: default; }
.btn.locked:hover, .btn.locked:active { transform: none; filter: none; box-shadow: 0 5px 0 var(--coral-dk), 0 14px 28px rgba(255,90,95,.28); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transform: none; transition: none; } }
@media (max-width: 430px) { .btn { font-size: 17px; padding: 13px 20px; } }

/* ---------- hero: the game's sky, sun, clouds and rooftops ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--sky-top) 0%, #7cc3e2 55%, var(--sky-bottom) 100%);
  padding: clamp(36px, 7vw, 76px) 0 clamp(150px, 20vw, 210px);
  color: var(--outline);
}
.hero .sun {
  position: absolute; z-index: -1; right: 9%; top: 15%;
  width: clamp(80px, 11vw, 140px); aspect-ratio: 1; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 80px 30px rgba(255,227,163,.45);
}
.cloud {
  position: absolute; z-index: -1; width: var(--w, 150px); height: calc(var(--w, 150px) * .42);
  background:
    radial-gradient(circle at 22% 62%, #fff 0 22%, transparent 23%),
    radial-gradient(circle at 50% 42%, #fff 0 30%, transparent 31%),
    radial-gradient(circle at 78% 62%, #fff 0 22%, transparent 23%);
  opacity: .9;
  animation: drift var(--t, 60s) linear infinite;
}
@keyframes drift { from { transform: translateX(-8vw); } to { transform: translateX(8vw); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }

.hero .shell {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr);
  align-items: center;
}
@media (max-width: 860px) {
  .hero .shell { grid-template-columns: 1fr; text-align: center; }
  /* keep the sun and clouds out from behind the stacked text */
  .hero .sun { top: auto; bottom: 34%; right: 4%; }
  .hero > .cloud:nth-of-type(2), .hero > .cloud:nth-of-type(4) { display: none; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: rgba(27,37,64,.82);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 10px var(--mustard); }

.hero h1 { font-size: clamp(58px, 11.5vw, 112px); line-height: 1; }
.hero .lede {
  font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; color: var(--outline);
  max-width: 34ch; margin: 18px 0 0;
}
@media (max-width: 860px) { .hero .lede { margin-inline: auto; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
@media (max-width: 860px) { .cta-row { justify-content: center; } }
.cta-note { margin: 16px 0 0; font-size: 14.5px; font-weight: 700; color: #26406a; }

.hero-art { position: relative; justify-self: center; }
.hero-art .phone { width: min(290px, 70vw); transform: rotate(4deg); }
@media (prefers-reduced-motion: reduce) { .hero-art .phone { transform: none; } }

/* the balloon that drifts beside the title */
.float-balloon {
  position: absolute; left: -46px; top: 8%; width: 74px; z-index: 2;
  animation: bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 10px 12px rgba(27,37,64,.25));
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .float-balloon { animation: none; } }
@media (max-width: 860px) { .float-balloon { left: -18px; width: 56px; } }

/* rooftops along the bottom of the hero: navy blocks, mustard caps, lit
   windows (assets/img/skyline.svg, drawn like the game's plain roofs) */
.skyline {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 0;
  height: clamp(120px, 17vw, 190px);
  background: url('img/skyline.svg') center bottom / auto 100% repeat-x;
}
/* the navy panel rises over the roofs, as the menu panel does in the game */
.panel-lip {
  position: relative; height: 34px; margin-top: -34px; z-index: 1;
  background: var(--frame); border-radius: 30px 30px 0 0;
}

/* ---------- phone frame for screenshots ---------- */
.phone {
  border-radius: 34px; padding: 7px; background: var(--outline);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(255,255,255,.08);
}
.phone img { border-radius: 28px; width: 100%; }

/* ---------- stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 6px;
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats div {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 12px; text-align: center;
}
.stats strong {
  display: block; font-family: 'Lilita One', sans-serif; font-weight: 400;
  font-size: clamp(30px, 5vw, 40px); line-height: 1; color: var(--mustard);
}
.stats span { display: block; margin-top: 8px; font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

/* ---------- sections ---------- */
section { padding: clamp(52px, 8vw, 92px) 0; }
.kicker {
  display: block; font-size: 13px; font-weight: 900; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.section-head { max-width: 62ch; margin-bottom: clamp(26px, 5vw, 42px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 5.6vw, 50px); }
.section-head h2 em { font-style: normal; color: var(--coral); }
.section-head p { color: var(--muted); margin: 14px 0 0; font-size: 18px; }
.nowrap { white-space: nowrap; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 26px;
}
.card .glyph {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  display: grid; place-items: center; background: var(--raised);
}
.card .glyph svg { width: 28px; height: 28px; display: block; }
.card h3 { font-size: 23px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card:nth-child(4n+1) .glyph { color: var(--coral); }
.card:nth-child(4n+2) .glyph { color: var(--wind); }
.card:nth-child(4n+3) .glyph { color: var(--mustard); }
.card:nth-child(4n+4) .glyph { color: #8fe3b0; }

/* ---------- split feature: text beside a picture ---------- */
.split {
  display: grid; gap: clamp(28px, 6vw, 70px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
}
.split.flip .art { order: -1; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split .text { text-align: center; }
  .split.flip .art { order: 0; }
}
.split .art { justify-self: center; }
.split .art .phone { width: min(280px, 72vw); }
.split .art .poster {
  width: min(430px, 86vw); border-radius: 22px; box-shadow: var(--shadow-deep);
  transform: rotate(-2deg);
}
@media (prefers-reduced-motion: reduce) { .split .art .poster { transform: none; } }
.split .section-head { margin-bottom: 22px; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; color: var(--muted); }
.ticks li b { color: var(--ink); font-weight: 800; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .28em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2b134' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 820px) { .ticks { max-width: 34rem; margin-inline: auto; text-align: left; } }

/* the balloon rewards row */
.rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.reward {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 8px 14px; text-align: center;
}
.reward svg { width: 34px; height: 50px; margin: 0 auto 8px; display: block; }
.reward b { display: block; font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 18px; }
.reward span { display: block; font-size: 13px; color: var(--muted); }

/* 50 landmarks strip */
.cities {
  margin-top: clamp(34px, 6vw, 60px); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); background: #bee6f0;
}
.cities img { width: 100%; }
.cities-note { text-align: center; color: var(--dim); font-size: 14.5px; margin: 12px 0 0; }

/* ---------- screenshot rail ---------- */
.rail-wrap { margin-inline: calc(var(--pad) * -1); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(250px, 64vw);
  gap: 22px; overflow-x: auto; padding: 8px var(--pad) 26px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  justify-content: safe center;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.rail figure { margin: 0; scroll-snap-align: center; }
.rail figcaption {
  margin-top: 14px; text-align: center; font-size: 13px; font-weight: 800;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted);
}

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; max-width: 76ch; }
details.qa {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 2px 20px;
}
details.qa summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-family: 'Lilita One', sans-serif; font-size: 19px; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: '+'; color: var(--coral); font-size: 28px; line-height: 1; }
details.qa[open] summary::after { content: '\2212'; }
details.qa p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }

/* ---------- closing band: a little sky again ---------- */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  text-align: center; border-radius: 30px;
  padding: clamp(36px, 6vw, 64px) var(--pad) clamp(90px, 12vw, 120px);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  color: var(--outline);
}
.band h2 { font-size: clamp(32px, 6vw, 54px); }
.band h2 em { font-style: normal; color: var(--coral); -webkit-text-stroke: .1em var(--outline); paint-order: stroke fill; }
.band p { color: #26406a; font-weight: 700; max-width: 50ch; margin: 14px auto 0; }
.band .cta-row { justify-content: center; }
.band .skyline { height: 80px; }

/* ---------- text pages ---------- */
.page-head { padding: clamp(38px, 7vw, 68px) 0 0; }
.page-head h1 { font-size: clamp(38px, 6.6vw, 58px); }
.page-head .meta { color: var(--muted); font-size: 15px; margin-top: 14px; }
.prose { max-width: 76ch; padding: clamp(24px, 4vw, 34px) 0 0; }
.prose h2 {
  font-size: clamp(23px, 3.6vw, 30px); margin: 40px 0 12px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.prose h3 { font-size: 18px; margin: 26px 0 4px; color: var(--mustard); }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--coral); }
.prose strong { color: var(--ink); font-weight: 800; }
.prose code { font-size: .92em; background: var(--raised); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.prose .callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--coral); border-radius: var(--radius-sm);
  padding: 18px 22px; margin: 24px 0;
}
.prose .callout > :first-child { margin-top: 0; }
.prose .callout > :last-child { margin-bottom: 0; }
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 22px; margin-top: 8px;
}
.toc p {
  font-size: 13px; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: var(--dim); margin: 0;
}
.toc ul { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; column-gap: 26px; }
@media (max-width: 620px) { .toc ul { columns: 1; } }
.toc li { margin: 0 0 9px; font-size: 15px; break-inside: avoid; }

.table-scroll { overflow-x: auto; margin: 20px 0; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-family: 'Lilita One', sans-serif; font-weight: 400; letter-spacing: .4px; color: var(--ink); background: var(--card); }
table.data td { color: var(--muted); }
table.data tbody th { font-family: inherit; font-weight: 800; letter-spacing: 0; background: transparent; }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: 0; }
/* a three-column prose table is unreadable on a phone: stack it into labelled rows */
@media (max-width: 660px) {
  .table-scroll { overflow-x: visible; }
  table.data { min-width: 0; display: block; }
  table.data thead { display: none; }
  table.data tbody { display: block; }
  table.data tr { display: block; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
  table.data tr:last-child { border-bottom: 0; }
  table.data th, table.data td { display: block; border: 0; padding: 4px 14px; }
  table.data tbody th { font-family: 'Lilita One', sans-serif; font-weight: 400; color: var(--ink); font-size: 18px; padding-top: 12px; }
  table.data td::before {
    content: attr(data-label); display: block;
    font-size: 11.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim);
  }
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line); margin-top: clamp(40px, 7vw, 80px);
  padding: 40px 0 54px; background: #10172b;
}
.site-foot .shell { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
.site-foot .brand span { font-size: 19px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 700; }
.foot-links a:hover { color: var(--ink); }
.foot-links button.link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 700;
  color: var(--muted); cursor: pointer;
}
.foot-links button.link:hover { color: var(--ink); }
.copy { width: 100%; color: var(--dim); font-size: 13.5px; margin: 0; }
@media (max-width: 620px) { .foot-links { margin-left: 0; } }

/* ---------- 404 ---------- */
.oops { text-align: center; padding: clamp(60px, 12vw, 120px) 0; }
.oops h1 { font-size: clamp(64px, 15vw, 128px); color: var(--coral); }
.oops p { color: var(--muted); margin: 12px auto 30px; max-width: 44ch; }
.oops .popped { width: 90px; margin: 0 auto 18px; }

/* ---------- print (a privacy policy gets printed and filed) ---------- */
@media print {
  .site-head, .site-foot, .toc, .btn, .consent { display: none !important; }
  body { background: #fff; color: #111; font-size: 12pt; }
  .prose p, .prose li, .page-head .meta, table.data td { color: #333; }
  .prose h3 { color: #000; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ---------- analytics consent banner (assets/consent.js) ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 16px 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  color: var(--muted); font-size: 14px; line-height: 1.5;
}
.consent p { margin: 0; flex: 1 1 260px; }
.consent-btns { display: flex; gap: 10px; flex: 0 0 auto; }
.consent .btn { font-size: 15px; padding: 9px 16px; }
