:root {
  --bg: #f5f7f3;
  --surface: #ffffff;
  --ink: #172018;
  --muted: #596358;
  --line: #d9e0d4;
  --green: #2f7d32;
  --green-dark: #1f5f25;
  --lime: #d9f99d;
  --blue: #1f5eff;
  --shadow: 0 18px 50px rgba(23, 32, 24, .10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(23, 32, 24, .08);
  background: rgba(248, 250, 247, .88);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(1180px, 100%);
  min-height: 58px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #18341f;
  box-shadow: 0 0 0 1px rgba(47, 125, 50, .18), 0 10px 24px rgba(22, 49, 28, .16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.nav {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(23, 32, 24, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72);
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #465348;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-header {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 24px;
}

.legal-intro {
  max-width: 760px;
  padding: 54px 0 16px;
}

.legal-intro h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
}

.legal-intro p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.legal-page {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

.legal-section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.legal-section p {
  max-width: 760px;
  margin-bottom: 10px;
  color: #2c352e;
  font-size: 16px;
}

.legal-section a,
.legal-date {
  color: var(--green-dark);
  font-weight: 800;
}

.nav a:hover {
  color: var(--ink);
  background: #fff;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.header-contact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
}

.header-contact-max {
  justify-content: center;
  min-width: 70px;
  padding: 7px 9px;
  color: #111;
}

.header-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .7);
}

.contact-icon {
  display: block;
  flex: 0 0 auto;
}

.contact-icon-telegram {
  width: 18px;
  height: 18px;
}

.contact-icon-max {
  width: 54px;
  height: 18px;
  color: #111;
}

.header-action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(22, 49, 28, .18);
  border-radius: 7px;
  color: #fff;
  background: #18341f;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(22, 49, 28, .14);
}

.header-action:hover {
  background: #22452a;
}

.hero,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 46px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 72px 0 54px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: .94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.15;
}

.lead {
  max-width: 760px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: white;
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.hero-points,
.check-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-points {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.hero-points li,
.check-list li {
  position: relative;
  padding-left: 24px;
}

.hero-points li::before,
.check-list li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--green);
  font-weight: 900;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-row {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 7px;
  background: #edf3e9;
}

.panel-row span {
  color: var(--muted);
  font-size: 14px;
}

.panel-row strong {
  font-size: 20px;
}

.section {
  padding: 72px 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-note {
  max-width: 680px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: 38px;
  align-items: start;
  padding-top: 18px;
}

.about-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 24, .06);
}

.about-card p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 18px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tags span {
  padding: 8px 10px;
  border: 1px solid rgba(47, 125, 50, .16);
  border-radius: 7px;
  color: var(--green-dark);
  background: #edf3e9;
  font-size: 13px;
  font-weight: 850;
}

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

.case-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(278px, 340px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 4px 18px;
  scroll-snap-type: inline mandatory;
  scrollbar-color: rgba(31, 95, 37, .55) rgba(23, 32, 24, .08);
}

.case-carousel::-webkit-scrollbar {
  height: 10px;
}

.case-carousel::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(23, 32, 24, .08);
}

.case-carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(31, 95, 37, .55);
}

.card,
.case-card,
.request-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 24, .06);
}

.card,
.case-card {
  padding: 24px;
}

.case-card {
  min-height: 372px;
  scroll-snap-align: start;
}

.card p,
.case-card p,
.request-copy p {
  color: var(--muted);
}

.price {
  margin: 20px 0 0;
  color: var(--green-dark) !important;
  font-size: 22px;
  font-weight: 900;
}

.card-note {
  margin: 10px 0 0;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 42px;
  align-items: start;
}

.check-list {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-left: 4px solid var(--green);
  background: #edf3e9;
}

.case-tag {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.case-visual {
  position: relative;
  display: block;
  width: calc(100% + 16px);
  height: 118px;
  margin: -8px -8px 20px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(23, 32, 24, .08);
  border-radius: 8px;
  cursor: zoom-in;
  background-color: #edf3e9;
  background-position: center;
  background-size: cover;
  appearance: none;
}

.case-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23, 32, 24, .12), rgba(23, 32, 24, .58));
}

.case-visual::after {
  content: "Увеличить";
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(23, 32, 24, .72);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}

.case-visual:hover::after,
.case-visual:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.case-visual:focus-visible {
  outline: 3px solid rgba(47, 125, 50, .28);
  outline-offset: 3px;
}

.case-visual-admin {
  background-image: url("/assets/images/case-zavod-admin.png");
  background-position: left top;
}

.case-visual-crm {
  background-image: url("/assets/images/case-admin-dashboard.jpg");
}

.case-visual-chart,
.case-visual-table {
  background-image: url("/assets/images/case-analytics.jpg");
}

.case-visual-bot,
.case-visual-notify {
  background-image: url("/assets/images/case-data-screen.jpg");
}

