:root {
  --legal-bg: #05011f;
  --legal-bg-2: #09032d;
  --legal-card: rgba(13, 11, 49, .76);
  --legal-card-2: rgba(255,255,255,.055);
  --legal-border: rgba(255,255,255,.13);
  --legal-border-strong: rgba(54, 225, 255, .34);
  --legal-text: rgba(255,255,255,.96);
  --legal-muted: rgba(255,255,255,.72);
  --legal-soft: rgba(255,255,255,.54);
  --legal-gold: #d9b98f;
  --legal-gold-dark: #b8956b;
  --legal-cyan: #31d7ff;
  --legal-violet: #9b5cff;
  --legal-pink: #ff4fd8;
  --legal-radius: 24px;
  --legal-shadow: 0 24px 90px rgba(0,0,0,.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body.legal-page {
  margin: 0;
  min-height: 100vh;
  color: var(--legal-text);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(155,92,255,.22), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(49,215,255,.18), transparent 30%),
    radial-gradient(circle at 50% 92%, rgba(255,79,216,.12), transparent 36%),
    linear-gradient(135deg, var(--legal-bg), var(--legal-bg-2));
  overflow-x: clip;
}

body.legal-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0, transparent 72%);
}

.legal-page a {
  color: inherit;
}

.legal-bg,
.legal-orb,
.legal-grid-glow {
  pointer-events: none;
}

.legal-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: .58;
  z-index: 0;
}

.legal-orb-a {
  width: 320px;
  height: 320px;
  top: 90px;
  left: -110px;
  background: radial-gradient(circle, rgba(155,92,255,.42), transparent 70%);
}

.legal-orb-b {
  width: 300px;
  height: 300px;
  right: -100px;
  top: 220px;
  background: radial-gradient(circle, rgba(49,215,255,.30), transparent 70%);
}

.legal-grid-glow {
  position: fixed;
  inset: auto 0 0 0;
  height: 260px;
  background: linear-gradient(to top, rgba(184,149,107,.10), transparent);
  z-index: 0;
}

.legal-container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.legal-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 2, 28, .72);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(18px);
}

.legal-navbar-inner {
  width: min(1220px, calc(100% - 30px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.legal-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 0 18px rgba(49,215,255,.18));
}

.legal-brand-text {
  font-family: "Anton", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.legal-main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-main-nav a {
  text-decoration: none;
  color: rgba(255,255,255,.80);
  font-size: .88rem;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: .2s ease;
}

.legal-main-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.legal-main-nav .nav-cta {
  color: #07021f;
  background: linear-gradient(135deg, var(--legal-gold), #fff1c9);
  box-shadow: 0 0 24px rgba(217,185,143,.18);
}

.legal-burger {
  display: none;
  width: 46px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.legal-burger span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.legal-hero {
  padding: 82px 0 34px;
}

.legal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: stretch;
}

.legal-kicker,
.section-topline {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 9px 13px;
  border: 1px solid rgba(217,185,143,.34);
  border-radius: 999px;
  color: var(--legal-gold);
  background: rgba(255,255,255,.06);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.legal-hero h1 {
  margin: 0;
  max-width: 10ch;
  font-family: "Anton", sans-serif;
  font-size: clamp(42px, 7vw, 92px);
  line-height: .88;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow: 0 14px 38px rgba(0,0,0,.50), 0 0 30px rgba(155,92,255,.20);
}

.legal-hero h1 span {
  color: var(--legal-gold);
}

.legal-hero-text {
  max-width: 72ch;
  margin: 22px 0 0;
  color: var(--legal-muted);
  line-height: 1.85;
  font-size: 1rem;
}

.legal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
  transition: .2s ease;
}

.legal-btn:hover {
  transform: translateY(-2px);
}

.legal-btn-primary {
  color: #05011f;
  background: linear-gradient(135deg, var(--legal-cyan), #ffffff 58%, var(--legal-gold));
  box-shadow: 0 14px 36px rgba(49,215,255,.18);
}

.legal-btn-ghost {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
}

.legal-status-card {
  position: relative;
  align-self: end;
  min-height: 320px;
  padding: 24px;
  border-radius: var(--legal-radius);
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)),
    radial-gradient(circle at 90% 10%, rgba(49,215,255,.16), transparent 36%),
    radial-gradient(circle at 10% 90%, rgba(155,92,255,.18), transparent 36%);
  box-shadow: var(--legal-shadow);
  overflow: hidden;
}

.legal-status-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 160px;
  background: radial-gradient(circle, rgba(49,215,255,.22), transparent 70%);
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--legal-cyan);
  box-shadow: 0 0 24px var(--legal-cyan);
  margin-bottom: 18px;
}

.legal-status-card h2 {
  margin: 0 0 16px;
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 2rem;
}

.legal-status-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-status-card li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: var(--legal-muted);
  line-height: 1.55;
}

.legal-status-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--legal-gold);
  box-shadow: 0 0 16px rgba(217,185,143,.5);
}

.legal-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0 84px;
}

.legal-side {
  min-width: 0;
}

.legal-toc {
  position: sticky;
  top: 98px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--legal-radius);
  border: 1px solid var(--legal-border);
  background: rgba(12, 9, 48, .76);
  box-shadow: 0 18px 60px rgba(0,0,0,.34);
  backdrop-filter: blur(14px);
}

