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

:root {
  --bg: #f6f3ee;
  --bg-soft: #ede8df;
  --surface: #ffffff;
  --ink: #1b1b1b;
  --ink-soft: #4a4a4a;
  --ink-mute: #6b6a66;
  --accent: #4338ca;
  --accent-deep: #312e81;
  --accent-tint: #eef0fc;
  --line: #ded8cc;
  --line-soft: #ece7dd;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  color: var(--ink);
}

/* The legal pages must set their own body background — they load
   only this stylesheet, never style.css. */
.legal-page {
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }

/* ============================================================
   Legal header (a <div>, never a <section>)
   ============================================================ */

.legal-header {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  padding: 72px 0 56px;
}

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

.legal-header .kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c7d2fe;
  margin-bottom: 14px;
}

.legal-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 14px;
}

.legal-header .updated {
  color: #d6d2f5;
  font-size: 0.95rem;
}

.legal-header .back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 10px 18px;
  border-radius: 999px;
  background-color: #ffffff;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.legal-header .back-home:hover {
  background-color: var(--accent-tint);
  color: var(--accent-deep);
  text-decoration: none;
}

/* ============================================================
   Legal content container (centered, padded)
   ============================================================ */

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

/* Scope isolation — guarantee homepage section styling can never
   pollute legal pages. Scoped to body content only. */
.legal-page .legal-content section {
  background-color: transparent !important;
  color: var(--ink) !important;
}

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

/* ============================================================
   Table of contents
   ============================================================ */

.toc {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 44px;
}

.toc h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--ink);
}

.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
  font-size: 0.92rem;
}

.toc ol li a {
  color: var(--ink-soft);
  display: flex;
  gap: 10px;
  padding: 4px 0;
}

.toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
}

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

/* ============================================================
   Legal sections and headings
   ============================================================ */

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

.legal-content section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.legal-content section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 24px 0 10px;
}

.legal-content section p {
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.legal-content section ul,
.legal-content section ol {
  margin: 0 0 18px 22px;
  color: var(--ink-soft);
}

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

.legal-content section strong {
  color: var(--ink);
  font-weight: 700;
}

.legal-content section a {
  color: var(--accent);
  font-weight: 600;
}

.legal-note {
  background-color: var(--accent-tint);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ============================================================
   Legal footer
   ============================================================ */

.legal-footer {
  background-color: var(--ink);
  color: #d8d6d0;
  padding: 40px 0;
  margin-top: 0;
}

.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.legal-footer .brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 10px;
}

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

.legal-footer a {
  color: #c7d2fe;
  font-weight: 600;
}

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

.legal-footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
  .toc ol { grid-template-columns: 1fr; }
  .legal-header { padding: 56px 0 44px; }
  .legal-content { padding: 40px 0 60px; }
}
