/* =========================================================
   BerriesGroup — shared legal stylesheet
   Used ONLY by privacy.html and terms-of-service.html
   Dark berry canvas matching the homepage theme.
   ========================================================= */

.legal-page {
  background-color: #120B0D;
  color: #F3E9EC;
}

.legal-page {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.legal-page * {
  box-sizing: border-box;
}

.legal-page a {
  color: #F43F5E;
  text-decoration: none;
}

.legal-page a:hover {
  color: #F3E9EC;
}

/* ---------- Header (a <header> element, never a <section>) ---------- */

.legal-header {
  background: linear-gradient(135deg, #1A1115 0%, #241720 55%, #2D1C25 100%);
  border-bottom: 1px solid #33222B;
  padding: 26px 0 28px;
}

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

.legal-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.legal-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F3E9EC;
}

.legal-brand:hover {
  color: #F43F5E;
}

.legal-back {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F3E9EC;
  background-color: #BE123C;
  padding: 10px 18px;
  border-radius: 999px;
}

.legal-back:hover {
  background-color: #F43F5E;
  color: #F3E9EC;
}

.legal-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  color: #F3E9EC;
  margin-bottom: 10px;
}

.legal-meta {
  font-size: 0.95rem;
  color: #C3AAB3;
}

/* ---------- Table of contents ---------- */

nav.toc {
  background-color: #1A1115;
  border: 1px solid #33222B;
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 12px;
}

nav.toc .toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F43F5E;
  margin-bottom: 16px;
}

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

nav.toc a {
  color: #C3AAB3;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  display: inline-block;
  padding: 2px 0;
}

nav.toc a:hover {
  color: #F43F5E;
}

nav.toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  color: #BE123C;
  font-weight: 800;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}

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

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

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

/* Scope isolation: never let shared IDs bleed backgrounds onto legal sections */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  padding: 40px 0;
  border-bottom: 1px solid #291A21;
}

.legal-content section:last-of-type {
  border-bottom: none;
  padding-bottom: 8px;
}

.legal-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #F3E9EC;
  margin-bottom: 18px;
  line-height: 1.25;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F43F5E;
  margin: 22px 0 10px;
}

.legal-content p {
  color: #C3AAB3;
  margin-bottom: 16px;
  font-size: 1rem;
}

.legal-content ul {
  margin: 0 0 18px 22px;
  color: #C3AAB3;
}

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

.legal-content strong {
  color: #F3E9EC;
  font-weight: 700;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.legal-footer {
  background-color: #1A1115;
  border-top: 1px solid #33222B;
  padding: 28px 0;
}

.legal-footer .container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-footer p {
  color: #8F727D;
  font-size: 0.9rem;
}

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

.legal-footer a:hover {
  color: #F43F5E;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  nav.toc ol {
    grid-template-columns: 1fr;
  }

  .legal-content section {
    padding: 32px 0;
  }
}
