/**
 * Legal document skin — the surface every legal text of the site is set on:
 * the hero, the content card, sections, lists and highlights. The light theme
 * (html[data-theme="light"], managers/core/ThemeCore.js) recolors it at the end
 * of this file.
 */

section.legal-page {
  /* Palette of the legal document */
  --white: #ffffff;
  --gray-300: #d1d5db;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-300: #a5b4fc;
  --indigo-500: #6366f1;
  --violet-500: #8b5cf6;
  --brand-violet-600: #652cff;
  --brand-violet-500: #7c3cff;
  --brand-lavender-300: #b8a5ff;
  min-height: 100vh;
}

.legal-hero {
  padding-top: 120px;
  padding-bottom: 80px;
}

.legal-hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(
    135deg,
    var(--white) 0%,
    var(--indigo-100) 30%,
    var(--indigo-200) 60%,
    var(--indigo-300) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.legal-content-wrapper {
  /* A single reading column: comfortable line length for the document */
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem 8rem;
}

.legal-content-card {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .legal-content-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
}

.legal-section {
  margin-bottom: 2.5rem;
}

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

.legal-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-200);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
}

.legal-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--violet-500), var(--indigo-500));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.legal-section-content {
  color: var(--slate-300);
  line-height: 1.7;
  font-size: 1rem;
}

.legal-section-content p {
  margin-bottom: 1rem;
}

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

.legal-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.legal-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--slate-300);
  line-height: 1.6;
}

.legal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--violet-500);
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 0 4px rgba(139, 92, 246, 0.4);
}

.legal-highlight {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.legal-highlight p {
  color: var(--slate-100);
  font-weight: 500;
  margin: 0;
}

/* Responsive improvements */
@media (max-width: 640px) {
  .legal-hero {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .legal-section-title {
    font-size: 1.25rem;
  }

  .legal-section-content {
    font-size: 0.95rem;
  }
}

/* Link styles within content */
.legal-section-content a {
  color: var(--indigo-300);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  text-shadow: 0 0 4px rgba(165, 180, 252, 0.3);
}

.legal-section-content a:hover {
  color: var(--indigo-200);
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(199, 210, 254, 0.5);
}

/* ---------- Light theme ---------- */

:root[data-theme='light'] .legal-hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #312e81 55%, #6d28d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

:root[data-theme='light'] .legal-content-card {
  background: #ffffff;
  border-color: rgba(124, 58, 237, 0.14);
  box-shadow:
    0 24px 48px -16px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(124, 58, 237, 0.06);
}

:root[data-theme='light'] .legal-section-title {
  color: #0f172a;
}

:root[data-theme='light'] .legal-section-content,
:root[data-theme='light'] .legal-list li {
  color: #334155;
}

:root[data-theme='light'] .legal-highlight {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.07), rgba(99, 102, 241, 0.05));
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: none;
}

:root[data-theme='light'] .legal-highlight p {
  color: #1e1b4b;
}

:root[data-theme='light'] .legal-section-content a {
  color: #4f46e5;
  text-shadow: none;
}

:root[data-theme='light'] .legal-section-content a:hover {
  color: #312e81;
  text-shadow: none;
}

:root[data-theme='light'] .legal-page .text-gray-400 {
  color: #64748b;
}
