/* ============================================================
   Applokal (applokal.app) — общие стили · v2 «техно»
   Тёмная тема: глубокий сине-графитовый + градиент цианвиолет
   (сигнал/маршрут) + оранжевый гео-пин. Правится в одном месте.
   ============================================================ */

:root {
  --bg: #0a0e17;
  --bg-glow: #101830;
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #111726;
  --ink: #e9edf5;
  --muted: #8b95a8;
  --line: rgba(255, 255, 255, 0.09);
  --cyan: #34dfff;
  --violet: #7c5cff;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));
  --pin: #ff7847;        /* гео-маркер: точки маршрута, пины */
  --pin-soft: rgba(255, 120, 71, 0.12);
  --fresh: #3ddc97;      /* «проверено», свежесть */
  --fresh-soft: rgba(61, 220, 151, 0.1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --body: "Golos Text", system-ui, sans-serif;
  --display: "Unbounded", var(--body);
  --radius: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  position: relative;
}

/* фоновая координатная сетка + свечение: сайт как карта */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(124, 92, 255, 0.14), transparent 65%),
    radial-gradient(700px 420px at 12% 8%, rgba(52, 223, 255, 0.08), transparent 60%),
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pin); outline-offset: 2px; border-radius: 4px; }

::selection { background: rgba(124, 92, 255, 0.4); }

/* ---------- Шапка ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.site-bar { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.brand {
  font-family: var(--display);
  font-weight: 500; font-size: 18px;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 9px;
  letter-spacing: -0.01em;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pin); display: inline-block;
  box-shadow: 0 0 10px var(--pin), 0 0 22px rgba(255, 120, 71, 0.4);
}
.brand small { font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 400; align-self: flex-end; }
nav.main { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
nav.main a { font-size: 14px; color: var(--ink); text-decoration: none; opacity: .85; }
nav.main a:hover { opacity: 1; color: var(--cyan); text-decoration: underline; }
.langs { display: flex; gap: 6px; }
.langs a {
  font-family: var(--mono); font-size: 11px; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 6px; background: var(--card);
}
.langs a[aria-current="true"] { color: var(--cyan); border-color: var(--cyan); }

/* ---------- Честная строка статистики ---------- */
.truthline { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 28px 0 0; }
.truthline b { color: var(--fresh); font-weight: 600; }

/* ---------- Герой ---------- */
.hero { padding: 12px 0 8px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 4.6vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 10px 0 12px;
  max-width: 20ch;
}
/* градиентный акцент на ключевом слове через выделение всего заголовка тонко: */
.hero h1 {
  background: linear-gradient(100deg, var(--ink) 55%, var(--cyan) 82%, var(--violet));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--ink);
}
.hero p.sub { color: var(--muted); max-width: 56ch; margin: 0 0 6px; }

/* ---------- Фильтр-маршрут (сигнатурный элемент) ---------- */
.route {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  margin: 26px 0 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
/* тонкая градиентная кромка сверху */
.route::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: .8;
}
.route-steps { display: flex; flex-direction: column; }
.stop { display: grid; grid-template-columns: 26px 1fr; gap: 14px; }
.stop-rail { display: flex; flex-direction: column; align-items: center; }
.stop-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid var(--line); background: var(--bg);
  flex: none; margin-top: 5px;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.stop.active .stop-dot { border-color: var(--pin); box-shadow: 0 0 12px rgba(255, 120, 71, 0.5); }
