/* ================================================
   PsyTyping Platform — theme.css
   Подключать на каждой странице портала.
   ================================================ */

:root {
  /* Основные цвета */
  --primary:  #1a2e4a;   /* тёмно-синий — шапки, акценты */
  --accent:   #2d6fa4;   /* средний синий — прогресс, ссылки */
  --accent2:  #e8a020;   /* золотой — CTA-кнопки, выделения */
  --bg:       #f4f6f9;   /* светло-серый фон */
  --card:     #ffffff;   /* белые карточки */
  --text:     #1a1a2e;   /* основной текст */
  --muted:    #6b7280;   /* вторичный текст */

  /* Шкала результатов */
  --low:      #2e7d32;   /* зелёный — норма */
  --mod:      #f57c00;   /* оранжевый — умеренный */
  --high:     #c62828;   /* красный — высокий */
  --crit:     #7b1fa2;   /* фиолетовый — критический */

  /* Радиусы */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ── Сброс ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Типографика ── */
h1 { font-size: 28px; font-weight: 700; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p  { color: var(--text); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Шапка ── */
.site-header {
  background: var(--primary);
  color: #fff;
  height: 60px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.3px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s;
}
.nav-link:hover { color: #fff; text-decoration: none; }

/* ── Контейнер ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Кнопки ── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-accent    { background: var(--accent2); color: #fff; }
.btn-outline   { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost     { background: rgba(255,255,255,.12); color: #fff; border: none; }
.btn-sm        { padding: 7px 16px; font-size: 13px; }
.btn-primary-sm { background: var(--primary); color: #fff; padding: 7px 16px; font-size: 13px;
                  border-radius: var(--radius-sm); text-decoration: none; display: inline-block; }

/* ── Карточки ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 8px rgba(26,46,74,.07);
  padding: 24px;
}

/* ── Формы ── */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1.5px solid #dde1e8;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
input:focus { border-color: var(--accent); }

/* ── Бейджи ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .02em;
}
.badge-new      { background: #e3f2fd; color: #1565c0; }
.badge-soon     { background: #f3e5f5; color: #6a1b9a; }
.badge-ready    { background: #e8f5e9; color: #2e7d32; }

/* ── Прогресс-бар ── */
.progress-track {
  height: 8px;
  background: #e5e8ef;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width .3s ease;
}

/* ── Шкала результатов ── */
.score-bar-wrap { height: 8px; background: #e5e8ef; border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; }
.score-low  { background: var(--low); }
.score-mod  { background: var(--mod); }
.score-high { background: var(--high); }
.score-crit { background: var(--crit); }

/* ── Утилиты ── */
.text-muted   { color: var(--muted); }
.text-center  { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ── Адаптив ── */
@media (max-width: 600px) {
  .site-header { padding: 0 16px; }
  h1 { font-size: 22px; }
  .container { padding: 0 12px; }
}
