/* =========================================================
   WEHAMH, PC — legal stylesheet
   Shared by privacy.html and terms-of-service.html
   ========================================================= */

:root {
  --bg: #0B0E14;
  --bg-2: #10141D;
  --surface: #131826;
  --surface-2: #1A2030;
  --border: #232A3B;
  --border-soft: #1B2233;
  --text: #E8EAED;
  --text-dim: #9AA3B5;
  --text-faint: #6C7690;
  --amber: #F0A83C;
  --violet: #8B6CF0;
}

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

html { scroll-behavior: smooth; }

.legal-page {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Header (solid/gradient, NOT a section) ---- */

.legal-header {
  background: linear-gradient(135deg, #171c2b, #10141d);
  border-bottom: 1px solid var(--border-soft);
  padding: 0;
}

.legal-header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.legal-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #F0A83C, #d18a1f);
  color: #14100a;
  font-weight: 800;
  font-size: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-brand-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.legal-brand-sub { color: var(--amber); }

.legal-header .legal-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.legal-header .legal-subtitle {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 16px;
}

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

.legal-content {
  padding: 48px 0 72px;
}

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

/* Scope isolation: guarantee homepage section styling never leaks */
.legal-content section {
  background-color: transparent !important;
  color: var(--text) !important;
}

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

.legal-toc h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 16px;
  font-weight: 700;
}

.legal-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-toc li { counter-increment: toc; }

.legal-toc a {
  color: var(--text-dim);
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  transition: color 0.2s ease;
}

.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 12px;
  color: var(--violet);
  font-weight: 700;
}

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

/* Body sections */
.legal-content section {
  margin-bottom: 44px;
  padding-top: 8px;
}

.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}

.legal-content p {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-dim);
  margin: 0 0 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-content strong { color: var(--text); }
.legal-content a { color: var(--amber); }
.legal-content a:hover { text-decoration: underline; }

.legal-content .legal-highlight {
  background-color: var(--surface);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.legal-content .legal-highlight p { margin-bottom: 0; }

/* ---- Footer ---- */

.legal-footer {
  background-color: var(--bg-2);
  border-top: 1px solid var(--border-soft);
  padding: 40px 24px;
}

.legal-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.legal-footer-inner a {
  color: var(--amber);
  font-weight: 600;
}

.legal-footer-inner a:hover { text-decoration: underline; }

.legal-footer-inner .legal-footer-meta {
  color: var(--text-faint);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
