/* Block Frenzy legal pages.
   Palette and type are taken from the game: espresso-ink background, terracotta
   and gold accents, Bungee for the wordmark, Baloo 2 for everything else.
   Section cards echo the in-game panels; the divider tiles echo the gold-rimmed
   jewel blocks from the app icon. */

:root {
  --bg-1: #241C17;          /* espresso ink */
  --bg-2: #150F0D;
  --surface: #2E2520;       /* espresso panel */
  --surface-2: #3A2F28;
  --text: #F5EDE4;          /* warm cream */
  --muted: #C8B8A6;
  --accent: #E4623A;        /* terracotta - hero accent */
  --accent-2: #3E93A8;      /* muted teal - secondary */
  --gold: #E9B44C;
  --line: rgba(245, 237, 228, 0.14);

  /* Jewel colours lifted from the app icon. */
  --jewel-red: #C0392B;
  --jewel-blue: #3A7CA8;
  --jewel-gold: #E0A82E;
  --jewel-purple: #7B5FA8;
  --jewel-green: #4A9A4F;
  --jewel-pink: #C9527E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(228, 98, 58, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(233, 180, 76, 0.10), transparent 70%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.68;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Masthead ---------- */

header.masthead { padding: 52px 22px 38px; text-align: center; }

.app-icon {
  width: 104px; height: 104px;
  margin: 0 auto 22px;
  display: block;
  border-radius: 24px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(233, 180, 76, 0.28);
}

/* Two-tone wordmark, matching the icon: cream BLOCK over gold FRENZY, each with
   an offset shadow rather than an outline. */
.wordmark {
  font-family: Bungee, "Baloo 2", system-ui, sans-serif;
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.wordmark span { display: block; }
.wordmark .block {
  font-size: clamp(30px, 8.5vw, 50px);
  color: var(--text);
  text-shadow: 0 4px 0 #A8341C;
}
.wordmark .frenzy {
  font-size: clamp(30px, 8.5vw, 50px);
  color: var(--gold);
  text-shadow: 0 4px 0 #9A6B17;
}

h1 {
  font-size: clamp(21px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.tag {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Jewel divider ---------- */

/* Gold-rimmed keycaps with a gloss highlight, as in the app icon. */
.jewels { display: flex; gap: 10px; justify-content: center; margin: 26px auto 0; }
.jewel {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 2px solid rgba(233, 180, 76, 0.85);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4), inset 0 -6px 10px rgba(0, 0, 0, 0.22);
}
.jewel::after {
  content: "";
  position: absolute;
  top: 15%; left: 18%;
  width: 40%; height: 26%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}
.jewel.r { background: var(--jewel-red); }
.jewel.b { background: var(--jewel-blue); }
.jewel.y { background: var(--jewel-gold); }
.jewel.p { background: var(--jewel-purple); }
.jewel.g { background: var(--jewel-green); }
.jewel.k { background: var(--jewel-pink); }

/* ---------- Content ---------- */

main.page { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 60px; }

nav.legal-nav {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 26px;
}
nav.legal-nav a {
  font-size: 12.5px; font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
nav.legal-nav a:hover { color: var(--text); background: var(--surface-2); }
nav.legal-nav a[aria-current="page"] {
  color: #2A1008; background: var(--gold); border-color: var(--gold);
}

.date {
  color: var(--muted); text-align: center;
  margin-bottom: 24px; font-size: 12.5px;
  letter-spacing: 0.02em;
}

section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

h2 {
  font-size: 19px; font-weight: 800;
  margin-bottom: 12px;
  color: var(--gold);
  letter-spacing: 0.005em;
}
h3 {
  font-size: 15px; font-weight: 700;
  margin: 16px 0 6px;
  color: var(--accent-2);
}

p, li { font-size: 14.5px; color: var(--text); margin-bottom: 10px; }
ul, ol { padding-left: 22px; }
li::marker { color: var(--accent); }
strong { font-weight: 800; }

.note, .steps {
  background: rgba(62, 147, 168, 0.12);
  border-left: 4px solid var(--accent-2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 14px;
}
.steps {
  background: rgba(228, 98, 58, 0.12);
  border-left-color: var(--accent);
  padding: 16px 18px 16px 38px;
}
.note p:last-child, .steps li:last-child { margin-bottom: 0; }

a { color: var(--accent); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

footer.footer {
  text-align: center; color: var(--muted);
  padding: 0 20px 48px; font-size: 13px;
}
footer.footer a { color: var(--muted); font-weight: 700; }
footer.footer a:hover { color: var(--gold); }

@media (max-width: 480px) {
  header.masthead { padding: 38px 18px 30px; }
  .app-icon { width: 84px; height: 84px; border-radius: 20px; }
  section { padding: 20px; border-radius: 16px; }
  .jewel { width: 26px; height: 26px; }
}

/* The pages are a single dark treatment by design, matching the game. Respect a
   reduced-motion preference by dropping the fixed background attachment, which
   is the only thing here that moves. */
@media (prefers-reduced-motion: reduce) {
  body { background-attachment: scroll; }
}
