/* ==================== DevIX ==================== */

:root {
  --dark: #000000;
  --dark-card: #130d22;
  --light: #f6f5f9;
  --white: #ffffff;
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --text: #0a0a0a;
  --muted: #57526a;
  --grey: #ebe9f0;
  --line: #e4e2ea;
  --radius: 4px;
  --header-h: 90px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 500;
}

/* ==================== PARTICLES CANVAS ==================== */

/* sits behind the page; dark blocks are transparent so the particles show through */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn--white {
  background: var(--white);
  border-color: var(--white);
  color: var(--dark);
}

@media (hover: hover) {
  .btn--white:hover {
    background: transparent;
    color: var(--white);
  }
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

@media (hover: hover) {
  .btn--accent:hover {
    background: transparent;
    color: var(--accent);
  }
}

.btn--outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

@media (hover: hover) {
  .btn--outline:hover {
    background: var(--accent);
    color: var(--white);
  }
}

.btn--outline-white {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

@media (hover: hover) {
  .btn--outline-white:hover {
    background: var(--white);
    color: var(--dark);
  }
}

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

.btn--hero {
  min-width: 280px;
}

.btn--sm {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.link {
  color: var(--accent);
  font-weight: 500;
  transition: opacity .2s ease;
}

.link:hover {
  opacity: .7;
}

/* ==================== HEADER ==================== */

.header {
  position: relative;
  z-index: 50;
  height: var(--header-h);
}

.header--dark {
  color: var(--white);
}

.header--light {
  background: var(--light);
  color: var(--text);
}

.header__inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo img {
  height: 88px;
  width: auto;
  margin: -22px;
}

.logo__name {
  padding-left: 14px;
  border-left: 1px solid currentColor;
  font-size: 16px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: .28em;
}

.header--light .logo img {
  filter: brightness(0);
}

.header__menu {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 24px;
  min-width: 0;
  margin-left: 24px;
}

/* the nav sits in the middle of the space between the logo and the right block,
   so the gaps on both sides stay equal as items are added */
.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 30px;
  white-space: nowrap;
}

/* the row tightens as top-level items are added; it holds up to 8,
   beyond that group items into a dropdown like "Услуги" */
@media (min-width: 1200px) {
  .nav:has(> :nth-child(6)) {
    gap: 30px;
  }

  .nav:has(> :nth-child(7)) {
    gap: 24px;
    font-size: 16px;
  }

  .nav:has(> :nth-child(8)) {
    gap: 18px;
  }
}

.nav a,
.nav__toggle {
  transition: opacity .2s ease;
}

.nav a:hover,
.nav__toggle:hover {
  opacity: .65;
}

.nav a.active {
  font-weight: 500;
}

.nav__drop {
  position: relative;
}

.nav__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
}

.nav__toggle::after {
  content: '';
  border: 3px solid transparent;
  border-top: 4px solid currentColor;
  border-bottom: 0;
}

.nav__sub {
  position: absolute;
  top: 100%;
  left: -20px;
  display: none;
  min-width: 270px;
  padding: 10px 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .16);
  color: var(--text);
  font-size: 16px;
}

.nav__sub a {
  display: block;
  padding: 8px 20px;
}

@media (min-width: 1200px) {
  .nav__drop:hover .nav__sub,
  .nav__drop:focus-within .nav__sub {
    display: block;
  }
}

.header__right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
}

.header .btn {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
}

.lang {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(10, 10, 10, .18);
  border-radius: var(--radius);
}

.header--dark .lang {
  border-color: rgba(255, 255, 255, .28);
}

.lang-selector-btn {
  height: 46px;
  padding: 0 12px;
  background: none;
  border: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  opacity: .55;
  transition: opacity .2s ease, background-color .2s ease;
}

.lang-selector-btn:hover {
  opacity: 1;
}

.lang-selector-btn.lang-btn-active {
  background: rgba(10, 10, 10, .08);
  opacity: 1;
}

.header--dark .lang-selector-btn.lang-btn-active {
  background: rgba(255, 255, 255, .16);
}

.header__cta {
  display: none;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 8px;
  background: none;
  border: 0;
}

