/* ============================================================
   CryptBot — оформление лендинга.
   Палитра взята из приложения (desktop/src/design/tokens.css),
   чтобы сайт и программа выглядели одним продуктом.
   ============================================================ */

:root {
  --base: #0e1516;
  --surface: #131c1d;
  --card: #172122;
  --card-hover: #1c2829;
  --line: #253334;
  --line-strong: #33474a;

  --text: #edf4ee;
  --text-2: #aebeb8;
  --text-3: #899d98;

  --accent: #74d8bf;
  --accent-2: #96e4cf;
  --accent-ink: #08201b;
  --accent-soft: #16302b;

  --gold: #d4bc83;
  --danger: #ef9096;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --wrap: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 16px/1.65 Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 48px, 760px); }

/* ---------- Появление при прокрутке ----------
   Сдвиг небольшой и без масштабирования: крупные перемещения
   на длинной странице читаются как дёрганье, а не как плавность. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  /* Уход быстрее прихода и БЕЗ задержки. Если уводить блок с той же
     ступенчатой задержкой, с которой он появлялся, при прокрутке вверх
     карточки исчезают вразнобой — выглядит как подвисание. */
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__glow { animation: none !important; }
}

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.header.is-stuck {
  background: rgba(14, 21, 22, .82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__mark { width: 30px; height: 30px; color: var(--accent); }
.brand__text { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.brand--sm .brand__mark { width: 24px; height: 24px; }

.nav { display: flex; gap: 26px; margin-left: 10px; font-size: 14px; color: var(--text-2); }
.nav a { position: relative; padding: 6px 0; transition: color .25s var(--ease); }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.lang { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.lang button {
  min-width: 38px; height: 28px; padding: 0 8px;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--text-3); font: 600 12px Inter, sans-serif; letter-spacing: .04em;
  cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 10px 30px -12px var(--accent); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 30px; font-size: 16px; border-radius: var(--r-lg); }
.btn__icon { width: 19px; height: 19px; flex: none; }

/* ---------- Герой ---------- */
.hero { position: relative; padding: clamp(72px, 11vw, 132px) 0 clamp(60px, 8vw, 100px); overflow: hidden; }
.hero__glow {
  position: absolute; top: -320px; left: 50%; width: 900px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(116, 216, 191, .16), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift { to { transform: translateX(-50%) translateY(46px) scale(1.08); } }

.hero__inner { position: relative; text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; margin-bottom: 26px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 500;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero__title { font-size: clamp(36px, 6.2vw, 66px); font-weight: 700; }
.hero__title span { display: block; }
.hero__title .accent {
  background: linear-gradient(96deg, var(--accent) 10%, var(--gold) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { max-width: 640px; margin: 26px auto 0; color: var(--text-2); font-size: clamp(16px, 1.7vw, 19px); }

.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 40px; }
.hero__meta { color: var(--text-3); font-size: 13px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 720px; margin: 62px auto 0;
}
.hero__stats > div {
  padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card), transparent);
}
.hero__stats dt { color: var(--text-3); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.hero__stats dd { margin: 9px 0 0; color: var(--accent); font-size: clamp(18px, 2.4vw, 26px); font-weight: 600; }

/* ---------- Секции ---------- */
.section { padding: clamp(66px, 9vw, 116px) 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }

.eyebrow { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.section__title { margin-top: 14px; font-size: clamp(27px, 3.6vw, 40px); max-width: 780px; }
.section__lead { margin-top: 18px; max-width: 700px; color: var(--text-2); font-size: 17px; }
.note { margin-top: 20px; color: var(--text-3); font-size: 13px; max-width: 700px; }

/* ---------- Таблица сравнения ---------- */
.table { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 17px 20px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
thead th { background: var(--card); color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
thead th.is-us { color: var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .25s var(--ease); }
tbody tr:hover { background: rgba(255, 255, 255, .015); }
td:first-child { color: var(--text-2); }
td.bad { color: var(--text-3); }
td.good { color: var(--text); font-weight: 500; }
td.good::before { content: '✓'; margin-right: 9px; color: var(--accent); font-weight: 700; }

/* ---------- Карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 44px; }
.card {
  padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--card-hover); transform: translateY(-3px); }
.card__icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
}
.card__icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 17px; }
.card p { margin-top: 11px; color: var(--text-2); font-size: 14.5px; }

/* ---------- Шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin-top: 46px; counter-reset: s; }
.steps li { position: relative; padding-top: 26px; border-top: 1px solid var(--line); }
.steps__num {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 700;
}
.steps h3 { font-size: 16px; }
.steps p { margin-top: 10px; color: var(--text-2); font-size: 14.5px; }

/* ---------- Загрузка ---------- */
.download {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: start;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  background:
    radial-gradient(600px 300px at 12% 0%, rgba(116, 216, 191, .09), transparent 68%),
    var(--card);
}
.download h2 { margin-top: 14px; font-size: clamp(25px, 3.2vw, 34px); }
.download__body > p { margin-top: 16px; color: var(--text-2); max-width: 460px; }
.download__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.download__version { color: var(--text-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.download__req { margin-top: 22px; color: var(--text-3); font-size: 13px; }

.warn { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(0, 0, 0, .22); }
.warn h3 { font-size: 14px; color: var(--gold); }
.warn ul { margin-top: 15px; display: grid; gap: 13px; }
.warn li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.warn li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .75; }

/* ---------- Вопросы ---------- */
.faq { margin-top: 36px; display: grid; gap: 11px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card);
  transition: border-color .25s var(--ease);
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-size: 15.5px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .3s var(--ease), border-color .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); border-color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-md); }
.faq p { padding: 0 22px 20px; color: var(--text-2); font-size: 14.5px; }

/* ---------- Подвал ---------- */
.footer { padding: 52px 0 60px; border-top: 1px solid var(--line); background: var(--surface); }
.footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__legal { max-width: 520px; margin-top: 16px; color: var(--text-3); font-size: 12.5px; line-height: 1.65; }
.footer__links { display: flex; flex-direction: column; gap: 11px; font-size: 14px; color: var(--text-2); }
.footer__links a { transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--accent); }

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .download { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr; max-width: 380px; }
}
@media (max-width: 560px) {
  .wrap, .wrap--narrow { width: calc(100% - 32px); }
  .header__inner { gap: 12px; }
  .btn--lg { width: 100%; }
  .hero__cta { align-items: stretch; }
}

/* Кнопка до появления файла: видно, что она есть, но что нажимать
   пока рано. Прятать её нельзя — тогда непонятно, куда идти. */
.btn.is-waiting { background: var(--card-hover); color: var(--text-2); box-shadow: none; }
.btn.is-waiting:hover { background: var(--card-hover); transform: none; box-shadow: none; }

/* ---------- Требования ---------- */
.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; margin-top: 42px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.req { display: flex; flex-direction: column; gap: 7px; padding: 22px 24px; background: var(--card); transition: background-color .3s var(--ease); }
.req:hover { background: var(--card-hover); }
.req__label { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.req__value { color: var(--text); font-size: 15px; }

/* ---------- Скриншоты ---------- */
.shot { margin: 38px 0 0; }
.shot picture { display: block; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card);
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.shot:hover img { border-color: var(--line-strong); transform: translateY(-2px); }
.shot figcaption { margin-top: 14px; color: var(--text-3); font-size: 13.5px; line-height: 1.6; max-width: 640px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 26px; }
.shots .shot { margin-top: 26px; }
