/* Battlingo — the game's "Comic Brawl" look, ported to the web.
   Three devices carry the whole design and are reused everywhere: a thick ink outline, a HARD
   offset shadow (never blurred — a blurred shadow reads as material design, not as ink), and a
   halftone dot field. Colours are the game's own palette; every accent below appears in-game.
   --display is set per page by generate.mjs: Bangers has no CJK and untrusted Vietnamese, so
   those two locales get Nunito / the OS heavy face instead. */

:root {
  --bg: #fdf3df;
  --ink: #16140f;
  --dim: #6a5f4a;
  --primary: #ff3b6b;
  --accent: #ffd23f;
  --blue: #2da7ff;
  --green: #3ec46d;
  --purple: #b06bff;
  --surface: #ffffff;
  --display: Bangers, "Nunito", system-ui, sans-serif;
  /* The wordmark and the store names are latin brand names in every locale, so they keep Bangers
     even where --display has been swapped out for a CJK/Vietnamese-capable face. */
  --brand: Bangers, "Nunito", system-ui, sans-serif;
  --body: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  --edge: 3px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
  --pop-sm: 4px 4px 0 var(--ink);
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #c92b53; }

/* The halftone field. Two offset dot grids so the texture doesn't read as a plain lattice.
   The dot colour is its OWN property, never currentColor — a translucent currentColor would be
   inherited by every bit of text in the section and wash the whole thing out. */
.dots {
  --dot: rgba(255, 255, 255, 0.16);
  background-image:
    radial-gradient(var(--dot) 1.6px, transparent 1.7px),
    radial-gradient(var(--dot) 1.6px, transparent 1.7px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}

.display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0;
}

/* ---------------------------------------------------------------- header */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--primary);
  border-bottom: var(--edge);
  color: #fff;
}
header.site .bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
header.site a { color: #fff; text-decoration: none; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--brand);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: auto;
}
.brand img {
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--ink);
}
header.site nav { display: flex; gap: 16px; font-size: 14px; font-weight: 800; }
header.site nav a:hover { text-decoration: underline; }

/* The language picker is a real <select> on purpose: it is the one control that must work with
   no JS, on a phone, in nine scripts. */
.langpick {
  font: 700 13px/1 var(--body);
  color: var(--ink);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 7px 10px;
  cursor: pointer;
}

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

.hero {
  background: var(--primary);
  color: #fff;
  border-bottom: var(--edge);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 54px 20px 0;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 30px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--pop-sm);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 74px);
  /* Loose enough that the drop shadow of one line clears the caps of the next — 1.02 collides
     as soon as the headline wraps to two lines on a phone. */
  line-height: 1.09;
  /* The ink outline of the in-game headline, faked with four shadows so it works on any face.
     Offsets are in em so the outline and the drop stay proportional as the size clamps down. */
  text-shadow:
    0.04em 0 0 var(--ink), -0.04em 0 0 var(--ink), 0 0.04em 0 var(--ink), 0 -0.04em 0 var(--ink),
    0.12em 0.12em 0 rgba(22, 20, 15, 0.9);
}
.lede {
  font-size: 19px;
  font-weight: 600;
  max-width: 32em;
  margin: 20px 0 28px;
}

/* Store buttons. Neither store listing is public yet, so the default state is a "soon" badge —
   generate.mjs swaps in a real link the moment marketing.mjs says the listing is live. */
.cta { display: flex; flex-wrap: wrap; gap: 14px; padding-bottom: 40px; }
.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  padding: 11px 20px 11px 16px;
  background: var(--ink);
  color: #fff !important;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--pop-sm);
  text-decoration: none !important;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.store-btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-btn b { display: block; font-family: var(--brand); font-size: 20px; letter-spacing: 0.5px; }
.store-btn small { display: block; font-size: 11px; font-weight: 800; opacity: 0.75; letter-spacing: 0.6px; text-transform: uppercase; }
a.store-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
/* A muted-but-solid slate: a translucent ink reads as olive on the yellow card and maroon on
   the pink hero, i.e. as a rendering mistake rather than as a disabled button. */
