/* =========================================================
   BRACO LIMITED — braco.hair
   Shared legal stylesheet for privacy.html and terms-of-service.html
   Light theme: warm ivory body, dark ink text, cobalt accent.
   ========================================================= */

:root {
  --bg: #F6F3ED;
  --bg-alt: #FFFFFF;
  --bg-soft: #EDE8DE;
  --ink: #161616;
  --ink-soft: #3A3630;
  --muted: #5C564A;
  --line: #E0DACD;
  --accent: #2347C7;
  --accent-dark: #16308A;
  --accent-soft: #E8EDFC;
  --sidebar: #131313;
  --sidebar-ink: #F4F1EA;
  --sidebar-muted: #9C968A;
}

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

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

/* Legal pages load ONLY this stylesheet, so the body background
   and text color must be defined right here. */
body.legal-page {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background-color: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

/* ---------- Scope isolation (must stay body-content only) ---------- */
.legal-page .legal-content section {
  background-color: transparent !important;
  color: var(--ink) !important;
}

/* ---------- Header (a <header>, never a <section>) ---------- */
.legal-header {
  background: linear-gradient(135deg, var(--sidebar) 0%, #242424 100%);
  color: #FFFFFF;
  padding: 72px 24px 56px;
  text-align: center;
}

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

.legal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: #FFFFFF;
}

.legal-header .brand:hover {
  text-decoration: none;
}

.legal-header .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 17px;
}

.legal-header .brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.legal-header h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  line-height: 1.2;
}

.legal-header .legal-updated {
  margin-top: 16px;
  font-size: 14px;
  color: var(--sidebar-muted);
}

/* ---------- Table of contents ---------- */
.legal-toc {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 8px;
}

.legal-toc-inner {
  background-color: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
}

.legal-toc h2 {
  font-size: 14px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 700;
}

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

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

.legal-toc ol li a {
  display: flex;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.6;
}

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

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

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

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

.legal-content h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  scroll-margin-top: 24px;
}

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

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

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

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

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

.legal-content .legal-callout {
  background-color: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.legal-content .legal-callout p {
  margin-bottom: 0;
  color: var(--ink);
}

.legal-content .legal-address {
  background-color: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 18px 0;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: var(--sidebar);
  color: var(--sidebar-ink);
  margin-top: 64px;
  padding: 48px 24px 32px;
  text-align: center;
}

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

.legal-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.legal-footer .brand:hover {
  text-decoration: none;
}

.legal-footer .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 15px;
}

.legal-footer .brand-name {
  font-weight: 800;
  font-size: 17px;
}

.legal-footer p {
  color: var(--sidebar-muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.legal-footer .legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  margin-bottom: 22px;
}

.legal-footer .legal-footer-links a {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
}

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

.legal-footer .legal-copyright {
  font-size: 13.5px;
  color: var(--sidebar-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .legal-toc ol {
    columns: 1;
  }
  .legal-header {
    padding: 48px 20px 40px;
  }
}
