/* ==========================================================================
   CHANGRAN — Shared legal stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   ========================================================================== */

:root {
  --bg: #FAF8FD;
  --surface: #FFFFFF;
  --text: #44355B;
  --text-soft: #6B5E8C;
  --plum: #5B4A8A;
  --plum-dark: #2A2140;
  --lilac: #C4B5FD;
  --lilac-pale: #EDE8FA;
  --hairline: #E3DBF5;
  --border: #D8CEF0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Legal pages define their own background and text color */
.legal-page {
  background-color: #FAF8FD;
  color: #44355B;
}

body {
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #44355B;
  background-color: #FAF8FD;
  overflow-x: hidden;
}

a {
  color: var(--plum);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--plum-dark);
  line-height: 1.25;
  font-weight: 700;
}

/* Scope-isolation rule: never let any section inside the legal content
   inherit a dark or opaque background from a shared stylesheet */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* --------------------------------------------------------------------------
   LEGAL HEADER (div / header element, never a section)
   -------------------------------------------------------------------------- */

.legal-header {
  background: linear-gradient(135deg, #2A2140 0%, #5B4A8A 100%);
  border-bottom: 1px solid var(--lilac);
}

.legal-header .legal-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.legal-brand:hover {
  text-decoration: none;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #C4B5FD;
  background-color: #FFFFFF;
  color: #5B4A8A;
  font-size: 18px;
  font-weight: 800;
}

.legal-wordmark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #FFFFFF;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  color: #2A2140;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.18s ease;
}

.legal-back:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   LEGAL PAGE TITLE BAND (inside the header, so the h1 sits on the dark
   gradient background and contrasts strongly with it)
   -------------------------------------------------------------------------- */

.legal-header-title {
  padding: 40px 0 48px;
}

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

.legal-header-title .chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: #C4B5FD;
  color: #2A2140;
  margin-bottom: 20px;
}

.legal-header-title h1 {
  font-size: clamp(32px, 5vw, 46px);
  color: #FFFFFF;
  margin-bottom: 16px;
}

.legal-header-title .legal-meta {
  font-size: 15px;
  color: #EDE8FA;
}

/* --------------------------------------------------------------------------
   LEGAL CONTENT
   -------------------------------------------------------------------------- */

.legal-content {
  padding: 56px 0 80px;
}

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

.legal-content h2 {
  font-size: 26px;
  color: #5B4A8A;
  margin: 48px 0 16px;
  padding-top: 8px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 19px;
  color: #2A2140;
  margin: 26px 0 10px;
}

.legal-content p {
  font-size: 16px;
  color: #44355B;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 24px;
  color: #44355B;
}

.legal-content li {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   TABLE OF CONTENTS
   -------------------------------------------------------------------------- */

.legal-toc {
  background-color: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 40px;
}

.legal-toc h2 {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5B4A8A;
  margin: 0 0 16px;
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  font-size: 15px;
  color: #44355B;
  display: block;
  padding: 4px 0;
}

.legal-toc a:hover {
  color: #5B4A8A;
}

.legal-toc a::before {
  content: "#";
  color: #C4B5FD;
  font-weight: 700;
  margin-right: 8px;
}

/* --------------------------------------------------------------------------
   LEGAL FOOTER (seal footer)
   -------------------------------------------------------------------------- */

.seal-footer {
  border-top: 2px solid #C4B5FD;
  background-color: #FAF8FD;
}

.seal-footer .footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid #C4B5FD;
  background-color: #FFFFFF;
  color: #5B4A8A;
  font-size: 20px;
  font-weight: 800;
}

.footer-wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #2A2140;
}

.footer-brand p {
  color: #6B5E8C;
  font-size: 15px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5B4A8A;
  margin-bottom: 18px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.footer-links a {
  color: #44355B;
  font-size: 15px;
}

.footer-links a:hover {
  color: #5B4A8A;
}

.footer-contact address {
  font-style: normal;
  color: #6B5E8C;
  font-size: 15px;
  line-height: 1.6;
}

.footer-contact a {
  display: block;
  color: #44355B;
  font-size: 15px;
  margin-bottom: 10px;
}

.footer-contact a:hover {
  color: #5B4A8A;
}

.footer-legal {
  margin-top: 56px;
  padding: 22px 0;
  border-top: 1px solid #E3DBF5;
  text-align: center;
  font-size: 14px;
  color: #6B5E8C;
}

.footer-legal a {
  color: #5B4A8A;
}

.footer-rule {
  height: 2px;
  background-color: #C4B5FD;
  width: 100%;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
