/* ==========================================================================
   Legal pages (privacy policy, terms of service)
   ========================================================================== */
:root {
  --navy-950: #061229;
  --navy-800: #003478;
  --navy-700: #0a4696;
  --navy-600: #1557b0;
  --indigo-600: #3b5bdb;
  --cyan-500: #00b3e9;
  --cyan-400: #38c7f0;
  --cyan-100: #e3f7fd;

  --ink-900: #0f1b2d;
  --ink-700: #33415a;
  --ink-500: #68768a;
  --ink-400: #8a96a8;

  --surface: #ffffff;
  --page-bg: #f3f5f9;
  --border: #e3e8ef;

  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  font-family: var(--font-body);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Top navigation
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 26, 60, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan-500) 0%, var(--indigo-600) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__link {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #a9b6cc;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.site-nav__cta {
  margin-left: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-500), var(--indigo-600));
  text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(0, 179, 233, 0.8);
  transition: filter 0.15s ease;
}

.site-nav__cta:hover {
  filter: brightness(1.08);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0d2350 0%, #081a3c 55%, var(--navy-950) 100%);
  padding: 64px 24px 120px;
}

.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -60%;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 179, 233, 0.22) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(56, 199, 240, 0.12);
  border: 1px solid rgba(56, 199, 240, 0.25);
  color: var(--cyan-400);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 12px;
}

.hero__subtitle {
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.6;
  color: #a9b6cc;
  margin: 0;
}

/* ==========================================================================
   Layout: table of contents + document
   ========================================================================== */
.legal-layout {
  max-width: 1120px;
  margin: -72px auto 0;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  position: relative;
}

.toc {
  position: sticky;
  top: 88px;
  padding: 18px 14px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 8px 24px -12px rgba(15, 27, 45, 0.14);
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}

.toc__title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc__link {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-500);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.toc__link:hover {
  color: var(--ink-900);
  background: var(--page-bg);
}

.toc__link.is-active {
  color: var(--navy-700);
  font-weight: 600;
  background: var(--cyan-100);
  border-left-color: var(--cyan-500);
  border-radius: 0 8px 8px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 24px 48px -24px rgba(15, 27, 45, 0.22);
}

/* ==========================================================================
   Legal document typography
   ========================================================================== */
.legal {
  padding: 44px 52px 52px;
}

.legal-meta {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-500);
  background: var(--page-bg);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 100px;
  margin: 0 0 32px;
}

.legal-section {
  margin-bottom: 34px;
}

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

.legal-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0 0 12px;
}

.legal-section h3 {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-900);
  margin: 20px 0 8px;
}

.legal-section p,
.legal-section li {
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-700);
}

.legal-section p {
  margin: 0 0 12px;
}

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

.legal-section ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

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

.legal-section li::marker {
  color: var(--cyan-500);
}

.legal-section a {
  color: var(--navy-700);
  font-weight: 500;
  text-decoration-color: rgba(10, 70, 150, 0.3);
  text-underline-offset: 2px;
}

.legal-section a:hover {
  text-decoration-color: currentColor;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
}

.site-footer__text {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--ink-500);
}

.site-footer__link {
  color: var(--ink-700);
  font-weight: 500;
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--navy-700);
  text-decoration: underline;
}

.site-footer__link:focus-visible,
.site-nav__link:focus-visible,
.site-nav__cta:focus-visible,
.toc__link:focus-visible {
  outline: 2px solid var(--cyan-500);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

  .legal {
    padding: 32px 24px 36px;
  }
}

@media (max-width: 560px) {
  .site-nav__link {
    display: none;
  }

  .hero {
    padding: 44px 20px 100px;
  }

  .legal-layout {
    padding: 0 14px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
