/* ============================================
   TWO DOG STUDIOS — LEGAL PAGES STYLESHEET
   Applies to: privacy-policy.html, terms-of-service.html
   ============================================ */

/* ---- Hero ---- */
.legal-hero {
  padding: calc(var(--nav-h) + 64px) 0 64px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(108,99,255,0.12) 0%, transparent 55%),
    radial-gradient(circle at 90% 30%, rgba(224,64,251,0.07) 0%, transparent 50%);
  pointer-events: none;
}
.legal-hero .container { position: relative; z-index: 1; }

.legal-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ---- Body layout ---- */
.legal-main { min-height: 100vh; }

.legal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  padding-top: 64px;
  padding-bottom: 100px;
  align-items: start;
}

/* ---- Table of Contents ---- */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.toc-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

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

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

.legal-toc ol li a {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: 6px;
  line-height: 1.4;
  transition: background var(--transition), color var(--transition);
}
.legal-toc ol li a:hover {
  background: rgba(108,99,255,0.1);
  color: var(--purple);
}

/* ---- Content ---- */
.legal-content {
  max-width: 780px;
}

.legal-intro-box {
  background: rgba(108,99,255,0.07);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 56px;
}
.legal-intro-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.legal-content section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.legal-content section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.3;
}

.section-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--purple);
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 50px;
  padding: 3px 10px;
  flex-shrink: 0;
}

.legal-content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.legal-content p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 14px;
}
.legal-content p:last-child { margin-bottom: 0; }

.legal-content ul {
  margin: 14px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-content ul li {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
}
.legal-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 0.75rem;
  top: 3px;
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

.legal-content a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: rgba(108,99,255,0.3);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}
.legal-content a:hover {
  color: var(--pink);
  text-decoration-color: rgba(224,64,251,0.4);
}

/* ---- Contact block inside legal ---- */
.legal-contact-block {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-contact-block p,
.legal-contact-block address {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}
.legal-contact-block strong { color: var(--white); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .legal-body {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .legal-toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .legal-hero { padding: calc(var(--nav-h) + 40px) 0 40px; }
  .legal-body { padding-top: 40px; padding-bottom: 64px; }
  .legal-intro-box { padding: 20px; }
  .legal-content h2 { font-size: 1.15rem; }
  .legal-contact-block { padding: 18px 20px; }
}
