/**
 * Socrates — shared platform shell (nav, tokens, buttons)
 * Full dark shell: one consistent theme site-wide (restore light via _archive/).
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --gold: #c2410c;
  --gold-light: #ea580c;
  --gold-dim: rgba(194, 65, 12, 0.16);

  --purple: #818cf8;
  --purple-light: #a5b4fc;
  --purple-dim: rgba(129, 140, 248, 0.12);

  --bg: #080b12;
  --bg2: #0c111a;
  --bg3: #121a26;
  --surface: #151d2e;
  --surface-2: #1c2739;
  --border: rgba(248, 250, 252, 0.08);
  --border-strong: rgba(248, 250, 252, 0.12);

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --muted2: #64748b;

  --radius: 10px;
  --radius-lg: 14px;

  --nav-h: 56px;
  --shadow-nav: 0 1px 0 rgba(0, 0, 0, 0.45);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* ── Site nav (all top-level pages) ── */
nav.site-nav,
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(8, 11, 18, 0.9);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-nav);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.045em;
  flex-shrink: 0;
}

.nav-logo .nav-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 0;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 24px);
  flex: 1;
  min-width: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active,
.nav-links a.nav-link-current {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--gold);
}

.nav-cta,
.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  font-family: var(--font-sans);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-purple {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-purple:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-lg { padding: 11px 20px; font-size: 14px; border-radius: 9px; }
.btn-xl { padding: 13px 24px; font-size: 15px; border-radius: 9px; }

/* Narrow viewports: keep hub links reachable */
@media (max-width: 1100px) {
  nav.site-nav,
  .site-nav {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-bottom: 10px;
  }
  .nav-logo {
    order: 0;
    flex-shrink: 0;
  }
  .nav-right,
  .nav-cta {
    order: 1;
    margin-left: auto;
  }
  .nav-links {
    order: 2;
    flex: 1 1 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 16px;
    padding: 6px 0 2px;
    margin: 4px calc(-1 * clamp(16px, 4vw, 48px)) 0;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%);
  }
  .nav-links a {
    flex-shrink: 0;
    padding-bottom: 2px;
  }
}

@media (max-width: 520px) {
  .nav-right .btn:not(.btn-gold):not(.btn-purple),
  .nav-cta .btn:not(.btn-gold):not(.btn-purple) {
    padding: 8px 12px;
    font-size: 12px;
  }
}
