/* Fold 'em site: the game's look (DESIGN.md). Flat colour, the sticker
   (light shape, dark outline, a dark copy a little lower), the first
   world's cyan, yellow cells, orange Cel, gold stars. */

@font-face {
  font-family: Nunito;
  src: url("fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ground: #10A2BF;      /* WorldPalette cyan, the first world */
  --ink: #1F2937;         /* cell outline (border_material) */
  --sticker-ink: #262626; /* the sticker's outline (color_label3d) */
  --cell: #FFD23F;        /* cells and buttons (color_button_bg) */
  --cell-hover: #FFE066;
  --cel: #FF7300;         /* Cel (active_cell_material) */
  --gold: #FFA500;        /* stars */
  --text: #fff;
  --text-shadow: rgba(0, 38, 64, 0.5); /* color_label_shadow */
  --button-text: #1A1A2E;
  --outline: 4px;         /* GameTheme.STICKER_OUTLINE */
  --edge: 8px;            /* GameTheme.STICKER_EDGE */
  --radius: 12px;
}

* { box-sizing: border-box; }

html { background: var(--ground); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font: 600 19px/1.55 Nunito, system-ui, sans-serif;
  text-shadow: 1px 2px 0 var(--text-shadow);
  -webkit-font-smoothing: antialiased;
}

/* The drifting squares and the vignette sit behind everything */
#squares, .vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.vignette {
  background: radial-gradient(ellipse 62% 56% at 50% 58%,
    transparent 55%, rgba(0, 20, 40, 0.16) 100%);
}

main, footer { position: relative; z-index: 1; }

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 16px 32px;
}

/* Sticker text: white, a dark outline, the dark copy below */
.sticker-text {
  color: #fff;
  -webkit-text-stroke: 0.16em var(--sticker-ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--sticker-ink);
  font-weight: 900;
  letter-spacing: 0.01em;
}

h1, h2 { margin: 0; line-height: 1.1; }
h2 { font-size: 28px; font-weight: 900; }

a { color: #FFF3B0; text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible, .board:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

/* The game's button: yellow, outlined, standing on its dark edge; pressed,
   it sinks into it */
.button {
  display: inline-block;
  padding: 10px 22px;
  background: var(--cell);
  color: var(--button-text);
  border: var(--outline) solid var(--sticker-ink);
  border-bottom-width: calc(var(--outline) + var(--edge));
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  text-shadow: none;
  transition: background-color 0.12s;
}
.button:hover { background: var(--cell-hover); }
.button:active {
  border-bottom-width: var(--outline);
  transform: translateY(var(--edge));
}

/* ---------- Pages with text (support, privacy) ---------- */

.page-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
}
.page-head img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: var(--outline) solid var(--sticker-ink);
  box-shadow: 0 6px 0 var(--sticker-ink);
}
.page-head h1 { font-size: clamp(34px, 7vw, 48px); }

.prose { max-width: 640px; }
.prose h2 { font-size: 23px; margin-top: 36px; }
.prose p { margin: 10px 0 0; }

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

footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 18px;
}
footer small {
  flex-basis: 100%;
  font-size: 14px;
  opacity: 0.85;
}