.burger span {
  display: block;
  height: 3px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.header.is-open .burger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.header.is-open .burger span:nth-child(2) {
  opacity: 0;
}

.header.is-open .burger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==================== HERO ==================== */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero--dark {
  min-height: 660px;
  padding: 150px 0 166px;
  color: var(--white);
}

.hero--light {
  padding: 120px 0 130px;
  background: var(--light);
  border-bottom: 1px solid var(--line);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 72px;
  line-height: 1;
}

.hero__subtitle {
  max-width: 760px;
  margin: 30px auto 0;
  font-size: 20px;
  line-height: 30px;
}

.hero--light .hero__subtitle {
  max-width: 520px;
}

.hero__stats {
  max-width: 900px;
  margin: 50px auto 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.hero--light::before,
.hero--light::after {
  content: '';
  position: absolute;
  bottom: 60px;
  width: 300px;
  height: 230px;
  background: linear-gradient(135deg, #ffffff 0%, #e8e5ef 100%);
  opacity: .9;
}

.hero--light::before {
  left: calc(50% - 760px);
  clip-path: polygon(0 45%, 38% 0, 38% 55%, 76% 10%, 100% 62%, 62% 100%, 62% 48%, 24% 92%);
}

.hero--light::after {
  left: calc(50% + 460px);
  bottom: 110px;
  clip-path: polygon(0 62%, 30% 20%, 30% 68%, 68% 0, 100% 30%, 62% 100%, 62% 50%, 24% 100%);
}

/* ==================== SECTIONS ==================== */

/* light blocks overlap the previous one by 1px so the dark page background
   never shows through as a hairline between them at fractional zoom levels */
.section {
  margin-top: -1px;
  padding: 1px 0 80px;
  background: var(--light);
}

.section--white {
  background: var(--white);
}

.section--dark {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  color: var(--white);
}

.heading {
  padding: 75px 0 30px;
}

.heading h1,
.heading h2,
.how__title {
  max-width: 760px;
  font-size: 46px;
  line-height: 51px;
}

.heading p {
  max-width: 760px;
  margin-top: 15px;
  font-size: 20px;
  line-height: 30px;
}

.heading--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.heading--page {
  padding-top: 60px;
}

.heading--tight {
  padding-top: 0;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
}

.more-link:hover {
  opacity: .7;
}

/* ==================== SERVICES GRID ==================== */

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 24px;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
  .service:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(124, 58, 237, .14);
  }
}

.service:nth-child(3n + 2)::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: 170px;
  height: 230px;
  background: linear-gradient(200deg, #f2f0f6 0%, #ffffff 80%);
  clip-path: polygon(45% 0, 100% 18%, 100% 100%, 0 100%);
  pointer-events: none;
}

.service > * {
  position: relative;
  z-index: 1;
}

.service__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.service h3 {
  margin-top: 20px;
  font-size: 20px;
  line-height: 25px;
}

.service p {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}

.service .link {
  margin-top: auto;
  font-size: 15px;
  line-height: 22px;
}

/* ==================== HOW WE WORK ==================== */

.how {
  display: grid;
  grid-template-columns: 1fr 660px;
  gap: 40px;
}

.how__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.how__card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: var(--dark-card);
  border-radius: var(--radius);
}

.how__card h3 {
  font-size: 24px;
  line-height: 26px;
}

.how__card p {
  max-width: 460px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 21px;
  opacity: .8;
}

.how__art {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 150px;
  height: 150px;
  transform: translateY(-42%);
  filter: drop-shadow(0 0 24px rgba(139, 92, 246, .9));
}

.how__card--team {
  display: grid;
  grid-template-columns: 292px 1fr;
  gap: 0 20px;
}

.how__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.chip--accent {
  background: var(--accent);
  border-color: var(--accent);
}

.how__stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.how__stat b {
  display: block;
  font-size: 24px;
  font-weight: 500;
  line-height: 26px;
}

.how__stat span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 21px;
  opacity: .8;
}

.how__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px 20px;
  background: var(--accent);
  border-radius: var(--radius);
  font-size: 22px;
  font-weight: 500;
  line-height: 26px;
}

.how__bar .icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

/* ==================== PROJECT CARDS ==================== */

.project {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 40px;
  min-height: 470px;
  margin-bottom: 30px;
  padding: 60px;
  background: var(--white);
  border-radius: var(--radius);
}

.project--light {
  margin-bottom: 0;
  background: var(--light);
}

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

.project h3 {
  font-size: 36px;
  line-height: 43px;
}

.project p {
  margin: 15px 0 30px;
  font-size: 20px;
  line-height: 30px;
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 30px;
}