.toc-title {
  margin: 0 0 8px;
  color: var(--legal-gold);
  font-family: "Anton", sans-serif;
  font-size: 1.35rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.legal-toc a {
  display: block;
  color: rgba(255,255,255,.76);
  text-decoration: none;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: .90rem;
  font-weight: 700;
  transition: .18s ease;
}

.legal-toc a:hover,
.legal-toc a.is-active {
  color: #fff;
  border-color: rgba(49,215,255,.28);
  background: rgba(255,255,255,.065);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 20px rgba(49,215,255,.07);
}

.legal-document {
  min-width: 0;
  border: 1px solid var(--legal-border);
  border-radius: calc(var(--legal-radius) + 4px);
  background:
    radial-gradient(circle at 100% 0%, rgba(49,215,255,.08), transparent 28%),
    radial-gradient(circle at 0% 12%, rgba(155,92,255,.10), transparent 24%),
    rgba(9, 7, 40, .70);
  box-shadow: var(--legal-shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.legal-section {
  padding: 34px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 16px;
  color: #fff;
  font-family: "Anton", sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.legal-section h3 {
  margin: 24px 0 10px;
  color: var(--legal-gold);
  font-size: 1.02rem;
  letter-spacing: .02em;
}

.legal-section p {
  margin: 0 0 14px;
  color: var(--legal-muted);
  line-height: 1.85;
  font-size: .98rem;
}

.legal-section strong {
  color: #fff;
}

.legal-section ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legal-section li {
  position: relative;
  padding: 9px 0 9px 25px;
  color: var(--legal-muted);
  line-height: 1.68;
}

.legal-section li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--legal-cyan), var(--legal-violet));
  box-shadow: 0 0 18px rgba(49,215,255,.35);
}

.legal-alert,
.contact-card {
  margin: 20px 0 4px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(217,185,143,.25);
  color: rgba(255,255,255,.85);
  background:
    linear-gradient(135deg, rgba(217,185,143,.13), rgba(155,92,255,.07));
}

.legal-alert-soft {
  border-color: rgba(49,215,255,.22);
  background: linear-gradient(135deg, rgba(49,215,255,.10), rgba(155,92,255,.06));
}

.contact-card p {
  margin-bottom: 8px;
}

.legal-section a {
  color: #fff;
  text-decoration-color: rgba(49,215,255,.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.legal-final {
  background: linear-gradient(135deg, rgba(155,92,255,.09), rgba(49,215,255,.06));
}

.legal-footer {
  position: relative;
  z-index: 1;
  padding: 56px 0 28px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(3, 1, 18, .72);
}

.footer-cta {
  padding: 28px;
  border-radius: var(--legal-radius);
  border: 1px solid rgba(255,255,255,.13);
  background:
    radial-gradient(circle at 100% 0%, rgba(49,215,255,.13), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.footer-cta h2 {
  margin: 0 0 8px;
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 2rem;
}

.footer-cta p {
  margin: 0;
  color: var(--legal-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
  padding: 26px 0;
}

.footer-grid p {
  color: var(--legal-muted);
  line-height: 1.7;
}

.footer-logo {
  width: 74px;
  height: auto;
  margin-bottom: 12px;
}

.footer-grid h3 {
  color: var(--legal-gold);
  font-size: .96rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}

.footer-grid a {
  display: block;
  color: rgba(255,255,255,.74);
  text-decoration: none;
  padding: 6px 0;
  transition: .18s ease;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 18px;
  color: var(--legal-soft);
  font-size: .86rem;
}

.footer-bottom p {
  margin: 0;
}

.legal-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #05011f;
  background: linear-gradient(135deg, var(--legal-cyan), var(--legal-gold));
  box-shadow: 0 16px 40px rgba(0,0,0,.32);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
  font-weight: 900;
  font-size: 1.1rem;
}

.legal-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 980px) {
  .legal-hero-grid,
  .legal-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .legal-status-card {
    align-self: stretch;
    min-height: auto;
  }

  .legal-side {
    order: -1;
  }

  .legal-toc {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-title {
    grid-column: 1 / -1;
  }

  .footer-cta,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .legal-navbar-inner {
    min-height: 70px;
  }

  .legal-burger {
    display: inline-flex;
  }

  .legal-main-nav {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(6, 3, 30, .96);
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 70px rgba(0,0,0,.42);
  }

  .legal-main-nav.is-open {
    display: flex;
  }

  .legal-main-nav a {
    padding: 13px 14px;
  }

  .legal-brand-text {
    font-size: 1.12rem;
  }

  .legal-hero {
    padding: 52px 0 20px;
  }

  .legal-hero h1 {
    max-width: 11ch;
    font-size: clamp(38px, 13vw, 62px);
  }

  .legal-hero-text {
    font-size: .94rem;
    line-height: 1.75;
  }

  .legal-hero-actions,
  .footer-cta .legal-btn {
    width: 100%;
  }

  .legal-btn {
    width: 100%;
  }

  .legal-layout {
    padding-bottom: 56px;
  }

  .legal-toc {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .legal-section {
    padding: 24px 18px;
  }

  .legal-section h2 {
    font-size: 30px;
  }

  .footer-grid {
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
