/*
 * Публичные страницы (лендинг, вход) — в стиле нового интерфейса.
 * Токены — копия frontend/src/styles/tokens.css: меняете там — поменяйте и здесь.
 */
@font-face {
  font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('fonts/manrope-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'Manrope Variable', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ground: #f5f6f8;
  --surface: #ffffff;
  --surface-muted: #f7f8fb;
  --surface-hover: #f1f2f7;
  --border: #ebedf2;
  --border-strong: #e3e5ec;
  --divider: #f1f2f5;
  --text: #1b1d29;
  --text-secondary: #454a5c;
  --text-muted: #5c6072;
  --accent: #4d5ac2;
  --accent-hover: #3f4ba8;
  --accent-ink: #3f4ba8;
  --accent-soft: #eef0fb;
  --accent-soft-2: #f2f3fc;
  --accent-ring: #e6e8f7;
  --on-accent: #ffffff;
  --success-fg: #1f7a52; --success-bg: #e8f6ef; --success: #2e9e6a;
  --warning-fg: #9a5a00; --warning-bg: #fff4e0; --warning: #e0a030;
  --danger-fg: #b42b41;  --danger-bg: #fdecef;  --danger: #d5485e;
  --purple-fg: #6b3fa8;  --purple-bg: #f3ecfb;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --shadow-soft: 0 6px 20px rgba(27, 29, 41, 0.07);
  --shadow-pop: 0 12px 32px rgba(27, 29, 41, 0.14);
  --shadow-hero: 0 30px 80px rgba(47, 56, 140, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-1: 0.18s;
  --dur-2: 0.28s;
  --dur-3: 0.45s;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--ground);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; transition: color var(--dur-1) var(--ease); }
a:hover { color: var(--accent-hover); }
img, svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Иконки: контурные 24×24, currentColor ---------- */
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Логотип ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.2px; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #5b68d6, #4652b8); box-shadow: 0 6px 16px rgba(77, 90, 194, 0.32);
}
.brand-mark .ico { width: 18px; height: 18px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius); font: inherit; font-size: 15px; font-weight: 700;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
    box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px rgba(77, 90, 194, 0.28); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: 0 10px 26px rgba(77, 90, 194, 0.36); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-light { background: #fff; color: var(--accent-ink); box-shadow: 0 10px 26px rgba(20, 24, 70, 0.25); }
.btn-light:hover { background: #f4f5ff; color: var(--accent-hover); transform: translateY(-1px); }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30; background: rgba(245, 246, 248, 0.82);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(255, 255, 255, 0.9); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.site-nav { display: flex; gap: 4px; margin-left: 16px; }
.site-nav a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.site-nav a:hover { color: var(--text); background: var(--surface-hover); }
.site-header .actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.section-title { text-wrap: balance; margin-top: 14px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.8px; }
.section-lead { margin-top: 14px; font-size: 18px; color: var(--text-secondary); }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.card-hover:hover { border-color: #d8dbf3; box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.icon-tile {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Подвал ---------- */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; font-size: 14px; }
.site-footer nav a { color: var(--text-secondary); }
.site-footer nav a:hover { color: var(--text); }
.copyright { font-size: 14px; color: var(--text-muted); }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 60px; gap: 12px; }
  .site-header .btn-ghost { display: none; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-lead { font-size: 16px; }
  .site-footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
