/* DropshipGuru — Legal Pages (scoped, premium documentation layout) */

.legal-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 12px rgba(247, 184, 36, 0.45);
  transition: width 0.12s ease-out;
}

.legal-page-wrap {
  min-height: 100vh;
  background: #0E1013;
}

.legal-hero {
  position: relative;
  padding: clamp(48px, 7vw, 72px) clamp(20px, 4vw, 32px);
  border-bottom: 1px solid rgba(247, 184, 36, 0.12);
  background:
    radial-gradient(ellipse 60% 80% at 50% -20%, rgba(212, 175, 55, 0.08), transparent 60%),
    #0E1013;
}

.legal-hero-inner {
  width: min(850px, 100%);
  margin: 0 auto;
  text-align: center;
}

.legal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.06);
  color: #E8C872;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.legal-hero-icon {
  width: 18px;
  height: 18px;
  color: #E8C872;
}

.legal-hero h1 {
  margin: 0 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: #f0efe8;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.legal-hero-desc {
  margin: 0 auto;
  max-width: 620px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #7a7468;
}

.legal-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 48px) 0 clamp(80px, 10vw, 120px);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.legal-toc-wrap {
  position: sticky;
  top: 96px;
}

.legal-toc-title {
  margin: 0 0 14px;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.legal-toc {
  margin: 0;
  padding: 16px;
  list-style: none;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
}

.legal-toc li { margin: 0; }

.legal-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #9a9488;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.legal-toc a:hover {
  color: #f0efe8;
  background: rgba(247, 184, 36, 0.06);
}

.legal-toc a.is-active {
  color: #E8C872;
  background: rgba(247, 184, 36, 0.1);
  border-left-color: var(--gold);
}

.legal-toc-mobile {
  display: none;
}

.legal-content {
  width: min(850px, 100%);
  justify-self: center;
}

.legal-intro {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(247, 184, 36, 0.18);
}

.legal-intro h2 {
  margin: 0 0 16px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #E8C872;
  letter-spacing: 0.02em;
}

.legal-intro p {
  margin: 0 0 14px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #b8b4a8;
}

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

.legal-section {
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(16px);
  animation: legalFadeUp 0.7s var(--ease-premium) forwards;
}

.legal-section:nth-child(2) { animation-delay: 0.05s; }
.legal-section:nth-child(3) { animation-delay: 0.1s; }
.legal-section:nth-child(4) { animation-delay: 0.15s; }

@keyframes legalFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.legal-section h2,
.legal-section h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: #E8C872;
  letter-spacing: -0.01em;
}

.legal-section h2 {
  margin: 0 0 18px;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  scroll-margin-top: 110px;
}

.legal-section h3 {
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 600;
  scroll-margin-top: 110px;
}

.legal-section p {
  margin: 0 0 16px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.82;
  color: #b8b4a8;
}

.legal-section p strong {
  color: #f0efe8;
  font-weight: 700;
}

.legal-section ul {
  margin: 0 0 16px;
  padding-left: 22px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #b8b4a8;
}

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

.legal-card {
  margin: 20px 0;
  padding: 20px 22px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(247, 184, 36, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.legal-divider {
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(90deg, transparent, rgba(247, 184, 36, 0.35), transparent);
  border: none;
}

.legal-back-top {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(247, 184, 36, 0.3);
  background: rgba(14, 16, 19, 0.92);
  color: #E8C872;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}

.legal-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.legal-back-top:hover {
  border-color: rgba(247, 184, 36, 0.55);
  box-shadow: 0 8px 28px rgba(247, 184, 36, 0.18);
}

.legal-back-top svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .legal-toc-wrap { display: none; }

  .legal-toc-mobile {
    display: block;
    margin-bottom: 8px;
  }

  .legal-toc-mobile summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(247, 184, 36, 0.2);
    background: rgba(255, 255, 255, 0.04);
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #E8C872;
  }

  .legal-toc-mobile summary::-webkit-details-marker { display: none; }

  .legal-toc-mobile .legal-toc {
    margin-top: 12px;
  }

  .legal-content { width: 100%; }
}

@media (max-width: 640px) {
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; transform: none; flex-direction: column; padding: 16px; background: rgba(6, 7, 9, 0.96); border-bottom: 1px solid rgba(247, 184, 36, 0.2); }
  nav.open { display: flex; }
  .menu-btn { display: inline-grid; place-items: center; }
}

@media print {
  .legal-progress, .legal-toc-wrap, .legal-toc-mobile, .legal-back-top, .float-wa, .site-header, footer, .menu-btn { display: none !important; }
  .legal-page-wrap { background: #fff; }
  .legal-hero, .legal-section p, .legal-section li { color: #111 !important; }
  .legal-section h2, .legal-section h3, .legal-intro h2 { color: #333 !important; }
  .legal-layout { display: block; width: 100%; padding: 0; }
  .legal-content { width: 100%; max-width: 100%; }
  .legal-section { break-inside: avoid; opacity: 1 !important; transform: none !important; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-section { animation: none; opacity: 1; transform: none; }
  .legal-back-top, .legal-toc a { transition: none; }
}