.project__stack span {
  padding: 4px 12px;
  background: var(--light);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.project .btn {
  min-width: 240px;
  margin-top: auto;
}

.project__image {
  width: 100%;
  height: 350px;
  background: #f2f2f2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top center;
}

.project__tag {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  background: var(--grey);
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 500;
}

/* ==================== CASE COVER ==================== */

/* shown instead of a screenshot: black card with the case title and the DevIX logo;
   sizes follow the cover's own width, so it works in cards and on the case page */
.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
  text-align: center;
  container-type: inline-size;
}

.cover__title {
  padding: 0 6cqw;
  font-size: 5cqw;
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.cover__brand {
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  margin-top: 9cqw;
  font-size: 3.4cqw;
  font-weight: 500;
  letter-spacing: .28em;
}

/* the logo artwork fills only the middle half of its canvas */
.cover__brand img {
  height: 16cqw;
  width: auto;
  margin: -4cqw;
}

.cover__brand span {
  padding-left: 2.4cqw;
  border-left: 1px solid currentColor;
  line-height: 6cqw;
}

.case__image.cover {
  aspect-ratio: 16 / 9;
}

/* ==================== CASE PAGE ==================== */

.case {
  max-width: 1000px;
}

.case__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

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

.case h1 {
  max-width: 760px;
  margin: 20px 0 40px;
  font-size: 46px;
  line-height: 51px;
}

.case__image {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.case__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}

.case__meta h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 31px;
}

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

.case__stack span {
  padding: 8px 16px;
  border: 1px solid var(--text);
  border-radius: 100px;
  font-size: 14px;
  line-height: 20px;
}

.case__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.case__stack + .case__facts {
  margin-top: 30px;
}

/* links from a case to the services it illustrates */
.case__services {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 30px;
}

.case__section {
  padding-top: 60px;
}

.case__section h2 {
  margin-bottom: 30px;
  font-size: 46px;
  line-height: 51px;
}

.case__section p {
  margin-bottom: 15px;
}

.case__section .bullets li {
  padding-left: 20px;
  font-size: 18px;
  line-height: 27px;
}

.case__section .bullets li::before {
  top: 12px;
  left: 4px;
}

/* ==================== CARDS (advantages, steps, stack) ==================== */

.cards {
  display: grid;
  gap: 20px;
}

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

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

.cards--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
}

.section--white .card {
  background: var(--light);
}

.section--white .card--outline {
  background: var(--white);
  border: 1px solid var(--line);
}

.card__icon,
.card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 30px;
  border-radius: 50%;
}

.card__icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.card__num {
  background: var(--accent);
  color: var(--white);
  font-size: 20px;
  font-weight: 500;
}

.card h3 {
  font-size: 24px;
  line-height: 31px;
}

.card p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 24px;
}

.card--stat b {
  display: block;
  color: var(--accent);
  font-size: 46px;
  font-weight: 500;
  line-height: 51px;
}

.card--stat span {
  display: block;
  margin-top: 10px;
}

.card--stat h3 {
  margin-top: 10px;
}

.bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 16px;
  line-height: 26px;
}

.bullets li::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 2px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.card .bullets {
  margin-top: 16px;
}

/* ==================== ROWS (service types) ==================== */

.row-card {
  position: relative;
  margin-bottom: 20px;
  padding: 30px 200px 30px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.row-card h3 {
  font-size: 24px;
  line-height: 31px;
}

.row-card p {
  max-width: 760px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 24px;
}

.row-card .bullets {
  columns: 2;
  column-gap: 40px;
  margin-top: 16px;
}

.row-card--solid {
  background: var(--white);
  border-color: transparent;
}

.row-card__icon {
  position: absolute;
  top: 50%;
  right: 40px;
  width: 110px;
  height: 110px;
  padding: 26px;
  transform: translateY(-50%);
  background: var(--accent);
  border-radius: 28px;
  color: var(--white);
  stroke-width: 1.6;
}

/* ==================== PRICE ==================== */

.price {
  display: grid;
  grid-template-columns: 1fr 660px;
  gap: 40px;
  margin-bottom: 30px;
}

.price__text h2 {
  font-size: 46px;
  line-height: 51px;
}

.price__text p {
  max-width: 440px;
  margin-top: 15px;
}

.price__value {
  font-size: 36px;
  font-weight: 500;
  line-height: 43px;
}

.price__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 21px;
}

.price__row b {
  font-weight: 600;
}

/* ==================== PROJECT EXAMPLES ==================== */

