/* legal.css — SteerMind AI Legal Document Pages
   Premium dark theme aligned with landing page design language.
   No external resources. No JavaScript. Accessible and readable.
   Shared by all legal pages (DE + EN).
*/

/* ── Design Tokens ──────────────────────────────────────────────────────── */

:root {
  /* Backgrounds — aligned with landing page */
  --bg:            #0A0E14;
  --surface:       #111820;
  --surface-raise: #161D27;
  --elevated:      #1C2430;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.06);
  --border-mid:    rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text-primary:  #E6EDF3;
  --text-body:     #8B949E;
  --text-muted:    #484F58;

  /* Brand */
  --accent:        #3FB950;
  --accent-hover:  #2EA043;
  --accent-dim:    rgba(63, 185, 80, 0.10);
  --accent-glow:   rgba(63, 185, 80, 0.15);
  --border-accent: rgba(63, 185, 80, 0.22);
  --gold:          #C9A84C;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow:   0 0 40px rgba(63, 185, 80, 0.10);

  /* Typography */
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radii */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-normal: 300ms ease;

  --max-w: 820px;
}

/* ── Font Faces ────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/landing-assets/fonts/inter-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/landing-assets/fonts/inter-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/landing-assets/fonts/inter-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/landing-assets/fonts/inter-latin-700.woff2') format('woff2');
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  line-height: 1.82;
  min-height: 100vh;
}

::selection {
  background: rgba(63, 185, 80, 0.25);
  color: var(--text-primary);
}

/* ── Skip Link ──────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  z-index: 200;
}

.skip-link:focus {
  top: var(--sp-xs);
}

/* ── Header — Glassmorphism ────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-mid);
  padding: 14px var(--sp-md);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}

/* Brand wordmark */
.brand-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  transition: color var(--t-fast);
}

.brand-link .brand-ai {
  color: var(--accent);
  font-weight: 700;
}

.brand-link:hover {
  color: var(--text-primary);
}

.brand-link:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.back-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--t-fast);
}

.back-link:hover {
  color: var(--text-body);
}

.back-link:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.header-links {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.lang-switch-legal {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xs);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.lang-switch-legal:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.lang-switch-legal:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ── Main ───────────────────────────────────────────────────────────────── */

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-md);
}

/* ── Document Header — Mesh Gradient ───────────────────────────────────── */

.doc-header {
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-mid);
  position: relative;
}

.doc-header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -120px;
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(63, 185, 80, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.doc-lang {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}

.doc-title {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 720;
  letter-spacing: -0.032em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.doc-date {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 500;
}

/* ── Table of Contents ──────────────────────────────────────────────────── */

.toc {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--border-accent);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-lg);
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

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

.toc-link {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  transition: color var(--t-fast), background var(--t-fast);
}

.toc-link:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.toc-link:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h2 {
  font-size: 1rem;
  font-weight: 660;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-top: var(--sp-lg);
  margin-bottom: 0.75rem;
  padding-left: 14px;
  border-left: 3px solid var(--accent-dim);
  line-height: 1.4;
  transition: border-color var(--t-normal);
}

h2:target {
  border-left-color: var(--accent);
}

h3 {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-primary);
  margin-top: var(--sp-md);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

p {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: var(--text-body);
}

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 0.75rem;
}

li {
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
  color: var(--text-body);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ── Definition List (legal data) ───────────────────────────────────────── */

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  margin: var(--sp-sm) 0 var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  box-shadow: var(--shadow-sm);
}

dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 3px;
  white-space: nowrap;
}

dd {
  font-size: 0.84rem;
  color: var(--text-body);
  padding-top: 3px;
}

/* ── Info Box ───────────────────────────────────────────────────────────── */

.info-box {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin: var(--sp-sm) 0;
  box-shadow: 0 0 20px rgba(63, 185, 80, 0.04);
}

.info-box p {
  margin-bottom: 0;
  font-size: 0.85rem;
  color: var(--text-body);
}

/* ── Doc Section ────────────────────────────────────────────────────────── */

.doc-section {
  margin-bottom: var(--sp-sm);
}

.doc-section + .doc-section {
  padding-top: var(--sp-xs);
}

/* ── Data Table ─────────────────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-sm) 0 var(--sp-md);
  font-size: 0.83rem;
  overflow-x: auto;
  display: block;
}

.data-table thead {
  display: table-header-group;
}

.data-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-mid);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border-mid);
  padding: var(--sp-lg) var(--sp-md);
  margin-top: var(--sp-xl);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 0.84rem;
  font-weight: 660;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-brand .brand-ai {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: var(--sp-md);
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-sep {
  color: var(--border-mid);
  list-style: none;
  font-size: 1rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  main {
    padding: var(--sp-lg) var(--sp-sm);
  }

  header {
    padding: 12px var(--sp-sm);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-sm);
  }

  .footer-links {
    gap: var(--sp-sm);
  }

  .doc-title {
    font-size: 1.75rem;
  }

  dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  dt {
    margin-top: var(--sp-xs);
  }

  .toc {
    padding: var(--sp-xs) var(--sp-sm);
  }
}

/* ── Reduced Motion ────────────────────────────────────────────────────── */

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