/* ==============================================
   Bustamante LLC — Legal Pages Stylesheet
   Shared styles for privacy.html and terms-of-service.html
   ============================================== */

:root {
  --legal-dark: #14141f;
  --legal-accent: #d94f3c;
  --legal-accent-light: #fdf3f1;
  --legal-light: #f9f8f6;
  --legal-white: #ffffff;
  --legal-text: #1c1b1a;
  --legal-text-secondary: #5c5855;
  --legal-border: #e0ddd7;
  --legal-font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --legal-font-heading: Georgia, 'Times New Roman', Times, serif;
  --legal-radius: 8px;
  --legal-transition: 0.25s ease;
}

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

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

body {
  font-family: var(--legal-font);
  background: var(--legal-light);
  color: var(--legal-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: #b83e2e;
  text-decoration: underline;
}

/* ===== LEGAL PAGE LAYOUT ===== */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== LEGAL HEADER — div/header, NOT section ===== */
.legal-header {
  background: linear-gradient(160deg, #14141f 0%, #1d1d2a 100%);
  padding: 56px 40px 48px;
  border-bottom: 1px solid #2e2d38;
}

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

.legal-header-inner a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 24px;
}

.legal-header-inner a:hover {
  color: var(--legal-white);
  text-decoration: none;
}

.legal-header-inner h1 {
  font-family: var(--legal-font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.legal-header-inner .legal-meta {
  font-size: 0.92rem;
  color: #FFFFFF;
}

/* ===== LEGAL CONTENT AREA ===== */
.legal-content {
  flex: 1;
  padding: 48px 0 40px;
}

/* ===== SCOPE-ISOLATION: guarantee legal pages are never polluted ===== */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

/* ===== TABLE OF CONTENTS ===== */
.toc {
  background: var(--legal-white);
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-radius);
  padding: 28px 32px;
  margin-bottom: 40px;
}

.toc h2 {
  font-family: var(--legal-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--legal-text);
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  padding-left: 0;
}

.toc ol li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.toc ol li a {
  color: var(--legal-accent);
  font-weight: 500;
}

.toc ol li a:hover {
  text-decoration: underline;
}

/* ===== LEGAL SECTIONS ===== */
.legal-content section {
  margin-bottom: 36px;
  padding: 0;
}

.legal-content section h2 {
  font-family: var(--legal-font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--legal-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--legal-border);
}

.legal-content section p {
  font-size: 1rem;
  color: var(--legal-text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
}

.legal-content section ul,
.legal-content section ol {
  margin: 10px 0 18px 24px;
  color: var(--legal-text-secondary);
}

.legal-content section ul li,
.legal-content section ol li {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-content section .back-to-top {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--legal-accent);
  font-weight: 600;
  margin-top: 4px;
}

.legal-content section .back-to-top:hover {
  text-decoration: underline;
}

/* ===== LEGAL FOOTER ===== */
.legal-footer {
  background: #14141f;
  padding: 28px 40px;
  border-top: 1px solid #2e2d38;
}

.legal-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-footer-inner .footer-brand {
  font-family: var(--legal-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.legal-footer-inner .footer-brand span {
  color: var(--legal-accent);
}

.legal-footer-inner .footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.88rem;
}

.legal-footer-inner .footer-links a {
  color: #FFFFFF;
}

.legal-footer-inner .footer-links a:hover {
  color: var(--legal-accent);
  text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .legal-header {
    padding: 40px 24px 36px;
  }

  .legal-header-inner h1 {
    font-size: 2rem;
  }

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

  .legal-content .container {
    padding: 0 20px;
  }

  .toc {
    padding: 20px 24px;
  }

  .legal-content section h2 {
    font-size: 1.3rem;
  }

  .legal-footer {
    padding: 20px 24px;
  }

  .legal-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
