:root {
  --bg: #08160f;
  --bg-deep: #04110b;
  --card: rgba(18, 48, 32, .72);
  --line: rgba(196, 255, 214, .14);
  --text: #f4fff7;
  --muted: #b7d4c2;
  --accent: #6ee7a0;
  --accent2: #c8f7d8;
  --ink: #062416;
  --gold: #e8c97a;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --nav-h: 72px;
  --app-max: 430px;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  overflow: hidden;
}

/* soft side glow like хлам.бел */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 22vw;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 231, 160, .16), transparent 42%),
    radial-gradient(circle at 70% 80%, rgba(232, 201, 122, .08), transparent 40%);
}
body::before { left: 0; }
body::after { right: 0; }

.app {
  height: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(700px 240px at 90% -8%, rgba(110, 231, 160, .2), transparent 50%),
    linear-gradient(180deg, #0d2418 0%, #08160f 40%, #06140e 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .04),
    0 30px 80px rgba(0, 0, 0, .45);
}

/* ——— topbar ——— */
.topbar {
  height: calc(58px + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(8, 22, 15, .7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
  flex: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(47, 191, 106, .28);
  flex: none;
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.call {
  background: linear-gradient(180deg, #8af0b4, #3dce7a);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  padding: 11px 15px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(61, 206, 122, .25);
  white-space: nowrap;
}

/* ——— screens ——— */
.screens {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(var(--nav-h) + var(--safe-bot) + 18px);
  display: none;
}

.screen.active {
  display: block;
  animation: fadeUp .28s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ——— hero ——— */
.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 200px;
  border: 1px solid var(--line);
  background:
    radial-gradient(420px 180px at 80% 0%, rgba(110, 231, 160, .22), transparent 55%),
    radial-gradient(320px 160px at 10% 100%, rgba(232, 201, 122, .1), transparent 50%),
    linear-gradient(165deg, #123825 0%, #0a1c12 55%, #06140e 100%);
  padding: 20px 18px 18px;
  margin-bottom: 12px;
}

.kicker {
  color: #d7f8e4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.12;
  margin: 8px 0 10px;
  letter-spacing: -.04em;
  font-weight: 800;
}

.lead {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* ——— CTA cards ——— */
.cta-grid {
  display: grid;
  gap: 8px;
  margin: 4px 0 14px;
}

.cta {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cta:hover,
.cta:focus-visible {
  border-color: rgba(110, 231, 160, .45);
  outline: none;
}

.cta .ico {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(160deg, #1d5a36, #123825);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent);
}

.cta .ico svg {
  width: 22px;
  height: 22px;
}

.cta h2 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.cta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cta .go {
  margin-left: auto;
  color: #8fb89c;
  align-self: center;
  font-size: 20px;
  font-weight: 300;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0 0 8px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 6px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.stat b {
  display: block;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

.note-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 10px 2px 0;
}

.note-line a {
  color: #8ef0b0;
  text-decoration: none;
  font-weight: 700;
}

/* ——— section heads ——— */
.hrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 2px 12px;
  gap: 10px;
}

.hrow h1,
.hrow h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.03em;
  font-weight: 800;
}

.link {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.sub {
  color: var(--muted);
  font-size: 13px;
  margin: -6px 2px 14px;
  line-height: 1.4;
}

/* ——— cards / forms ——— */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px;
  margin-bottom: 10px;
}

.form {
  display: grid;
  gap: 10px;
}

.form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.form label > span {
  display: block;
  margin-bottom: 6px;
}

.req { color: var(--gold); }

input,
textarea,
select {
  width: 100%;
  background: rgba(4, 17, 11, .7);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 13px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #7fa892;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 88px;
}

.map-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(4, 17, 11, .5);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.map-toolbar button {
  background: rgba(110, 231, 160, .12);
  border: 1px solid rgba(110, 231, 160, .28);
  color: var(--accent2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.map-toolbar button:disabled {
  opacity: .55;
  cursor: wait;
}

#map {
  height: 180px;
  width: 100%;
  background: #0a1c12;
}

/* Leaflet dark-ish overlay feel */
.leaflet-container {
  background: #0a1c12;
  font: inherit;
}

.filebox {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  display: block;
  transition: border-color .15s ease, background .15s ease;
}

.filebox:hover,
.filebox.has-files {
  border-color: rgba(110, 231, 160, .4);
  background: rgba(110, 231, 160, .06);
}

.filebox input {
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.filebox .hint {
  font-weight: 700;
  color: var(--accent2);
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 15px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.btn-main {
  background: linear-gradient(180deg, #8af0b4, #3dce7a);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(61, 206, 122, .22);
}

.btn-main:disabled {
  opacity: .6;
  cursor: wait;
}

.btn-ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border: 1px solid var(--line);
}

/* ——— contacts ——— */
.contacts {
  display: grid;
  gap: 8px;
}

.contacts a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  backdrop-filter: blur(10px);
}

.contacts a .dot {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(160deg, #1d5a36, #123825);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: none;
}

.contacts a .dot svg {
  width: 18px;
  height: 18px;
}

.contacts a span {
  display: block;
  font-weight: 800;
  font-size: 14px;
}

.contacts a small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.about p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.about p:last-child {
  margin-bottom: 0;
}

.about b {
  color: var(--text);
}

.legal {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal a {
  color: #8ef0b0;
}

/* ——— bottom nav ——— */
.bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bot));
  padding-bottom: var(--safe-bot);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(6, 18, 12, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

.tab {
  border: 0;
  background: none;
  color: #7fa892;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 2px;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.active,
.tab.on {
  color: var(--accent);
}

.hidden { display: none !important; }

/* ——— thanks page ——— */
.thanks-wrap {
  min-height: 100dvh;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 16px calc(28px + var(--safe-bot));
  position: relative;
  z-index: 1;
  background:
    radial-gradient(700px 240px at 90% -8%, rgba(110, 231, 160, .2), transparent 50%),
    linear-gradient(180deg, #0d2418 0%, #08160f 40%, #06140e 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .04),
    0 30px 80px rgba(0, 0, 0, .45);
}

.thanks-card {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px;
  backdrop-filter: blur(10px);
  text-align: center;
}

.thanks-card .check {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(160deg, #8af0b4, #2fbf6a);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(47, 191, 106, .28);
}

.thanks-card .check svg {
  width: 28px;
  height: 28px;
}

.thanks-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -.04em;
}

.thanks-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.thanks-card .contacts {
  text-align: left;
  margin-bottom: 14px;
}

.thanks-home {
  display: block;
  margin-top: 4px;
  text-decoration: none;
  text-align: center;
}

/* ——— desktop ≥900px ——— */
@media (min-width: 900px) {
  :root {
    --app-max: 920px;
  }

  html, body {
    height: auto;
    min-height: 100%;
  }

  body {
    overflow: auto;
  }

  .app {
    margin: 24px auto;
    height: auto;
    min-height: calc(100vh - 48px);
    max-width: var(--app-max);
    border-radius: 28px;
    overflow: hidden;
  }

  .screens {
    position: relative;
    overflow: visible;
    flex: none;
    min-height: 60vh;
  }

  .screen {
    position: static;
    inset: auto;
    display: none;
    overflow: visible;
    padding: 22px 28px calc(var(--nav-h) + 28px);
  }

  .screen.active {
    display: block;
    animation: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    padding-left: 22px;
    padding-right: 22px;
  }

  .bottom {
    position: sticky;
    left: auto;
    right: auto;
  }

  .hero {
    min-height: 220px;
    padding: 28px 28px 24px;
  }

  .hero h1 {
    font-size: 34px;
    max-width: 16ch;
  }

  .lead {
    max-width: 42ch;
    font-size: 15px;
  }

  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cta {
    padding: 18px;
  }

  .cta h2 {
    font-size: 17px;
  }

  .desktop-split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 16px;
    align-items: start;
  }

  .desktop-split .card {
    margin-bottom: 0;
  }

  #map {
    height: 240px;
  }

  .contacts {
    grid-template-columns: 1fr 1fr;
  }

  .stats {
    max-width: 520px;
  }

  .thanks-wrap {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    max-width: 560px;
    border-radius: 28px;
    overflow: hidden;
  }
}

@media (min-width: 1200px) {
  :root {
    --app-max: 980px;
  }
}