.example {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.example__image {
  width: 100%;
  height: 200px;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  object-position: top center;
}

.example__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.example h3 {
  font-size: 20px;
  line-height: 26px;
}

.example p {
  margin: 10px 0 20px;
  font-size: 14px;
  line-height: 22px;
}

.example .link {
  margin-top: auto;
  font-size: 15px;
}

.example:hover .link {
  opacity: .7;
}

/* ==================== DEMO PAGE ==================== */

/* demo projects as tiles: preview on top, then what it is and what to try */
.demos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.demo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
}

.demo__shot {
  position: relative;
  display: block;
  border-bottom: 1px solid var(--line);
}

.demo__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  object-position: top center;
  transition: opacity .2s ease;
}

.demo__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  background: var(--dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}

.demo__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
}

.demo h2 {
  font-size: 28px;
  line-height: 34px;
}

.demo p {
  margin: 12px 0 16px;
  font-size: 18px;
  line-height: 28px;
}

.demo .bullets {
  margin-bottom: 26px;
  color: var(--muted);
}

.demo .btn {
  min-width: 240px;
  margin-top: auto;
}

@media (hover: hover) {
  .demo__shot:hover img {
    opacity: .85;
  }
}

/* home page: the same demos as a compact row right under the first screen */
.section--strip {
  padding-bottom: 0;
}

.heading--mini {
  padding: 50px 0 24px;
}

.heading--mini h2 {
  font-size: 32px;
  line-height: 40px;
}

/* all demos in one row, however many there are */
.demo-strip {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 20px;
}

.demo-mini {
  display: block;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
}

.demo-mini img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 7;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  object-position: top center;
  transition: opacity .2s ease;
}

.demo-mini__body {
  display: block;
  padding: 14px 16px 16px;
}

.demo-mini b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.demo-mini__body span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

@media (hover: hover) {
  .demo-mini:hover img {
    opacity: .85;
  }

  .demo-mini:hover b {
    color: var(--accent);
  }
}

/* ==================== BANNER ==================== */

.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 155px;
  margin-top: 60px;
  padding: 40px;
  overflow: hidden;
  background: var(--dark);
  border-radius: var(--radius);
  color: var(--white);
}

.banner--tight {
  margin-top: 20px;
}

.banner h2 {
  font-size: 30px;
  line-height: 36px;
}

.banner p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 24px;
  opacity: .9;
}

.banner__text,
.banner__actions {
  position: relative;
  z-index: 1;
}

.banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
}

.banner__actions .btn {
  min-width: 240px;
}

/* ==================== FAQ ==================== */

.faq-item {
  margin-bottom: 20px;
  background: var(--white);
  border-radius: var(--radius);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  padding: 25px 30px;
  background: none;
  border: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 31px;
  text-align: left;
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform .25s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  background: var(--white);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  max-width: 860px;
  padding: 0 30px 30px;
  font-size: 18px;
  line-height: 27px;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==================== CALCULATOR ==================== */

.calc {
  display: grid;
  grid-template-columns: 1fr 400px;
  align-items: start;
  gap: 20px;
}

.calc__section {
  margin-bottom: 20px;
}

.calc__section h3 {
  margin-bottom: 24px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

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

.option.selected {
  background: #f5f3ff;
  border-color: var(--accent);
}

.option input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
}

.option-desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.option-price {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.range-input {
  width: 100%;
  height: 4px;
  background: var(--grey);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-input::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.range-value {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.range-current {
  color: var(--text);
  font-weight: 500;
}

.summary {
  position: sticky;
  top: 20px;
}

.summary h3 {
  margin-bottom: 10px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 21px;
}

.price-item-label {
  color: var(--muted);
}

.price-item-value {
  font-weight: 500;
  text-align: right;
}

.total-label {
  margin-top: 24px;
  font-size: 16px;
}

.total-amount {
  margin: 4px 0 24px;
  font-size: 46px;
  font-weight: 500;
  line-height: 51px;
}

.summary .price-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

/* total that stays at the bottom of the screen until the summary itself is in view */
.calc-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
  transition: transform .25s ease;
}

.calc-bar.is-hidden {
  transform: translateY(110%);
}

.calc-bar__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.calc-bar__amount {
  display: block;
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
}

.calc-bar .btn {
  height: 44px;
  font-size: 15px;
}

/* ==================== CONTACTS PAGE ==================== */

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

.info__row {
  display: grid;
  grid-template-columns: 360px 1fr;
  padding: 20px 0 50px;
}

.info__row h2 {
  font-size: 24px;
  line-height: 28px;
}

.info__row a {
  display: block;
  width: fit-content;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 27px;
  transition: color .2s ease;
}

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

/* ==================== CONTACT BLOCK ==================== */

.contact {
  padding-top: 80px;
}

.contact__card {
  display: grid;
  grid-template-columns: 1fr 520px;
  align-items: center;
  gap: 40px;
  padding: 60px 40px;
  background: var(--accent);
  border-radius: var(--radius);
  color: var(--white);
}

.contact__text h2 {
  max-width: 520px;
  font-size: 46px;
  line-height: 51px;
}

.contact__text p {
  max-width: 480px;
  margin-top: 15px;
  font-size: 20px;
  line-height: 30px;
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius);
}

.contact__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, .16);
  border-radius: 50%;
}

