/* ========================================
   Legal pages – terms.html, privacy.html
   ======================================== */
.legal {
  padding: 180px 40px 160px;
  background: var(--surface-l0);
  min-height: 100vh;
  position: relative;
}

.legal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: linear-gradient(
    to bottom,
    rgba(252, 185, 178, 0.12) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  color: var(--fg-primary);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-secondary);
  margin-bottom: 80px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.legal-back:hover {
  gap: 10px;
  color: var(--fg-primary);
}

.legal-content h1 {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--fg-primary);
  margin-bottom: 20px;
}

.legal-content .legal-updated {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-tertiary);
  margin-bottom: 160px;
  letter-spacing: 0.2px;
}

.legal-content section {
  margin-bottom: 96px;
  position: relative;
}

.legal-content section + section {
  padding-top: 0;
}

.legal-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--fg-primary);
  margin-bottom: 32px;
  line-height: 1.15;
  letter-spacing: -0.8px;
}

.legal-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  margin-top: 56px;
  margin-bottom: 20px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.legal-content h3:first-of-type {
  margin-top: 0;
}

.legal-content p {
  font-size: 17px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
}

.legal-content ul {
  margin: 20px 0 28px 0;
  padding-left: 0;
  list-style: none;
}

.legal-content li {
  position: relative;
  font-size: 17px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 10px;
  padding-left: 24px;
  line-height: 1.7;
}

.legal-content li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bg-brand);
}

.legal-content li strong {
  color: var(--fg-primary);
  font-weight: 700;
}

.legal-content a {
  color: var(--bg-brand);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.legal-content a:hover {
  color: var(--bg-brand-hover);
  border-bottom-color: transparent;
}

.legal-contact {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: var(--radius-2xl);
  margin-top: 32px;
  border: 1px solid rgba(235, 80, 64, 0.08);
}

.legal-contact p {
  margin-bottom: 12px;
  font-size: 16px;
}

.legal-contact p:last-child {
  margin-bottom: 0;
}

.legal-contact strong {
  color: var(--fg-primary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .legal {
    padding: 120px 24px 96px;
  }

  .legal-back {
    margin-bottom: 48px;
  }

  .legal-updated {
    margin-bottom: 64px;
  }

  .legal-content section {
    margin-bottom: 72px;
  }

  .legal-content h2 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .legal-content h3 {
    font-size: 18px;
    margin-top: 40px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 16px;
  }

  .legal-contact {
    padding: 28px;
  }
}
