/* Topaz — autonomous sewerage turnkey */
:root {
  --ink: #101612;
  --ink-2: #1a2420;
  --paper: #f3f1ea;
  --fog: #e7e4da;
  --white: #fff;
  --accent: #c45c1a;
  --accent-2: #2f6f5e;
  --accent-soft: rgba(196, 92, 26, 0.14);
  --muted: #4d5a54;
  --line: #d5d0c4;
  --ok: #1f7a4d;
  --radius: 12px;
  --font: "Segoe UI", system-ui, sans-serif;
  --display: "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  --pad: 22px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right));
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.top__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, #3a8f78, var(--accent-2) 45%, #1d4339);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  flex-shrink: 0;
}
.logo__brand {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  line-height: 1.1;
}
.logo__sub {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}
.nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}
.nav__list a.is-active,
.nav__list a:hover { background: var(--fog); color: var(--ink); }
.top__actions { display: flex; align-items: center; gap: 10px; }
.top__phone { font-weight: 800; white-space: nowrap; }
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--fog);
  cursor: pointer;
  font-size: 1.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn--accent {
  background: linear-gradient(135deg, #d96a28, var(--accent));
  color: #fff;
  box-shadow: 0 10px 22px rgba(196, 92, 26, 0.28);
}
.btn--accent:hover { color: #fff; }
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.72);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn--dark {
  background: var(--ink-2);
  color: #fff;
}
.btn--full { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: min(72svh, 620px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: clip;
  background: #15201c;
  contain: layout paint style;
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,14,12,.82) 0%, rgba(10,14,12,.45) 48%, rgba(10,14,12,.25) 100%),
    linear-gradient(180deg, rgba(10,14,12,.2) 0%, rgba(10,14,12,.78) 100%);
  pointer-events: none;
}
.hero__body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 56px 0 64px;
}
.hero__eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #c8e6dc;
}
.hero__brand {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-wrap: balance;
}
.hero__lead {
  margin: 0 0 28px;
  max-width: 32em;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.9);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding: 72px 0; content-visibility: auto; contain-intrinsic-size: 1px 640px; }
.section--tint { background: var(--fog); }
.section--ink {
  background: linear-gradient(145deg, #121a17 0%, #1c2b26 55%, #2a2418 100%);
  color: #fff;
}
.section__tag {
  margin: 0 0 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b3a0a;
}
.section--ink .section__tag { color: #c8e6dc; }
.section__title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.section__desc {
  margin: 0 0 28px;
  max-width: 36em;
  color: var(--muted);
}
.section--ink .section__desc { color: rgba(255,255,255,.78); }

/* Quiz */
.quiz {
  display: grid;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.quiz__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.quiz label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}
.quiz select,
.quiz input {
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.quiz__result {
  display: none;
  padding: 16px;
  border-radius: 12px;
  background: var(--fog);
}
.quiz__result.is-on { display: block; }
.quiz__result strong { font-size: 1.15rem; }
.quiz__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Products */
.hits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.hit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.hit__img {
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.hit__tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.hit__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hit__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.hit__price {
  margin-top: auto;
  font-size: 1.25rem;
  font-weight: 800;
}
.hit__price del {
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.hit__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  padding-top: 8px;
  border-top: 2px solid var(--accent-2);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}
.step h3 { margin: 0 0 8px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); }

/* Why */
.why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.why article strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}
.why article p { margin: 0; color: var(--muted); }

/* Cases */
.cases {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}
.case {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
}
.case:first-child { grid-row: span 2; min-height: 100%; }
.case img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(8,12,10,.88) 100%);
}
.case__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 20px;
}
.case__body h3 { margin: 0 0 6px; font-size: 1.15rem; }
.case__body p { margin: 0; color: rgba(255,255,255,.82); font-size: 0.92rem; }

/* Service strip */
.serv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.serv a {
  display: grid;
  gap: 10px;
  color: inherit;
}
.serv img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 14px;
}
.serv h3 { margin: 0; font-size: 1.1rem; }
.serv p { margin: 0; color: rgba(255,255,255,.75); }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.info-list a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.offices { display: grid; gap: 12px; margin-top: 18px; }
.offices article {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.offices strong { display: block; margin-bottom: 4px; }

.form {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}
.form input,
.form textarea,
.form select {
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.form textarea { min-height: 96px; resize: vertical; }

.page-hero {
  padding: 48px 0 28px;
  background: linear-gradient(145deg, #121a17, #24352e);
  color: #fff;
}
.page-hero .section__tag { color: #c8e6dc; }
.page-hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
}
.page-hero__lead { margin: 0; max-width: 36em; color: rgba(255,255,255,.85); }

.catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.foot {
  padding: 48px 0 28px;
  background: #0d1311;
  color: rgba(255,255,255,.82);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.foot__brand { margin: 0 0 8px; font-size: 1.2rem; font-weight: 800; color: #fff; }
.foot__h { margin: 0 0 10px; font-weight: 800; color: #fff; }
.foot__text { margin: 0; max-width: 28em; }
.foot a { color: rgba(255,255,255,.82); }
.foot a:hover { color: #fff; }
.foot__copy {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 0.85rem;
  color: rgba(255,255,255,.55);
}

.mob-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  gap: 8px;
}
.mob-bar a {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--fog);
  color: var(--ink);
}

.lead {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  background: transparent;
}
.lead::backdrop { background: rgba(8, 12, 10, 0.55); }
.lead__form {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px 20px 20px;
  background: #fff;
  border-radius: 18px;
}
.lead__form h2 { margin: 0; font-size: 1.3rem; }
.lead__hint { margin: 0; color: var(--muted); }
.lead__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--fog);
  cursor: pointer;
  font-size: 1.2rem;
}
.lead__form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}
.lead__form input,
.lead__form textarea {
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
}
.lead__note { margin: 0; font-size: 0.75rem; color: var(--muted); }
.lead__status { margin: 0; font-weight: 800; }
.lead__status.is-ok { color: var(--ok); }
.lead__status.is-err { color: #b42318; }

@media (max-width: 960px) {
  .nav { display: none; }
  .nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 18px;
  }
  .nav.is-open .nav__list { flex-direction: column; }
  .burger { display: grid; place-items: center; }
  .top__phone { display: none; }
  .quiz__grid,
  .hits,
  .steps,
  .why,
  .serv,
  .catalog { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr; }
  .case:first-child { grid-row: auto; min-height: 320px; }
  .contact, .foot__grid { grid-template-columns: 1fr; }
  .mob-bar { display: flex; }
  body { padding-bottom: 72px; }
}

@media (max-width: 560px) {
  :root { --header-h: 64px; --pad: 16px; }
  .logo__sub { display: none; }
  .hero { align-items: center; min-height: min(68svh, 520px); }
  .hero__body { padding: 40px 0 48px; text-align: left; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .quiz__grid,
  .hits,
  .steps,
  .why,
  .serv,
  .catalog { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}
