/* =========================================================
   ChefGood — shared legal stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   ========================================================= */

:root {
  --bg: #16110e;
  --bg-2: #1e1712;
  --surface: #221a15;
  --surface-2: #2a2018;
  --line: #3a2d23;
  --ink: #f4ede3;
  --muted: #b5a695;
  --faint: #8d7f6e;
  --accent: #ff6a3d;
  --accent-2: #ff8a5c;
  --champagne: #ffc38f;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-size: 16px;
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The legal page body must define its own background and text color. */
.legal-page {
  background-color: var(--bg);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}

p { color: var(--muted); }

/* ---------------- Header ---------------- */
.legal-header {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--champagne) 100%);
  border-bottom: 1px solid var(--line);
}
.legal-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 46px;
}
.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: #1a120c;
  margin-bottom: 30px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: #1a120c;
  color: var(--champagne);
  font-weight: 700;
  font-size: 15px;
}
.legal-header h1 {
  font-size: 46px;
  letter-spacing: -0.01em;
  color: #1a120c;
  margin-bottom: 12px;
}
.legal-header-sub {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #5a2c18;
}

/* ---------------- Content ---------------- */
.legal-content {
  padding: 60px 0 70px;
}

/* Scope isolation: keep section backgrounds transparent within the body content only. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Table of contents ---------------- */
.legal-toc {
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 48px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.toc-list {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}
.toc-list li {
  counter-increment: toc;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.toc-list li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}
.toc-list a {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.15s ease;
}
.toc-list a:hover { color: var(--champagne); }

/* ---------------- Sections ---------------- */
.legal-content section {
  padding: 20px 0 40px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.legal-content section:last-of-type { border-bottom: none; }

.legal-content h2 {
  font-size: 27px;
  color: var(--ink);
  margin-bottom: 18px;
}
.legal-content h3 {
  font-size: 20px;
  color: var(--ink);
  margin: 22px 0 10px;
}
.legal-content p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 16px;
}
.legal-content p:last-child { margin-bottom: 0; }

/* ---------------- Footer ---------------- */
.legal-footer {
  background-color: var(--bg-2);
  border-top: 1px solid var(--line);
}
.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.legal-footer-inner p {
  font-size: 14px;
  color: var(--faint);
}
.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.legal-footer-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.legal-footer-links a:hover { color: var(--champagne); }

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  .legal-header h1 { font-size: 34px; }
  .toc-list { grid-template-columns: 1fr; }
  .legal-content { padding: 48px 0 56px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}
