:root {
  --bg: #000;
  --surface: #0e0e10;
  --raised: #18181b;
  --line: #2a2a2e;
  --text: #f4f4f5;
  --muted: #8d8d95;
  --red: #e5242b;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .logo { font-family: "Unbounded", "Onest", system-ui, sans-serif; font-weight: 700; line-height: 1.2; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* шапка */
.header { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 20px; }
.logo i { color: var(--red); font-style: normal; }
.nav { display: flex; gap: 22px; align-items: center; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 16px "Onest", sans-serif; cursor: pointer; transition: transform .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); border-color: #444; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.disabled { opacity: .45; pointer-events: none; }
.btn small { font-weight: 500; opacity: .8; }

/* главный экран */
.hero { padding: 84px 0 64px; background: radial-gradient(900px 420px at 80% -10%, rgba(229,36,43,.22), transparent 70%); }
.hero h1 { font-size: clamp(30px, 5.6vw, 54px); max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { max-width: 560px; color: var(--muted); font-size: 18px; margin: 20px 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 16px; }

section { padding: 56px 0; }
section h2 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 28px; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); font-family: "Unbounded", sans-serif; font-size: 14px; margin-bottom: 14px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* фильтры и карточки */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 14px "Onest", sans-serif; cursor: pointer; }
.filter.on { background: var(--red); border-color: var(--red); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s, border-color .18s; display: block; }
.card:hover { transform: translateY(-3px); border-color: #3a3a40; }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #07070a; }
.card-media img, .card-media svg { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 12px; left: 12px; background: var(--red); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 16px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid #3a3a40; border-radius: 999px; padding: 2px 10px; font-size: 13px; color: #d4d4d8; background: rgba(255,255,255,.03); }
.chip.red { border-color: var(--red); color: #fff; }
.empty { color: var(--muted); padding: 30px 0; }

/* страница маршрута */
.crumbs { color: var(--muted); font-size: 14px; padding: 28px 0 10px; }
.crumbs a:hover { color: var(--text); }
.route-head h1 { font-size: clamp(26px, 4.4vw, 40px); margin: 6px 0 16px; }
.route-head p { color: var(--muted); font-size: 17px; max-width: 700px; margin: 16px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 28px 0 0; }
.gallery img { border-radius: 16px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.map-box { margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
#map { height: 460px; background: #0a0a0c; }
.stops { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.stops li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stops li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); font: 700 13px "Unbounded", sans-serif; }
.stops h3 { font-size: 16px; margin-bottom: 4px; }
.stops p { margin: 0; color: var(--muted); font-size: 15px; }
.stops small { color: var(--muted); display: block; margin-top: 6px; }
.box { background: linear-gradient(135deg, rgba(229,36,43,.18), rgba(229,36,43,.04)); border: 1px solid rgba(229,36,43,.4); border-radius: var(--radius); padding: 28px; }
.box h2 { font-size: 22px; margin-bottom: 8px; }
.box p { color: #d4d4d8; margin: 0 0 20px; }

/* страница «Скачать» */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h3 { font-size: 18px; margin-bottom: 10px; }
.panel p, .panel li { color: #c4c4cc; font-size: 15px; }
.panel ol { padding-left: 20px; margin: 12px 0 18px; }

/* подвал */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 44px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
.footer a:hover { color: var(--text); }

/* карта: тёмная подложка и подписи */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.92) grayscale(.35); }
.leaflet-container { background: #0a0a0c; font-family: "Onest", sans-serif; }
.leaflet-control-attribution { background: rgba(0,0,0,.7) !important; color: #8d8d95 !important; }
.leaflet-control-attribution a { color: #b4b4bc !important; }
.stop-pin { width: 28px; height: 28px; border-radius: 50%; background: var(--red); border: 2px solid #fff; color: #fff; display: grid; place-items: center; font: 700 12px "Unbounded", sans-serif; }
.metro-m { display: flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--red); font: 900 16px "Onest", sans-serif; text-shadow: 0 0 3px #000, 0 0 6px #000; pointer-events: none; }
.metro-m span { color: #fff; font: 600 11px "Onest", sans-serif; }

@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
  .hero { padding: 52px 0 44px; }
  #map { height: 380px; }
}
