/* Shared layout — nav, footer, legal pages (matches index.html design system) */
:root {
  --navy: #0f1f3d;
  --navy-light: #1a2f52;
  --navy-muted: #2a4068;
  --white: #ffffff;
  --off-white: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-300: #c5cdd9;
  --gray-500: #6b7a90;
  --gray-700: #3d4a5c;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --shadow-sm: 0 1px 3px rgba(15, 31, 61, 0.08);
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --nav-height: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(15, 31, 61, 0.06);
  box-shadow: 0 1px 3px rgba(15, 31, 61, 0.05), 0 4px 16px rgba(15, 31, 61, 0.04);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  padding: 0.5rem 0.625rem;
  border-radius: 8px;
  transition: color 0.18s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.18s ease, left 0.18s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link.nav-active::after {
  width: calc(100% - 1.25rem);
  left: 0.625rem;
}

.nav-link.nav-active {
  color: var(--accent);
  font-weight: 600;
}

.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  background: var(--gray-100);
  border-radius: 8px;
  padding: 0.125rem;
  margin-left: 0.25rem;
}

.lang-switcher-indicator {
  position: absolute;
  top: 0.125rem;
  bottom: 0.125rem;
  left: 0.125rem;
  width: 0;
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.lang-btn {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.375rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--gray-500);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.lang-btn:hover:not(.active) {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.55);
}

.lang-btn.active {
  color: var(--accent);
}

/* ---- Legal page content ---- */
.legal-page {
  padding: calc(var(--nav-height) + 1.5rem) 1.5rem 4rem;
  background: var(--off-white);
  min-height: calc(100vh - 200px);
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.legal-inner h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1.75rem;
  color: var(--navy);
}

.legal-inner h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--navy);
}

.legal-inner h2:first-of-type {
  margin-top: 0;
}

.legal-inner p,
.legal-inner address {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-inner address {
  font-style: normal;
}

.legal-inner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal-inner a:hover {
  text-decoration: underline;
}

.legal-disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ---- Footer ---- */
.footer {
  padding: 3rem 1.5rem 2rem;
  background: var(--navy);
  color: var(--gray-300);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-legal {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.footer-legal a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-legal a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .nav-link.hide-mobile {
    display: none;
  }

  .nav-inner {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1rem;
    min-width: 0;
  }

  .logo-mark {
    width: 24px;
    height: 24px;
    margin-right: 6px;
  }

  .nav-link {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .lang-switcher {
    flex-shrink: 0;
  }

  .legal-inner {
    padding: 1.75rem 1.25rem;
  }
}