.store-btn.soon { background: #423c31; cursor: default; }

.hero-shots {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-bottom: -60px;
}
.hero-shots .phone {
  width: 36%;
  margin: 0 -4%;
  border: var(--edge);
  border-radius: 22px;
  box-shadow: var(--pop);
  background: var(--ink);
}
.hero-shots .phone:nth-child(1) { transform: rotate(-7deg) translate(18px, -18px); z-index: 1; }
.hero-shots .phone:nth-child(2) { width: 42%; z-index: 3; }
.hero-shots .phone:nth-child(3) { transform: rotate(7deg) translate(-18px, -18px); z-index: 2; }

/* ---------------------------------------------------------------- sections */

section.band { padding: 66px 20px; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
section.band h2 {
  font-size: clamp(30px, 5vw, 46px);
  margin-bottom: 8px;
}
.rule {
  width: 84px;
  height: 8px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  margin: 14px 0 30px;
}

/* ---------------------------------------------------------------- features */

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.feature {
  background: var(--surface);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: var(--pop);
  padding: 22px;
  font-weight: 700;
  font-size: 17px;
}
.feature .ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  font-size: 27px;
  line-height: 1;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--pop-sm);
}

/* ---------------------------------------------------------------- screenshot rail */

.shots-band { background: var(--ink); color: #fff; border-top: var(--edge); border-bottom: var(--edge); }
.shots-band.dots { --dot: rgba(255, 255, 255, 0.09); }
.shots-band .rule { background: var(--primary); }
.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail figure {
  flex: none;
  /* The framed store shot includes its headline band, so it needs more width than the bare
     capture did to keep that headline readable. */
  width: 268px;
  margin: 0;
  scroll-snap-align: center;
}
.rail img {
  width: 100%;
  border: var(--edge);
  border-radius: 20px;
  box-shadow: var(--pop);
  background: var(--c);
}

/* ---------------------------------------------------------------- languages */

.langs-band { background: var(--blue); color: #fff; border-bottom: var(--edge); }
.langs-band.dots { --dot: rgba(255, 255, 255, 0.2); }
.langs-band p { font-size: 19px; font-weight: 600; max-width: 46em; }
.lang-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 28px 0 0; }
.lang-chips a,
.lang-chips strong {
  display: block;
  padding: 9px 18px;
  background: var(--surface);
  color: var(--ink) !important;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--pop-sm);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}
.lang-chips strong { background: var(--accent); }
.lang-chips a:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }

/* ---------------------------------------------------------------- price / closing CTA */

.price-card {
  background: var(--accent);
  border: var(--edge);
  border-radius: 24px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 40px;
  text-align: center;
}
.price-card p { font-size: 19px; font-weight: 600; max-width: 40em; margin: 18px auto 26px; }
.price-card .cta { justify-content: center; padding-bottom: 0; }

/* ---------------------------------------------------------------- documents (privacy/terms/support) */

main.doc { max-width: 760px; margin: 0 auto; padding: 44px 20px 72px; }
main.doc h1 { font-family: var(--display); font-size: clamp(32px, 6vw, 46px); text-transform: uppercase; margin: 0 0 6px; }
main.doc h2 { font-size: 21px; margin: 34px 0 8px; }
main.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.updated { color: var(--dim); font-size: 14px; margin: 0 0 26px; }
main.doc ul { padding-left: 22px; }
main.doc li { margin-bottom: 8px; }
.card {
  background: var(--surface);
  border: var(--edge);
  border-radius: 16px;
  box-shadow: var(--pop);
  padding: 20px 22px;
  margin: 22px 0;
}
.card.summary { background: #fff6cf; }

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

footer.site {
  background: var(--ink);
  color: #f6ecd6;
  border-top: var(--edge);
  padding: 40px 20px;
}
footer.site .wrap { display: grid; gap: 18px; }
footer.site a { color: var(--accent); }
footer.site .foot-brand { font-family: var(--brand); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 700; }
footer.site .langs { font-size: 14px; line-height: 2; color: #cbbfa5; }
footer.site .fine { font-size: 13px; color: #9c917c; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; gap: 8px; }
  .hero .cta { padding-bottom: 8px; }
  .hero-shots { margin-bottom: -80px; }
  .hero-shots { max-width: 460px; margin-left: auto; margin-right: auto; }
  .features { grid-template-columns: 1fr; }
  .price-card { padding: 28px 20px; }
  section.band { padding: 52px 20px; }
  .brand { font-size: 22px; }
  header.site nav { font-size: 13px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.store-btn:hover, .lang-chips a:hover { transform: none; }
}
