/* Meshtastic-FIDO — сайт-визитка. Оформление в духе терминального интерфейса программы (GoldED-стиль). */

:root {
  --bg:        #d9d9d9;   /* светлый фон, как у светлой темы TUI */
  --panel:     #e9e9e9;
  --ink:       #1c1c1c;
  --ink-soft:  #55606b;
  --header-1:  #0d3b6f;   /* тёмно-синяя шапка */
  --header-2:  #1b4b8f;
  --accent:    #e8952f;   /* оранжевый акцент — логотип, заголовки колонок */
  --ok:        #2f8f3f;   /* зелёный статус в футере */
  --line:      #b9b9b9;
  --btn:       #0d5a9e;
  --btn-hi:    #1670bf;
  --mono: "Cascadia Mono", "Consolas", "DejaVu Sans Mono", ui-monospace,
          "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #1e1e1e;
    --panel:    #262626;
    --ink:      #d6d6d6;
    --ink-soft: #8b949e;
    --line:     #3a3a3a;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Верхняя панель ─────────────────────────────── */
.topbar {
  background: linear-gradient(180deg, var(--header-2), var(--header-1));
  color: #eef3f9;
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 52px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: .5px; display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.brand__net { color: #eef3f9; }
.brand__fido { color: var(--accent); white-space: nowrap; }
.dot-link { color: #9fc0e6; letter-spacing: -1px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: #cfe0f2; text-decoration: none; }
.nav a:hover { color: #fff; text-decoration: underline; }

/* Переключатель языка */
.langs { display: flex; border: 1px solid rgba(255,255,255,.3); }
.langs button {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  background: transparent;
  color: #cfe0f2;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
}
.langs button:first-child { border-left: 0; }
.langs button:hover { background: rgba(255,255,255,.1); color: #fff; }
.langs button.is-active { background: var(--accent); color: #1c1c1c; }

/* ── Таблица «Сеть FIDO» под меню ──────────────── */
.netstats {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.netstats__inner { padding: 9px 20px; }
.netstats__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
}
.netstats__title { color: var(--accent); font-weight: 700; white-space: nowrap; }
.netstats__upd { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.netstats__rows { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.netstats__fw { white-space: nowrap; overflow-x: auto; }
.netstats__fw b { color: var(--ink); }
.netstats__fw i { color: var(--ink); font-style: normal; font-weight: 700; }
.netstats__geo { color: var(--ink-soft); }
.netstats__note { color: var(--ink-soft); }

/* ── Hero ──────────────────────────────────────── */
.hero {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(0,0,0,.03) 27px, rgba(0,0,0,.03) 28px),
    var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.hero__tag { color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.hero h1 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  max-width: 800px;
  margin-bottom: 18px;
}
.hero__lead { max-width: 720px; color: var(--ink-soft); margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.btn--primary { background: var(--btn); color: #fff; }
.btn--primary:hover { background: var(--btn-hi); }
.btn--ghost { border-color: var(--accent); color: var(--ink); }
.btn--ghost:hover { background: rgba(232,149,47,.12); }

.hero__status { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); }
.stat--ok { color: var(--ok); font-weight: 700; }
.stat:nth-child(3) { color: var(--btn); font-weight: 700; }

/* ── Блоки ─────────────────────────────────────── */
.block { padding: 52px 0; }
.block--alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block__title { color: var(--accent); font-size: 20px; letter-spacing: 1px; margin-bottom: 8px; }
.block__sub { color: var(--ink-soft); margin-bottom: 26px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 18px; }
.cols p { color: var(--ink-soft); }
.cols strong { color: var(--ink); }

/* ── Карточки возможностей ─────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
}
.card h3 { font-size: 15px; margin-bottom: 6px; }
.card p { font-size: 13.5px; color: var(--ink-soft); }
.card__list { margin: 0; padding-left: 16px; font-size: 13.5px; color: var(--ink-soft); }
.card__list li { margin-top: 5px; }
.card__list li::marker { color: var(--accent); }

/* ── Скриншоты ─────────────────────────────────── */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.shot { background: var(--bg); border: 1px solid var(--line); padding: 8px; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); cursor: zoom-in; }
.shot img:hover { border-color: var(--accent); }
.shot figcaption { padding: 8px 4px 2px; font-size: 13px; color: var(--ink-soft); }

/* ── Лайтбокс ──────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 16, 26, .9);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox__fig {
  margin: 0;
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border: 1px solid var(--accent);
  background: var(--bg);
  cursor: default;
}
.lightbox__cap {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: #cfe0f2;
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  background: transparent;
  color: #eef3f9;
  border: 1px solid rgba(255, 255, 255, .35);
  cursor: pointer;
}
.lightbox__close:hover { background: var(--accent); color: #1c1c1c; }

/* ── Как начать ────────────────────────────────── */
.wip { color: var(--ink-soft); margin-bottom: 18px; }
.hero code, kbd { font-family: var(--mono); }
code {
  background: rgba(232,149,47,.15);
  color: var(--ink);
  padding: 1px 6px;
}
kbd {
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  padding: 1px 6px;
  font-size: 12px;
}

/* ── Футер ─────────────────────────────────────── */
.footer {
  background: linear-gradient(180deg, var(--header-1), #0a2f58);
  color: #cfe0f2;
  border-top: 2px solid var(--accent);
  padding: 22px 0;
}
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.footer kbd { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #eef3f9; }

/* ── Адаптив ───────────────────────────────────── */
@media (max-width: 720px) {
  .hero h1 { font-size: 24px; }
  .cols { grid-template-columns: 1fr; gap: 16px; }
  .nav { order: 3; width: 100%; }
}
