/*
 * The public pages (home, support, privacy, terms, credits), dressed in the
 * game's own colours: the royal-blue ribbon, the gold keyline, cream paper and
 * bark-brown ink. Headings are Baloo 2, the game's face; body text is the
 * system font, because a privacy policy has to be read, not admired.
 */
@font-face {
  font-family: 'Baloo 2';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/baloo-2-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Baloo 2';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/baloo-2-latin-800-normal.woff2') format('woff2');
}

:root {
  --blue: #164a9e;
  --blue-deep: #0c2f70;
  --blue-bright: #2a6bd0;
  --gold: #ffd84a;
  --gold-deep: #e0a100;
  --paper: #fffaf0;
  --page: #f6ead0;
  --edge: #ecd6a4;
  --ink: #3a2410;
  --ink-soft: #6d4a1f;
  --leaf: #2a7a48;
  --leaf-deep: #1d5c35;
  --link: #1f5fbf;
  --display: 'Baloo 2', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 var(--text);
}

.band {
  background: linear-gradient(180deg, var(--blue-bright) 0%, var(--blue) 55%, var(--blue-deep) 100%);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 3px 0 var(--gold-deep);
  padding: max(18px, env(safe-area-inset-top)) 16px 18px;
  text-align: center;
}
.band a { display: inline-block; }
.band img { width: 220px; max-width: 70vw; height: auto; display: block; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 8px;
}
.paper {
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 20px;
  padding: 26px clamp(18px, 5vw, 40px) 30px;
  box-shadow: 0 2px 0 var(--edge);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 6vw, 40px); font-weight: 800; color: var(--blue); }
h2 { font-size: 23px; font-weight: 800; color: var(--ink); margin-top: 30px; }
h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 20px; }
h1 + p, h2 + p, h3 + p, h2 + ul, h3 + ul { margin-top: 8px; }
.stamp { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }
p, ul, ol, dl { margin: 12px 0 0; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 6px; }
strong { font-weight: 650; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }

/* A term and its explanation, for "what we collect". */
dl.facts { display: grid; gap: 14px; }
dl.facts div { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1.5px solid var(--edge); }
dl.facts dt { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2; }
dl.facts dd { margin: 4px 0 0; }

.lead { font-size: 19px; color: var(--ink-soft); }
.aside {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fdf2d2;
  border: 1.5px solid #f1d58a;
}

/* -- home -------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.hero > img { width: 150px; height: auto; margin-bottom: -30px; }
.hero h1 { font-size: clamp(32px, 7vw, 46px); }
.pillars { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 22px; }
.pillars li { margin: 0; padding: 14px 16px; background: #fff; border: 1.5px solid var(--edge); border-radius: 14px; }
.pillars b { font-family: var(--display); font-size: 19px; display: block; line-height: 1.2; }
/* Apple's own badge, untouched: at least 40px tall, a quarter of its height clear around it. */
.store { display: inline-block; margin-top: 4px; padding: 14px 0; }
.store img { display: block; width: 168px; height: 56px; }

/* -- support form -------------------------------------------------------- */
form { display: grid; gap: 14px; margin-top: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 16px; }
label small { font-weight: 400; font-size: 15px; color: var(--ink-soft); }
input, select, textarea {
  font: 17px/1.4 var(--text);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--edge);
  border-radius: 12px;
  padding: 11px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(42, 107, 208, .35); border-color: var(--blue-bright); }
textarea { min-height: 150px; resize: vertical; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button {
  justify-self: start;
  font: 800 19px/1 var(--display);
  color: #fff;
  background: linear-gradient(180deg, #5fc36b, var(--leaf));
  border: 0;
  border-radius: 999px;
  padding: 13px 26px 11px;
  box-shadow: 0 4px 0 var(--leaf-deep);
  cursor: pointer;
}
button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--leaf-deep); }
button[disabled] { opacity: .6; cursor: default; }
.status { font-weight: 600; }
.status.bad { color: #a32020; }
.thanks { text-align: center; padding: 10px 0 4px; }
.thanks img { width: 110px; height: auto; }

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px max(28px, env(safe-area-inset-bottom));
  color: var(--ink-soft);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
}
footer a { color: var(--ink-soft); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero > img { display: none; }
}
