:root {
  --blue: #3a96dd;
  --blue-dark: #2a7bbd;
  --navy: #000033;
  --navy-2: #0d0d4a;
  --purple: #6b3fa0;
  --crimson: #9e0039;
  --orange: #f26522;
  --red: #d21428;
  --text: #1c2233;
  --muted: #5b6478;
  --bg: #f4f7fb;
  --white: #fff;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-dark); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e3e8f0;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.top nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: var(--white) !important;
  padding: 14px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 17px;
  transition: background .15s, transform .15s;
  border: 0;
}
.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn.small { padding: 9px 18px; font-size: 15px; }
.btn.light { background: var(--white); color: var(--blue-dark) !important; }
.btn.light:hover { background: #eaf3fc; }

/* Первый экран */
.hero {
  background: linear-gradient(160deg, var(--blue) 0%, #2f80c8 60%, #1f5f9e 100%);
  color: var(--white);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.hero h1 { font-size: 46px; line-height: 1.12; margin: 0 0 18px; }
.hero p.lead { font-size: 20px; opacity: .95; margin: 0 0 30px; max-width: 520px; }
.hero .note { font-size: 14px; opacity: .8; margin-top: 14px; }
.hero-cards { position: relative; height: 430px; }
.hero-cards img {
  position: absolute; width: 230px; border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 40, .35);
}
.hero-cards img:nth-child(1) { left: 0; top: 40px; transform: rotate(-6deg); }
.hero-cards img:nth-child(2) { left: 120px; top: 0; z-index: 2; }
.hero-cards img:nth-child(3) { left: 240px; top: 50px; transform: rotate(6deg); }

/* Секции */
section { padding: 80px 0; }
section h2 { font-size: 34px; margin: 0 0 12px; text-align: center; }
section .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 46px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: 0 2px 10px rgba(20, 40, 80, .06);
}
.feature img { width: 64px; height: 64px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 8px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.cards-section { background: var(--navy); color: var(--white); }
.cards-section .sub { color: #aab0d8; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards figure { margin: 0; }
.cards img { border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.cards figcaption { text-align: center; margin-top: 12px; color: #aab0d8; font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--white); border-radius: var(--radius); padding: 28px; position: relative; box-shadow: 0 2px 10px rgba(20, 40, 80, .06); }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: var(--white); font-weight: 700; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.commands { max-width: 640px; margin: 0 auto; background: var(--white); border-radius: var(--radius); padding: 10px 28px; box-shadow: 0 2px 10px rgba(20, 40, 80, .06); }
.commands div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }
.commands div:last-child { border-bottom: 0; }
.commands code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--blue-dark); font-weight: 600; }
.commands span { color: var(--muted); text-align: right; }

.cta { background: linear-gradient(160deg, var(--blue), #1f5f9e); color: var(--white); text-align: center; }
.cta h2 { color: var(--white); }
.cta p { opacity: .9; margin: 0 0 28px; }

footer { background: var(--navy); color: #aab0d8; padding: 34px 0; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
footer a { color: #d6daf5; }

/* Страница политики */
.doc { max-width: 800px; margin: 0 auto; padding: 50px 20px 80px; }
.doc h1 { font-size: 32px; line-height: 1.2; }
.doc h2 { font-size: 22px; margin-top: 34px; text-align: left; }
.doc .fill { background: #fff3c4; padding: 0 4px; border-radius: 4px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 50px; }
  .hero h1 { font-size: 34px; }
  .hero-cards { height: 340px; max-width: 420px; }
  .hero-cards img { width: 180px; }
  .hero-cards img:nth-child(2) { left: 100px; }
  .hero-cards img:nth-child(3) { left: 200px; }
  .features, .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .top nav a:not(.btn) { display: none; }
  section { padding: 56px 0; }
  section h2 { font-size: 28px; }
}

@media (max-width: 420px) {
  .hero-cards { height: 290px; }
  .hero-cards img { width: 150px; }
  .hero-cards img:nth-child(2) { left: 80px; }
  .hero-cards img:nth-child(3) { left: 160px; }
}

/* QR-код бота */
button.btn { border: 0; cursor: pointer; font: inherit; }
.qr-modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 51, .6);
}
.qr-modal[hidden] { display: none; }
.qr-box {
  position: relative; width: 100%; max-width: 340px; padding: 28px 24px 24px; text-align: center;
  background: var(--white); color: var(--text); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.qr-box h3 { margin: 0 0 14px; font-size: 22px; }
.qr-box img { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto; }
.qr-box p { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.qr-close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none;
  font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer;
}
.qr-phone { display: none; margin-top: 16px; }
@media (hover: none) and (pointer: coarse) { .qr-phone { display: inline-block; } }
