/* Unified Design System — shared across all static pages */

:root {
  --bg: #0a0908;
  --text: #e8e4e0;
  --muted: #837b74;
  --dim: #5b5550;
  --accent: #c87941;
  --accent-hover: #d4956a;
  --surface: rgba(16, 13, 11, 0.92);
  --border: rgba(200, 121, 65, 0.22);
  --border-soft: rgba(255, 255, 255, 0.06);
  --gold: #bfa76f;
  --danger: #ffb4ab;
  --success: #34D399;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
}

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

html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  vertical-align: middle;
}

/* === Topbar (unified header) === */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.topbar-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-back:hover { color: var(--text); }

/* Language toggle */
.lang-toggle {
  display: flex;
  gap: 4px;
}
.lang-toggle button {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: Inter, sans-serif;
  transition: all 0.15s;
}
.lang-toggle button.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* === Sidebar (unified) === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 73px 24px 32px;
  z-index: 5;
  overflow-y: auto;
}
.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
}
.sidebar a:hover {
  background: rgba(200, 121, 65, 0.06);
  color: var(--text);
}
.sidebar a.active {
  background: rgba(200, 121, 65, 0.12);
  color: var(--accent);
  font-weight: 500;
}
.sidebar a .material-symbols-outlined { font-size: 20px; }

/* === Main Content === */
.main-content {
  margin-left: calc(240px + max(20px, (100vw - 240px - 980px) / 2));
  margin-right: max(20px, (100vw - 240px - 980px) / 2);
  max-width: 980px;
  padding: 48px 24px;
}

/* === Bottom Nav (mobile) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 50;
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a .material-symbols-outlined { font-size: 22px; }

/* === Footer === */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 8px;
}
.footer a:hover { color: var(--accent); }

/* === Legal Content Styles === */
.legal-section-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 40px;
}
.legal-section-header .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.legal-section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-style: italic;
  font-weight: 600;
  margin: 0;
}

.legal-content {
  line-height: 1.8;
  max-width: 780px;
}
.legal-content h4 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text);
  margin: 40px 0 16px;
}
.legal-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
}
.legal-card.highlight {
  background: rgba(200, 121, 65, 0.05);
  border-color: rgba(200, 121, 65, 0.3);
}

.legal-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.legal-cta p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 36px;
  border-radius: 8px;
  border: none;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }

/* === Page Hero (worlds, roadmap, etc.) === */
.hero {
  text-align: center;
  padding: 48px 24px 40px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === CTA Section === */
.cta-section {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 24px;
  margin: 48px 0;
}
.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 0 0 8px;
}
.cta-section p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 16px;
}
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: opacity 0.15s;
}
.cta-button:hover { opacity: 0.9; }

/* === Breadcrumb (SEO pages) === */
.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* === Bilingual === */
html[lang="ru"] section[lang="en"] { display: none; }
html[lang="en"] section[lang="ru"] { display: none; }
html[lang="ru"] span[lang="en"] { display: none; }
html[lang="en"] span[lang="ru"] { display: none; }

/* === Responsive === */
@media (max-width: 1099px) {
  .sidebar { display: none; }
  .main-content {
    margin-left: 0;
    margin-right: 0;
    padding: 24px 16px 96px;
    max-width: 100%;
  }
  .bottom-nav { display: flex; }
  .topbar { padding: 12px 16px; }
  .topbar-brand { font-size: 16px; }
  .hero { padding: 32px 16px 24px; }
  .legal-section-header h2 { font-size: 28px; }
  .legal-content h4 { font-size: 22px; }
}

@media (min-width: 1100px) {
  .bottom-nav { display: none; }
}
