/* Базовый слой: системный стек, палитра, сетка */
:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --accent: #2563eb;
  --dark: #0b1220;
  --dark-2: #1e3a8a;
  --muted: #55637a;
  --line: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Шапка */
.header { background: var(--dark); color: #fff; }
.header__row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 18px; }
.logo:hover { text-decoration: none; }
.logo__icon { color: var(--accent); }
.nav a { color: #cbd5e1; margin-left: 20px; min-height: 44px; display: inline-flex; align-items: center; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); color: #fff; padding: 72px 0 88px; }
.hero__inner { max-width: 720px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.2; margin: 0 0 12px; }
.hero__sub { font-size: 18px; color: #c7d2e8; margin: 0 0 28px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--radius);
  font: inherit; font-weight: 600; cursor: pointer; border: 0;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #1d4ed8; text-decoration: none; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: default; }

/* Карточки фич */
.features { padding: 56px 0; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card__icon { color: var(--accent); margin-bottom: 12px; }
.card h2 { font-size: 18px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Форма входа */
.login { padding: 56px 0 72px; }
.login__inner { display: flex; justify-content: center; }
.login__form {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
.login__form h2 { margin: 0 0 6px; font-size: 20px; }
.login__hint { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit; color: var(--text); background: #fff;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.login__error { color: #dc2626; min-height: 22px; margin: 10px 0 0; font-size: 14px; }
.login__links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }

/* Спиннер */
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Подвал */
.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 14px; }
.footer__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer a { margin-left: 18px; color: var(--muted); }

/* Legal-страницы */
.legal { padding: 48px 0 64px; }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: 26px; margin: 0 0 6px; }
.legal time { color: var(--muted); font-size: 14px; display: block; margin-bottom: 24px; }
.legal h2 { font-size: 17px; margin: 26px 0 8px; }
.legal p { margin: 0 0 14px; }

/* Адаптив */
@media (max-width: 768px) {
  .features__grid { grid-template-columns: 1fr; }
  .nav a { margin-left: 14px; }
  .hero { padding: 48px 0 60px; }
}
