:root {
  --ink: #12202f;
  --muted: #5f6b7a;
  --line: #dce3eb;
  --panel: #ffffff;
  --soft: #f4f7fa;
  --navy: #10263f;
  --blue: #1f73d2;
  --green: #148c6a;
  --amber: #d58b1f;
  --shadow: 0 18px 45px rgba(20, 35, 55, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  background: #fbfcfe;
}

body.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(220, 227, 235, 0.85);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.hero-actions,
.trust-strip,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
}

.main-nav {
  gap: 24px;
  color: #334358;
  font-size: 15px;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.header-action,
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 750;
}

.header-action {
  color: #fff;
  background: var(--navy);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.header-action:hover {
  background: #183a5f;
  box-shadow: 0 12px 26px rgba(16, 38, 63, 0.18);
}

.hero {
  position: relative;
  min-height: calc(100svh - 128px);
  display: grid;
  align-items: center;
  padding: clamp(52px, 8vw, 96px) clamp(18px, 4vw, 56px);
  overflow: hidden;
  color: #fff;
  background: var(--navy);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(11, 27, 45, 0.94) 0%, rgba(15, 38, 63, 0.84) 38%, rgba(15, 38, 63, 0.32) 72%, rgba(15, 38, 63, 0.18) 100%),
    linear-gradient(180deg, rgba(12, 29, 48, 0.1) 70%, #fbfcfe 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/bitrix-support-hero.png");
  background-position: center right;
  background-size: cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

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

.hero .eyebrow {
  color: #87e0c4;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.18;
}

.hero-text {
  max-width: 640px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
}

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

.button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.button:hover,
.header-action:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(31, 115, 210, 0.26);
}

.button.primary:hover {
  background: #195fb0;
  box-shadow: 0 18px 34px rgba(31, 115, 210, 0.32);
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 680px;
  margin: 0;
}

.hero-stats div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-stats dt {
  font-size: 28px;
  font-weight: 850;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.75);
}

.trust-strip {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.trust-strip span {
  padding: 8px 12px;
  color: #405167;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-size: 14px;
  font-weight: 650;
}

.section,
.contact-section,
.audit-band {
  padding: clamp(62px, 8vw, 108px) clamp(18px, 4vw, 56px);
}

.section-lead {
  max-width: 860px;
  margin-bottom: 34px;
}

.section-lead p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.problem-grid,
.service-list,
.plans-grid,
.case-grid {
  display: grid;
  gap: 18px;
}

.problem-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.problem-grid article,
.service-list article,
.plan,
.case-grid article,
.faq-list details,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(20, 35, 55, 0.06);
}

.problem-grid article,
.service-list article,
.case-grid article {
  padding: 24px;
}

.problem-grid article,
.service-list article,
.plan,
.case-grid article {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.problem-grid article:hover,
.service-list article:hover,
.plan:hover,
.case-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 115, 210, 0.34);
  box-shadow: 0 18px 42px rgba(20, 35, 55, 0.11);
}

.icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-weight: 900;
}

.service-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-list article {
  min-height: 260px;
  border-top: 4px solid var(--blue);
}

.audit-band {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: center;
  color: #fff;
  background: var(--navy);
}

.audit-band .eyebrow {
  color: #87e0c4;
}

.audit-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.audit-band ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-band li {
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-weight: 700;
}

.plans-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.plan {
  position: relative;
  padding: 28px;
  overflow: hidden;
}

.plan.featured {
  border-color: rgba(31, 115, 210, 0.52);
  box-shadow: var(--shadow);
}

.plan::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: var(--green);
}

.plan.featured::before {
  background: var(--blue);
}

.plan:nth-child(3)::before {
  background: var(--amber);
}

.plan-level {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
}

.badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.price {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.plan ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: #405167;
}

.process {
  background: var(--soft);
}

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

.steps li {
  padding: 24px 0 0;
  border-top: 2px solid var(--line);
}

.steps span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--amber);
  font-weight: 900;
}

.slider-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -58px 0 22px;
}

.slider-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 35, 55, 0.07);
  cursor: pointer;
  font: 900 28px/1 Inter, "Segoe UI", Arial, sans-serif;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.slider-button:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 115, 210, 0.42);
  background: var(--soft);
}

.slider-button:focus-visible {
  outline: 3px solid rgba(31, 115, 210, 0.18);
}

.case-grid {
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 115, 210, 0.42) transparent;
  padding: 2px 2px 16px;
}

.case-grid article {
  min-width: 0;
  scroll-snap-align: start;
}

.case-grid::-webkit-scrollbar {
  height: 8px;
}

.case-grid::-webkit-scrollbar-thumb {
  background: rgba(31, 115, 210, 0.35);
  border-radius: 999px;
}

.case-grid::-webkit-scrollbar-track {
  background: transparent;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.faq-list details {
  padding: 20px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list p {
  margin: 14px 0 0;
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
  gap: 34px;
  align-items: start;
  background: #fff;
}

.contact-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.contact-email a {
  color: var(--blue);
  font-weight: 800;
}

.contact-email a:hover {
  color: var(--green);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

label {
  display: grid;
  gap: 7px;
  color: #334358;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 115, 210, 0.15);
}

textarea {
  resize: vertical;
}

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

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: #e7edf5;
  background: #0d1c2e;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  .main-nav {
    display: none;
  }

  .service-list,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-grid {
    grid-auto-columns: calc((100% - 18px) / 2);
  }
}

@media (max-width: 780px) {
  .site-header {
    min-height: auto;
  }

  .header-action {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 110px);
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(11, 27, 45, 0.94) 0%, rgba(15, 38, 63, 0.86) 58%, rgba(15, 38, 63, 0.62) 100%),
      linear-gradient(180deg, rgba(12, 29, 48, 0.1) 70%, #fbfcfe 100%);
  }

  .hero-bg {
    opacity: 0.62;
    background-position: center;
  }

  .hero-stats,
  .problem-grid,
  .service-list,
  .plans-grid,
  .steps,
  .audit-band,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .slider-toolbar {
    justify-content: flex-start;
    margin: 0 0 18px;
  }

  .case-grid {
    grid-auto-columns: minmax(270px, 86%);
  }

  .service-list article {
    min-height: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .hero-text {
    font-size: 16px;
    margin-bottom: 22px;
  }

  .hero-stats div {
    padding: 12px;
  }

  .hero-stats dt {
    font-size: 23px;
  }

  .button {
    width: 100%;
  }

  .trust-strip {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  body.js-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
