/* ==========================================================================
   Digihack — legal pages
   Privacy Policy, Terms & Conditions, Refund Policy.
   Hero + sticky table of contents + long-form text.
   (WordPress: page-legal.php template; content edited in the block editor.)
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */
.legal-hero {
  background: linear-gradient(180deg, var(--tint) 0%, #fff 100%);
  padding: 3rem 0 3.5rem;
}

.crumb {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--accent);
}

.crumb b {
  color: var(--ink);
  font-weight: 500;
}

.legal-hero h1 {
  margin-top: 20px;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.legal-hero .lead {
  margin-top: 12px;
  max-width: 720px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

.legal-meta b {
  color: var(--ink);
  font-weight: 600;
}

/* Layout ----------------------------------------------------------------- */
.legal {
  padding: 3rem 0 5rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
}

.legal-toc h2 {
  font: 600 12px/1 "Poppins", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: flex;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font: 600 12px/1.6 "Poppins", sans-serif;
  color: var(--accent);
}

.legal-toc a:hover {
  background: var(--tint);
  color: var(--accent);
}

/* Prose ------------------------------------------------------------------ */
.legal-body {
  max-width: 780px;
}

.legal-body section + section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.legal-body h2 {
  font-size: 24px;
  font-weight: 600;
  scroll-margin-top: 24px;
}

.legal-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
}

.legal-body p,
.legal-body ul {
  margin-top: 12px;
  color: var(--text);
}

.legal-body ul {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-body li::marker {
  color: var(--accent);
}

.legal-note {
  border-left: 3px solid var(--brand);
  background: var(--tint);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

.legal-contact {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  font-size: 15px;
}

.legal-contact b {
  display: block;
  font: 600 12px/1.6 "Poppins", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-contact a {
  color: var(--ink);
  text-decoration: none;
}

.legal-contact a:hover {
  color: var(--accent);
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .legal-hero {
    padding: 1.5rem 0 2.5rem;
  }

  .legal-hero h1 {
    font-size: 32px;
  }

  .legal {
    padding: 2rem 0 4rem;
  }

  .legal-toc ol,
  .legal-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-body h2 {
    font-size: 21px;
  }
}

/* Phones: section headings fill the width (stack_pass.py) */
@media (max-width: 640px) {
  .sec-head {
    max-width: none;
  }

  h2,
  .h2 {
    text-wrap: pretty;
  }

  .h2,
  .cta h2,
  .cx-info h2,
  .sg-head h2,
  .cb-copy h2 {
    font-size: 23px;
    line-height: 1.25;
  }

  .sec-head .lead {
    font-size: 16px;
  }
}
