:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #15191f;
  --text-secondary: #5d6672;
  --border: #e3e7ec;
  --dark: #161b22;
  --dark-2: #1e252e;
  --accent: #e98218;
  --accent-hover: #cc6f10;
  --accent-soft: rgba(233, 130, 24, 0.12);
  --max: 1200px;
  --header: 68px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 25, 31, 0.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Manrope, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 76px;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 14px;
  background: var(--dark);
  color: #fff;
  z-index: 100;
}
.skip:focus { left: 12px; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }
.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  flex: 0 0 auto;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 700; letter-spacing: 0.01em; }
.brand__sub { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

.nav {
  display: none;
  gap: 18px;
}
.nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header);
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 18px;
}
.nav__link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
.nav__link:hover { color: var(--text); }

.header__cta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.icon-btn img { width: 26px; height: 26px; }
.header__phone {
  display: none;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.menu-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.menu-btn span,
.menu-btn::before,
.menu-btn::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  content: "";
}
.menu-btn span { margin: 0 auto; }

@media (min-width: 1024px) {
  .nav { display: flex; position: static; flex-direction: row; padding: 0; border: 0; }
  .menu-btn { display: none; }
  .header__phone { display: inline; }
}

.hero {
  padding: 28px 0 12px;
  background:
    linear-gradient(180deg, #fff 0%, var(--surface) 100%);
}
.hero__grid {
  display: grid;
  gap: 24px;
}
.hero__content { min-width: 0; }
.mini-form { min-width: 0; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 6vw, 48px); letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -0.02em; }
h3 { font-size: 18px; }
.lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 18px;
  max-width: 42rem;
}
.lead--short { display: block; }
.lead--full { display: none; }
.header__phone-icon { display: inline-flex; }

@media (min-width: 768px) {
  .lead--short { display: none; }
  .lead--full { display: block; }
  .header__phone-icon { display: none; }
}
.muted { color: var(--text-secondary); }

.proof {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}
.proof li {
  position: relative;
  padding-left: 18px;
  font-weight: 600;
}
.proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface); color: var(--text); }
.btn--full { width: 100%; }
.btn--full-mobile { width: 100%; }

.mini-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.mini-form__title { font-size: 18px; margin-bottom: 14px; }

.hero__visual {
  margin: 0;
  background: var(--dark);
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
}
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__note {
  margin: 0;
  padding: 10px 14px 14px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field__label { font-size: 14px; }
.field__input,
select.field__input,
textarea.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 500;
  color: var(--text);
}
textarea.field__input { min-height: 112px; resize: vertical; }
.field__hint { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
}
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.check a { color: var(--text); }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.alert {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fde8e8;
  color: #8a1f1f;
  font-weight: 600;
}

.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.trust__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  font-weight: 650;
  font-size: 14px;
  text-align: center;
}
.trust__sep { margin: 0 12px; color: var(--accent); }

.section { padding: 56px 0; }
.section--alt { background: var(--surface); }
.section--dark {
  background: var(--dark);
  color: #f3f5f7;
}
.section--dark .muted,
.section--dark p { color: rgba(243,245,247,.78); }
.section__head { margin-bottom: 24px; max-width: 46rem; }

.cards {
  display: grid;
  gap: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card p { margin: 0; color: var(--text-secondary); }
.card--quiet { background: var(--surface); }
.section--dark .card {
  background: var(--dark-2);
  border-color: rgba(255,255,255,.08);
  color: inherit;
}
.section--dark .card p { color: rgba(243,245,247,.78); }

.list { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.list li { margin: 4px 0; }

.factors {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}
.factors li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
}
.factors span {
  color: var(--accent-hover);
  font-variant-numeric: tabular-nums;
}

.formula {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.formula__plus,
.formula__eq { color: var(--accent); font-weight: 700; }

.process-photos {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.ph { scroll-snap-align: start; }
.ph {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.ph img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--surface); }
.ph figcaption {
  padding: 10px 12px 12px;
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 18px 64px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-secondary); }

.geo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.geo li {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 8px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
}
.faq p { margin: 0 0 14px; color: var(--text-secondary); }

.form--full { max-width: 860px; }
.form__grid {
  display: grid;
  gap: 12px;
}

.footer {
  background: var(--dark);
  color: #f3f5f7;
  padding: 40px 0 28px;
}
.footer a { color: #fff; }
.footer .muted { color: rgba(243,245,247,.7); }
.footer__grid { display: grid; gap: 24px; }
.footer__h { font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(243,245,247,.6); }
.brand--footer { margin-bottom: 12px; }
.brand--footer .brand__sub { color: rgba(243,245,247,.65); }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--border);
}
.sticky-cta.is-hidden { display: none; }
.sticky-cta .btn { width: 100%; }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px 96px;
  background: var(--surface);
}
.page__card,
.page__doc {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 22px;
}
.back { font-weight: 700; text-decoration: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 18, 22, 0.88);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; }
.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  font-size: 28px;
  cursor: pointer;
}

