/* ============================================================
   LEGAL PAGES — terms.css
   Shared styles for Terms of Service and Privacy Policy pages.
   Uses the site's design tokens: Fredoka headings, Inter body,
   #0a0a0a background, rgba(215,218,207) text, rgb(167,224,8) accent.
   ============================================================ */


/* ============================================================
   PAGE BODY
   ============================================================ */

.legal-page {
  display: block;
  min-height: 100vh;
  background: #0a0a0a;
  color: rgba(215, 218, 207, 0.85);
  font-family: 'Inter', sans-serif;
}


/* ============================================================
   PAGE CONTAINER
   ============================================================ */

.legal-container {
  display: block;
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 32px 140px;  /* top clears fixed header */
}


/* ============================================================
   PAGE HEADER — title, badge, last-updated
   ============================================================ */

.legal-header {
  display: block;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-header-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: rgb(167, 224, 8);
  background: rgba(167, 224, 8, 0.1);
  border: 1px solid rgba(167, 224, 8, 0.2);
  border-radius: 6px;
  padding: 5px 12px;
  margin-bottom: 16px;
}

.legal-page-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: rgba(215, 218, 207, 0.95);
  margin: 0 0 8px;
  line-height: 1.2;
}

.legal-page-updated {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(215, 218, 207, 0.35);
  margin: 0;
}


/* ============================================================
   SECTION CARDS — each numbered section in its own card
   ============================================================ */

.legal-section {
  display: block;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.legal-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Section number + title row */
.legal-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-section-number {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(167, 224, 8);
  background: rgba(167, 224, 8, 0.1);
  border-radius: 8px;
  padding: 4px 10px;
  flex-shrink: 0;
  line-height: 1;
}

.legal-section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(215, 218, 207, 0.95);
  margin: 0;
  line-height: 1.3;
}


/* ============================================================
   BODY TEXT
   ============================================================ */

.legal-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(215, 218, 207, 0.7);
  margin: 0 0 12px;
}

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

.legal-text strong {
  color: rgba(215, 218, 207, 0.95);
  font-weight: 600;
}

.legal-text em {
  font-style: italic;
  color: rgba(215, 218, 207, 0.6);
}

.legal-text a {
  color: rgb(167, 224, 8);
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal-text a:hover {
  color: rgb(190, 245, 40);
  text-decoration: underline;
}


/* ============================================================
   SUB-LABELS — bold inline headings within a section
   ============================================================ */

.legal-sub-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(215, 218, 207, 0.9);
  margin: 20px 0 8px;
}

.legal-sub-label:first-child {
  margin-top: 0;
}


/* ============================================================
   SUB-SECTION TITLES — e.g. "3a. Information You Provide"
   ============================================================ */

.legal-subsection-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.02rem;
  font-weight: 500;
  color: rgba(215, 218, 207, 0.88);
  margin: 22px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.legal-subsection-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}


/* ============================================================
   BULLET LISTS
   ============================================================ */

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.legal-list li {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(215, 218, 207, 0.7);
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(167, 224, 8, 0.45);
}

.legal-list li strong {
  color: rgba(215, 218, 207, 0.95);
  font-weight: 600;
}

.legal-list li:last-child {
  margin-bottom: 0;
}


/* ============================================================
   NUMBERED LISTS
   ============================================================ */

.legal-list--numbered {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  counter-reset: legal-counter;
}

.legal-list--numbered li {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(215, 218, 207, 0.7);
  padding-left: 30px;
  position: relative;
  margin-bottom: 6px;
  counter-increment: legal-counter;
}

.legal-list--numbered li::before {
  content: counter(legal-counter);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgb(167, 224, 8);
  background: rgba(167, 224, 8, 0.1);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.legal-list--numbered li strong {
  color: rgba(215, 218, 207, 0.95);
  font-weight: 600;
}

.legal-list--numbered li:last-child {
  margin-bottom: 0;
}


/* ============================================================
   CALLOUT BOX — for important warnings / notices
   ============================================================ */

.legal-callout {
  background: rgba(167, 224, 8, 0.04);
  border: 1px solid rgba(167, 224, 8, 0.12);
  border-left: 3px solid rgba(167, 224, 8, 0.4);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0;
}

.legal-callout .legal-text {
  margin-bottom: 0;
}


/* ============================================================
   PAGE FOOTER — last-updated line at bottom
   ============================================================ */

.legal-page-footer {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(215, 218, 207, 0.25);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-style: italic;
}


/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

.legal-back-to-top {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 20, 0.9);
  color: rgba(215, 218, 207, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease,
              background 0.15s ease, border-color 0.15s ease;
  z-index: 50;
}

.legal-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.legal-back-to-top:hover {
  background: rgba(167, 224, 8, 0.1);
  border-color: rgba(167, 224, 8, 0.3);
  color: rgb(167, 224, 8);
}

.legal-back-to-top svg {
  width: 18px;
  height: 18px;
}


/* ============================================================
   CROSS-LINKS — navigation between terms and privacy
   ============================================================ */

.legal-cross-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.legal-cross-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(215, 218, 207, 0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.legal-cross-link:hover {
  background: rgba(167, 224, 8, 0.06);
  border-color: rgba(167, 224, 8, 0.2);
  color: rgb(167, 224, 8);
}

.legal-cross-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}


/* ============================================================
   DESKTOP — larger screens get more breathing room
   ============================================================ */

@media (min-width: 1024px) {
  .legal-container {
    padding-top: 110px;
    padding-bottom: 80px;
  }

  .legal-section {
    padding: 32px 36px 28px;
  }
}


/* ============================================================
   TABLET — mid-range adjustments
   ============================================================ */

@media (max-width: 768px) {
  .legal-container {
    padding: 16px 16px 140px;  /* no header clearance on mobile */
  }

  .legal-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  .legal-page-title {
    font-size: 1.7rem;
  }

  .legal-section {
    padding: 22px 20px 18px;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .legal-section-header {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .legal-section-number {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .legal-section-title {
    font-size: 1.08rem;
  }

  .legal-text {
    font-size: 0.85rem;
    line-height: 1.7;
  }

  .legal-list li {
    font-size: 0.85rem;
    line-height: 1.7;
  }

  .legal-list--numbered li {
    font-size: 0.85rem;
    line-height: 1.7;
  }

  .legal-sub-label {
    font-size: 0.85rem;
  }

  .legal-subsection-title {
    font-size: 0.95rem;
  }

  .legal-back-to-top {
    bottom: 80px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .legal-cross-links {
    flex-direction: column;
    gap: 8px;
  }

  .legal-cross-link {
    justify-content: center;
  }
}


/* ============================================================
   SMALL MOBILE — tighter spacing
   ============================================================ */

@media (max-width: 400px) {
  .legal-container {
    padding: 12px 12px 140px;
  }

  .legal-page-title {
    font-size: 1.45rem;
  }

  .legal-section {
    padding: 18px 16px 14px;
    border-radius: 10px;
  }

  .legal-text {
    font-size: 0.82rem;
  }

  .legal-list li {
    font-size: 0.82rem;
    padding-left: 18px;
  }

  .legal-list li::before {
    left: 4px;
    top: 9px;
    width: 4px;
    height: 4px;
  }

  .legal-list--numbered li {
    font-size: 0.82rem;
    padding-left: 26px;
  }

  .legal-list--numbered li::before {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .legal-header-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
  }
}