.contact__info {
  flex: 1;
  min-width: 0;
}

.contact__info span {
  display: block;
  font-size: 14px;
  line-height: 20px;
  opacity: .75;
}

.contact__info b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.contact__item .btn {
  min-width: 160px;
  color: var(--accent);
}

@media (hover: hover) {
  .contact__item .btn:hover {
    color: var(--white);
  }
}

/* ==================== FOOTER ==================== */

.footer {
  padding: 80px 0 60px;
  color: var(--white);
}

.footer__cols {
  display: grid;
  grid-template-columns: 400px 300px 1fr;
}

.footer__title {
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 28px;
  opacity: .6;
}

.footer__col a {
  display: block;
  width: fit-content;
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 27px;
  transition: opacity .2s ease;
}

.footer__col a:hover {
  opacity: .6;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 24px;
  width: fit-content;
  margin-top: 40px;
}

.footer__logo img {
  height: 160px;
  width: auto;
  margin: -40px;
}

.footer__logo span {
  padding-left: 24px;
  border-left: 2px solid var(--white);
  font-size: 30px;
  font-weight: 500;
  line-height: 56px;
  letter-spacing: .28em;
}

.footer__bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 50px;
  padding-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
  line-height: 20px;
}

.footer__bottom span {
  opacity: .3;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1199px) {
  :root {
    --header-h: 72px;
  }

  html {
    scroll-padding-top: calc(var(--header-h) + 12px);
  }

  body.menu-open {
    overflow: hidden;
  }

  /* the header stays on screen, so the menu and the contact button are always one tap away */
  .header {
    position: sticky;
    top: 0;
  }

  .header--dark {
    background: var(--dark);
  }

  .header__menu {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    margin-left: 0;
    padding: 4px 20px calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .header--dark .header__menu {
    background: var(--dark);
  }

  .header--light .header__menu {
    background: var(--light);
  }

  .header.is-open .header__menu {
    display: flex;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    font-size: 20px;
    white-space: normal;
  }

  .nav > a,
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    font-size: inherit;
    text-align: left;
  }

  /* "Услуги" opens and closes on tap */
  .nav__toggle::after {
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
  }

  .nav__drop.is-open .nav__toggle::after {
    transform: rotate(-135deg);
  }

  .nav__sub {
    position: static;
    min-width: 0;
    padding: 6px 0 10px 16px;
    background: none;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    font-size: 17px;
  }

  .nav__drop.is-open .nav__sub {
    display: block;
  }

  .nav__sub a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    opacity: .85;
  }

  .header__right .btn {
    display: none;
  }

  .lang-selector-btn {
    min-width: 52px;
  }

  .header__cta {
    display: inline-flex;
    height: 40px;
    margin-left: auto;
    padding: 0 16px;
    font-size: 14px;
  }

  .header .header__cta {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  .burger {
    display: flex;
    margin-left: 8px;
  }

  .hero h1 {
    font-size: 56px;
  }

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

  .service {
    min-height: 250px;
  }

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

  .project {
    grid-template-columns: 1fr 1fr;
    padding: 60px 40px 40px;
  }

  .project h3 {
    font-size: 30px;
    line-height: 36px;
  }

  .cards--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc,
  .price {
    grid-template-columns: 1fr;
  }

  .calc-bar {
    display: flex;
  }

  .summary {
    position: static;
  }

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

  .contact__text h2 {
    font-size: 36px;
    line-height: 42px;
  }

  .footer__cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

}

