/* ============================================================
   Bwatacookie Studio — shared design system.

   Everything every page needs: tokens, the page chrome (header,
   footer, background), and the long-form document layout the legal
   pages use. Page-specific blocks (the home page's hero, game cards
   and key art) stay inline in index.html.

   Lives in one file so the three pages can't drift apart — which is
   exactly what happened when the legal pages carried their own copy
   of the palette.
   ============================================================ */

/* ---- tokens ------------------------------------------------ */
:root {
  color-scheme: dark;
  --ink: #f2f6f8;
  --ink-dim: #9fb0b8;
  --ink-faint: #64757e;
  --bg: #0a0f12;
  --bg-raised: #111a1f;
  --line: #1e2b32;
  --accent: #eef651;        /* Ball Journey's bonus yellow */
  --accent-2: #31b483;      /* its combo green */
  --accent-3: #e16565;      /* its spinner red */
  --radius: 18px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Two soft colour washes behind everything, fixed so the page scrolls
   over them rather than dragging them along. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 15% -10%, #15434f 0%, transparent 60%),
    radial-gradient(45rem 35rem at 95% 5%, #2a1f3d 0%, transparent 55%);
  opacity: 0.85;
}

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- header ------------------------------------------------ */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(10, 15, 18, 0.72);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: 1.02rem;
}
.brand .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(238, 246, 81, 0.16);
  flex: none;
}
nav {
  display: flex;
  gap: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-dim);
}
nav a { text-decoration: none; transition: color 0.18s; }
nav a:hover { color: var(--accent); }
@media (max-width: 560px) { nav a.hide-sm { display: none; } }

/* ---- section heading, shared by home and documents --------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 30px;
}
.section-head h2,
h2.kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.rule { flex: 1; height: 1px; background: var(--line); }

/* ---- long-form document (privacy, terms) ------------------- */
.doc { padding: 72px 0 96px; max-width: 760px; }

.doc .back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.18s;
}
.doc .back:hover { color: var(--accent); }

.doc h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin: 26px 0 0;
}

.doc .updated {
  margin: 10px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* The opening paragraph carries the document's scope, so it gets a
   little more presence than the body copy that follows. */
.doc .intro {
  margin: 28px 0 0;
  font-size: 1.05rem;
  color: var(--ink-dim);
  padding-left: 18px;
  border-left: 2px solid var(--accent-2);
}

.doc h2 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 46px 0 0;
}

.doc p,
.doc li { color: var(--ink-dim); }
.doc p { margin: 12px 0 0; }

.doc ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.doc ul li {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 0.95rem;
}
.doc ul li strong { color: var(--ink); }

.doc a:not(.back) {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(49, 180, 131, 0.35);
}
.doc a:not(.back):hover { border-bottom-color: var(--accent-2); }

/* ---- footer ------------------------------------------------ */
footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 36px 0 56px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--ink-faint);
}
.foot nav { font-size: 0.86rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
