/* ============================================================
   Man Cun Catering Culture Limited — Legal pages stylesheet
   Shared by privacy.html and terms-of-service.html
   ============================================================ */

:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #1B1B22;
  --ink-soft: #4B4B57;
  --line: #DDD7C9;
  --primary: #2A4BC7;
  --primary-deep: #1C3490;
  --primary-soft: #E7ECFB;
  --accent: #0E8A6B;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Legal page base: define the body background and text color here */
.legal-page {
  background-color: var(--bg);
  color: var(--ink);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header (div/header element, solid background) ---------- */
.legal-header {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, var(--accent) 130%);
  padding: 72px 24px 60px;
  text-align: center;
}

.legal-header .legal-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-header .legal-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C6D0F2;
  margin-bottom: 16px;
}

.legal-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 16px;
}

.legal-header p {
  color: #D9DFF4;
  font-size: 1.02rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Table of contents ---------- */
.legal-toc {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 30px;
  margin: 0 0 40px;
}

.legal-toc h2 {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 36px;
}

.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 8px;
  break-inside: avoid;
}

.legal-toc ol li a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.legal-toc ol li a:hover {
  color: var(--primary);
  text-decoration: none;
}

.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--primary);
  font-weight: 700;
  margin-right: 8px;
  font-size: 0.85rem;
}

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

.legal-content {
  padding: 56px 0 64px;
}

/* Scope isolation: legal sections are never painted by homepage rules */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-top: 12px;
}

.legal-content h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 20px 0 8px;
}

.legal-content p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-size: 1rem;
}

.legal-content ul {
  margin: 0 0 16px 24px;
  color: var(--ink-soft);
}

.legal-content ul li {
  margin-bottom: 8px;
}

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

/* Back to top link */
.legal-backtop {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: var(--ink);
  color: #EDEDF2;
  padding: 40px 24px;
  text-align: center;
}

.legal-footer .legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-footer .legal-footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.legal-footer p {
  color: #B9B9C4;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.legal-footer a {
  color: #FFFFFF;
  font-weight: 600;
  margin: 0 10px;
}

.legal-footer a:hover {
  color: #C6D0F2;
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 1.9rem;
  }

  .legal-toc ol {
    columns: 1;
  }
}
