/* Legal pages — оформление юридических документов */

.legal-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #06050c;
  color: rgba(209, 213, 219, 0.92);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.legal-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    140deg,
    #06050c 0%,
    #0d0820 20%,
    #120a2a 42%,
    #0a1028 62%,
    #160828 82%,
    #06050c 100%
  );
}

.legal-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 48% at 12% 0%, rgba(79, 70, 229, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 42% at 88% 100%, rgba(124, 58, 237, 0.12), transparent 55%);
}

.legal-header,
.legal-main,
.legal-footer {
  position: relative;
  z-index: 1;
}

.legal-header {
  border-bottom: 1px solid rgba(99, 102, 241, 0.22);
  padding: 1rem 1.25rem;
}

.legal-header__inner {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-header__logo {
  display: block;
  height: 1.5rem;
  width: auto;
  max-width: 10rem;
}

.legal-header__back {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(165, 180, 252, 0.95);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.legal-header__back:hover {
  color: #e0e7ff;
}

.legal-main {
  flex: 1;
  padding: 2.5rem 1.25rem 3rem;
}

.legal-main__inner {
  max-width: 48rem;
  margin: 0 auto;
}

.legal-doc-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

.legal-doc-meta {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: rgba(156, 163, 175, 0.85);
}

.legal-doc-body {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(209, 213, 219, 0.9);
}

.legal-doc-body > *:first-child {
  margin-top: 0;
}

.legal-doc-body > *:last-child {
  margin-bottom: 0;
}

.legal-doc-lead {
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(199, 210, 254, 0.88);
  font-style: italic;
}

.legal-section {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(99, 102, 241, 0.14);
}

.legal-section:first-child,
.legal-doc-lead + .legal-section {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.legal-doc-lead + .legal-section {
  margin-top: 1.75rem;
}

.legal-section h2 {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f3f4f6;
  letter-spacing: -0.01em;
}

.legal-clause {
  margin: 0 0 1rem;
  padding-left: 0;
}

.legal-clause__num {
  display: inline;
  font-weight: 600;
  color: rgba(165, 180, 252, 0.95);
  margin-right: 0.15em;
}

.legal-requisites {
  margin: 0.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(12, 10, 28, 0.55);
}

.legal-requisites > p:first-child {
  margin: 0 0 1rem;
  font-weight: 600;
  color: rgba(224, 231, 255, 0.95);
}

.legal-requisites dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-requisites dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.legal-requisites dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(156, 163, 175, 0.9);
}

.legal-requisites dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(209, 213, 219, 0.92);
}

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

.legal-list li {
  position: relative;
  margin: 0 0 0.65rem;
  padding-left: 1.35rem;
  line-height: 1.65;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.75);
}

.legal-list--definitions li {
  padding-left: 0;
}

.legal-list--definitions li::before {
  display: none;
}

.legal-list--definitions li strong {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 600;
  color: rgba(199, 210, 254, 0.95);
}

.legal-doc-body p:not(.legal-clause):not(.legal-doc-lead) {
  margin: 0 0 1rem;
}

.legal-doc-body a {
  color: rgba(165, 180, 252, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.legal-doc-body a:hover {
  color: #e0e7ff;
}

@media (max-width: 480px) {
  .legal-requisites dl > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

.legal-footer {
  border-top: 1px solid rgba(99, 102, 241, 0.22);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(156, 163, 175, 0.7);
}

.legal-footer p {
  margin: 0;
}

.legal-footer__links {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.legal-footer__links a {
  color: rgba(165, 180, 252, 0.9);
  text-decoration: none;
}

.legal-footer__links a:hover {
  color: #e0e7ff;
  text-decoration: underline;
}
