/*
 * Shared styling for the legal pages (privacy.html, terms.html).
 *
 * Reuses the public site's palette and typography tokens so the legal pages read as part of the
 * same product, then adds just the layout a long document needs: a narrow prose column, section
 * spacing, a table-of-contents strip and footnotes. Colours are duplicated from index.html because
 * this is a static site with no build step and no shared stylesheet — keeping the values here means
 * the legal pages can evolve without touching the landing page.
 */

:root {
  --cream: #faf3e8;
  --cream-deep: #f3e8d6;
  --paper: #fdf8ef;
  --ink: #1f1d2b;
  --ink-soft: #4a4658;
  --ink-muted: #8a8694;
  --orange: #ff8a00;
  --orange-deep: #f26a00;
  --gold: #fba524;
  --wine: #9b1236;
  --blue: #12a7e0;
  --line: rgba(31, 29, 43, 0.1);
  --shadow-soft: 0 10px 24px -14px rgba(60, 40, 20, 0.3);
  --radius: 22px;
  --maxw: 1080px;
  --prose: 760px;
  --font-body: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Nunito", var(--font-body);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--cream);
  background-image: url("assets/doodle-bg.jpg");
  background-size: 620px;
  background-repeat: repeat;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 243, 232, 0.88),
    rgba(250, 243, 232, 0.94) 40%,
    rgba(250, 243, 232, 0.98)
  );
  z-index: -1;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: var(--wine);
}

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

/* ---------- Top bar (matches support.html) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  background: rgba(250, 243, 232, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 6px 14px -8px rgba(60, 40, 20, 0.6);
}

.brand span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.topnav a {
  text-decoration: none;
}

.topnav a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 14px 26px -12px rgba(255, 138, 0, 0.95);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #ff9a26;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .topnav {
    display: none;
  }
}

/* ---------- Document layout ---------- */
.doc {
  padding: 56px 0 48px;
}

.doc-head {
  max-width: var(--prose);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--orange);
}

.doc-head h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 900;
  margin: 16px 0 0;
}

.doc-head .lede {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.doc-meta {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Table-of-contents strip. */
.toc {
  margin: 34px auto 0;
  max-width: var(--prose);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
}

.toc h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 32px;
  font-size: 14.5px;
}

.toc li {
  margin: 4px 0;
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
  color: var(--ink-soft);
}

.toc a:hover {
  color: var(--wine);
}

.prose {
  max-width: var(--prose);
  margin: 0 auto;
}

.prose section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.prose section:first-of-type {
  border-top: 0;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 22px 0 8px;
}

.prose p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--ink-soft);
}

.prose li {
  margin: 7px 0;
}

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

.prose a {
  font-weight: 600;
}

/* A quiet callout for important notes. */
.callout {
  background: rgba(255, 138, 0, 0.1);
  border: 1px solid rgba(242, 106, 0, 0.28);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 8px 0 18px;
}

.callout p {
  margin: 0;
  color: var(--ink);
}

/* Back / cross links at the end of a document. */
.doc-foot {
  max-width: var(--prose);
  margin: 8px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 600;
  font-size: 14.5px;
}

.doc-foot a {
  text-decoration: none;
}

.doc-foot a:hover {
  text-decoration: underline;
}

/* ---------- Footer (matches support.html) ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  background: rgba(255, 255, 255, 0.4);
  margin-top: 40px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.foot-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 14px;
}

.foot-left img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.foot-links a {
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

@media (max-width: 680px) {
  .doc {
    padding: 40px 0;
  }

  .wrap {
    padding: 0 18px;
  }

  .toc ol {
    columns: 1;
  }
}
