/**
 * HiLucy — Legal pages styling (Privacy Policy, Terms of Service).
 * Scoped to body.hilucy-legal so styles never leak to other pages.
 */

body.hilucy-legal {
  background: #f7f9fc;
}

/* Pull the content out from under the sticky header offset on these pages */
body.hilucy-legal .c27-top-content-margin {
  display: none;
}

/* ============================================================
   Page wrapper
   ============================================================ */
.hilucy-legal-page {
  max-width: 820px;
  margin: 0 auto 80px;
  padding: 0 24px;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 768px) {
  .hilucy-legal-page {
    padding: 0 32px;
  }
}

/* ============================================================
   Hero header
   ============================================================ */
.hilucy-legal-hero {
  background: linear-gradient(135deg, #03a9f0 0%, #0fb2e9 50%, #00d4ff 100%);
  color: #fff;
  padding: 56px 32px 64px;
  margin: 0 -9999px 48px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.hilucy-legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hilucy-legal-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.hilucy-legal-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.hilucy-legal-hero h1,
.hilucy-legal-page > h1.wp-block-heading:first-child {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
  color: #fff;
}

.hilucy-legal-hero .updated {
  font-size: 14px;
  opacity: 0.92;
  margin: 0;
  font-weight: 400;
}

/* When the H1 is rendered inside content (not extracted to hero), hide it
   because the hero already has it */
.hilucy-legal-page h1.wp-block-heading {
  display: none;
}

/* ============================================================
   Body content
   ============================================================ */
.hilucy-legal-page p {
  margin: 0 0 18px;
  color: #374151;
}

.hilucy-legal-page p:first-of-type em,
.hilucy-legal-page p:first-of-type strong {
  font-style: normal;
  font-weight: 500;
}

.hilucy-legal-page > p:first-of-type {
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
  padding: 14px 18px;
  background: #fff;
  border-left: 3px solid #03a9f0;
  border-radius: 4px;
  margin-bottom: 32px;
}

/* Section headings */
.hilucy-legal-page h2.wp-block-heading {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  line-height: 1.3;
  scroll-margin-top: 100px;
}

.hilucy-legal-page h2.wp-block-heading:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 16px;
}

.hilucy-legal-page h3.wp-block-heading {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin: 28px 0 12px;
}

/* Lists */
.hilucy-legal-page ul,
.hilucy-legal-page ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.hilucy-legal-page li {
  margin-bottom: 8px;
  color: #374151;
}

.hilucy-legal-page ul li::marker {
  color: #03a9f0;
}

/* Links */
.hilucy-legal-page a {
  color: #0193d3;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.hilucy-legal-page a:hover {
  color: #03a9f0;
  text-decoration-thickness: 2px;
}

/* Strong text */
.hilucy-legal-page strong {
  color: #0f172a;
  font-weight: 600;
}

/* Definition-style paragraphs (lots of <br> + <strong>) */
.hilucy-legal-page p strong:first-child {
  display: inline-block;
  min-width: 110px;
}

/* ============================================================
   Table of Contents
   ============================================================ */
.hilucy-legal-toc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 48px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hilucy-legal-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6b7280;
  margin: 0 0 14px;
}

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

@media (min-width: 640px) {
  .hilucy-legal-toc-list {
    grid-template-columns: 1fr 1fr;
  }
}

.hilucy-legal-toc-list li {
  margin: 0;
  padding: 0;
}

.hilucy-legal-toc-list a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease, padding 0.15s ease;
}

.hilucy-legal-toc-list a:hover {
  color: #03a9f0;
  padding-left: 6px;
  text-decoration: none;
}

.hilucy-legal-toc-list a .toc-num {
  display: inline-block;
  min-width: 24px;
  font-variant-numeric: tabular-nums;
  color: #9ca3af;
  font-weight: 600;
  margin-right: 6px;
}

/* ============================================================
   Footer note
   ============================================================ */
.hilucy-legal-footer {
  margin-top: 56px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.hilucy-legal-footer a {
  color: #03a9f0;
  text-decoration: none;
  font-weight: 500;
}

.hilucy-legal-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   Print styles
   ============================================================ */
@media print {
  body.hilucy-legal { background: #fff; }
  .hilucy-legal-hero {
    background: none !important;
    color: #000 !important;
    padding: 0 0 24px !important;
    margin: 0 0 24px !important;
    border-bottom: 2px solid #000;
  }
  .hilucy-legal-hero h1 { color: #000 !important; }
  .hilucy-legal-toc { display: none; }
  .hilucy-legal-page { max-width: 100%; }
}
