@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600&display=swap');

:root {
  --page: #f9fafb;
  --surface: #ffffff;
  --ink: #0a1b33;
  --navy: #0a152d;
  --muted: #64748b;
  --line: rgba(203, 213, 225, 0.62);
  --blue: #0ea5e9;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 6%, rgba(186, 230, 253, 0.24), transparent 26rem),
    radial-gradient(circle at 92% 24%, rgba(221, 214, 254, 0.18), transparent 28rem),
    var(--page);
}

a { color: inherit; }

.legal-header {
  position: sticky;
  top: 16px;
  z-index: 30;
  width: min(680px, calc(100vw - 32px));
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px auto 0;
  padding: 6px;
  border: 1px solid rgba(203, 213, 225, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.legal-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.legal-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #f1f5f9;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.legal-mark img {
  width: 27px;
  height: 27px;
}

.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.back-link:hover {
  border-color: #cbd5e1;
  transform: scale(1.02);
}

.legal-shell {
  width: min(1120px, calc(100vw - 48px));
  margin: 48px auto 104px;
}

.legal-hero {
  position: relative;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 68px 72px;
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 40px 100px -28px rgba(15, 23, 42, 0.08);
  isolation: isolate;
}

.legal-hero::before {
  content: "";
  position: absolute;
  top: -170px;
  right: -110px;
  z-index: -2;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(34, 211, 238, 0.34), transparent 23%),
    radial-gradient(circle at 64% 58%, rgba(14, 165, 233, 0.23), transparent 34%),
    radial-gradient(circle at 47% 52%, rgba(124, 58, 237, 0.11), transparent 52%);
  filter: blur(4px);
}

.legal-hero::after {
  content: "";
  position: absolute;
  top: -96px;
  right: -22px;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(14, 116, 144, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(14, 116, 144, 0.04),
    0 0 0 108px rgba(124, 58, 237, 0.025);
}

.legal-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #0e7490;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 78px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.legal-hero > p:last-child {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.legal-card {
  width: min(920px, calc(100% - 72px));
  margin: 22px auto 0;
  padding: 72px 78px 84px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px -54px rgba(15, 23, 42, 0.3);
}

.legal-card h2 {
  margin: 58px 0 18px;
  padding-top: 28px;
  border-top: 1px solid rgba(226, 232, 240, 0.82);
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}

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

.legal-card p {
  max-width: 76ch;
  margin: 0 0 18px;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.84;
  text-wrap: pretty;
}

.legal-card p strong {
  color: var(--ink);
  font-weight: 700;
}

.legal-card a {
  color: #0369a1;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card .document-subtitle {
  margin: -4px 0 32px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.36;
}

.legal-footer {
  width: min(1120px, calc(100vw - 48px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 30px 0 52px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  font-size: 10px;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.legal-footer a {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.legal-footer a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.4);
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .legal-header {
    top: 10px;
    width: calc(100vw - 24px);
    min-height: 56px;
    margin-top: 10px;
  }

  .legal-brand {
    gap: 8px;
    padding-right: 4px;
    font-size: 16px;
  }

  .legal-mark {
    width: 42px;
    height: 42px;
  }

  .legal-mark img {
    width: 25px;
    height: 25px;
  }

  .back-link {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 11px;
  }

  .legal-shell {
    width: calc(100vw - 24px);
    margin: 32px auto 76px;
  }

  .legal-hero {
    min-height: 300px;
    padding: 44px 26px;
    border-radius: 32px;
  }

  .legal-hero::before {
    top: -230px;
    right: -240px;
  }

  .legal-hero::after {
    top: -130px;
    right: -180px;
  }

  .legal-hero h1 {
    max-width: 100%;
    font-size: clamp(43px, 13vw, 58px);
  }

  .legal-card {
    width: 100%;
    margin-top: 12px;
    padding: 44px 24px 58px;
    border-radius: 30px;
  }

  .legal-card h2 {
    margin-top: 46px;
    padding-top: 24px;
    font-size: 23px;
  }

  .legal-card p {
    max-width: none;
    font-size: 14px;
    line-height: 1.78;
  }

  .legal-footer {
    width: calc(100vw - 36px);
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body { background: #fff; }
  body::before,
  .legal-header,
  .legal-footer { display: none; }
  .legal-shell { width: 100%; margin: 0; }
  .legal-hero,
  .legal-card {
    width: 100%;
    margin: 0;
    padding-inline: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .legal-hero { min-height: auto; padding-block: 0 36px; }
  .legal-hero::before,
  .legal-hero::after { display: none; }
  .legal-card h2 { break-after: avoid; }
  .legal-card p { orphans: 3; widows: 3; }
}
