/* ══════════════════════════════════════════
   LEGAL PAGES — STYLESHEET
   ══════════════════════════════════════════ */

:root {
  --legal-bg: #F5F5DC;
  --legal-dark: #01311F;
  --legal-gold: #C6AA58;
  --legal-gold-light: rgba(198, 170, 88, 0.15);
  --legal-gold-glow: rgba(198, 170, 88, 0.35);
  --legal-border: rgba(1, 49, 31, 0.08);
  --legal-text: #2c2c2c;
  --legal-text-muted: #555555;
  --legal-font-serif: 'Playfair Display', Georgia, serif;
  --legal-font-sans: 'Inter', system-ui, sans-serif;
  --legal-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body.legal-page {
  background: var(--legal-bg);
  color: var(--legal-dark);
  font-family: var(--legal-font-sans);
  line-height: 1.65;
  margin: 0;
  padding: 0;
}

/* ── HERO SECTION ── */
.legal-hero {
  position: relative;
  background-color: #001f13;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.492) 0%, rgba(0, 0, 0, 0.245) 40%, rgba(255, 255, 255, 0) 100%), url("/images/tech2.png");
  background-position: center center;
  background-size: cover;
  color: #ffffff;
  padding: 150px 8% 90px;
  text-align: center;
  overflow: hidden;
  /* background-attachment: fixed; */
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
}

.legal-hero__eyebrow {
  font-family: var(--legal-font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--legal-gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.legal-hero__eyebrow::before,
.legal-hero__eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--legal-gold);
}

.legal-hero__title {
  font-family: var(--legal-font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  line-height: 1.1;
  color: #ffffff;
}

.legal-hero__meta {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1.2rem;
  display: inline-block;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 0.5rem;
}

/* ── LAYOUT WRAPPER ── */
.legal-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 4% 120px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

/* ── STICKY SIDEBAR (TOC) ── */
.legal-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 15px;
}

.legal-sidebar::-webkit-scrollbar {
  width: 4px;
}

.legal-sidebar::-webkit-scrollbar-thumb {
  background: rgba(1, 49, 31, 0.15);
  border-radius: 4px;
}

.legal-sidebar__title {
  font-family: var(--legal-font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--legal-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--legal-border);
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--legal-font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--legal-text-muted);
  text-decoration: none !important;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s var(--legal-ease);
  position: relative;
}

.legal-toc-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0%;
  background: var(--legal-gold);
  border-radius: 2px;
  transition: height 0.3s ease;
}

.legal-toc-link:hover {
  color: var(--legal-dark) !important;
  background: rgba(1, 49, 31, 0.03);
}

.legal-toc-link.active {
  color: var(--legal-dark) !important;
  font-weight: 600;
  background: rgba(198, 170, 88, 0.08);
}

.legal-toc-link.active::before {
  height: 60%;
}

.legal-toc-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--legal-gold);
  min-width: 20px;
}

/* ── CONTENT SECTIONS ── */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.legal-section {
  scroll-margin-top: 120px;
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--legal-border);
  box-shadow: 0 10px 40px rgba(1, 49, 31, 0.015);
  transition: transform 0.4s var(--legal-ease), box-shadow 0.4s var(--legal-ease);
}

.legal-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(1, 49, 31, 0.03);
}

.legal-section__num {
  font-family: var(--legal-font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--legal-gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.legal-section__title {
  font-family: var(--legal-font-serif);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--legal-dark);
  margin: 0 0 1.5rem;
  line-height: 1.25;
}

.legal-section__body {
  font-size: 0.98rem;
  color: var(--legal-text);
  line-height: 1.75;
}

.legal-section__body p {
  margin-bottom: 1.2rem;
}

.legal-section__body p:last-child {
  margin-bottom: 0;
}

.legal-section__body ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-section__body li {
  position: relative;
  padding-left: 24px;
}

.legal-section__body li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--legal-gold);
  font-size: 0.8rem;
  top: 1px;
}

/* ── PLAIN ENGLISH CALLOUTS ── */
.legal-plain-box {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: rgba(198, 170, 88, 0.04);
  border-left: 3px solid var(--legal-gold);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 20px rgba(1, 49, 31, 0.02);
}

.legal-plain-box__header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--legal-font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--legal-gold);
  margin-bottom: 0.75rem;
}

.legal-plain-box__header i {
  font-size: 0.9rem;
}

.legal-plain-box__body {
  font-size: 0.93rem;
  color: var(--legal-dark);
  font-style: italic;
  line-height: 1.6;
}

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 1024px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legal-sidebar {
    position: sticky;
    top: 72px;
    z-index: 100;
    background: rgba(245, 245, 220, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 -4%;
    padding: 15px 4%;
    border-bottom: 1px solid var(--legal-border);
    max-height: none;
    /* overflow-y: visible; */
    transition: top 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .header.scrolled~#main .legal-sidebar {
    top: 60px;
  }

  .legal-sidebar__title {
    display: none;
  }

  .legal-toc-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 0.75rem;
    scrollbar-width: none;
    /* Firefox */
  }

  .legal-toc-list::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
  }

  .legal-toc-link {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    background: rgba(1, 49, 31, 0.03);
    border-radius: 20px;
  }

  .legal-toc-link::before {
    display: none;
  }

  .legal-toc-link.active {
    background: var(--legal-dark);
    color: #ffffff !important;
  }

  .legal-toc-link.active .legal-toc-num {
    color: var(--legal-gold);
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 120px 6% 60px;
  }

  .legal-wrapper {
    padding: 40px 6% 80px;
  }

  .legal-sidebar {
    margin: 0 -6%;
    padding: 15px 6%;
  }

  .legal-section {
    padding: 1.75rem;
  }

  .legal-section__title {
    font-size: 1.6rem;
  }

  .legal-content {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .legal-hero {
    padding: 100px 4% 50px;
  }

  .legal-wrapper {
    padding: 30px 4% 60px;
  }

  .legal-sidebar {
    margin: 0 -4%;
    padding: 12px 4%;
  }

  .legal-section {
    padding: 1.25rem;
  }

  .legal-section__title {
    font-size: 1.4rem;
  }

  .legal-plain-box {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
  }
}