/* Boondoggle Games studio pages: privacy policy, license agreement, 404.
   Same frame as the homepage: paper ground, Bricolage Grotesque, ink. */

:root {
  --paper: #f4f4f1;
  --ink: #1a1a1f;
  --ink-soft: #4a4a55;
  --line: #d9d9d2;
  --studio: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--studio);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

img {
  display: block;
}

/* ---------- Top bar (matches the homepage) ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}

.topbar a {
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wordmark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ---------- Legal document ---------- */

.doc-head {
  padding: clamp(48px, 7vw, 96px) var(--gutter) 40px;
  border-bottom: 3px solid var(--ink);
}

.doc-head h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.doc-head p {
  margin: 20px 0 0;
  max-width: 40rem;
  font-size: 19px;
  color: var(--ink-soft);
}

.doc {
  display: grid;
  grid-template-columns: minmax(200px, 0.32fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: start;
  padding: 56px var(--gutter) 96px;
}

.toc {
  position: sticky;
  top: 24px;
  font-size: 15px;
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.toc li {
  border-bottom: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 9px 0;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
}

.toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose {
  max-width: 44rem;
  font-size: 18px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 56px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  scroll-margin-top: 24px;
}

.prose h3 {
  margin: 28px 0 6px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  text-underline-offset: 3px;
}

.prose em {
  color: var(--ink-soft);
}

/* ---------- 404 ---------- */

.lost {
  padding: clamp(56px, 9vw, 120px) var(--gutter) 96px;
}

/* .lost > .lost-code outranks the generic .lost > p rule below */
.lost > .lost-code {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(6rem, 22vw, 18rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.lost h1 {
  margin: 28px 0 0;
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.lost > p {
  margin: 16px 0 0;
  max-width: 34rem;
  font-size: 19px;
  color: var(--ink-soft);
}

.lost-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 3px solid var(--ink);
}

.lost-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  transition: transform 0.2s ease;
}

.lost-links a:hover {
  transform: translateY(-3px);
}

.lost-links img {
  width: 52px;
  height: 52px;
  border-radius: 27%;
}

.home-link {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Footer (matches the homepage) ---------- */

footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px var(--gutter) 40px;
}

.foot {
  max-width: 1340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hello {
  align-self: flex-start;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.hello:hover {
  color: #ffffff;
}

footer :focus-visible {
  outline-color: var(--paper);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin: 0;
  font-size: 15px;
  color: #b9b9c2;
}

.foot-row span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot-row a {
  color: var(--paper);
}

@media (max-width: 860px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lost-links a {
    transition: none;
  }
}