.case-visual-calls,
.case-visual-server {
  background-image: url("/assets/images/case-server.jpg");
}

.case-visual-shop,
.case-visual-parser,
.case-visual-legacy,
.case-visual-feed,
.case-visual-script {
  background-image: url("/assets/images/case-code-dashboard.png");
}

.case-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(47, 125, 50, .2);
  border-radius: 8px;
  background: #edf3e9;
}

.case-cta div {
  display: grid;
  gap: 4px;
}

.case-cta strong {
  font-size: 20px;
}

.case-cta span {
  color: var(--muted);
}

.reviews-section {
  padding-top: 42px;
}

.reviews-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.reviews-head .section-heading {
  margin-bottom: 0;
}

.review-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid rgba(47, 125, 50, .2);
  border-radius: 8px;
  text-decoration: none;
  background: #edf3e9;
  box-shadow: 0 10px 26px rgba(23, 32, 24, .06);
}

.review-profile:hover {
  border-color: rgba(47, 125, 50, .38);
  background: #e6f0e2;
}

.review-profile__score {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.review-profile strong,
.review-profile small {
  display: block;
}

.review-profile strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.review-profile small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.review-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 218px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 24, .06);
}

.review-card-featured {
  border-color: rgba(47, 125, 50, .28);
  background: linear-gradient(180deg, #ffffff, #edf3e9);
}

.review-card::before {
  content: "★★★★★";
  color: #f3b21b;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
}

.review-card__top {
  display: grid;
  gap: 4px;
}

.review-card__top strong {
  font-size: 18px;
  line-height: 1.15;
}

.review-card__top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-card p {
  margin: 0;
  color: #334037;
  font-size: 15px;
}

.reviews-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 32, 24, .08);
  border-radius: 8px;
  background: #fff;
}

.reviews-note span {
  color: var(--muted);
  font-weight: 750;
}

.reviews-note a {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-weight: 900;
  text-decoration: none;
}

.reviews-note a:hover {
  text-decoration: underline;
}

.process {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  counter-increment: steps;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.steps li::before {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: var(--green);
  content: counter(steps);
  font-weight: 900;
}

.steps strong,
.steps span {
  display: block;
}

.steps span {
  margin-top: 10px;
  color: var(--muted);
}

.fit-section {
  padding-top: 42px;
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.fit-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 24, .06);
}

.fit-card-muted {
  background: #f0f3ed;
}

.fit-card ul {
  display: grid;
  gap: 10px;
  padding-left: 19px;
  margin: 0;
  color: var(--muted);
}

.fit-card li::marker {
  color: var(--green);
}

.request-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr);
  gap: 38px;
  align-items: start;
}

.request-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfcfa;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(47, 125, 50, .18);
  border-color: var(--green);
}

input.is-invalid,
textarea.is-invalid,
.consent-field:has(input.is-invalid) {
  border-color: #b42318;
  background: #fff8f6;
}

input.is-invalid:focus,
textarea.is-invalid:focus {
  outline-color: rgba(180, 35, 24, .16);
  border-color: #b42318;
}

.field-hint,
.field-error {
  margin-top: -2px;
  font-size: 12px;
  line-height: 1.35;
}

.field-hint {
  color: #738071;
  font-weight: 650;
}

.field-error {
  display: none;
  color: #b42318;
  font-weight: 800;
}

.field-error:not(:empty) {
  display: block;
}

.consent-field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fbfcfa;
  font-size: 13px;
  line-height: 1.45;
}

.consent-field input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.consent-field a,
.site-footer a {
  color: var(--green-dark);
  font-weight: 800;
}

.consent-error {
  margin-top: -8px;
}

.button:disabled {
  cursor: wait;
  opacity: .64;
}

.hidden-field {
  display: none;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-note a {
  color: var(--green-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 28px clamp(18px, 4vw, 54px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

body.modal-open {
  overflow: hidden;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.image-modal.is-open {
  display: flex;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: zoom-out;
  background: rgba(10, 14, 11, .74);
  backdrop-filter: blur(10px);
}

.image-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: #101611;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}

.image-modal__dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  background: #0c110d;
}

.image-modal__dialog p {
  margin: 0;
  padding: 14px 18px;
  color: #fff;
  font-weight: 800;
}

.image-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  background: rgba(16, 22, 17, .72);
  font-size: 26px;
  line-height: 1;
}

@media (max-width: 900px) {
  .header-shell {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .header-link {
    display: none;
  }

  .hero,
  .split,
  .about-section,
  .reviews-head,
  .fit-grid,
  .request-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .cards,
  .reviews-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .case-carousel {
    grid-auto-columns: minmax(272px, 84vw);
  }

  .case-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .case-cta .button {
    width: 100%;
  }

  .reviews-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 8px 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-text small {
    display: none;
  }

  .header-action {
    min-height: 38px;
    padding: 9px 11px;
    font-size: 13px;
  }

  .hero,
  .section {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 40px;
  }
}
