/* ══════════════════════════════════════════
   N1K.PRO — SHARED DESIGN TOKENS
   Единый источник стилей для всего сайта.
   Подключать: <link rel="stylesheet" href="/shared/tokens.css">
   ══════════════════════════════════════════ */

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

/* ── DESIGN TOKENS ── */
:root {
  /* Background levels (4 tiers) */
  --bg:         #08080a;
  --surface:    #111114;
  --elevated:   #16161a;
  --elevated-2: #1c1c22;

  /* Text */
  --text:           #e8e6e3;
  --text-secondary: #9a9aa0;

  /* Accent */
  --accent:     #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.08);
  --accent-glow: rgba(200, 255, 0, 0.15);

  /* Semantic */
  --red:    #ff5f57;
  --yellow: #febc2e;
  --green:  #28c840;

  /* Typography */
  --font-display: 'Unbounded', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-serif:   'Instrument Serif', serif;

  /* Spacing scale (modular) */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 24px;  --sp-6: 32px;
  --sp-7: 48px;  --sp-8: 64px;  --sp-9: 96px;
  --sp-10: 128px;

  /* Border radius scale */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card:     0 2px 8px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.2);
  --shadow-elevated: 0 4px 16px rgba(0,0,0,0.4), 0 16px 48px rgba(0,0,0,0.3);
  --shadow-accent:   0 0 24px rgba(200, 255, 0, 0.06), 0 0 64px rgba(200, 255, 0, 0.03);
}

/* ── BASE ── */
html {
  font-size: 16px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* ══════════════════════════════════════════
   NAV
   ══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--sp-4) 0;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }
.nav-agent { color: var(--accent) !important; font-weight: 500; border: 1px solid rgba(200, 255, 0, 0.3); padding: 2px 10px; border-radius: 9999px; }
.nav-agent:hover { background: rgba(200, 255, 0, 0.08); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid rgba(200, 255, 0, 0.25);
  border-radius: var(--r-full);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  padding: var(--sp-6) 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-copy a {
  color: var(--accent);
  text-decoration: none;
}

.footer-copy a:hover { text-decoration: underline; }

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

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
  box-shadow: 0 2px 12px rgba(200, 255, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(200, 255, 0, 0.2);
  background: #d4ff33;
}

.btn-primary:active {
  transform: translateY(0);
  background: #b8e600;
}

.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 400;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-sm);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: rgba(200, 255, 0, 0.3);
}

/* ══════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(200, 255, 0, 0.06); }
  50%      { box-shadow: 0 0 48px rgba(200, 255, 0, 0.12); }
}

/* ══════════════════════════════════════════
   RESPONSIVE — nav & footer
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .nav-links { display: none; }
  .nav-cta   { display: none; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
