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

:root {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --accent: #f26c2a;
  --accent-2: #2f6fed;
  --accent-soft: rgba(242, 108, 42, 0.12);
  --text: #101828;
  --text-muted: #5f667a;
  --border: #e5e7ef;
  --radius: 16px;
  --shadow-card: 0 4px 14px rgba(15, 23, 42, 0.07);
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #ffffff;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent);
}

.logo__mark {
  --logo-mark-color: var(--accent);
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background-color: var(--logo-mark-color);
  -webkit-mask: url("../img/logo-mark.png") center / contain no-repeat;
  mask: url("../img/logo-mark.png") center / contain no-repeat;
}

.logo--on-light .logo__mark {
  --logo-mark-color: #0f172a;
}

.logo__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.logo__title {
  font-size: 20px;
  line-height: 1.2;
}

.logo__tagline {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.2px;
  text-transform: none;
}

.logo--light span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #ffffff;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__phones {
  display: grid;
  gap: 2px;
}

.phone {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.phone--secondary {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  display: block;
}

.page section {
  padding: 80px 0;
}

.hero {
  padding: 100px 0 90px;
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--accent-2);
}

.hero__title {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 12px 0 16px;
  line-height: 1.15;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 18px;
}

.hero__actions {
  margin: 30px 0 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__panel span,
.hero__panel a {
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.hero__panel a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(242, 108, 42, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn--block {
  width: 100%;
}

.hero__visual {
  display: grid;
  gap: 16px;
}

.hero__highlight {
  background: #0f172a;
  color: #ffffff;
  padding: 24px;
  border-radius: var(--radius);
}

.highlight__label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px;
}

.highlight__grid {
  display: grid;
  gap: 16px;
}

.highlight__value {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.highlight__text {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.hero__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.hero__card h3 {
  margin: 0 0 8px;
}

.hero__tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__tags span,
.hero__tags a {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}

.hero__tags a:hover {
  background: var(--accent);
  color: #ffffff;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head--left {
  text-align: left;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 10px;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.award-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}

.award-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.12);
  color: var(--accent-2);
  font-size: 12px;
  margin-bottom: 12px;
}

.grid,
.card-row {
  display: grid;
  gap: 20px;
}

.card-row {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-fill {
  --cols: 4;
  --gap: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.grid-fill > * {
  flex: 1 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols) - 1px);
  min-width: 0;
}

.grid-fill--1 { --cols: 1; }
.grid-fill--2 { --cols: 2; }
.grid-fill--3 { --cols: 3; }
.grid-fill--4 { --cols: 4; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.hero__card,
.award-card,
.card,
.process__item,
.solution__text,
.solution__block,
.shots__item,
.feature,
.partner-card,
.form {
  box-shadow: var(--shadow-card);
}

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

.process__item {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.case__results {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
}

.case__results a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case__results a:hover {
  color: var(--accent);
}

.solution__back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent-2);
}

.solution__card {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.solution__inner h1 {
  margin: 0 0 20px;
  font-size: 32px;
  line-height: 1.25;
}

.solution__lead {
  margin: -8px 0 28px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 760px;
}

.solution__inner h2 {
  margin: 40px 0 18px;
  font-size: clamp(22px, 3vw, 28px);
}

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

.solution__inner .card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.solution__inner .card p {
  margin: 0;
  color: var(--text-muted);
}

.service-card__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.solution__text {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  overflow-wrap: anywhere;
}

.solution__text img,
.solution__text iframe,
.solution__text video {
  max-width: 100%;
  height: auto;
}

.solution__text table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.solution__empty {
  color: var(--text-muted);
}

.solution__cta {
  margin-top: 24px;
}

.solution__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.solution__stat {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: grid;
  gap: 4px;
}

.solution__stat b {
  font-size: 30px;
  line-height: 1.1;
  color: var(--accent);
}

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

.solution__checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.solution__checks li {
  position: relative;
  padding-left: 32px;
  line-height: 1.55;
  color: var(--text-muted);
}

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

.solution__checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.solution__verdict {
  margin-top: 40px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.solution__inner .solution__verdict h2 {
  margin: 0 0 12px;
}

.solution__verdict p {
  margin: 0;
  line-height: 1.6;
}

.solution__verdict p + p {
  margin-top: 10px;
  color: var(--text-muted);
}

.solution__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.solution__block {
  margin-top: 40px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
}

.solution__inner .solution__block h2 {
  margin: 0 0 12px;
}

.solution__block .solution__lead {
  margin: 0 0 24px;
  font-size: 17px;
}

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

.solution__more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.solution__more a {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.solution__more a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shots__item {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.shots__item a {
  display: block;
  background: var(--bg-soft);
  cursor: zoom-in;
}

.shots__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.shots.grid-fill--1 .shots__item img {
  width: auto;
  max-width: 100%;
  max-height: 640px;
  margin: 0 auto;
  aspect-ratio: auto;
}

.features {
  display: grid;
  gap: 24px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  align-items: center;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature--reverse {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature--reverse .feature__body {
  order: 2;
}

.feature__body h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
}

.feature__body p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.feature__points {
  grid-template-columns: 1fr;
  gap: 10px;
}

.feature__media {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.feature__media a {
  display: block;
  cursor: zoom-in;
}

.feature__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: top;
  transition: transform 0.3s ease;
}

.feature__media a:hover img {
  transform: scale(1.02);
}

.features__rest {
  margin-top: 24px;
}

.shots__item figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
  background: rgba(15, 23, 42, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  border-radius: 8px;
  background: #ffffff;
}

.lightbox__figure figcaption {
  margin-top: 12px;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__close {
  top: 12px;
  right: 12px;
}

.lightbox__prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.service-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-card h3 a::after {
  content: " →";
  color: var(--accent);
}

.service-card h3 a:hover {
  color: var(--accent);
}

.partners__slider {
  display: grid;
  gap: 18px;
}

.partners__page {
  display: grid;
  gap: 16px;
  align-items: stretch;
  justify-items: stretch;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, calc((100% - 48px) / 4));
}

.partners__page:not(.is-active) {
  display: none;
}

.partner-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: 150px;
  box-sizing: border-box;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.partner-card img {
  width: 100%;
  max-width: 160px;
  height: 60px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.partner-card__logo {
  font-weight: 600;
  color: var(--text-muted);
}

.partner-card__name {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.partners__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.partners__nav {
  border: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
}

.partners__dots {
  display: flex;
  gap: 6px;
}

.partners__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

.partners__dot.is-active {
  background: var(--accent);
}

.team__grid {
  --gap: 12px;
}

.team__grid .team-card__photo {
  max-height: 360px;
}

.team-card {
  width: 100%;
  max-width: none;
  border: none;
  background: transparent;
  padding: 0;
  text-align: center;
}

.team-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  margin-bottom: 16px;
  border: none;
  background: transparent;
}

.team-card h3 {
  margin: 0 0 6px;
}

.team-card span {
  margin-top: 0;
}
.team-card span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.contact__details {
  display: grid;
  gap: 16px;
}

.contact__details span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.contact__details a,
.contact__details p {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.contact__map {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
  display: block;
}

.form {
  background: var(--card);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.form label,
.consultant__form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.form input,
.form textarea,
.consultant__form input,
.consultant__form textarea {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
}

.form textarea,
.consultant__form textarea {
  resize: vertical;
}

.form input:focus,
.form textarea:focus,
.consultant__form input:focus,
.consultant__form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form .btn,
.consultant__form .btn {
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.form .btn:disabled,
.consultant__form .btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.form__note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.form__status {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0;
}

.form__status--success {
  color: #1a7f37;
  background: rgba(26, 127, 55, 0.12);
  border: 1px solid rgba(26, 127, 55, 0.25);
}

.form__status--error {
  color: #b42318;
  background: rgba(180, 35, 24, 0.12);
  border: 1px solid rgba(180, 35, 24, 0.25);
}

.consultant {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  font-family: inherit;
}

.consultant__toggle {
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(242, 108, 42, 0.25);
}

.scroll-nav {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consultant ~ .scroll-nav {
  bottom: 88px;
}

.scroll-nav[hidden] {
  display: none;
}

.scroll-nav__btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: opacity 0.2s, visibility 0.2s, background 0.2s, color 0.2s;
}

.scroll-nav__btn:hover,
.scroll-nav__btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  outline: none;
}

.scroll-nav__btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.scroll-nav__btn.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chat-locked .scroll-nav {
  display: none;
}

.consultant__panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  padding: 18px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  display: none;
}

.consultant.is-open .consultant__panel {
  display: block;
}

.consultant__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.consultant__title {
  font-weight: 600;
  margin: 0;
}

.consultant__close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.consultant__form {
  display: grid;
  gap: 14px;
}

.consultant__status {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
}

.consultant__status:empty {
  display: none;
}

.consultant__status--success {
  color: #1a7f37;
  background: rgba(26, 127, 55, 0.12);
  border: 1px solid rgba(26, 127, 55, 0.25);
}

.consultant__status--error {
  color: #b42318;
  background: rgba(180, 35, 24, 0.12);
  border: 1px solid rgba(180, 35, 24, 0.25);
}

.consultant__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.consultant__badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.consultant__badge[hidden] {
  display: none;
}

.consultant--chat .consultant__panel {
  width: 360px;
  height: 520px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  padding: 0;
  overflow: hidden;
  flex-direction: column;
}

.consultant--chat.is-open .consultant__panel {
  display: flex;
}

.chat__header {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.chat__presence {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.chat__presence::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #98a2b3;
  vertical-align: 1px;
}

.chat__presence--online::before {
  background: #12b76a;
}

.chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  overscroll-behavior: contain;
}

.chat__msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat__msg--operator {
  align-self: flex-start;
}

.chat__msg--visitor {
  align-self: flex-end;
  align-items: flex-end;
}

.chat__msg--system {
  align-self: center;
  max-width: 100%;
}

.chat__bubble {
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chat__msg--operator .chat__bubble {
  background: #ffffff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat__msg--visitor .chat__bubble {
  background: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat__msg--system .chat__bubble {
  padding: 6px 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.chat__msg.is-pending .chat__bubble {
  opacity: 0.6;
}

.chat__msg.is-failed .chat__bubble {
  background: #fde8e7;
  color: #b42318;
}

.chat__meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted);
}

.chat__msg.is-failed .chat__meta {
  color: #b42318;
}

.chat__meta:empty {
  display: none;
}

.chat__contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--accent-soft);
}

.chat__contacts[hidden] {
  display: none;
}

.chat__contacts-title,
.chat__contacts-actions {
  grid-column: 1 / -1;
}

.chat__contacts-title {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.chat__contacts input,
.chat__form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
}

.chat__contacts input:focus,
.chat__form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.chat__contacts-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat__contacts-actions .btn {
  padding: 7px 16px;
  font-size: 13px;
}

.chat__contacts input {
  padding: 7px 10px;
  font-size: 13px;
  min-width: 0;
}

@media (pointer: coarse) {
  .chat__form textarea,
  .chat__contacts input {
    font-size: 16px;
  }
}

.chat__link {
  border: none;
  background: none;
  padding: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.chat__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 4px;
  border-top: 1px solid var(--border);
}

.chat__form textarea {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  line-height: 1.4;
}

.chat__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chat__send {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat__send:disabled {
  opacity: 0.6;
  cursor: default;
}

.chat__note {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 11px;
}

.site-footer {
  background: #0f172a;
  color: #ffffff;
  padding: 50px 0 24px;
}

.site-footer a {
  color: inherit;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.footer__links {
  display: grid;
  align-content: start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: border-color 0.2s ease;
}

.link-item:hover {
  border-color: var(--accent);
}

.link-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.solution__inner .link-item__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.link-item__title a {
  color: inherit;
  text-decoration: none;
}

.link-item__title a:hover {
  color: var(--accent);
}

.solution__inner .link-item__text {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.link-item__go {
  flex-shrink: 0;
  white-space: nowrap;
}

.footer__contacts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.footer__phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.footer__comma {
  margin-right: 4px;
}

.footer__bottom {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

@media (max-width: 1000px) {
  .grid-fill--4 {
    --cols: 2;
  }
}

@media (max-width: 900px) {
  .solution__grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .feature,
  .feature--reverse {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .feature--reverse .feature__body {
    order: 0;
  }

  .grid-fill--3,
  .grid-fill--4 {
    --cols: 2;
  }

  .site-header {
    position: sticky;
  }

  .header__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 0;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    padding: 4px 10px;
    max-width: 100%;
    gap: 8px;
  }

  .logo__mark {
    width: 34px;
    height: 34px;
  }

  .logo__title {
    font-size: 18px;
  }

  .logo__tagline {
    font-size: 10px;
  }

  .header__actions {
    display: contents;
  }

  .header__phones {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
  }

  .phone,
  .phone--secondary {
    font-size: 13px;
    white-space: nowrap;
  }

  .burger {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    padding: 8px 4px;
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 14px 18px;
    flex-direction: column;
    display: none;
    z-index: 30;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
  }

  .nav.is-open {
    display: grid;
    gap: 10px;
  }

  .nav a {
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 0;
  }

  .nav a:hover {
    color: #ffffff;
  }

  .hero__grid {
    gap: 28px;
  }

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

  .partners__page--single,
  .partners__page--double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .page section {
    padding: 36px 0;
  }

  .link-item {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .link-item__go {
    white-space: normal;
    text-align: center;
  }

  .hero {
    padding: 20px 0 24px;
  }

  .hero__title {
    font-size: clamp(24px, 6vw, 32px);
    margin: 8px 0 12px;
  }

  .hero__actions {
    margin: 18px 0 12px;
  }

  .hero__panel {
    margin-top: 4px;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head--left {
    margin-bottom: 14px;
  }

  .section-head h2 {
    margin: 0 0 6px;
  }

  .card {
    padding: 16px;
  }

  .process__item {
    padding: 12px 14px;
  }

  .partner-card {
    height: 136px;
    padding: 14px;
  }

  .hero__highlight {
    padding: 18px;
  }

  .hero__card {
    padding: 16px;
  }

  .highlight__grid {
    gap: 12px;
  }

  .highlight__value {
    font-size: 22px;
  }

  .contact__details a {
    padding: 4px 0;
  }

  .case__results li {
    padding: 2px 0;
  }

  .solution__inner h1 {
    font-size: 24px;
  }

  .solution__lead {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .solution__grid-3 {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 56px 12px;
  }

  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .solution__inner h2 {
    margin-top: 28px;
  }

  .solution__text {
    padding: 16px;
  }

  .feature,
  .feature--reverse {
    padding: 16px;
  }

  .feature__body h3 {
    font-size: 19px;
  }

  .solution__cta {
    width: 100%;
  }

  .solution__stats {
    gap: 10px;
  }

  .solution__stat {
    padding: 14px;
  }

  .solution__stat b {
    font-size: 24px;
  }

  .solution__verdict,
  .solution__block {
    margin-top: 28px;
    padding: 18px 16px;
  }

  .solution__block .solution__lead {
    font-size: 16px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

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

  .grid-fill--2,
  .grid-fill--3,
  .grid-fill--4 {
    --cols: 1;
  }

  .partners__page--single,
  .partners__page--double {
    grid-template-columns: minmax(0, 300px);
  }

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

  .consultant {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .scroll-nav {
    right: 12px;
    bottom: 12px;
  }

  .consultant ~ .scroll-nav {
    bottom: 76px;
  }

  .scroll-nav__btn {
    width: 40px;
    height: 40px;
  }

  .consultant__panel {
    right: auto;
    left: 0;
    width: 100%;
  }

  .consultant__toggle {
    width: 100%;
    justify-content: center;
  }

  .chat-locked,
  .chat-locked body {
    overflow: hidden;
  }

  .consultant--chat .consultant__panel {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
    z-index: 60;
  }

  .chat__header {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .chat__msg {
    max-width: 90%;
  }

  .chat__note {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}
