/* Общее для лендинга и фермы: токены, шапка, кнопки, модалка, подвал.
   Шрифтов извне нет — проект собирается без зависимостей, сайт тоже. */

:root {
  --ink: #07080c;
  --ink-2: #0b0d13;
  --panel: #0e1119;
  --panel-2: #131826;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e9edf4;
  --dim: #8b95a7;
  --dim-2: #5f687a;
  --profit: #48f096;
  --glass: #cee2ee;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --r: 14px;
  --r-sm: 9px;
  --pad: clamp(18px, 4vw, 46px);
  --head: 62px;
}

* { box-sizing: border-box; }

/* Авторский display бьёт [hidden] из таблицы браузера, и скрытый экран
   с display:grid остаётся на странице. Экраны фермы переключаются именно
   атрибутом, так что правило обязательное, а не косметическое. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Картинка, которой нет на сервере. Пустая ячейка честнее рамки с крестиком:
   про поломку скажет консоль, а не первый экран сайта. Класс вешает ui.js. */
img.img-missing {
  background: var(--panel);
  color: transparent;
  min-height: 1px;
}
button { font: inherit; color: inherit; }

::selection { background: rgba(72, 240, 150, 0.25); }

/* Изометрическая сетка пола — тот же мотив, что на фоне самих сборок. */
.floorgrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 100% 62px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 62px 100%;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 0%, transparent 72%);
}

.glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.wrap {
  width: min(1220px, 100% - var(--pad) * 2);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ——— шапка ——— */
.head {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--head);
  display: flex;
  align-items: center;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.head.is-stuck { border-bottom-color: var(--line); background: rgba(7, 8, 12, 0.9); }

.head__in {
  display: flex;
  align-items: center;
  gap: 26px;
  width: min(1220px, 100% - var(--pad) * 2);
  margin-inline: auto;
}

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(150deg, #2a3550, #0d1017);
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
  flex: none;
}
.logo__mark::before {
  content: "";
  position: absolute;
  inset: 6px 7px auto 7px;
  height: 5px;
  border-radius: 1px;
  background: var(--profit);
  box-shadow: 0 0 8px var(--profit);
}
.logo__mark::after {
  content: "";
  position: absolute;
  inset: auto 7px 5px 7px;
  height: 8px;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(206, 226, 238, 0.5), rgba(206, 226, 238, 0.08));
}
.logo__txt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.logo__txt span { color: var(--dim-2); }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  font-size: 13.5px;
  color: var(--dim);
  transition: color 0.18s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav__out { display: inline-flex; align-items: center; gap: 5px; }
.nav__out svg { width: 12px; height: 12px; opacity: 0.55; transition: opacity 0.18s, transform 0.18s; }
.nav__out:hover svg { opacity: 1; transform: translate(1px, -1px); }

.head__right { display: flex; align-items: center; gap: 10px; flex: none; }

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}
.lang button {
  background: none;
  border: 0;
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim-2);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.lang button.is-on { color: var(--ink); background: var(--text); }

/* ——— кнопки ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, transform 0.12s, opacity 0.18s;
}
.btn:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; border-color: var(--line-2); }

.btn--primary {
  background: var(--profit);
  border-color: var(--profit);
  color: #04140c;
  font-weight: 600;
}
.btn--primary:hover {
  background: #5cf7a4;
  border-color: #5cf7a4;
  box-shadow: 0 0 26px rgba(72, 240, 150, 0.28);
}
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn--ghost { border-color: transparent; color: var(--dim); }
.btn--ghost:hover { color: var(--text); }

.mono { font-family: var(--mono); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--line-2);
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 44px); }
p { margin: 0; }

.dim { color: var(--dim); }

/* ——— бейдж тира ——— */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.tag::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.tag--one { color: #fff; background: linear-gradient(90deg, rgba(255, 214, 122, 0.2), rgba(198, 118, 250, 0.2)); }

/* Уровень детализации точками. Живёт в base.css, а не в landing.css:
   те же точки стоят в карточке сборки на ферме. */
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.25; }
.dots i.on { opacity: 1; box-shadow: 0 0 6px currentColor; }

/* Правила .t-<тир> генерирует ui.js из собранной таблицы: тиров ровно
   столько, сколько их в коллекции, и цвет каждого приходит из палитры
   рендера. Прописать их здесь значило бы снова завести вторую копию. */

/* ——— модалка кошелька ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 5, 8, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal.is-open { display: flex; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } }

.modal__box {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 26px;
  animation: rise 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
@keyframes rise { from { transform: translateY(14px) scale(0.98); opacity: 0; } }

.modal__title { font-size: 19px; font-weight: 600; }
.modal__lead { font-size: 13.5px; color: var(--dim); margin-top: 7px; line-height: 1.55; }
.modal__list { display: grid; gap: 9px; margin-top: 20px; }

.wopt {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.wopt:hover { border-color: var(--line-2); background: #171d2d; }
.wopt:active { transform: translateY(1px); }
.wopt[disabled] { opacity: 0.45; cursor: not-allowed; }
.wopt__ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  flex: none;
}
.wopt__ico svg { width: 17px; height: 17px; }
.wopt__t { display: block; font-size: 14.5px; font-weight: 500; }
.wopt__s { display: block; font-size: 12px; color: var(--dim-2); margin-top: 3px; line-height: 1.45; }

.wwatch { display: flex; gap: 8px; margin-top: 4px; }
.input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s;
}
.input:focus { border-color: rgba(72, 240, 150, 0.5); }
.input::placeholder { color: var(--dim-2); }

.modal__err {
  margin-top: 13px;
  font-size: 12.5px;
  color: #ff8a80;
  min-height: 17px;
}
.modal__x {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: 0;
  color: var(--dim-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.modal__x:hover { color: var(--text); }
.modal__box { position: relative; }

/* ——— адрес в шапке ——— */
.acct {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.acct__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--profit);
  box-shadow: 0 0 8px var(--profit);
  animation: pulse 2.4s ease-in-out infinite;
  flex: none;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.acct__addr { font-family: var(--mono); font-size: 12.5px; }
.acct__x {
  background: none; border: 0;
  color: var(--dim-2);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 5px;
}
.acct__x:hover { color: #ff8a80; background: rgba(255, 138, 128, 0.1); }

/* ——— подвал ——— */
.foot {
  border-top: 1px solid var(--line);
  /* Секции уже несут нижний отступ — своего подвалу нужно немного. */
  margin-top: 40px;
  padding: 40px 0 34px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015));
}
.foot__top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 30px;
  align-items: center;
  justify-content: space-between;
}
.foot__links { display: flex; gap: 8px; }
.foot__links a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--dim);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.foot__links a:hover {
  color: var(--text);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.04);
}
.foot__bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim-2);
}

/* ——— уведомление ——— */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 300;
  padding: 12px 20px;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--ok { border-color: rgba(72, 240, 150, 0.45); }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* На узком экране в шапку не влезают вордмарк, переключатель языка и адрес
   одновременно. Уходит вордмарк: знак остаётся, а адрес кошелька — то,
   ради чего в шапку вообще смотрят. */
@media (max-width: 560px) {
  .head__in { gap: 12px; }
  .logo__txt { display: none; }
  .lang button { padding: 5px 7px; }
  .acct { padding-left: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
