/* ============================================================
   BASE – переменные, сброс, типографика, утилиты, анимации
   ============================================================ */

:root {
  --black: #080b12;
  --dark: #0e121c;
  --gray: #111;
  --card-bg: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.06);
  --gold: #e3ff04;
  --gold-dim: rgba(227,255,4,0.15);
  --gold-glow: 0 0 40px rgba(227,255,4,0.08);
  --text: #b0b8c8;
  --text-light: #e8ecf0;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.22,1,0.36,1);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);

  /* для портфолио (объединено) */
  --portfolio-bg: #090909;
  --portfolio-card: #111;
  --portfolio-card-hover: #171717;
  --portfolio-border: rgba(255,255,255,.06);
  --portfolio-text: #AFAFAF;
  --portfolio-white: #fff;
  --portfolio-gold: #D8C08C;
  --portfolio-shadow: 0 20px 60px rgba(0,0,0,.35);
  --portfolio-radius: 22px;
  --portfolio-transition: .55s cubic-bezier(.22,.61,.36,1);

  /* для футера */
  --footer-bg: #070b12;
  --footer-bg-2: #0b1019;
  --footer-card: rgba(255,255,255,.03);
  --footer-border: rgba(255,255,255,.08);
  --footer-text: #d5d9df;
  --footer-title: #ffffff;
  --footer-muted: #8f98a5;
  --footer-green: #08bb0e;
  --footer-green-light: #2ee63d;
  --footer-radius: 24px;
  --footer-shadow: 0 30px 80px rgba(0,0,0,.35);
  --footer-transition: .35s cubic-bezier(.2,.8,.2,1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: #fff;
}

/* Контейнер и секции */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
  position: relative;
}
.section--dark {
  background: var(--dark);
}
.section--black {
  background: var(--black);
}
.section--light {
  background: #f5f6f8;
}

/* Заголовки */
.title {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}
.title--gold {
  color: var(--gold);
}
.title--dark {
  color: var(--black);
}
.subtitle {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 12px;
  padding: 4px 16px 4px 0;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}
.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--black);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 16px;
  border-radius: 20px;
  transition: transform var(--transition);
}
.badge:hover {
  transform: scale(1.04);
}

/* Утилиты */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.gap-12 { gap: 12px; }

/* Анимации */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.22,1,0.36,1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.22,1,0.36,1);
}
.stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.visible > *:nth-child(2) { transition-delay: .10s; }
.stagger.visible > *:nth-child(3) { transition-delay: .15s; }
.stagger.visible > *:nth-child(4) { transition-delay: .20s; }
.stagger.visible > *:nth-child(5) { transition-delay: .25s; }
.stagger.visible > *:nth-child(6) { transition-delay: .30s; }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.08);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--black);
  padding: 12px 24px;
  z-index: 99999;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
}
.skip-link:focus {
  top: 0;
}

/* Кнопка "наверх" */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--black);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(227,255,4,0.2);
  display: none;
  transition: var(--transition);
  align-items: center;
  justify-content: center;
}
.scroll-top:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 8px 32px rgba(227,255,4,0.35);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  max-width: 90%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: #4caf50; }
.toast.error { border-color: #f44336; }

/* Модалка */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}
.modal__box {
  background: #fff;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 40px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.35s ease;
}
.modal__box--large { max-width: 720px; }
.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: color var(--transition);
}
.modal__close:hover { color: var(--black); }
.modal__box h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 8px;
}
.modal__box p {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.modal__box input,
.modal__box textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8e8e8;
  border-radius: var(--radius-sm);
  font-size: 16px;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.modal__box input:focus,
.modal__box textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 4px rgba(227,255,4,0.1);
}
.modal__box textarea {
  min-height: 100px;
  resize: vertical;
}
.modal__box .btn-primary {
  width: 100%;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Базовые медиа-запросы */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
}
@media print {
  .no-print { display: none !important; }
  .hero { min-height: auto !important; }
  .stats__bg { display: none !important; }
}