/* =========================
   Legal Theme Tokens
   ========================= */
:root {
  --legal-border: rgba(132, 105, 214, 0.2);
  --legal-border-strong: rgba(132, 105, 214, 0.22);
  --legal-chip-border: rgba(109, 84, 214, 0.24);

  --legal-surface-top: rgba(255, 255, 255, 0.83);
  --legal-surface-bottom: rgba(255, 255, 255, 0.6);
  --legal-panel-top: rgba(255, 255, 255, 0.82);
  --legal-panel-bottom: rgba(255, 255, 255, 0.62);

  --legal-shadow-soft: 0 10px 22px rgba(87, 63, 176, 0.1);
  --legal-shadow-main: 0 16px 34px rgba(87, 63, 176, 0.12);
  --legal-shadow-hover: 0 22px 38px rgba(87, 63, 176, 0.14);

  --legal-accent: #604bc7;
  --legal-accent-muted: #564aa3;
  --legal-accent-soft: rgba(238, 230, 255, 0.9);
  --legal-accent-line: linear-gradient(
    90deg,
    rgba(96, 69, 193, 0.92),
    rgba(208, 109, 223, 0.92)
  );
}

/* =========================
   Layout
   ========================= */
.legal-main {
  padding: 72px 0 86px;
}

.legal-shell {
  position: relative;
  display: grid;
  gap: 20px;
}

/* Decorative ambient glow */
.legal-shell::before {
  content: "";
  position: absolute;
  top: -26px;
  right: 34px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(131, 102, 233, 0.22) 0%,
    rgba(131, 102, 233, 0) 68%
  );
  filter: blur(8px);
  pointer-events: none;
}

.legal-hero,
.legal-card {
  border: 1px solid var(--legal-border);
  border-radius: 26px;
  background: linear-gradient(
    180deg,
    var(--legal-surface-top),
    var(--legal-surface-bottom)
  );
  backdrop-filter: blur(4px);
  box-shadow:
    var(--legal-shadow-main),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

/* =========================
   Hero
   ========================= */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(221, 157, 255, 0.34) 0%,
    rgba(221, 157, 255, 0) 70%
  );
  pointer-events: none;
}

.legal-hero__titleRow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legal-hero__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--legal-chip-border);
  color: #5f46c8;
  font-size: 22px;
  background: linear-gradient(
    180deg,
    rgba(238, 230, 255, 0.92),
    rgba(226, 214, 255, 0.8)
  );
  box-shadow: 0 8px 18px rgba(103, 75, 193, 0.2);
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--legal-chip-border);
  border-radius: 999px;
  padding: 8px 14px;
  color: #4f44a3;
  background: rgba(228, 217, 255, 0.8);
  font-size: 13px;
  font-weight: 800;
}

.legal-hero h1 {
  margin: 14px 0 8px;
  font-family: "Sora", "Nunito Sans", sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.7px;
}

.legal-hero p {
  margin: 0;
  max-width: 78ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
}

.legal-hero__actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: #54499f;
  background: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 700;
}

/* =========================
   Summary + Jump Links
   ========================= */
.legal-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legal-snapshot__item {
  border: 1px solid var(--legal-border-strong);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(
    180deg,
    var(--legal-panel-top),
    var(--legal-panel-bottom)
  );
  box-shadow:
    var(--legal-shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.legal-snapshot__item h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.legal-snapshot__item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.legal-jump {
  border: 1px solid var(--legal-border-strong);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(2px);
}

.legal-jump__label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #594ca8;
}

.legal-jump__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-jump__links a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--legal-border);
  color: #4f44a3;
  background: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 800;
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.legal-jump__links a:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 84, 214, 0.38);
  background: rgba(236, 227, 255, 0.92);
}

/* =========================
   Legal Cards
   ========================= */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.legal-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  /* Offset anchor targets below sticky header */
  scroll-margin-top: 120px;
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.legal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--legal-accent-line);
}

.legal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 88, 220, 0.35);
  box-shadow:
    var(--legal-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.legal-card__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid rgba(109, 84, 214, 0.28);
  background: var(--legal-accent-soft);
  color: var(--legal-accent-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.legal-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.2;
}

.legal-card h2 i {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--legal-chip-border);
  color: var(--legal-accent);
  font-size: 13px;
  background: rgba(238, 230, 255, 0.78);
}

.legal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 700;
}

.legal-card ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
}

.legal-card li + li {
  margin-top: 6px;
}

.legal-link {
  color: var(--link-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(74, 57, 185, 0.4);
  text-underline-offset: 3px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1120px) {
  .legal-snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1060px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .legal-main {
    padding-top: 44px;
    padding-bottom: 70px;
  }

  .legal-shell::before {
    display: none;
  }

  .legal-hero {
    padding: 20px;
  }

  .legal-hero__titleRow {
    gap: 10px;
  }

  .legal-hero__icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 18px;
    border-radius: 12px;
  }

  .legal-hero h1 {
    font-size: clamp(30px, 9vw, 46px);
  }

  .legal-hero__actions .btn {
    width: 100%;
  }

  .legal-hero p,
  .legal-card p,
  .legal-card ul {
    font-size: 15px;
  }

  .legal-card h2 {
    font-size: 21px;
  }

  .legal-card {
    padding: 18px;
  }

  .legal-jump {
    padding: 14px;
  }

  .legal-jump__links a {
    width: 100%;
    text-align: center;
  }
}
