/* ===== LEGAL PAGES STYLES ===== */

/* Hero */
.legal-hero {
  background: var(--dark);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}
.legal-hero__mesh {
  position: absolute;
  inset: 0;
}
.legal-hero__mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}
.legal-hero__mesh-orb--1 {
  width: 500px; height: 500px;
  background: rgba(232, 81, 45, 0.25);
  top: -20%; left: -5%;
  animation: meshFloat1 12s ease-in-out infinite;
}
.legal-hero__mesh-orb--2 {
  width: 400px; height: 400px;
  background: rgba(240, 144, 48, 0.15);
  top: 10%; right: -10%;
  animation: meshFloat2 15s ease-in-out infinite;
}
.legal-hero__mesh-orb--3 {
  width: 300px; height: 300px;
  background: rgba(14, 165, 233, 0.15);
  bottom: -10%; left: 40%;
  animation: meshFloat3 10s ease-in-out infinite;
}

.legal-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.legal-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.legal-hero__text { flex: 1; }
.legal-hero__tag {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent, #0ea5e9);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legal-hero__tag::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--accent, #0ea5e9);
  border-radius: 2px;
}
.legal-hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.legal-hero__date {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-hero__date i { font-size: 0.85rem; }

.legal-hero__nav {
  display: flex;
  gap: 8px;
}
.legal-hero__nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
  text-decoration: none;
}
.legal-hero__nav a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.legal-hero__nav a.active {
  background: var(--gradient);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(232, 81, 45, 0.3);
}

.legal-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.legal-hero__icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--accent, #0ea5e9);
}

/* Layout */
.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  padding: 80px 0 120px;
  background: var(--white);
}

/* Sidebar TOC */
.legal-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 16px;
}
.legal-toc::-webkit-scrollbar { width: 3px; }
.legal-toc::-webkit-scrollbar-track { background: transparent; }
.legal-toc::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

.legal-toc__title {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray-400);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}
.legal-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-toc__link {
  display: block;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.legal-toc__link:hover {
  color: var(--dark);
  background: var(--gray-50);
}
.legal-toc__link.active {
  color: var(--primary);
  background: rgba(232, 81, 45, 0.06);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Content */
.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gray-100);
  scroll-margin-top: 100px;
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section__number {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.legal-section h2 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.legal-section h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 12px;
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.85;
  margin-bottom: 16px;
}

.legal-section ul {
  margin-bottom: 20px;
  padding-left: 0;
}
.legal-section li {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 10px;
  list-style: none;
  padding-left: 24px;
  position: relative;
}
.legal-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gradient);
}
.legal-section li strong {
  color: var(--dark);
  font-weight: 600;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(232, 81, 45, 0.3);
  transition: var(--transition);
}
.legal-section a:hover {
  border-bottom-color: var(--primary);
}

/* Info callout box */
.legal-callout {
  background: linear-gradient(135deg, rgba(240,144,48,0.06), rgba(232,81,45,0.06));
  border: 1px solid rgba(232, 81, 45, 0.12);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.legal-callout p {
  margin-bottom: 0;
  color: var(--gray-700);
}
.legal-callout strong {
  color: var(--dark);
}

/* Contact card at bottom */
.legal-contact {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 48px;
  position: relative;
  overflow: hidden;
}
.legal-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(232, 81, 45, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(240, 144, 48, 0.1) 0%, transparent 50%);
}
.legal-contact__inner {
  position: relative;
  z-index: 1;
}
.legal-contact h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.legal-contact > .legal-contact__inner > p {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.legal-contact__items {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.legal-contact__item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.legal-contact__item-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #0ea5e9);
  font-size: 0.9rem;
}
.legal-contact__item a,
.legal-contact__item span {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: none;
}
.legal-contact__item a:hover { color: var(--white); }

/* Footer minimal */
.legal-footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.legal-footer .footer__bottom {
  border-top: none;
}

/* Progress bar */
.legal-progress {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gray-200);
  z-index: 999;
}
.legal-progress__bar {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px; height: 48px;
  background: var(--gradient);
  color: var(--white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(232, 81, 45, 0.35);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition);
  text-decoration: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(232, 81, 45, 0.45);
}

/* Responsive */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .legal-toc {
    position: relative;
    top: 0;
    max-height: none;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
  }
  .legal-hero__content {
    flex-direction: column;
    align-items: flex-start;
  }
  .legal-hero__meta {
    align-items: flex-start;
    flex-direction: row;
    gap: 16px;
  }
  .legal-contact__items {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .legal-hero { padding: 120px 0 60px; }
  .legal-hero__nav { flex-wrap: wrap; }
  .legal-hero__icon { width: 56px; height: 56px; font-size: 1.3rem; }
  .legal-layout { padding: 40px 0 80px; }
  .legal-section { margin-bottom: 32px; padding-bottom: 32px; }
  .legal-contact { padding: 28px; }
}
