/* ============================================================
   Liquid glass design layer - legal pages (tos.html / privacy.html)
   Mirrors index.css / evomind.css so legal docs match the site design.
   ============================================================ */
:root {
  --glass-blur: 20px;
  --glass-bg: rgba(24, 25, 29, 0.55);
  --glass-bg-strong: rgba(24, 25, 29, 0.74);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-soft: rgba(255, 255, 255, 0.06);
  --glass-highlight: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .34);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, .38), 0 28px 70px rgba(0, 0, 0, .42);
}

/* ---------- Header glass ---------- */
.site-header {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid var(--glass-border-soft);
  box-shadow: var(--shadow-sm);
}
.mobile-menu {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}
.header-nav a:hover,
.header-nav a.is-current {
  background: var(--glass-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border-soft);
}

/* ---------- Header ≤1023px: hamburger right, hide desktop CTA ---------- */
@media (max-width: 1023px) {
  .header-actions { margin-left: auto; }
  .header-actions > .btn { display: none; }
}

/* ---------- Hero (plain) ---------- */
.legal-hero {
  position: relative;
  padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
  text-align: center;
}
.legal-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--on-surface);
  margin-bottom: 10px;
}
.legal-hero__sub {
  font-size: 1rem;
  color: var(--on-surface-variant);
}

/* ---------- Document ---------- */
.legal-doc {
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 112px);
}
.legal-doc__inner {
  margin: 0 auto;
}
.legal-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 24px;
  text-align: center;
}
.legal-section + .legal-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border-soft);
}
.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  margin-bottom: 12px;
}
.legal-section h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--on-surface);
  margin: 20px 0 8px;
}
.legal-section p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.legal-section p + p {
  margin-top: 12px;
}
.legal-section ul,
.legal-section ol {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 10px 0;
  padding-left: 0;
  list-style-position: inside;
}
.legal-section li {
  margin-bottom: 8px;
}
.legal-section li strong {
  color: var(--on-surface);
  font-weight: 500;
}
.legal-section a {
  color: var(--on-surface);
  text-decoration: underline;
  text-decoration-color: var(--outline);
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.legal-section a:hover {
  color: var(--on-surface-variant);
  text-decoration-color: var(--glass-border);
}
.legal-note {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 14px 0;
}
.legal-note strong {
  color: var(--on-surface);
  font-weight: 500;
}
.legal-note p,
.legal-note {
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

/* ---------- Section dividers ---------- */
.section--top-bordered {
  border-top: none;
  position: relative;
}
.section--top-bordered::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--outline-variant) 20%, var(--outline-variant) 80%, transparent);
}
.site-footer {
  border-top: none;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--outline-variant) 20%, var(--outline-variant) 80%, transparent);
}

/* ---------- Mobile (≤767px) ---------- */
@media (max-width: 767px) {
  .legal-hero { padding: 40px 0 32px; }
  .legal-hero__eyebrow { margin-bottom: 8px; }
  .legal-hero__title { font-size: 2rem; margin-bottom: 8px; }
  .legal-hero__sub { font-size: 0.875rem; }

  .card { border-radius: 20px; }

  .legal-card { padding: 20px; }
  .legal-section h2 { font-size: 1.125rem; }
  .legal-section h3 { font-size: 0.9375rem; }
  .legal-section p,
  .legal-section ul,
  .legal-section ol { font-size: 0.875rem; }

  .footer-grid { padding: 48px 0 32px; gap: 32px 20px; }
}
