/* =========================================================
   THE ACTIVE PHARM — Legal / Policy Pages
   Shares brand variables from styles.css; adds document layout
   ========================================================= */

/* ---------- Legal Page Layout ---------- */
.legal-hero {
  background: var(--navy);
  color: #fff;
  padding: 120px 0 56px;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(12,195,247,0.12) 0%, transparent 65%);
  border-radius: 50%;
}
.legal-hero__inner {
  position: relative;
  z-index: 2;
}
.legal-hero .secnum {
  color: var(--cyan);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 18px;
}
.legal-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 600;
  max-width: 760px;
}
.legal-hero h1 em {
  color: var(--cyan);
  font-style: italic;
}
.legal-hero__meta {
  margin-top: 22px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* ---------- Back link ---------- */
.legal-back {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 30px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
  transition: color 0.25s;
}
.legal-back:hover { color: var(--cyan); }
.legal-back svg { width: 16px; height: 16px; }

/* ---------- Document Body ---------- */
.legal-doc {
  background: var(--paper);
  padding: 72px 0 96px;
}
.legal-doc__inner {
  max-width: 820px;
  margin: 0 auto;
}
.legal-doc p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--slate);
  margin-bottom: 18px;
}
.legal-doc p strong {
  color: var(--navy);
  font-weight: 600;
}
.legal-doc > .legal-doc__inner > p:first-of-type {
  font-size: 18px;
  line-height: 1.75;
  color: var(--navy);
  font-weight: 400;
}

/* Section headings within the document */
.legal-doc h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin: 48px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  letter-spacing: -0.01em;
}
.legal-doc h2:first-of-type {
  border-top: none;
  margin-top: 36px;
}
.legal-doc h2 .num {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--cyan);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.legal-doc h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 28px 0 10px;
}

/* Lists */
.legal-doc ul,
.legal-doc ol {
  margin: 14px 0 22px;
  padding-left: 0;
}
.legal-doc ul li,
.legal-doc ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--slate);
}
.legal-doc ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.legal-doc ol {
  counter-reset: legal-counter;
  list-style: none;
}
.legal-doc ol li::before {
  content: counter(legal-counter);
  counter-increment: legal-counter;
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.legal-doc li strong { color: var(--navy); }

/* Inline links */
.legal-doc a {
  color: var(--cyan);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(12,195,247,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s;
}
.legal-doc a:hover { text-decoration-color: var(--cyan); }

/* Emphasis blocks */
.legal-doc .callout {
  background: var(--cyan-soft);
  border-left: 3px solid var(--cyan);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.legal-doc .callout p {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 15.5px;
}

/* Contact block at the end */
.legal-contact {
  margin-top: 56px;
  padding: 32px;
  background: var(--cream);
  border-radius: var(--radius-lg);
}
.legal-contact h3 {
  margin-top: 0;
  font-size: 20px;
}
.legal-contact p { margin-bottom: 8px; }
.legal-contact .contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--slate);
  margin-bottom: 10px;
}
.legal-contact .contact-row svg {
  width: 18px;
  height: 18px;
  color: var(--cyan);
  flex-shrink: 0;
}
.legal-contact a { color: var(--navy); font-weight: 500; }

/* Effective date badge */
.effective-date {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .legal-hero { padding: 100px 0 40px; }
  .legal-doc { padding: 48px 0 72px; }
  .legal-doc__inner { padding: 0 20px; }
  .legal-back { margin-bottom: 24px; }
}