.stop.done .stop-dot {
  border-color: var(--pin); background: var(--pin);
  box-shadow: 0 0 12px rgba(255, 120, 71, 0.55);
}
.stop-line { width: 2px; flex: 1; background: var(--line); min-height: 18px; transition: background .25s; }
.stop.done .stop-line { background: linear-gradient(var(--pin), rgba(255,120,71,.25)); }
.stop:last-child .stop-line { display: none; }
.stop-body { padding-bottom: 18px; min-width: 0; }
.stop:last-child .stop-body { padding-bottom: 4px; }
.stop-label {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--body); font-size: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.chip:hover { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(52, 223, 255, .25); }
.chip[aria-pressed="true"] {
  background: var(--grad); border-color: transparent; color: #06101a; font-weight: 600;
  box-shadow: 0 0 16px rgba(52, 223, 255, .3);
}
.chip.ghost { color: var(--muted); border-style: dashed; }
.route-note { font-size: 13px; color: var(--muted); margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.route-reset {
  background: none; border: none; color: var(--cyan); cursor: pointer;
  font-family: var(--mono); font-size: 12px; padding: 0; text-decoration: underline;
}

/* ---------- Результаты ---------- */
.results-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }
.results-head h2 { font-family: var(--display); font-weight: 500; font-size: 20px; margin: 0; }
.results-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px; margin-bottom: 30px;
}
.app-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.app-card:hover {
  border-color: rgba(52, 223, 255, .5); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(52, 223, 255, .12);
}
.app-top { display: flex; gap: 12px; align-items: center; }
.app-icon {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 18px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 4px 14px rgba(0, 0, 0, .35);
}
.app-name { font-weight: 600; font-size: 16px; }
.app-name a { color: var(--ink); text-decoration: none; }
.app-name a:hover { color: var(--cyan); text-decoration: underline; }
.app-cat { font-size: 12.5px; color: var(--muted); }
.app-cat a { color: var(--muted); }
.app-cat a:hover { color: var(--cyan); }
.app-desc { font-size: 14px; color: var(--ink); opacity: .9; margin: 0; }
.app-meta {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.fresh { color: var(--fresh); }
.geo-tag { color: var(--pin); }
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 30px; text-align: center; color: var(--muted); font-size: 14px;
  grid-column: 1 / -1; background: var(--card);
}

/* ---------- Хабовые блоки (перелинковка) ---------- */
.hubs { border-top: 1px solid var(--line); padding: 30px 0 8px; }
.hubs h2 { font-family: var(--display); font-weight: 500; font-size: 20px; margin: 0 0 14px; }
.hubs h3 {
  font-size: 13px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 0 0 10px;
}
.soon {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--pin); background: var(--pin-soft); border: 1px solid rgba(255, 120, 71, .3);
  border-radius: 6px; padding: 3px 8px;
  vertical-align: middle; margin-left: 8px; font-weight: 400;
}
.hub-sub { font-size: 14px; color: var(--muted); max-width: 68ch; margin: -4px 0 14px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.hub-list { list-style: none; margin: 0; padding: 0; }
.hub-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.hub-list li:last-child { border-bottom: none; }
.hub-list .cnt { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }
.hub-list.cols3 { column-count: 3; column-gap: 28px; display: block; }
.hub-list.cols3 li { break-inside: avoid; display: block; }
@media (max-width: 860px) { .hub-list.cols3 { column-count: 2; } }
@media (max-width: 560px) { .hub-list.cols3 { column-count: 1; } }

.teasers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.teaser {
  display: flex; flex-direction: column; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--ink);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .15s, box-shadow .15s;
}
.teaser:hover { border-color: rgba(124, 92, 255, .55); box-shadow: 0 0 18px rgba(124, 92, 255, .18); }
.teaser-type {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; width: fit-content;
}
.teaser-title { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.teaser-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: auto; }

.foot-compact { column-count: 2; column-gap: 18px; }
.foot-compact li { break-inside: avoid; }

