@font-face {
  font-family: 'Onest';
  src: url('assets/fonts/onest-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('assets/fonts/onest-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}

:root {
  --bg: #f5f6f4;
  --ink: #161816;
  --muted: #676c68;
  --hair: #e3e5e2;
  --card: #ffffff;
  --line: #62d3c4;
  --line-ink: #1d8b7c;
  --high: #f0ad3c;
  --low: #ec6a5a;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 6.8vw, 112px);
  --header: 80px;
  --logo-h: 30px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 2px rgb(20 30 25 / 0.04), 0 12px 32px rgb(20 30 25 / 0.08);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); }
a { color: inherit; }

/* Шапка */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 var(--gutter);
  background: var(--bg);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: auto; height: var(--logo-h); }
.nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 28px; }
.nav a { font-size: 16px; text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.nav a:hover { color: var(--line-ink); }
.pill {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--card);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.pill:hover { border-color: #c9ccc8; }
.pill:active { transform: scale(0.97); }
:is(a, button):focus-visible { outline: 2px solid var(--line-ink); outline-offset: 3px; border-radius: 8px; }


/* Тексты шагов */
.copy { position: absolute; top: calc(var(--header) + 30px); left: var(--gutter); right: var(--gutter); }
.step {
  position: absolute;
  inset: 0 0 auto 0;
  display: grid;
  grid-template-columns: 52% 1fr;
  align-items: start;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.2s ease, transform 0.35s var(--ease); /* уход быстрый: место освобождается до прихода нового текста */
  pointer-events: none;
}
.step.is-past { transform: translateY(-18px); }
.step.is-active { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.4s ease, transform 0.6s var(--ease); }
.step :is(h1, h2) {
  margin: 0;
  max-width: 9.8em;
  font-size: clamp(30px, 3.9vw, 64px);
  line-height: 1.08;
  font-weight: 450;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.step p { margin: 6px 0 0; max-width: 27em; font-size: clamp(15px, 1.33vw, 20px); line-height: 1.5; color: var(--muted); }
.step p + p { grid-column: 2; }

/* Магазины — всегда внизу на диске */
.stores { position: absolute; left: 50%; top: calc(var(--top) + var(--u) * 0.36 + 32px); transform: translate(-50%, -50%); display: flex; gap: 11px; z-index: 5; }
.store {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.25s var(--ease), background 0.2s;
}
/* Финал: круг замкнулся — кнопки магазинов по очереди подпрыгивают, дважды */
[data-live="outro"] .store { animation: store-hop 0.9s var(--ease) 1.3s 2; }
[data-live="outro"] .store:nth-child(2) { animation-delay: 1.42s; }
[data-live="outro"] .store:nth-child(3) { animation-delay: 1.54s; }
@keyframes store-hop { 0%, 60%, 100% { transform: none; } 25% { transform: translateY(-9px) scale(1.06); } }
.store svg { width: 21px; height: 21px; }
.store:last-child svg { width: 23px; height: 23px; }
.store:hover { transform: translateY(-2px); background: #2a2d2a; }
.store:active { transform: scale(0.95); }


/* Под браслетом: белый диск продолжается, на нём разделы; форму считает tail.js */
.after { position: relative; overflow: hidden; margin-top: -1px; contain: paint; }
.after__disc { position: absolute; border-radius: 50%; background: var(--card); }
.after__inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 104px var(--gutter) 0; }
.block + .block { margin-top: 112px; }
.block h2, .cta h2 { margin: 0; max-width: 10em; font-size: clamp(28px, 3.2vw, 48px); line-height: 1.1; font-weight: 450; letter-spacing: -0.015em; text-wrap: balance; }
.block p { margin: 0 0 12px; max-width: 30em; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: var(--muted); }
.block--split { display: grid; grid-template-columns: 52% 1fr; align-items: start; }
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 36px 0 0; }
.faq > div { padding: 28px 28px 30px; border-radius: 24px; background: var(--bg); }
.faq dt { margin-bottom: 10px; font-size: 18px; font-weight: 500; }
.faq dd { margin: 0; line-height: 1.55; color: var(--muted); }
.cta { margin: 120px auto 0; max-width: 34em; text-align: center; }
.cta h2 { margin: 0 auto 14px; }
.cta p { margin: 0 auto; line-height: 1.55; color: var(--muted); }
.stores--inline { position: static; transform: none; justify-content: center; margin-top: 28px; }
.footer { display: grid; gap: 12px; justify-items: center; padding: 40px var(--gutter) 48px; text-align: center; font-size: 14px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer__links a { text-decoration: none; transition: color 0.2s; }
.footer__links a:hover { color: var(--ink); }
.footer__links--legal { font-size: 13px; }
.footer__fine { margin: 8px 0 0; font-size: 12px; color: #9a9f9b; }

/* Телефон и планшет стоя: класс ставит main.js по пропорциям окна */
@media (max-width: 959px) {
  .nav { display: none; }
}
@media (max-width: 719px) {
  :root { --header: 60px; --logo-h: 24px; }
  .block--split, .faq { grid-template-columns: 1fr; }
  .block h2 { margin-bottom: 16px; }
  .faq > div { padding: 22px; }
  .block + .block, .cta { margin-top: 80px; }
  .topbar { padding: 0 12px 0 16px; }
  .nav { display: none; }
  .pill { height: 38px; padding: 0 16px; font-size: 14px; }
  .after__inner { padding-top: 72px; }
}


.is-narrow .copy { top: calc(var(--header) + 14px); }
.is-narrow .step { grid-template-columns: 1fr; }
.is-narrow .step :is(h1, h2) { font-size: clamp(26px, 7.6vw, 34px); max-width: none; }
.is-narrow .step p { margin-top: 10px; font-size: 15px; line-height: 1.45; }
.is-narrow .step p + p { grid-column: 1; }
.is-narrow .stores { top: calc(var(--top) + var(--u) * 0.5); }
.is-narrow .store { width: 44px; height: 44px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
