/* ═══════════════════════════════════════════════════════════
   1. ТОКЕНЫ — меняете цвет/скругление здесь, меняется везде
   ═══════════════════════════════════════════════════════════ */
:root {
  /* поверхности */
  --bg:        #0A0C11;
  --surface:   #121620;
  --surface-2: #171C28;
  --border:    #242B3A;

  /* текст */
  --text:  #E9ECF3;
  --muted: #98A1B4;

  /* акцент */
  --accent:      #5B8CFF;
  --accent-2:    #22D3EE;
  --accent-grad: linear-gradient(135deg, #5B8CFF 0%, #22D3EE 100%);
  --accent-soft: rgba(91, 140, 255, .12);

  /* статусы */
  --ok:    #34D399;
  --error: #F87171;

  /* система */
  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1120px;
  --gap:       clamp(16px, 3vw, 28px);
  --section-y: clamp(64px, 9vw, 120px);
  --shadow:    0 10px 40px rgba(0, 0, 0, .45);
  --header-h:  64px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   2. БАЗА И ТИПОГРАФИКА
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--text); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--accent); }

ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: #06080D;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #06080D; }

/* ═══════════════════════════════════════════════════════════
   3. LAYOUT
   ═══════════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: 720px; }

.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.section--alt { background: #0C0F16; border-block: 1px solid var(--border); }

.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2 { position: relative; padding-top: 18px; }
.section__head h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 3px;
  border-radius: 2px;
  background: var(--accent-grad);
}
.section__lead { color: var(--muted); font-size: 1.05rem; }

.subhead {
  margin: clamp(36px, 5vw, 56px) 0 20px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.subhead:first-of-type { margin-top: 0; }

.grid { display: grid; gap: var(--gap); }
.grid--cards    { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--contacts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ═══════════════════════════════════════════════════════════
   4. КНОПКИ И БЕЙДЖИ
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn--primary {
  background: var(--accent-grad);
  color: #06080D;
  box-shadow: 0 6px 24px rgba(91, 140, 255, .25);
}
.btn--primary:hover { color: #06080D; transform: translateY(-1px); opacity: .92; }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.btn--sm   { padding: 9px 16px; font-size: .9rem; }
.btn--wide { width: 100%; padding-block: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.badge {
  display: inline-block;
  margin: 0 0 20px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   5. ХЕДЕР
   ═══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 17, .75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.logo:hover { color: var(--text); }
.logo__mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--accent-grad);
  flex: none;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--text); }
.nav .btn { color: #06080D; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.header.is-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   6. HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 10vw, 128px);
  scroll-margin-top: var(--header-h);
  background-image:
    linear-gradient(rgba(36, 43, 58, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 43, 58, .35) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  top: -220px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(91, 140, 255, .22) 0%, transparent 62%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__lead {
  max-width: 62ch;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: .92rem;
}
.hero__facts li { position: relative; padding-left: 18px; }
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ═══════════════════════════════════════════════════════════
   7. КАРТОЧКИ, МЕТРИКИ, ШАГИ, ПРИНЦИПЫ, СТЕК
   ═══════════════════════════════════════════════════════════ */
.card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #303a4e; transform: translateY(-2px); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .96rem; }
.card__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.card__icon svg { width: 22px; height: 22px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.metrics li { display: flex; flex-direction: column; gap: 4px; }
.metrics strong {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metrics span { color: var(--muted); font-size: .92rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps__num {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
}
.steps h4 { margin-bottom: .35em; }
.steps p { color: var(--muted); font-size: .94rem; }

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.principles li { padding-left: 18px; border-left: 2px solid var(--border); }
.principles h4 { margin-bottom: .3em; }
.principles p { color: var(--muted); font-size: .94rem; }

.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack li {
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
}

/* ═══════════════════════════════════════════════════════════
   8. ФОРМА
   ═══════════════════════════════════════════════════════════ */
.form {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 8px; }
.field > label { font-size: .93rem; font-weight: 500; }
.req { color: var(--accent); }

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: .97rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #5C6478; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); background: #1A2030; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--error); }

.field__error { margin: 0; color: var(--error); font-size: .87rem; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .93rem; cursor: pointer; }
.check input {
  width: 18px; height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}

/* honeypot: невидимо для людей, но доступно ботам */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { margin: 0; font-size: .94rem; min-height: 1.4em; }
.form__status.is-ok    { color: var(--ok); }
.form__status.is-error { color: var(--error); }
.form__note { margin: 0; color: var(--muted); font-size: .84rem; }

/* ═══════════════════════════════════════════════════════════
   9. КОНТАКТЫ И ФУТЕР
   ═══════════════════════════════════════════════════════════ */
.contact {
  display: grid;
  gap: 4px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.contact:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.contact__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}
.contact__icon svg { width: 20px; height: 20px; }
.contact__label { color: var(--muted); font-size: .85rem; }
.contact__value { font-weight: 500; word-break: break-word; }
.contacts__note { margin-top: var(--gap); color: var(--muted); font-size: .92rem; }

.footer { border-top: 1px solid var(--border); padding-block: 36px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer__name { margin: 0; font-weight: 600; }
.footer__muted { margin: 0; color: var(--muted); font-size: .88rem; }
.footer__links { display: flex; gap: 20px; font-size: .92rem; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   10. МОБИЛЬНАЯ ВЕРСИЯ (единственный медиазапрос)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  body { font-size: 16px; }

  .burger { display: flex; }

  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .header.is-open .nav { display: flex; }
  .nav a { padding: 12px 0; font-size: 1rem; }
  .nav .btn { margin-top: 8px; padding-block: 14px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════
   11. ДОСТУПНОСТЬ: уважаем отключённую анимацию
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
