/* ===== LEGAL PAGES – legal.css ===== */
/* Adds styles for terms.html and privacy.html only.
   Inherits variables from styles.css but is fully self-contained otherwise. */

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.legal-hero {
  background: linear-gradient(135deg, #6B2B1C 0%, #835750 60%, #a06a5e 100%);
  padding: 72px 60px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.legal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #D4AF37 50%, rgba(0, 0, 0, 0) 100%);
}

.legal-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 500;
}

.legal-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.15;
}

.legal-hero > .legal-hero-inner > p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 28px;
  line-height: 1.6;
}

.legal-meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Page wrapper ───────────────────────────────────────────────────────────── */
.legal-main {
  background: #fff;
  padding: 60px;
}

/* Two-column grid: [TOC sidebar] | [Article] */
.legal-layout {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

/* ─── TOC sidebar ────────────────────────────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 90px;
  /* IMPORTANT: override any global nav {} styles — this element is a <aside>, safe */
}

.toc-inner {
  background: #FAF8F5;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  padding: 24px 20px;
}

.toc-inner h2 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6B2B1C;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e0d8;
  display: block; /* reset any potential flex from outer styles */
}

/* TOC links — use <div> elements in HTML so global nav{} doesn't interfere */
.toc-links-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-link {
  display: block !important;        /* force block regardless of global <a> styles */
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6B6B6B;
  padding: 5px 0 5px 10px;
  margin-bottom: 2px;
  text-decoration: none !important;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
  white-space: normal;
  word-break: break-word;
}

.toc-link:hover,
.toc-link.active {
  color: #6B2B1C;
  border-left-color: #835750;
  padding-left: 14px;
}

/* ─── Article ────────────────────────────────────────────────────────────────── */
.legal-content {
  /* Prevent content from overflowing the grid column */
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ─── Intro block ────────────────────────────────────────────────────────────── */
.legal-intro {
  border-left: 3px solid #835750;
  padding-left: 24px;
  margin-bottom: 48px;
}

.legal-intro p {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #6B6B6B;
  line-height: 1.8;
  margin: 0 0 16px 0;
}

/* ─── Definition box ─────────────────────────────────────────────────────────── */
.definition-box {
  background: #FAF8F5;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 20px;
}

.definition-box h3 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B2B1C;
  margin: 0 0 14px 0;
  display: block;
}

.definition-box ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.definition-box ul li {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #6B6B6B;
  padding: 8px 0;
  border-bottom: 1px solid #e8e0d8;
  line-height: 1.5;
  list-style: none !important;
}

.definition-box ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ─── Section ────────────────────────────────────────────────────────────────── */
.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e0d8;
}

.section-num {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #835750;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  line-height: 1;
}

.legal-section h2 {
  font-family: 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #6B2B1C;
  line-height: 1.3;
  margin: 0;
}

.legal-section h3 {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: #6B2B1C;
  margin: 24px 0 10px 0;
  display: block;
}

.legal-section p {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: #6B6B6B;
  line-height: 1.8;
  margin: 0 0 14px 0;
}

.legal-section ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 10px 0 18px 0 !important;
}

.legal-section ul li {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: #6B6B6B;
  line-height: 1.7;
  padding: 5px 0 5px 22px;
  position: relative;
  list-style: none !important;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #835750;
  opacity: 0.55;
  flex-shrink: 0;
}

.legal-section a {
  color: #835750;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(131, 87, 80, 0.35);
  transition: text-decoration-color 0.2s;
}

.legal-section a:hover {
  text-decoration-color: #835750;
}

/* ─── Callout notes ──────────────────────────────────────────────────────────── */
.legal-note {
  display: flex;
  gap: 14px;
  background: rgba(131, 87, 80, 0.06);
  border: 1px solid rgba(131, 87, 80, 0.18);
  border-left: 3px solid #835750;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
  align-items: flex-start;
}

.legal-note i {
  font-size: 15px;
  color: #835750;
  flex-shrink: 0;
  margin-top: 3px;
}

.legal-note p {
  font-size: 13.5px !important;
  color: #5a3a35 !important;
  margin: 0 !important;
  line-height: 1.65 !important;
}

.legal-note--warning {
  background: rgba(212, 175, 55, 0.07);
  border-color: rgba(212, 175, 55, 0.3);
  border-left-color: #D4AF37;
}

.legal-note--warning i {
  color: #b8950a;
}

.legal-note--warning p {
  color: #6b5511 !important;
}

/* ─── Contact card ───────────────────────────────────────────────────────────── */
.contact-card {
  background: #FAF8F5;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.contact-row i {
  color: #835750;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.contact-row span {
  color: #6B6B6B;
}

.contact-row a {
  color: #6B6B6B;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-row a:hover {
  color: #6B2B1C;
}

/* ─── Footer note ────────────────────────────────────────────────────────────── */
.legal-footer-note {
  border-top: 1px solid #e8e0d8;
  padding-top: 28px;
  margin-top: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6B6B6B;
  text-align: center;
}

.legal-footer-note p {
  margin: 0 0 6px 0;
}

.legal-alt-links a {
  color: #835750;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(131, 87, 80, 0.35);
  transition: text-decoration-color 0.2s;
}

.legal-alt-links a:hover {
  text-decoration-color: #835750;
}

/* ─── Join waitlist link (used as <a> on legal pages) ───────────────────────── */
a.btn-primary.join-waitlist-btn {
  display: inline-block !important;
  background: #835750 !important;
  color: #fff !important;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
}

/* ─── Responsive: tablet ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .legal-toc {
    position: static;
    order: -1; /* TOC appears above the article */
  }

  /* Make TOC links wrap horizontally on tablet */
  .toc-links-wrap {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .toc-link {
    display: inline-block !important;
    padding: 4px 10px 4px 0;
    border-left: none;
    border-bottom: 2px solid transparent;
    margin-right: 8px;
    white-space: nowrap;
  }

  .toc-link:hover,
  .toc-link.active {
    padding-left: 0;
    border-left: none;
    border-bottom-color: #835750;
  }

  .legal-main {
    padding: 32px 24px 60px;
  }

  .legal-hero {
    padding: 50px 24px 44px;
  }

  .legal-hero h1 {
    font-size: 34px;
  }
}

/* ─── Responsive: mobile ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .legal-hero h1 {
    font-size: 28px;
  }

  .legal-meta {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .section-header {
    flex-direction: column;
    gap: 4px;
  }

  .legal-section h2 {
    font-size: 18px;
  }

  .legal-main {
    padding: 24px 16px 48px;
  }
}
