/*
 * Kaevo legal pages — privacy, terms, data retention policy.
 *
 * Tokens mirror src/shared/branding.css and public/index.html so the
 * dark theme stays visually identical to the marketing landing page
 * and the pre-auth surfaces (signup, login, reset-password). The CSS
 * cannot import from src/shared/ directly because legal pages are
 * static HTML in public/ that Vite copies as-is; the token block is
 * duplicated here. If brand tokens shift in branding.css or index.html,
 * mirror the change here.
 *
 * Layout: fixed nav top, content card centered with max-width 800,
 * footer at bottom with cross-links between the three legal pages.
 */

:root {
  --bg:  #09090d;
  --bg2: #0f0f15;
  --bg3: #15151e;
  --bg4: #1c1c28;

  --border:  rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.14);

  --stone:  #c8a97e;
  --stone2: #dbb98e;

  --text:  #f0ede8;
  --text2: #8a8799;
  --text3: #4a4858;

  --amber: #f5a623;
}

* { box-sizing: border-box; }

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Nav ── shared with marketing index.html shape, simplified for legal pages */
.legal-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 13, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

.legal-nav-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  border-bottom: none;
}

.legal-nav-logo-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.legal-nav-logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
  margin-bottom: 2px;
}

.legal-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.legal-nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.02em;
  border-bottom: none;
  transition: color 0.2s;
}

.legal-nav-links a:hover {
  color: var(--text);
}

.legal-nav-cta {
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--stone) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.2s;
}

.legal-nav-cta:hover {
  background: var(--stone);
  color: var(--bg) !important;
  border-bottom-color: var(--stone);
}

/* ── Content ── */
main.legal-doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 128px 24px 64px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--stone);
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 32px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--text);
}

.effective {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 32px;
}

ul, ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text);
}

li {
  margin-bottom: 6px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--stone);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 169, 126, 0.3);
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: var(--stone2);
  border-bottom-color: var(--stone2);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

.important {
  background: rgba(245, 166, 35, 0.08);
  border-left: 3px solid var(--amber);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  color: var(--text);
}

/* ── Footer ── matches marketing index.html shape */
.legal-footer {
  border-top: 1px solid var(--border);
  padding: 40px 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.legal-footer-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  color: var(--stone);
}

.legal-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.legal-footer-links a {
  font-size: 12px;
  color: var(--text3);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s;
}

.legal-footer-links a:hover {
  color: var(--text2);
  border-bottom: none;
}

.legal-footer-copy {
  font-size: 12px;
  color: var(--text3);
}

/* ── Small-screen tweaks ── */
@media (max-width: 640px) {
  .legal-nav {
    padding: 16px 20px;
  }
  .legal-nav-links {
    gap: 16px;
  }
  .legal-nav-links a:not(.legal-nav-cta) {
    display: none;
  }
  main.legal-doc {
    padding: 96px 18px 48px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 18px;
    margin-top: 32px;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  th, td {
    white-space: normal;
    min-width: 140px;
  }
  .legal-footer {
    padding: 32px 20px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}
