/* ============================================
   Legal Pages (Terms, Privacy, Refund, Legal Notice)
   Premium Audio Spectrum Theme
   ============================================ */

/* Page layout */
.legal-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Decorative blobs */
.legal-page::before,
.legal-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.legal-page::before {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(107, 63, 255, 0.15), transparent 70%);
  filter: blur(80px);
}

.legal-page::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -150px;
  background: radial-gradient(circle, rgba(255, 77, 138, 0.12), transparent 70%);
  filter: blur(80px);
}

.legal-main {
  display: flex;
  flex: 1;
  justify-content: center;
  width: 100%;
  padding: var(--space-10) var(--space-4);
  position: relative;
  z-index: 1;
}

.legal-content {
  width: 100%;
  max-width: 56rem;
  border-radius: var(--radius-3xl);
  background: rgba(10, 6, 24, 0.88);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

/* Inter-page navigation pills */
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.legal-nav__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  transition: all var(--transition-normal);
}

.legal-nav__link:hover {
  color: var(--color-text);
  border-color: var(--color-border-light);
  background: var(--color-surface-hover);
}

.legal-nav__link.active {
  color: var(--color-text);
  background: linear-gradient(135deg, rgba(107, 63, 255, 0.2), rgba(255, 77, 138, 0.15));
  border-color: rgba(107, 63, 255, 0.4);
  box-shadow: 0 0 15px rgba(107, 63, 255, 0.2);
}

/* Header */
.legal-header {
  margin-bottom: var(--space-8);
}

.legal-header__label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-accent);
  margin-bottom: var(--space-2);
  text-shadow: 0 0 20px rgba(255, 126, 182, 0.4);
}

.legal-header__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-tight);
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.legal-header__intro {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 48rem;
}

/* Body content */
.legal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.8);
}

/* Section reveal animation */
.legal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.legal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays */
.legal-section:nth-child(1) { transition-delay: 0.05s; }
.legal-section:nth-child(2) { transition-delay: 0.1s; }
.legal-section:nth-child(3) { transition-delay: 0.15s; }
.legal-section:nth-child(4) { transition-delay: 0.2s; }
.legal-section:nth-child(5) { transition-delay: 0.25s; }
.legal-section:nth-child(6) { transition-delay: 0.3s; }
.legal-section:nth-child(7) { transition-delay: 0.35s; }
.legal-section:nth-child(8) { transition-delay: 0.4s; }
.legal-section:nth-child(9) { transition-delay: 0.45s; }
.legal-section:nth-child(10) { transition-delay: 0.5s; }
.legal-section:nth-child(11) { transition-delay: 0.55s; }
.legal-section:nth-child(12) { transition-delay: 0.6s; }
.legal-section:nth-child(13) { transition-delay: 0.65s; }
.legal-section:nth-child(14) { transition-delay: 0.7s; }

.legal-section__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
}

.legal-section__text {
  color: rgba(255, 255, 255, 0.8);
}

.legal-section__text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-normal);
}

.legal-section__text a:hover {
  color: var(--color-text);
}

.legal-section__highlight {
  font-weight: var(--font-medium);
  color: var(--color-text);
}

.legal-section__summary {
  color: var(--color-text-muted);
  font-style: italic;
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-border-glow);
}

.legal-section__list {
  list-style: disc;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.legal-section__list li::marker {
  color: var(--color-accent);
}

.legal-section__contact {
  font-weight: var(--font-medium);
  color: var(--color-accent);
}

.legal-section__contact a {
  color: var(--color-accent);
  transition: all var(--transition-normal);
}

.legal-section__contact a:hover {
  color: var(--color-text);
  text-shadow: 0 0 10px rgba(255, 126, 182, 0.5);
}

.legal-updated {
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-border-subtle);
}

/* Responsive */
@media (min-width: 640px) {
  .legal-content {
    padding: var(--space-10);
  }

  .legal-header__title {
    font-size: var(--text-4xl);
  }

  .legal-nav {
    gap: var(--space-3);
  }

  .legal-nav__link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .legal-section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .legal-page::before,
  .legal-page::after {
    display: none;
  }
}
