/* ==============================================================
   LEGAL PAGE STYLES - shared across /privacy/, /terms/, /cookies/
   Same design tokens as homepage, calmer treatment.
   ============================================================== */
:root {
  --blue: #0160E2;
  --cyan: #209BD4;
  --spotlight: #4FBDF0;
  --gradient: linear-gradient(90deg, #0160E2 0%, #209BD4 100%);
  --white: #FFFFFF;
  --paper: #F7F9FC;
  --tint-blue: #EEF6FB;
  --footer-bg: #062A6B;
  --ink: #0D1B4A;
  --ink-soft: #4A5568;
  --ink-mute: #6B7A99;
  --ink-on-blue-soft: rgba(255,255,255,0.82);
  --ink-on-blue-mute: rgba(255,255,255,0.55);
  --border: rgba(13,27,74,0.08);
  --border-strong: rgba(13,27,74,0.14);
  --font: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.7;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* Header (matches main site) */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: 0 2px 20px rgba(13,27,74,.06); }
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 16px 48px;
  display: flex; align-items: center; gap: 48px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 56px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; list-style: none; padding: 0; }
.nav a { color: var(--ink-soft); font-size: 15.5px; font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--blue); text-decoration: none; }
.nav-cta {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--gradient); color: white !important; font-weight: 600;
  box-shadow: 0 4px 14px rgba(1,96,226,.25);
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { color: white !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(1,96,226,.35); text-decoration: none; }

/* Services dropdown (parity with page.css) */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a::after {
  content: ""; width: 5px; height: 5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 4px; opacity: 0.6; display: inline-block;
}
.nav-has-dropdown::after {
  content: ""; position: absolute; top: 100%; left: -16px; right: -16px;
  height: 16px; background: transparent; pointer-events: none;
}
.nav-has-dropdown:hover::after,
.nav-has-dropdown:focus-within::after { pointer-events: auto; }
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: -16px;
  min-width: 220px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 6px; box-shadow: 0 16px 40px rgba(13,27,74,.16);
  list-style: none; margin: 0;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 110;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown,
.nav-has-dropdown.is-open .nav-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-has-dropdown.is-open > a::after { transform: rotate(225deg) translateY(0); opacity: 1; }
.nav-dropdown a {
  display: block; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--ink) !important;
  transition: background .15s, color .15s;
}
.nav-dropdown a:hover { background: var(--tint-blue); color: var(--blue) !important; text-decoration: none; }

/* Precision cursor */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none;
  z-index: 9999; border-radius: 50%;
  transform: translate3d(-50%,-50%,0); will-change: transform, width, height, opacity;
}
.cursor-dot { width: 6px; height: 6px; background: var(--blue); transition: width .18s, height .18s; }
.cursor-ring { width: 28px; height: 28px; border: 1.5px solid var(--blue); opacity: 0.45; transition: width .25s, height .25s, opacity .25s, background .25s; }
.cursor-dot.is-hover { width: 9px; height: 9px; }
.cursor-ring.is-hover { width: 52px; height: 52px; opacity: 0.65; background: rgba(1,96,226,0.06); }
.cursor-dot.is-down { width: 4px; height: 4px; }
.cursor-ring.is-down { width: 22px; height: 22px; opacity: 0.85; }
@media (hover: hover) and (pointer: fine) {
  body.has-precision-cursor, body.has-precision-cursor a, body.has-precision-cursor button { cursor: none; }
  body.has-precision-cursor input, body.has-precision-cursor textarea { cursor: text; }
}
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .cursor-dot, .cursor-ring { display: none !important; } body.has-precision-cursor { cursor: auto !important; } }

/* Mobile nav toggle */
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--blue); }
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-open { display: none; }
.nav-toggle.is-open .icon-close { display: block; }
.mobile-menu {
  position: fixed; top: 88px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(13,27,74,.10);
  transform: translateY(-110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 99;
  padding: 24px 24px 32px;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block; padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 17px; font-weight: 600; color: var(--ink);
  transition: background .2s, color .2s;
}
.mobile-menu a:hover { background: var(--tint-blue); color: var(--blue); text-decoration: none; }
.mobile-menu .nav-cta { margin-top: 16px; text-align: center; color: white !important; }
.mobile-menu-backdrop {
  position: fixed; inset: 0; background: rgba(13,27,74,0.40);
  opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 98;
}
.mobile-menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Hero */
.legal-hero {
  background: linear-gradient(160deg, var(--tint-blue) 0%, var(--white) 70%);
  padding: 96px 0 64px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.legal-hero::before {
  content: ""; position: absolute; right: -100px; top: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(79,189,240,.15), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 16px;
}
.legal-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05; margin: 0 0 12px;
  letter-spacing: -0.025em; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal-meta {
  font-size: 13px; color: var(--ink-mute);
  font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
  letter-spacing: 0.04em; margin: 0;
}

/* Body */
.legal-body { padding: 80px 0 96px; }
.legal-body .container {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 64px; align-items: start;
}
.legal-toc {
  position: sticky; top: 90px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.legal-toc-h {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 14px;
}
.legal-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.legal-toc a {
  font-size: 13px; color: var(--ink-soft); line-height: 1.4;
  display: block; padding: 4px 0;
}
.legal-toc a:hover { color: var(--blue); text-decoration: none; }

.legal-content h2 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em; color: var(--ink);
  margin: 48px 0 12px; scroll-margin-top: 90px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.legal-content p strong, .legal-content b { color: var(--ink); font-weight: 600; }
.legal-content a { color: var(--blue); font-weight: 500; }
.legal-list {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.legal-list li {
  position: relative; padding-left: 22px;
  color: var(--ink-soft); font-size: 16px; line-height: 1.65;
}
.legal-list li::before {
  content: ""; position: absolute;
  left: 0; top: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--blue);
}
.legal-callout {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--tint-blue);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 15px; color: var(--ink);
}

/* Footer (simplified for legal pages) */
.footer {
  background: var(--footer-bg); color: var(--ink-on-blue-soft);
  padding: 48px 0 32px;
  position: relative; overflow: hidden;
}
.footer .container { position: relative; z-index: 1; max-width: 1280px; }
.footer-grid-simple {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 24px;
}
.footer-brand-logo img { height: 48px; width: auto; display: block; }
.footer-legal-row {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 14px;
}
.footer-legal-row a { color: var(--ink-on-blue-soft); transition: color .2s; }
.footer-legal-row a:hover { color: white; text-decoration: none; }
.footer-meta {
  font-size: 12px; color: var(--ink-on-blue-mute);
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .legal-body .container { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; }
}
@media (max-width: 700px) {
  .header-inner { padding: 12px 24px; gap: 16px; }
  .logo img { height: 46px; }
  .mobile-menu { top: 76px; }
  .container { padding: 0 24px; }
  .legal-hero { padding: 64px 0 48px; }
  .legal-body { padding: 56px 0 72px; }
  .legal-content h2 { font-size: 20px; }
  .footer-grid-simple { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-legal-row { gap: 16px; }
}
