/* ============================================================
   GLOBAL ANIGMA INVESTMENTS - LEGAL PAGES STYLESHEET
   Applies to: privacy-policy.html, terms-of-service.html, cookie-policy.html
   Palette: Matched to main site green/teal scheme
   ============================================================ */

/* ---- BACK BUTTON ---- */
.legal-back-btn {
  padding: 10px 22px;
  font-size: 0.85rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---- LEGAL PAGE WRAPPER ---- */
.legal-page {
  min-height: 100vh;
  padding-top: 90px;
}

/* ---- LEGAL HERO ---- */
.legal-hero {
  background: linear-gradient(180deg, #060D09 0%, var(--clr-bg, #09100D) 100%);
  padding: 80px 40px 60px;
  border-bottom: 1px solid var(--clr-border, #243328);
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,165,106,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,165,106,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.legal-hero-inner {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.legal-icon {
  width: 80px; height: 80px;
  background: rgba(34,165,106,0.10);
  border: 1px solid rgba(34,165,106,0.28);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--clr-green, #22A56A);
  margin-bottom: 24px;
}

.legal-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--clr-white, #F0F5F2);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--clr-text-3, #4E6357);
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  letter-spacing: 0.05em;
}
.legal-meta span { color: var(--clr-green, #22A56A); }

/* ---- MAIN LAYOUT ---- */
.legal-container {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 60px 40px 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

/* ---- TABLE OF CONTENTS (Sidebar) ---- */
.legal-toc {
  position: sticky;
  top: 100px;
  background: var(--clr-surface, #101A16);
  border: 1px solid var(--clr-border, #243328);
  border-radius: 16px;
  padding: 28px 24px;
}
.legal-toc h3 {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clr-text-3, #4E6357);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--clr-border, #243328);
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-toc ol li {
  counter-increment: toc-counter;
}
.legal-toc ol li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--clr-text-2, #8A9E93);
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.legal-toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: 0.66rem;
  color: var(--clr-green, #22A56A);
  flex-shrink: 0;
}
.legal-toc ol li a:hover {
  color: var(--clr-white, #F0F5F2);
  background: rgba(34,165,106,0.06);
}

/* ---- LEGAL BODY ---- */
.legal-body { max-width: 780px; }

.legal-intro {
  font-size: 1.02rem;
  color: var(--clr-text-2, #8A9E93);
  line-height: 1.80;
  margin-bottom: 48px;
  padding: 28px 32px;
  background: var(--clr-surface, #101A16);
  border: 1px solid var(--clr-border, #243328);
  border-left: 3px solid var(--clr-green, #22A56A);
  border-radius: 0 12px 12px 0;
}

/* ---- SECTIONS ---- */
.legal-section {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--clr-border, #243328);
  scroll-margin-top: 100px;
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.legal-section h2 {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--clr-white, #F0F5F2);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-num {
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-green, #22A56A);
  background: rgba(34,165,106,0.10);
  border: 1px solid rgba(34,165,106,0.25);
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.legal-section h3 {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-teal, #1CA39A);
  margin: 24px 0 10px;
}
.legal-section p {
  font-size: 0.94rem;
  color: var(--clr-text-2, #8A9E93);
  line-height: 1.80;
  margin-bottom: 16px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section p strong {
  color: var(--clr-white, #F0F5F2);
  font-weight: 600;
}
.legal-section a {
  color: var(--clr-green, #22A56A);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.legal-section a:hover { color: var(--clr-green-light, #47D68A); }

.legal-section ul,
.legal-section ol {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.legal-section ul li,
.legal-section ol li {
  font-size: 0.90rem;
  color: var(--clr-text-2, #8A9E93);
  line-height: 1.70;
  padding-left: 20px;
  position: relative;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--clr-green, #22A56A);
}
.legal-section ol {
  counter-reset: ol-counter;
  list-style: none;
}
.legal-section ol li {
  counter-increment: ol-counter;
}
.legal-section ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: 0.78rem;
  color: var(--clr-green, #22A56A);
  font-weight: 600;
}

/* ---- COOKIE TABLE ---- */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid var(--clr-border, #243328);
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.cookie-table th {
  background: var(--clr-surface-2, #172119);
  color: var(--clr-green, #22A56A);
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: 0.70rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--clr-border, #243328);
}
.cookie-table td {
  padding: 12px 16px;
  color: var(--clr-text-2, #8A9E93);
  border-bottom: 1px solid var(--clr-border, #243328);
  vertical-align: top;
  line-height: 1.6;
}
.cookie-table tr:last-child td { border-bottom: none; }
.cookie-table tr:hover td { background: var(--clr-surface, #101A16); }

/* ---- FOOTER OF LEGAL PAGES ---- */
.legal-footer {
  background: #060D09;
  border-top: 1px solid var(--clr-border, #243328);
  padding: 28px 0;
  text-align: center;
}
.legal-footer-inner {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.legal-footer-copy {
  font-size: 0.73rem;
  color: var(--clr-text-3, #4E6357);
  font-family: var(--font-mono, 'Roboto Mono', monospace);
}
.legal-footer-links {
  display: flex;
  gap: 18px;
}
.legal-footer-links a {
  font-size: 0.73rem;
  color: var(--clr-text-3, #4E6357);
  transition: color 0.18s ease;
}
.legal-footer-links a:hover { color: var(--clr-green, #22A56A); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .legal-container {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 24px 80px;
  }
  .legal-toc { position: static; }
  .legal-hero { padding: 60px 24px 48px; }
  .legal-footer-inner { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 480px) {
  .legal-hero { padding: 48px 16px 36px; }
  .legal-container { padding: 32px 16px 60px; }
}