@media (max-width: 767px) {
  .container {
    padding: 0 12px;
  }

  .btn {
    font-size: 16px;
  }

  :root {
    --header-h: 64px;
  }

  .logo {
    gap: 10px;
  }

  .logo img {
    height: 72px;
    margin: -18px;
  }

  .logo__name {
    padding-left: 10px;
    font-size: 14px;
  }

  .header__menu {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero--dark {
    min-height: 0;
    padding: 48px 0 56px;
  }

  .hero--light {
    padding: 44px 0 52px;
  }

  .hero--light::before,
  .hero--light::after {
    display: none;
  }

  .hero h1 {
    font-size: 32px;
    line-height: 1.1;
  }

  .hero__subtitle {
    margin-top: 16px;
    font-size: 16px;
    line-height: 24px;
  }

  .hero__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
  }

  /* three figures in one row instead of three tall cards */
  .hero__stats.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 32px;
  }

  .hero__stats .card {
    padding: 14px 4px;
  }

  .hero__stats .card--stat b {
    font-size: clamp(20px, 6.4vw, 24px);
    line-height: 28px;
    white-space: nowrap;
  }

  .hero__stats .card--stat span,
  .how__stat span {
    hyphens: auto;
    overflow-wrap: anywhere;
  }

  .hero__stats .card--stat span {
    margin-top: 6px;
    font-size: 12px;
    line-height: 16px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .section {
    padding-bottom: 50px;
  }

  .section--dark {
    padding: 50px 0;
  }

  .heading {
    padding: 50px 0 24px;
  }

  .heading h1,
  .heading h2,
  .how__title,
  .contact__text h2 {
    font-size: 30px;
    line-height: 34px;
  }

  .heading p {
    font-size: 16px;
    line-height: 24px;
  }

  .heading--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .more-link {
    min-height: 44px;
  }

  /* compact service cards: number next to the title, the whole text in view */
  .services {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
  }

  .service {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    column-gap: 14px;
    min-height: 0;
    padding: 16px;
  }

  .service h3 {
    margin-top: 0;
    font-size: 18px;
    line-height: 23px;
  }

  .service p {
    grid-column: 1 / -1;
    margin: 12px 0 4px;
    font-size: 14px;
    line-height: 21px;
  }

  .service .link {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    min-height: 40px;
    font-size: 15px;
  }

  .how {
    gap: 24px;
  }

  .how__card {
    padding: 17px;
  }

  .how__card h3 {
    font-size: 20px;
    line-height: 24px;
  }

  .how__card--art {
    padding-top: 80px;
  }

  .how__art {
    top: 6px;
    width: 90px;
    height: 90px;
    transform: none;
  }

  .how__card--team {
    grid-template-columns: 1fr;
    gap: 20px 0;
  }

  .how__chips {
    justify-content: flex-start;
  }

  .how__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
  }

  .how__stat b {
    font-size: 20px;
    line-height: 24px;
  }

  .how__stat span {
    font-size: 12px;
    line-height: 16px;
  }

  .how__bar {
    font-size: 18px;
    line-height: 22px;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    margin-bottom: 24px;
    padding: 70px 17px 17px;
  }

  .project h3 {
    font-size: 24px;
    line-height: 29px;
  }

  .project p {
    margin: 10px 0 20px;
    font-size: 16px;
    line-height: 24px;
  }

  .project__stack {
    margin: -6px 0 20px;
  }

  .project .btn {
    width: 100%;
    min-width: 0;
  }

  .project__image {
    height: 200px;
    order: -1;
  }

  .project__tag {
    top: 15px;
    right: auto;
    left: 17px;
    font-size: 16px;
  }

  .demos {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .heading--mini {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 30px 0 16px;
  }

  .heading--mini h2 {
    font-size: 22px;
    line-height: 28px;
  }

  /* the row scrolls sideways and runs to the screen edges */
  .demo-strip {
    display: flex;
    gap: 12px;
    margin: 0 -12px;
    padding: 0 12px;
    overflow-x: auto;
    scroll-padding: 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .demo-strip::-webkit-scrollbar {
    display: none;
  }

  .demo-mini {
    flex: none;
    width: 62vw;
    max-width: 260px;
    scroll-snap-align: start;
  }

  .demo-mini b {
    font-size: 16px;
    line-height: 22px;
  }

  .demo-mini__body {
    padding: 10px 12px 12px;
  }

  .demo-mini__body span {
    font-size: 13px;
    line-height: 18px;
  }

  .demo__tag {
    top: 12px;
    left: 12px;
    font-size: 14px;
  }

  .demo__body {
    padding: 17px;
  }

  .demo h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .demo p {
    margin: 8px 0 12px;
    font-size: 16px;
    line-height: 24px;
  }

  .demo .bullets {
    margin-bottom: 20px;
  }

  .demo .btn {
    width: 100%;
    min-width: 0;
  }

  .cards--2,
  .cards--3,
  .cards--4 {
    grid-template-columns: 1fr;
  }

  .cards {
    gap: 12px;
  }

  .card {
    padding: 16px;
  }

  /* icon or step number sits beside the text, so a card takes half the height */
  .card:has(> .card__icon),
  .card:has(> .card__num) {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
  }

  .card__icon,
  .card__num {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }

  .card:has(> .card__icon) h3,
  .card:has(> .card__num) h3 {
    align-self: center;
  }

  .card:has(> .card__icon) p,
  .card:has(> .card__num) p {
    grid-column: 2;
    margin-top: 6px;
  }

  .card h3,
  .row-card h3 {
    font-size: 18px;
    line-height: 24px;
  }

  .card p,
  .row-card p {
    font-size: 15px;
    line-height: 22px;
  }

  .card--stat b {
    font-size: 36px;
    line-height: 40px;
  }

  .row-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    column-gap: 14px;
    margin-bottom: 12px;
    padding: 16px;
  }

  .row-card p,
  .row-card .bullets,
  .row-card .link {
    grid-column: 1 / -1;
  }

  .row-card .bullets {
    columns: 1;
  }

  .case h1,
  .case__section h2 {
    font-size: 30px;
    line-height: 34px;
  }

  .case h1 {
    margin-bottom: 24px;
  }

  .case__meta {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    padding-bottom: 40px;
  }

  .case__meta h3 {
    font-size: 20px;
    line-height: 26px;
  }

  .case__section {
    padding-top: 40px;
  }

  .case__section h2 {
    margin-bottom: 20px;
  }

  .case__section p,
  .case__section .bullets li {
    font-size: 16px;
    line-height: 24px;
  }

  .price {
    gap: 20px;
    margin-bottom: 20px;
  }

  .price__text h2 {
    font-size: 30px;
    line-height: 34px;
  }

  .price__value {
    font-size: 30px;
    line-height: 36px;
  }

  .price__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .row-card__icon {
    position: static;
    width: 48px;
    height: 48px;
    padding: 12px;
    transform: none;
    border-radius: 12px;
  }

  .banner {
    flex-direction: column;
    align-items: stretch;
    margin-top: 40px;
    padding: 24px 17px;
  }

  .banner--tight {
    margin-top: 24px;
  }

  .banner h2 {
    font-size: 24px;
    line-height: 29px;
  }

  .banner__actions {
    flex-direction: column;
  }

  .banner__actions .btn {
    min-width: 0;
  }

  .faq-item {
    margin-bottom: 12px;
  }

  .faq-question {
    gap: 16px;
    padding: 18px 17px;
    font-size: 18px;
    line-height: 24px;
  }

  .faq-answer {
    padding: 0 17px 20px;
    font-size: 16px;
    line-height: 24px;
  }

  .option {
    flex-wrap: wrap;
    padding: 14px;
  }

  .calc-bar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .option-title {
    font-size: 16px;
  }

  .option-price {
    width: 100%;
    padding-left: 34px;
  }

  .total-amount {
    font-size: 36px;
    line-height: 40px;
  }

  .info__row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: 30px;
  }

  .info__row h2 {
    font-size: 20px;
    line-height: 24px;
  }

  .info__row a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0;
    font-size: 16px;
  }

  .contact {
    padding-top: 50px;
  }

  .contact__card {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 24px 17px;
  }

  .contact__text p {
    font-size: 16px;
    line-height: 24px;
  }

  .contact__item {
    flex-wrap: wrap;
    padding: 17px;
  }

  .contact__item .btn {
    width: 100%;
  }

  .footer {
    padding: 50px 0 40px;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer__title,
  .footer__col a {
    font-size: 16px;
  }

  .footer__col a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0;
  }

  .footer__title {
    margin-bottom: 4px;
  }

  .footer__logo img {
    height: 112px;
    margin: -28px;
  }

  .footer__logo span {
    font-size: 22px;
    line-height: 40px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    margin-top: 30px;
    padding-top: 30px;
  }
}
