/* ============================================================
   ENSKOOL — LEGAL PAGES (Privacy Policy / Terms & Conditions)
   Typography aligned with the JIPMAT page: Zilla Slab (headings),
   Work Sans (body), JetBrains Mono (labels/eyebrows)
   ============================================================ */

.legal-page { background: var(--white-bgc); }

/* ───────────── Reading progress bar ───────────── */
.legal-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-dark) 100%);
  z-index: 999;
  transition: width 0.1s ease-out;
}

/* ───────────── Header ───────────── */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid #ece3f6;
  background: var(--white-bgc);
  position: sticky;
  top: 0;
  z-index: 50;
}

.legal-header .brand-logo img { height: 36px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--small-round-bgc-dark);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.legal-back:hover {
  background: var(--small-round-bgc);
  border-color: var(--purple);
  transform: translateX(-2px);
}

/* ───────────── Hero ───────────── */
.legal-hero {
  position: relative;
  padding: 90px 24px 70px;
  text-align: center;
  overflow: hidden;
  background: var(--dark-bgc);
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(100,46,134,0.55) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(212,188,238,0.25) 0%, transparent 40%),
    linear-gradient(180deg, #180b20 0%, #0E0B1C 100%);
}

.legal-hero-inner { position: relative; z-index: 1; }

.legal-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--small-round-bgc-dark);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,188,238,0.35);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.legal-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--small-round-bgc-dark);
}

.legal-hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 48px;
  color: var(--white-bgc);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.legal-hero .updated {
  font-family: var(--sans);
  font-size: 14.5px;
  color: rgba(255,255,255,0.6);
}

.legal-hero .updated .dot { margin: 0 10px; color: var(--small-round-bgc-dark); }

/* ───────────── Layout ───────────── */
.legal-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* ───────────── Table of contents ───────────── */
.legal-toc {
  position: sticky;
  top: 100px;
}

.legal-toc h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-left: 2px solid #ece3f6;
}

.legal-toc a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  padding: 9px 0 9px 18px;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.25s ease, border-color 0.25s ease, font-weight 0.25s ease;
  display: block;
}

.legal-toc a:hover { color: var(--purple); }

.legal-toc a.active {
  color: var(--purple-dark);
  font-weight: 600;
  border-left-color: var(--purple);
}

/* ───────────── Body content ───────────── */
.legal-body p {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  color: #3d3d3d;
  margin-bottom: 18px;
}

.legal-body h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 27px;
  color: var(--purple-dark);
  margin: 52px 0 16px;
  scroll-margin-top: 100px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.legal-body h2:first-of-type { margin-top: 0; }

.legal-body h3 {
  font-family: var(--sans);
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 28px 0 10px;
  scroll-margin-top: 100px;
}

.legal-body ul, .legal-body ol {
  margin: 0 0 20px;
  padding-left: 4px;
  list-style: none;
}

.legal-body ol { counter-reset: legal-ol; }

.legal-body ul li, .legal-body ol li {
  position: relative;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.8;
  color: #3d3d3d;
  margin-bottom: 11px;
  padding-left: 26px;
}

.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
}

.legal-body ol li { counter-increment: legal-ol; padding-left: 30px; }
.legal-body ol li::before {
  content: counter(legal-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--purple);
}

.legal-body strong { color: var(--text-dark); font-weight: 700; }

.legal-body a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: rgba(100,46,134,0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.legal-body a:hover { color: var(--purple-dark); }

/* ───────────── Callout note ───────────── */
.legal-note {
  position: relative;
  background: var(--small-round-bgc);
  border-radius: 14px;
  padding: 18px 22px 18px 52px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: #4a3a55;
  margin-bottom: 32px;
}

.legal-note::before {
  content: "i";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ───────────── Contact card ───────────── */
.legal-contact-card {
  background: linear-gradient(155deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: 20px;
  padding: 34px 36px;
  color: #ffffff;
  margin-top: 44px;
}

.legal-contact-card h3 {
  color: #ffffff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  margin-bottom: 16px;
}

.legal-contact-card .row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}

.legal-contact-card .row:last-child { margin-bottom: 0; }
.legal-contact-card .row .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  min-width: 62px;
}

.legal-contact-card a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ───────────── Back-to-top ───────────── */
.legal-top-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 12px 24px -10px rgba(100,46,134,0.5);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 60;
}

.legal-top-btn.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.legal-top-btn:hover { background: var(--purple-dark); }

/* ───────────── Responsive ───────────── */
@media (max-width: 860px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; }
  .legal-toc {
    position: static;
    border-bottom: 1px solid #ece3f6;
    padding-bottom: 22px;
  }
  .legal-toc ul {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    gap: 8px 4px;
  }
  .legal-toc a {
    padding: 7px 12px;
    border: 1px solid #ece3f6;
    border-left: 1px solid #ece3f6;
    border-radius: 999px;
    margin-left: 0;
  }
  .legal-toc a.active { border-color: var(--purple); background: var(--small-round-bgc); }
  .legal-hero { padding: 64px 20px 50px; }
  .legal-hero h1 { font-size: 32px; }
  .legal-header { padding: 16px 20px; }
  .legal-contact-card { padding: 26px 24px; }
}

@media (max-width: 360px) {
.legal-header .brand-logo img {
    height: 25px;
}
}