/* =============================================================================
 * Cura - /legal/ page styles
 *
 * Long-form reading layout. Builds on base.css + the chrome from home.css
 * (header / footer / mega-nav / modal); only adds the legal-page typography
 * and the callout block.
 * ============================================================================= */

.legal-hero {
  padding-top: clamp(5rem, 9vw, 8rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  text-align: left;
}
.legal-hero h1 {
  font-size: clamp(2rem, 3.6vw + 0.6rem, 3.4rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0.6rem 0 1.2rem;
}
.legal-hero h1 .accent { color: var(--accent-primary); }
.legal-lead {
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.15rem);
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 64ch;
  margin: 0 0 1rem;
}
.legal-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}
.legal-meta a { color: var(--accent-primary); }
.legal-meta a:hover { color: var(--accent-secondary); }

.legal-section {
  padding: clamp(2.4rem, 4vw, 3.6rem) 0;
  border-top: 1px solid var(--border-glass);
}
.legal-section h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 1.4vw + 0.8rem, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--text-strong);
  margin: 0 0 1.1rem;
}
.legal-section > .container > p,
.legal-section > .container-narrow > p {
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 1rem;
  max-width: 68ch;
  margin: 0 0 1rem;
}
.legal-section p code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92em;
  background: rgba(8, 24, 31, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text-strong);
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 72ch;
}
.legal-list li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 2.3rem;
  background: var(--surface-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.55;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.legal-list li::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(136, 176, 126, 0.08);
}
.legal-list li strong {
  color: var(--text-strong);
  font-weight: 500;
}
.legal-list li a {
  color: var(--accent-primary);
}
.legal-list li a:hover { color: var(--accent-secondary); }

.legal-callout {
  margin: 1.4rem 0 0;
  padding: 1.1rem 1.2rem;
  background: rgba(80, 118, 168, 0.10);
  border: 1px solid rgba(80, 118, 168, 0.28);
  border-left: 3px solid var(--accent-steel);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 72ch;
}
.legal-callout strong {
  color: var(--text-strong);
  font-weight: 500;
}

/* Section sub-headings (h3 inside privacy/terms sections). */
.legal-section h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-strong);
  margin: 1.4rem 0 0.45rem;
}

/* Table of contents - ordered list of section anchors. */
.legal-toc {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.4rem;
  max-width: 72ch;
  counter-reset: legal-toc;
}
.legal-toc li {
  counter-increment: legal-toc;
  padding-left: 1.7rem;
  position: relative;
  font-size: 0.95rem;
}
.legal-toc li::before {
  content: counter(legal-toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  font-family: var(--font-sans);
}
.legal-toc a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.legal-toc a:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
@media (max-width: 720px) {
  .legal-toc { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .legal-section { padding: 2rem 0; }
  .legal-list li { padding: 0.75rem 0.9rem 0.75rem 2rem; }
  .legal-list li::before { left: 0.8rem; top: 1.05rem; }
}