/* ---------- Принципы ---------- */
.principles { border-top: 1px solid var(--line); padding: 34px 0; }
.principles h2 { font-family: var(--display); font-weight: 500; font-size: 20px; margin: 0 0 8px; }
.principles .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 18px; }
.principles h3 { font-size: 15px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.principles h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fresh); box-shadow: 0 0 8px rgba(61, 220, 151, .6); flex: none;
}
.principles .cols p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Страница приложения ---------- */
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cyan); }
.app-hero { display: flex; gap: 18px; align-items: center; padding: 18px 0 6px; flex-wrap: wrap; }
.app-hero .app-icon { width: 72px; height: 72px; border-radius: 20px; font-size: 28px; }
.app-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 4vw, 34px); margin: 0; letter-spacing: -0.01em; }
.verified {
  font-family: var(--mono); font-size: 12px; color: var(--fresh);
  background: var(--fresh-soft); border: 1px solid rgba(61, 220, 151, .3);
  border-radius: 8px; padding: 4px 10px; display: inline-block; margin-top: 6px;
}
.store-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0 6px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #06101a; text-decoration: none;
  border-radius: 12px; padding: 11px 18px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 4px 18px rgba(52, 223, 255, .25);
  transition: box-shadow .15s, transform .15s;
}
.store-btn:hover { box-shadow: 0 6px 26px rgba(124, 92, 255, .4); transform: translateY(-1px); }
.store-btn small { font-family: var(--mono); font-size: 10px; opacity: .75; font-weight: 400; }
.no-apk { font-size: 13px; color: var(--muted); max-width: 62ch; margin: 6px 0 0; }
.no-apk b { color: var(--fresh); }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; padding: 24px 0 40px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.panel h2 { font-family: var(--display); font-weight: 500; font-size: 17px; margin: 0 0 12px; }
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts td:first-child { color: var(--muted); width: 42%; }
.facts tr:last-child td { border-bottom: none; }
.ver { border-left: 2px solid var(--line); padding: 2px 0 14px 14px; margin-left: 4px; position: relative; }
.ver:last-of-type { padding-bottom: 2px; }
.ver::before {
  content: ""; position: absolute; left: -6px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fresh); box-shadow: 0 0 8px rgba(61, 220, 151, .6);
}
.ver .v { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--cyan); }
.ver .d { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.ver p { margin: 4px 0 0; font-size: 14px; color: var(--ink); opacity: .9; }
.geo-list { display: flex; flex-wrap: wrap; gap: 6px; }
.geo-list span {
  font-size: 13px; background: var(--pin-soft); color: var(--pin);
  border: 1px solid rgba(255, 120, 71, .3); border-radius: 999px; padding: 4px 11px;
}
.author { display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.author .ava {
  width: 40px; height: 40px; border-radius: 50%; background: var(--fresh-soft);
  border: 1px solid rgba(61, 220, 151, .3);
  display: grid; place-items: center; font-weight: 600; color: var(--fresh); flex: none;
}
.author .role { color: var(--muted); font-size: 12.5px; }

/* ---------- Подвал ---------- */
footer.site {
  border-top: 1px solid var(--line);
  background: rgba(10, 14, 23, 0.6);
  padding: 28px 0 34px; margin-top: 10px;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
footer.site h4 {
  font-size: 13px; margin: 0 0 10px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500;
}
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 7px; font-size: 14px; }
footer.site a { color: var(--ink); opacity: .8; text-decoration: none; }
footer.site a:hover { opacity: 1; color: var(--cyan); text-decoration: underline; }
.foot-note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; }

/* ---------- Мобильная версия ---------- */
.burger {
  display: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 36px; cursor: pointer; padding: 0;
  font-size: 18px; line-height: 1; color: var(--ink); flex: none;
}

@media (max-width: 720px) {
  .site-bar { justify-content: space-between; gap: 12px; }
  .burger { display: grid; place-items: center; margin-left: auto; }

  nav.main {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 6px 20px 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  }
  body.menu-open nav.main { display: flex; }
  nav.main a { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  nav.main a:last-child { border-bottom: none; }
  .site-bar { position: relative; }

  .langs { order: 3; }

  .route { padding: 16px 14px 14px; }
  .chip { padding: 8px 13px; font-size: 13.5px; }
  .stop { grid-template-columns: 20px 1fr; gap: 10px; }
  .stop-body { padding-bottom: 14px; }

  .hero h1 { max-width: none; }
  .truthline { padding-top: 18px; }

  .app-hero .app-icon { width: 56px; height: 56px; font-size: 22px; }
  .store-btn { flex: 1 1 100%; justify-content: center; }
  .panel { padding: 16px; }
}

@media (max-width: 420px) {
  .langs { display: none; }
  .brand small { display: none; }
}

/* ---------- Текстовые страницы (about, методология и т.п.) ---------- */
.page { max-width: 760px; padding: 30px 0 50px; }
.page.wide { max-width: var(--maxw); }
.page h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.015em;
  margin: 8px 0 14px; line-height: 1.15;
}
.page h2 { font-family: var(--display); font-weight: 500; font-size: 19px; margin: 30px 0 10px; }
.page .lead { color: var(--muted); font-size: 17px; max-width: 60ch; }
.page p, .page li { font-size: 15.5px; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: 9px; }
.page li::marker { color: var(--pin); }
.page-updated { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 34px; }
.center-404 { text-align: center; padding-top: 60px; padding-bottom: 70px; max-width: 640px; }
.err-code {
  font-family: var(--display); font-weight: 600; font-size: clamp(64px, 14vw, 120px);
  margin: 0; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(124, 92, 255, .25);
}
