:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --ink: #0B1220;
  --ink-2: #374151;
  --mute: #6B7385;
  --line: #E3E7EF;
  --brand: #1B4DE4;
  --brand-2: #1640BF;
  --brand-soft: #EBF0FF;
  --ok: #15803D;
  --ok-soft: #E7F6EC;
  --r-lg: 22px;
  --r-md: 14px;
  --shadow: 0 1px 2px rgba(11,18,32,.04), 0 8px 24px -12px rgba(11,18,32,.14);
  --shadow-up: 0 2px 4px rgba(11,18,32,.05), 0 18px 40px -16px rgba(27,77,228,.30);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* подвал прижат к низу даже на короткой странице */
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
.foot { flex-shrink: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(227,231,239,.8);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--brand); }
.logo-mark { width: 30px; height: 30px; display: block; }
.logo-word { font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--ink); }
.top-btn {
  text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  transition: background .2s;
}
.top-btn:hover { background: #DDE6FF; }

/* ---------- первый экран ---------- */
.hero {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  padding: 28px 0 8px;
}
.hero h1 { font-size: clamp(30px, 8.2vw, 42px); line-height: 1.08; font-weight: 800; }
.lead { margin: 12px 0 0; color: var(--ink-2); font-size: 16.5px; max-width: 34em; }

.pick {
  margin-top: 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 18px 18px 14px;
}
.field + .field { margin-top: 18px; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.field-top label { font-size: 14px; color: var(--mute); font-weight: 500; }
.field-top output { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.field-scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--mute); }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px;
  background: transparent; margin: 0; cursor: pointer; touch-action: pan-y;
  --p: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand) var(--p), #E2E6EF var(--p));
}
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #E2E6EF; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%; margin-top: -10px;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 2px 8px rgba(27,77,228,.35);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 2px 8px rgba(27,77,228,.35);
}
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(27,77,228,.2); }

.counter {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.counter::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft);
}
.counter.is-none::before { background: #B45309; box-shadow: 0 0 0 4px #FEF3C7; }
.counter small { color: var(--mute); font-weight: 500; font-size: 13.5px; margin-left: auto; }

/* ---------- список ---------- */
.list-sec { padding: 14px 0 8px; }
.list { display: grid; gap: 14px; }

.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 18px;
  transition: box-shadow .25s, border-color .25s, opacity .25s, transform .25s;
}
.card.is-next { border-color: var(--brand); box-shadow: var(--shadow-up); }
.card.is-sent { opacity: .62; }
.card.is-sent:hover { opacity: 1; }

.card-badge {
  position: absolute; top: -11px; left: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--brand); color: #fff;
}
.card.is-sent .card-badge { background: var(--ok); }

.card-logo {
  height: 52px; width: 168px; max-width: 60%;
  display: flex; align-items: center; justify-content: flex-start;
  border-radius: 12px; overflow: hidden;
}
.card-logo img { max-height: 36px; max-width: 100%; width: auto; display: block; }
.card-logo[style] { justify-content: center; padding: 0 6px; }
.card-logo[style] img { max-height: 48px; }

