/*============================================
   Legal Pages Stylesheet
   Loaded by privacy.html & terms-of-service.html
   NO rgba() / opacity on text — solid hex only
   ============================================*/

:root {
  --legal-deep: #2B2024;
  --legal-terracotta: #B87D5C;
  --legal-sage: #8BA78A;
  --legal-cream: #FBF6F1;
  --legal-white: #FFFEFD;
  --legal-charcoal: #1B1B1F;
  --legal-muted: #6B5E63;
  --legal-sand: #E8DFD5;
  --legal-warm-gray: #F0EBE4;
  --legal-body-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--legal-body-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--legal-charcoal);
  background-color: var(--legal-cream);
  -webkit-font-smoothing: antialiased;
}

/* ========== NAV (for legal pages) ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--legal-deep);
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35em;
  font-weight: 700;
  color: #FFFEFD;
  font-family: var(--legal-body-font);
  text-decoration: none;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background-color: var(--legal-terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  color: #FFFEFD;
  flex-shrink: 0;
}

.nav-back {
  color: #CEC6C0;
  font-family: var(--legal-body-font);
  font-size: 0.925em;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-back:hover {
  color: #FFFEFD;
  background: rgba(255,255,255,0.08);
}

/* ========== LEGAL PAGE LAYOUT ========== */
.legal-page {
  padding-top: 100px;
  padding-bottom: 48px;
}

.legal-header {
  background-color: var(--legal-deep);
  padding: 48px 0;
  margin-bottom: 48px;
}

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

.legal-header h1 {
  font-family: var(--legal-body-font);
  font-size: 2.4em;
  font-weight: 800;
  color: #FFFEFD;
  margin-bottom: 10px;
}

.legal-header .legal-date {
  color: #CEC6C0;
  font-size: 0.925em;
}

.legal-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== TABLE OF CONTENTS ========== */
.toc-card {
  background-color: var(--legal-white);
  border: 1.5px solid var(--legal-sand);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 44px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.toc-card h2 {
  font-family: var(--legal-body-font);
  font-size: 1.25em;
  font-weight: 700;
  color: var(--legal-deep);
  margin-bottom: 18px;
}

.toc-nav {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

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

.toc-nav li a {
  display: block;
  padding: 6px 0;
  font-size: 0.905em;
  color: var(--legal-muted);
  font-family: var(--legal-body-font);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}

.toc-nav li a:hover {
  color: var(--legal-terracotta);
}

/* ========== LEGAL SECTIONS ========== */
.legal-section {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--legal-sand);
}

.legal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-family: var(--legal-body-font);
  font-size: 1.35em;
  font-weight: 700;
  color: var(--legal-deep);
  margin-bottom: 16px;
  padding-top: 4px;
}

.legal-section h3 {
  font-family: var(--legal-body-font);
  font-size: 1.1em;
  font-weight: 600;
  color: var(--legal-deep);
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-section p {
  font-size: 0.96em;
  color: var(--legal-charcoal);
  line-height: 1.78;
  margin-bottom: 14px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-section ul li,
.legal-section ol li {
  font-size: 0.96em;
  color: var(--legal-charcoal);
  line-height: 1.75;
  margin-bottom: 8px;
}

.legal-section strong {
  color: var(--legal-deep);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background-color: var(--legal-terracotta);
  color: #FFFEFD;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(184,125,92,0.3);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 900;
  border: none;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #9E5D3E;
}

/* ========== FOOTER ========== */
.legal-footer {
  background-color: var(--legal-deep);
  padding: 24px 0;
  color: #8A7E7A;
  margin-top: 32px;
  text-align: center;
}

.legal-footer .container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.875em;
  font-family: var(--legal-body-font);
}

.legal-footer a {
  color: var(--legal-terracotta);
  font-weight: 500;
  text-decoration: none;
}

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

/* ========== MEDIA QUERIES ========== */
@media (max-width: 768px) {
  .toc-nav {
    grid-template-columns: 1fr;
  }

  .legal-header h1 {
    font-size: 1.8em;
  }

  .legal-section h2 {
    font-size: 1.2em;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.1em;
  }
}
