/* Shared styles for the legal pages (terms, privacy, cookies, accessibility).
   Tokens, navigation and footer match index.html and contact.html. */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --primary:          #423ba5;
  --primary-hover:    #232366;
  --text-primary:     #180f1a;
  --text-secondary:   rgba(24, 15, 26, 0.72);
  --text-muted:       rgba(13, 13, 13, 0.72);
  --surface:          #fcfcfd;
  --surface-tint:     #f3f3f8;
  --surface-band:     #e8e8ef;
  --cta-text:         #efebf5;
  --border:           rgba(24, 15, 26, 0.12);
  --border-strong:    #d8d6e8;
  --radius-ui:        6px;
  --radius-card:      4px;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Fira Sans', sans-serif; line-height: 1.2; }
p { line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 28px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  background: var(--primary);
  color: var(--cta-text);
  padding: 9px 20px;
  border-radius: var(--radius-ui);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--primary-hover); text-decoration: none; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .mobile-cta {
  margin-top: 16px;
  background: var(--primary);
  color: var(--cta-text);
  padding: 11px 20px;
  border-radius: var(--radius-ui);
  text-align: center;
  font-weight: 600;
}

/* ─── Legal document ────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 0 96px;
}
.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin-bottom: 8px;
}
.legal h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.legal-meta {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.legal h2 {
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 24px);
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
}
.legal h3 {
  font-weight: 600;
  font-size: 18px;
  margin: 28px 0 10px;
}
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 18px; padding-left: 24px; }
.legal li { line-height: 1.7; margin: 0 0 8px; }
/* Links inside running text stay underlined so they don't rely on color alone. */
.legal a { text-decoration: underline; overflow-wrap: anywhere; }
.legal a:hover { color: var(--primary-hover); }
.legal-table-wrap { overflow-x: auto; margin: 4px 0 20px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  line-height: 1.55;
}
.legal th { background: var(--surface-tint); font-weight: 600; }
.legal-footnote {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--surface-band);
  border-top: 1px solid var(--border-strong);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo { display: flex; align-items: center; }
.footer-logo-img { height: 24px; width: auto; display: block; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-top: 8px;
}
.footer-copy a { text-decoration: underline; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 600px) {
  .legal { padding: 48px 0 64px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
