@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0f2427;
  --ink-2: #3f5759;
  --ink-3: #6f8486;
  --paper: #f2f0ea;
  --paper-2: #e9e6de;
  --line: rgba(15, 36, 39, 0.1);
  --teal: #13615d;
  --teal-2: #1d837c;
  --lime: #c8f26a;
  --lime-ink: #213300;
  --coral: #ff8a5c;
  --r-s: 14px;
  --r-m: 22px;
  --r-l: 32px;
  --shadow-s: 0 1px 2px rgba(15, 36, 39, 0.08), 0 6px 18px -8px rgba(15, 36, 39, 0.25);
  --shadow-l: 0 2px 6px rgba(15, 36, 39, 0.06), 0 30px 70px -24px rgba(15, 36, 39, 0.38);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { margin: 0; font-weight: 650; }
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 680;
}
.h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); line-height: 1.04; letter-spacing: -0.035em; }
.h3 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.015em; }
.kicker {
  margin: 0 0 14px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* Жидкое стекло: размытие и насыщение подложки, светлый обод сверху,
   блик, который следует за указателем (--mx/--my выставляет glass.js). */
.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.26));
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  backdrop-filter: blur(22px) saturate(185%);
  border-radius: var(--r-m);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    var(--shadow-l);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at var(--mx, 25%) var(--my, -10%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 55%);
  opacity: 0.85;
  transition: opacity 0.4s var(--ease-out);
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.06) 38%, rgba(255, 255, 255, 0.05) 62%, rgba(255, 255, 255, 0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass-dark {
  background: linear-gradient(160deg, rgba(15, 36, 39, 0.72), rgba(15, 36, 39, 0.52));
  color: #fff;
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    var(--shadow-l);
}
.glass-dark::before { background: radial-gradient(120% 90% at var(--mx, 25%) var(--my, -10%), rgba(255, 255, 255, 0.2), transparent 55%); }
.glass-dark::after { background: linear-gradient(140deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.25)); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s var(--ease-out), background-color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn-lime { background: var(--lime); color: var(--lime-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 26px -10px rgba(110, 160, 20, 0.7); }
.btn-lime:hover { background: #d4f784; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #18363a; }
.btn-ghost { background: rgba(255, 255, 255, 0.5); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(15, 36, 39, 0.12); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.8); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.92rem; }
.btn .arrow { transition: transform 0.2s var(--ease-out); }
.btn:hover .arrow { transform: translate(2px, -2px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(15, 36, 39, 0.1);
  font-size: 0.9rem;
  font-weight: 550;
  transition: background-color 0.18s, box-shadow 0.18s, transform 0.12s var(--ease-out);
}
@media (hover: hover) { .chip:hover { background: rgba(255, 255, 255, 0.85); } }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }

/* Шапка — плавающая стеклянная капсула. */
.header {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 28px));
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.logo i { font-style: normal; color: var(--teal-2); }
.logo-mark { width: 22px; height: 22px; margin-right: 8px; align-self: center; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--ink-2);
  transition: background-color 0.18s, color 0.18s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

.map-layer { position: fixed; inset: 0; z-index: 0; background: #e8e5dd; }
.map-layer .maplibregl-ctrl-attrib { font-size: 10px; background: rgba(255, 255, 255, 0.55); border-radius: 8px 0 0 0; }
.map-layer.is-locked { pointer-events: none; }
.map-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(242, 240, 234, 0.55), rgba(242, 240, 234, 0) 22%, rgba(242, 240, 234, 0) 70%, rgba(242, 240, 234, 0.6));
  transition: opacity 0.6s var(--ease-out);
}
.view { position: relative; z-index: 2; }

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 12px 18px;
  font-size: 0.92rem;
}

/* Телефон: размытие под плашками, которые лежат на движущейся карте или едут
   вместе со страницей, Safari пересчитывает на каждом кадре — параллакс
   запинается. Здесь стекло плотное, без размытия; размытие остаётся только у
   шапки и чуть слабее. */
@media (max-width: 820px) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(160deg, rgba(252, 251, 248, 0.94), rgba(246, 244, 239, 0.9)); }
  .glass-dark { background: rgba(15, 36, 39, 0.9); }
  .header.glass { -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%); background: rgba(250, 249, 246, 0.72); }
}
@media (max-width: 760px) {
  .header { top: 10px; height: 52px; padding-left: 16px; gap: 8px; }
  .nav a { padding: 8px 11px; font-size: 0.88rem; }
  .nav a.hide-sm { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass { background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-dark { background: rgba(15, 36, 39, 0.96); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