.card-usp {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 9px; border-radius: 14px;
  background: linear-gradient(100deg, #E3F7EA 0%, #F1FBF4 100%);
  border: 1px solid #C9EED6;
  color: #0E5E31; font-size: 15px; font-weight: 700; line-height: 1.25;
}
.usp-ic {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #22C55E, #15803D);
  box-shadow: 0 3px 8px -2px rgba(21,128,61,.45);
}
.usp-ic svg { width: 16px; height: 16px; }

.specs {
  margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px;
}
.spec { background: #F6F8FC; border-radius: 12px; padding: 10px 12px; }
.spec dt { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.spec dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.spec dd.is-unknown { font-size: 14px; font-weight: 500; color: var(--mute); letter-spacing: 0; }

.card-btn {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 16px; width: 100%; border: 0; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 17.5px; letter-spacing: -.01em;
  padding: 8px 8px 8px 26px; min-height: 62px; border-radius: 999px;
  color: #fff;
  background: linear-gradient(110deg, #2F6BFF 0%, #5B4BFF 45%, #9333EA 100%);
  background-size: 180% 100%; background-position: 0% 50%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow:
    0 14px 30px -12px rgba(91,75,255,.75),
    0 4px 10px -4px rgba(47,107,255,.45),
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -2px 0 rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .25s, background-position .6s;
  animation: hue 6s ease-in-out infinite;
}
.card-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 34px -12px rgba(91,75,255,.85),
    0 6px 12px -4px rgba(47,107,255,.5),
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -2px 0 rgba(0,0,0,.12);
}
.card-btn:active { transform: translateY(1px) scale(.985); }
/* градиент медленно переливается */
@keyframes hue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.btn-ic {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #fff; color: #5B4BFF;
  box-shadow: 0 4px 12px -4px rgba(30,20,90,.45);
}
.btn-ic svg { width: 20px; height: 20px; stroke-width: 2.4; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: translate(0, 0); } 80% { transform: translate(3px, -3px); } 90% { transform: translate(0, 0); } }

/* блик пробегает по кнопке раз в несколько секунд */
.card-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 38%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); animation: shine 4.5s ease-in-out infinite;
}
.card + .card .card-btn::after { animation-delay: .9s; }
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }

/* первая неотправленная карточка — вокруг кнопки расходится кольцо, чтобы взгляд падал на неё */
.list > .card:first-child:not(.is-sent) .card-btn { animation: hue 6s ease-in-out infinite, pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 14px 30px -12px rgba(91,75,255,.75), 0 4px 10px -4px rgba(47,107,255,.45), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 0 rgba(91,75,255,.55); }
  100% { box-shadow: 0 14px 30px -12px rgba(91,75,255,.75), 0 4px 10px -4px rgba(47,107,255,.45), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 14px rgba(91,75,255,0); }
}

.card.is-sent .card-btn {
  background: var(--brand-soft); color: var(--brand); box-shadow: none; animation: none; border-radius: 999px;
  justify-content: center; padding: 10px; font-weight: 700; font-size: 16px;
}
.card.is-sent .card-btn::after { display: none; }
.card.is-sent .card-btn svg { width: 18px; height: 18px; }

.all-sent {
  margin-bottom: 14px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--ok-soft); color: #14532D; font-weight: 600; font-size: 15px;
}
.empty {
  padding: 28px 18px; text-align: center; color: var(--mute);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.empty b { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 4px; }

/* ---------- как это работает ---------- */
.how { padding: 34px 0 6px; }
.how h2, .faq h2 { font-size: 25px; font-weight: 800; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 16px 16px 62px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 16px;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 800;
}
.steps b { display: block; font-size: 16px; }
.steps span { display: block; color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.req { margin: 14px 2px 0; font-size: 14px; color: var(--mute); }

/* ---------- вопросы ---------- */
.faq { padding: 34px 0 6px; }
.faq-list { margin-top: 16px; display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0 16px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 30px 16px 0; position: relative;
  font-weight: 600; font-size: 15.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: -4px 0 16px; color: var(--ink-2); font-size: 15px; }

/* ---------- дисклеймер ---------- */
.note { padding: 30px 0 8px; }
.note-box {
  border-radius: var(--r-lg); padding: 18px;
  background: #EEF1F7; border: 1px solid var(--line);
}
.note-box h3 { font-size: 16px; font-weight: 700; }
.note-box p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- подвал ---------- */
.foot { padding: 30px 0 calc(34px + env(safe-area-inset-bottom)); margin-top: 22px; border-top: 1px solid var(--line); background: var(--surface); }
.logo-sm .logo-mark { width: 26px; height: 26px; }
.logo-sm .logo-word { font-size: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.foot-links a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--brand); }
.foot-mail { display: inline-block; margin-top: 14px; font-size: 14.5px; color: var(--brand); text-decoration: none; font-weight: 600; }
.foot-note { margin: 14px 0 0; font-size: 13px; color: var(--mute); }

@media (min-width: 700px) {
  .hero { padding-top: 48px; }
  .pick { padding: 22px 24px 18px; }
  .card { padding: 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .card-btn, .card-btn::after, .btn-ic svg { animation: none !important; }
  .card-btn::after { display: none; }
}
