/* Legal Pages CSS - TimrX */

/* Hero */
.legal-hero {
  padding: calc(var(--navH) + 60px) 0 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 60%);
  border-bottom: 1px solid var(--line);
}

.legal-hero .container {
  max-width: 900px;
}

.legal-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.1;
}

.legal-hero .last-updated {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-hero .last-updated strong {
  color: var(--accent);
}

/* Content */
.legal-content {
  padding: 60px 0 80px;
}

.legal-content .container {
  max-width: 900px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}

.legal-content p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 16px;
  font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 20px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

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

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

/* Info boxes */
.legal-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-info p {
  margin: 0;
  color: var(--text);
}

.legal-warning {
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-warning p {
  margin: 0;
  color: var(--text);
}

/* Table of contents */
.legal-toc {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.legal-toc h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.legal-toc a {
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.legal-toc a::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-toc a:hover::before {
  opacity: 1;
}

/* Contact section */
.legal-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.legal-contact h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.legal-contact p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.legal-contact .btn {
  flex-shrink: 0;
  color: #0b0b0b;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.legal-contact .btn:hover {
  color: #0b0b0b;
  background: #fff;
  border-color: #fff;
  text-decoration: none;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-3px);
}

/* Footer — legal pages override */
.legal-content ~ footer,
.legal-hero ~ main + footer,
footer:last-of-type {
  border-top: none;
  padding: 0;
  margin-top: 0;
}

footer .foot {
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px var(--gutter, 20px) 32px;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 900px;
}

footer .foot > span {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
  order: 3;
}

footer .foot-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  order: 1;
}

footer .foot-nav a {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  transition: all 0.25s ease;
}

footer .foot-nav a:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

footer .foot-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  order: 2;
}

footer .foot-legal a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer .foot-legal a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .legal-hero {
    padding: calc(var(--navH) + 40px) 0 40px;
  }

  .legal-content {
    padding: 40px 0 60px;
  }

  .legal-content h2 {
    font-size: 1.3rem;
    margin: 36px 0 16px;
  }

  .legal-toc {
    padding: 20px;
  }

  .legal-contact {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 24px;
    padding: 16px 18px;
  }

  footer .foot {
    padding: 32px var(--gutter, 16px) 24px;
    gap: 20px;
  }

  footer .foot-nav a {
    font-size: 11px;
    padding: 5px 10px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}
