/* Protocol — общая тема (ProtocolLending) */

:root {
  --bg: #0d0e12;
  --surface: rgba(20, 22, 28, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(163, 175, 191, 0.4);
  --accent: #3b82f6;
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --success: #22c55e;
  --error: #ef4444;
  --font-serif: 'Playfair Display', serif;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Алиасы для legacy-страниц (index, style.css) */
  --bg-primary: var(--bg);
  --bg-secondary: rgba(20, 22, 28, 0.85);
  --bg-card: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-dim);
  --text-muted: #64748b;
  --text-light: var(--text);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header,
.site-header {
  padding: 24px 0;
  position: relative;
  z-index: 10;
}

.nav,
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo,
.site-logo {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a,
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.site-nav a:hover {
  color: var(--text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Sections */
.section {
  padding: 80px 0 100px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 80px;
  color: var(--text);
}

/* Buttons */
.btn {
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-focus);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-outline:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
}

/* Footer */
footer,
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  color: var(--text);
  font-weight: 500;
  margin-bottom: 16px;
  font-family: var(--font-serif);
}

.footer-col p,
.footer-col a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .status-indicator {
    display: none;
  }
}