@media (min-width: 768px) {
  .container { width: min(var(--max), calc(100% - 48px)); }
  .hero { padding: 40px 0 20px; }
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-areas:
      "copy visual"
      "form visual";
    align-items: start;
  }
  .hero__content { grid-area: copy; }
  .hero__visual { grid-area: visual; }
  .mini-form { grid-area: form; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards--tight { grid-template-columns: 1fr 1fr; }
  .factors { grid-template-columns: 1fr 1fr; }
  .process-photos {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: unset;
    overflow: visible;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .form__grid { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .btn--full-mobile { width: auto; }
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .header__phone { display: inline; }
  .sticky-cta { display: none; }
}

@media (min-width: 1024px) {
  .cards.cards--objects { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .cards--tight,
  .cards--dark { grid-template-columns: repeat(3, 1fr); }
  .hero__visual { min-height: 560px; position: sticky; top: calc(var(--header) + 16px); }
}

@media (max-width: 767px) {
  .header__cta .icon-btn:not(.header__phone-icon) { display: none; }
}

@media (max-width: 359px) {
  h1 { font-size: 26px; }
  .brand__sub { display: none; }
}

.section[id],
#lead,
#contacts,
#server,
#why,
#process,
#cases,
#services {
  scroll-margin-top: calc(var(--header) + 10px);
}

/* Services */
.cards--services { grid-template-columns: 1fr; }
.card--wide { grid-column: 1 / -1; }

/* Cases block */
.cases__tags {
  margin: 10px 0 0;
  font-weight: 650;
  font-size: 15px;
  color: var(--text);
}
.cases {
  display: grid;
  gap: 40px;
}
.case {
  display: grid;
  gap: 20px;
  align-items: start;
}
.case__media { min-width: 0; }
.case__photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark);
  cursor: zoom-in;
  box-shadow: var(--shadow);
}
.case__photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.case__photo:hover img,
.case__photo:focus-visible img { transform: scale(1.02); }
.case__thumbs { display: none; }
.case__geo {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-secondary);
}
.case__name {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.case__address {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.case__title {
  font-size: clamp(20px, 2.8vw, 26px);
  margin-bottom: 8px;
}
.case__lead {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
}
.case__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0 0 12px;
  list-style: none;
}
.case__metrics li {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(233, 130, 24, 0.15);
}
.case__metrics strong {
  display: block;
  color: var(--accent-hover);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}
.case__metrics span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}
.case__duration,
.case__extra {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.case__extra {
  font-weight: 650;
  line-height: 1.45;
}
.case__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  list-style: none;
}
.case__badges li {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 800;
}
.case__text {
  margin: 0 0 12px;
  color: var(--text-secondary);
}
.case__details {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 4px 14px;
}
.case__details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}
.case__details-text {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 14px;
}
.case__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-hover);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.case__link:hover { color: var(--accent); text-decoration: underline; }

.case__review {
  margin: 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}
.case__review p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  font-style: italic;
}
.case__review footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-secondary);
}
.case__review footer strong {
  color: var(--text);
  font-size: 14px;
}
.case__review-object {
  font-size: 12px;
  color: var(--text-secondary);
}

.cases-cta {
  margin-top: 36px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.cases-cta h3 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 10px;
}
.cases-cta p { max-width: 42rem; margin: 0 auto 18px; }
.cases-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 18, 22, 0.92);
  display: grid;
  place-items: center;
  padding: 56px 16px 24px;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox__frame {
  margin: 0;
  width: min(1100px, 100%);
  max-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}
.gallery-lightbox__frame img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.95);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.gallery-lightbox__close { top: 12px; right: 12px; }
.gallery-lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.gallery-lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }
.gallery-lightbox__counter {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

@media (min-width: 768px) {
  .cards--services { grid-template-columns: repeat(2, 1fr); }
  .case__metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .case {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: center;
  }
  .case--reverse .case__media { order: 2; }
  .case--reverse .case__body { order: 1; }
  .cases-cta { padding: 32px 28px; }
}

@media (min-width: 1024px) {
  .cards--services { grid-template-columns: repeat(3, 1fr); }
  .cases { gap: 56px; }
}
