/* wallfall.app: one stylesheet for every page. Colours come from the game's
   palette (game/core/palette.gd, decision 004): backdrop navy, bone type and
   the five brick colours of the wordmark strip. Dark is the brand look; light
   mode swaps to bone paper with navy type. */

@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --brick-1: #ec4a5e;
  --brick-2: #f0803c;
  --brick-3: #f0b64a;
  --brick-4: #63d26f;
  --brick-5: #33c8c0;

  /* light */
  --bg: #f5f0e6;
  --bg-deep: #ebe4d6;
  --surface: #fffdf8;
  --border: rgba(18, 26, 36, 0.12);
  --text: #121a24;
  --text-dim: #4f5d70;
  --link: #1d64c4;
  --placeholder-bg: #fbe3a6;
  --placeholder-text: #5c3b00;
  --hero-text: #f5f0e6;
  --hero-dim: #8d9bb0;

  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Rubik", var(--body);
  --gutter: 16px;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a24;
    --bg-deep: #090d13;
    --surface: #1d2733;
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f0e6;
    --text-dim: #8d9bb0;
    --link: #6cb2ff;
    --placeholder-bg: #4a3a12;
    --placeholder-text: #f2d35b;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brick-3); outline-offset: 2px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 800 1.05rem/1 var(--display);
  letter-spacing: 0.04em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 12px; }
.site-nav a { font: 500 0.95rem/1.2 var(--display); text-decoration: none; color: var(--text-dim); padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .lang {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
/* Narrow phones: the icon alone stands for the brand. */
@media (max-width: 359px) {
  .brand .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

main { flex: 1; display: flex; flex-direction: column; }
main > * { flex: 0 0 auto; }
main > .hero { flex: 1 0 auto; }

/* wordmark: WALLFALL over a five-brick strip (game/core/wordmark.gd) */
.wordmark {
  display: inline-block;
  margin: 0;
  font: 800 clamp(2.6rem, 13vw, 4.5rem)/1 var(--display);
  letter-spacing: 0.04em;
  margin-right: -0.04em;
}
.strip {
  display: flex;
  gap: 0.12em;
  height: 0.17em;
  margin-top: 0.21em;
  margin-right: 0.04em;
}
.strip span { flex: 1; border-radius: 0.06em; box-shadow: inset 0 -0.04em 0 rgba(0, 0, 0, 0.35); }
.strip span:nth-child(1) { background: var(--brick-1); }
.strip span:nth-child(2) { background: var(--brick-2); }
.strip span:nth-child(3) { background: var(--brick-3); }
.strip span:nth-child(4) { background: var(--brick-4); }
.strip span:nth-child(5) { background: var(--brick-5); }

/* home */
.hero {
  background: #121a24 radial-gradient(ellipse at 50% 35%, #1d2733 0%, #121a24 55%, #090d13 100%);
  color: var(--hero-text);
  text-align: center;
  padding: 48px 0 56px;
}
.hero .icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.hero .wordmark { color: var(--hero-text); margin-top: 28px; }
.pitch {
  font: 800 clamp(1.25rem, 5.2vw, 1.6rem)/1.25 var(--display);
  margin: 28px 0 10px;
}
.promo { color: var(--hero-dim); margin: 0 auto; max-width: 32rem; }
.soon {
  display: inline-block;
  margin: 32px 0 16px;
  font: 500 0.95rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick-3);
}
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
/* Placeholder slots: the official App Store and Google Play badges replace
   these once each listing is live. */
.badge-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 164px;
  height: 52px;
  padding: 0 16px;
  border: 1.5px dashed rgba(245, 240, 230, 0.35);
  border-radius: 10px;
  color: var(--hero-dim);
  text-align: left;
}
.badge-slot small { font-size: 0.7rem; line-height: 1.2; }
.badge-slot strong { font: 500 1.05rem/1.2 var(--display); color: var(--hero-text); }

/* documents */
.doc { padding: 40px 0 56px; }
.doc h1 {
  font: 800 clamp(1.8rem, 7vw, 2.4rem)/1.15 var(--display);
  margin: 0 0 8px;
}
.doc h2 {
  font: 800 1.3rem/1.3 var(--display);
  margin: 2.2em 0 0.5em;
  scroll-margin-top: 16px;
}
.doc h3 { font: 500 1.05rem/1.4 var(--display); margin: 1.6em 0 0.4em; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 0.35em; }
.meta { color: var(--text-dim); margin: 0 0 24px; }
.lede { font-size: 1.08rem; }
.meta.end { margin: 32px 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.toc ol { margin: 0; padding-left: 1.3em; columns: 2 14rem; column-gap: 24px; }
.toc li { break-inside: avoid; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--text-dim); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd + dt { margin-top: 10px; }
}

/* Every value still to be filled in is wrapped in <mark class="ph">. */
mark.ph {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 10px 0;
}
summary {
  cursor: pointer;
  padding: 14px 18px;
  font: 500 1rem/1.4 var(--display);
}
details > :not(summary) { margin: 0 18px 14px; }

.mail {
  font: 500 1.15rem/1.4 var(--display);
  overflow-wrap: anywhere;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 20px 0 28px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: inherit; }
