/* Axencia.co — Legal Pages · Privacy & Terms · World-Class */

html.ax-legal-page-root,
html.ax-legal-page-root body.ax-legal-page {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100% !important;
  position: static !important;
}

.ax-legal-page {
  --lg-teal: #00d4ff;
  --lg-blue: #3b82f6;
  --lg-glass: rgba(8, 18, 42, 0.82);
  --lg-border: rgba(59, 130, 246, 0.24);
  --lg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lg-sidebar: 240px;
}

.ax-legal-page main,
.ax-legal-page .ax-legal-body,
.ax-legal-page .ax-legal-layout,
.ax-legal-page .ax-legal-sidebar-col {
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}

/* ── Hero ── */
.ax-legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(112px, 14vw, 140px) 24px clamp(48px, 6vw, 64px);
  text-align: center;
}

.ax-legal-hero-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ax-legal-hero-grid {
  position: absolute;
  inset: -8%;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 35%, #000 12%, transparent 72%);
}

.ax-legal-hero-glow {
  position: absolute;
  width: min(480px, 70vw);
  height: min(480px, 70vw);
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.14), transparent 68%);
  filter: blur(60px);
}

.ax-legal-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.ax-legal-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.ax-legal-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
}

.ax-legal-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #fff 0%, rgba(226, 232, 240, 0.88) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ax-legal-hero-lead {
  margin: 0 auto 24px;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(148, 163, 184, 0.95);
}

.ax-legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
}

.ax-legal-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--lg-border);
  background: rgba(6, 12, 28, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.92);
}

.ax-legal-meta-chip svg {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}

.ax-legal-switch {
  display: inline-flex;
  margin-top: 28px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--lg-border);
  background: rgba(6, 12, 28, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.ax-legal-switch a {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
  transition: all 0.28s var(--lg-ease);
}

.ax-legal-switch a.is-active,
.ax-legal-switch a:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(0, 212, 255, 0.18));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── Layout ── */
.ax-legal-body {
  padding: 0 24px clamp(64px, 8vw, 96px);
  overflow: visible;
}

.ax-legal-layout {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 4vw, 40px);
  max-width: 1080px;
  margin: 0 auto;
}

.ax-legal-sidebar-col {
  flex: 0 0 var(--lg-sidebar);
  width: var(--lg-sidebar);
  min-width: var(--lg-sidebar);
  position: relative;
  align-self: stretch;
}

/* ── TOC — sticky sidebar (CSS + JS fixed fallback) ── */
.ax-legal-toc-wrap {
  position: sticky;
  top: calc(var(--nav-height, 72px) + 20px);
  z-index: 30;
  width: 100%;
  max-height: calc(100vh - var(--nav-height, 72px) - 40px);
}

.ax-legal-toc-wrap.is-js-fixed {
  position: fixed !important;
  z-index: 200 !important;
}

.ax-legal-toc-wrap.is-js-bottom {
  position: absolute !important;
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

.ax-legal-toc {
  position: relative;
  top: auto;
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--lg-border);
  background: var(--lg-glass);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.35) transparent;
}

.ax-legal-toc::-webkit-scrollbar {
  width: 4px;
}

.ax-legal-toc::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.35);
  border-radius: 999px;
}

.ax-legal-toc-label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lg-teal);
}

.ax-legal-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ax-legal-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.92);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.22s var(--lg-ease);
}

.ax-legal-toc a:hover {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.1);
}

.ax-legal-toc a.is-active {
  color: #fff;
  border-left-color: var(--lg-teal);
  background: rgba(0, 212, 255, 0.08);
}

/* ── Content ── */
.ax-legal-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ax-legal-section {
  padding: clamp(24px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--lg-border);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(0, 212, 255, 0.05), transparent 55%),
    var(--lg-glass);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--lg-ease), transform 0.55s var(--lg-ease);
}

.ax-legal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ax-legal-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.ax-legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 600;
  color: var(--lg-teal);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.22);
}

.ax-legal-section p,
.ax-legal-section li {
  font-size: 0.95rem;
  line-height: 1.72;
  color: rgba(203, 213, 225, 0.92);
}

.ax-legal-section p + p {
  margin-top: 12px;
}

.ax-legal-section ul {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.ax-legal-section li + li {
  margin-top: 8px;
}

.ax-legal-section a {
  color: var(--lg-teal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ax-legal-section a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* ── CTA strip ── */
.ax-legal-cta {
  margin-top: 8px;
  padding: clamp(28px, 4vw, 36px);
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(0, 212, 255, 0.08));
  text-align: center;
}

.ax-legal-cta h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.ax-legal-cta p {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: rgba(148, 163, 184, 0.95);
}

.ax-legal-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ax-legal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.28s var(--lg-ease);
}

.ax-legal-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.ax-legal-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
}

.ax-legal-btn--ghost {
  color: rgba(226, 232, 240, 0.95);
  background: rgba(6, 12, 28, 0.5);
  border: 1px solid var(--lg-border);
}

.ax-legal-btn--ghost:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(59, 130, 246, 0.12);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .ax-legal-layout {
    flex-direction: column;
  }

  .ax-legal-sidebar-col {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .ax-legal-toc-wrap,
  .ax-legal-toc-wrap.is-js-fixed,
  .ax-legal-toc-wrap.is-js-bottom {
    position: sticky !important;
    top: calc(var(--nav-height, 72px) + 8px) !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-height: none;
    margin-bottom: 4px;
  }

  .ax-legal-toc {
    max-height: none;
    overflow-y: visible;
  }

  .ax-legal-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .ax-legal-toc a {
    border-left: none;
    border: 1px solid rgba(59, 130, 246, 0.18);
    padding: 7px 12px;
    font-size: 0.76rem;
  }

  .ax-legal-toc a.is-active {
    border-color: rgba(0, 212, 255, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ax-legal-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
