:root {
  --bg: #090a0a;
  --bg-soft: #111313;
  --panel: #151717;
  --panel-strong: #1d1f1f;
  --text: #f2f2f2;
  --muted: #a6a8a8;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --accent: #d7d7d7;
  --accent-red: #9d2929;
  --shadow: rgba(0, 0, 0, 0.5);
  --heading: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 28rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 132px),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 12px, 12px 100%;
  opacity: 0.22;
}

body.dialog-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 40px, 1140px);
  margin-inline: auto;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 142px 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(100% - 40px, 1140px);
  margin: 18px auto 0;
}

.brand {
  display: inline-flex;
  width: 118px;
  height: 118px;
  align-items: center;
  justify-content: center;
}

.brand img {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 18px;
}

.footer-brand img {
  width: 90px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 4vw, 58px);
}

.main-nav a,
.header-action,
.button,
.tab,
.footer-nav a,
.footer-contact a {
  font-family: var(--heading);
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.main-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-action {
  display: inline-flex;
  min-width: 138px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.header-action:hover,
.header-action:focus-visible {
  background: #fff;
  color: #080909;
  border-color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

.hero {
  position: relative;
  min-height: clamp(680px, 82vh, 860px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #070808;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58)),
    repeating-linear-gradient(90deg, transparent 0 87px, rgba(255, 255, 255, 0.04) 88px, transparent 89px);
}

.hero__media {
  position: absolute;
  inset: 0;
  opacity: 0.98;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(0.08) contrast(1.08) brightness(0.98);
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.88) 0%, rgba(7, 8, 8, 0.64) 30%, rgba(7, 8, 8, 0.06) 68%, rgba(7, 8, 8, 0.08) 100%),
    linear-gradient(0deg, rgba(7, 8, 8, 0.68) 0%, rgba(7, 8, 8, 0.02) 42%, rgba(7, 8, 8, 0.06) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: clamp(680px, 82vh, 860px);
  flex-direction: column;
  justify-content: center;
  padding-top: 118px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  border-left: 2px solid var(--accent-red);
  padding-left: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--heading);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 520px;
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 600;
}

.hero__lead {
  max-width: 390px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  padding: 0 25px;
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: rgba(255, 255, 255, 0.94);
  color: #090a0a;
  border-color: rgba(255, 255, 255, 0.94);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #fff;
  border-color: #fff;
}

.button--hero {
  background: rgba(0, 0, 0, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.76);
}

.button--hero:hover,
.button--hero:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.95);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.9);
}

.button--small {
  min-height: 34px;
  padding-inline: 18px;
  font-size: 13px;
}

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

.section {
  padding: 34px 0 44px;
  border-bottom: 1px solid var(--line-soft);
}

.section--grain,
.section--reviews {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--bg-soft);
}

.section--compact {
  padding: 24px 0;
  background: #0d0e0f;
}

#services {
  background:
    linear-gradient(180deg, rgba(8, 9, 9, 0.42), rgba(8, 9, 9, 0.76)),
    url("./assets/bg-services-final.png") center / cover no-repeat,
    var(--bg-soft);
}

.section--compact {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.82)),
    url("./assets/bg-why-final.png") center / cover no-repeat,
    #050606;
}

#portfolio {
  background:
    linear-gradient(180deg, rgba(8, 9, 9, 0.44), rgba(8, 9, 9, 0.78)),
    url("./assets/bg-portfolio-final.png") center / cover no-repeat,
    var(--bg-soft);
}

#reviews {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.84)),
    url("./assets/bg-reviews-final.png") center / cover no-repeat,
    #050606;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading--center {
  justify-content: center;
  text-align: center;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 600;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.service-card {
  min-height: 180px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 22px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(0, 0, 0, 0.18);
}

.service-card svg,
.feature-item svg {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.86);
  stroke-width: 1.4;
}

.service-card h3,
.feature-item h3 {
  margin-bottom: 9px;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 600;
}

.service-card p,
.feature-item p,
.review-card p,
.footer-brand p {
  color: var(--muted);
}

.service-card p,
.feature-item p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.55;
}

.center-action {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.why-layout {
  display: grid;
  grid-template-columns: 255px 1fr;
  align-items: center;
  gap: 34px;
}

.why-title h2 {
  max-width: 255px;
  font-size: clamp(30px, 3vw, 40px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.feature-item {
  min-height: 146px;
  border-left: 1px solid var(--line);
  padding: 12px 24px 8px;
  text-align: center;
}

.feature-item:last-child {
  border-right: 1px solid var(--line);
}

.feature-item svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 13px;
}

.feature-item h3 {
  font-size: 15px;
}

.portfolio-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 30px;
}

.portfolio-heading {
  max-width: 650px;
}

.portfolio-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--heading);
  font-size: 13px;
  text-transform: uppercase;
}

.portfolio-heading h2 {
  margin-bottom: 12px;
}

.portfolio-heading p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.portfolio-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.portfolio-count {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  text-transform: uppercase;
}

.portfolio-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line-soft);
  padding: 4px;
  background: rgba(4, 5, 5, 0.46);
}

.tab {
  min-height: 42px;
  border: 1px solid transparent;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  cursor: pointer;
  font-family: var(--heading);
  font-size: 13px;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
}

.tab.is-active {
  border-color: #fff;
  color: #080909;
  background: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 3);
  grid-auto-rows: auto;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  transform-origin: center;
}

.portfolio-grid::-webkit-scrollbar {
  display: none;
}

.portfolio-pagination {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}

.portfolio-page {
  position: relative;
  width: 44px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.portfolio-page::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  content: "";
  background: rgba(255, 255, 255, 0.24);
  transform: translate(-50%, -50%);
  transition: width 180ms ease, background-color 180ms ease;
}

.portfolio-page:hover::before,
.portfolio-page:focus-visible::before {
  background: rgba(255, 255, 255, 0.62);
}

.portfolio-page.is-active::before {
  width: 34px;
  background: #fff;
}

@keyframes portfolio-reveal {
  0% {
    opacity: 0.35;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-grid.is-line-next,
.portfolio-grid.is-line-prev {
  animation: portfolio-reveal 220ms ease-out both;
}

.work-item {
  position: relative;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: #050606;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  isolation: isolate;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.work-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04) brightness(0.9);
  transition: transform 240ms ease, filter 240ms ease;
}

.work-item figcaption {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 20px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 56%, rgba(0, 0, 0, 0.94) 100%);
  color: #fff;
}

.work-item__category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--heading);
  font-size: 11px;
  text-transform: uppercase;
}

.work-item__category::before {
  width: 18px;
  height: 1px;
  content: "";
  background: currentColor;
}

.work-item h3 {
  margin-bottom: 7px;
  font-size: 22px;
  line-height: 1.15;
}

.work-item p {
  display: -webkit-box;
  max-width: 560px;
  margin-bottom: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.work-item:hover img,
.work-item:focus-within img {
  transform: scale(1.028);
  filter: saturate(1) contrast(1.06) brightness(1);
}

.work-item:hover,
.work-item:focus-within {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.reviews-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.reviews-viewport {
  overflow: hidden;
}

.reviews-track {
  display: grid;
  grid-auto-columns: calc((100% - 6px) / 3);
  grid-auto-flow: column;
  gap: 3px;
  will-change: transform;
}

.review-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(21, 23, 23, 0.66);
  border: 1px solid var(--line-soft);
}

.review-stars {
  margin-bottom: 12px;
  color: #f6c343;
  font-size: 15px;
  line-height: 1;
}

.review-card p {
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-author > span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #d7d7d7;
  color: #090a0a;
  font-family: var(--heading);
  font-weight: 600;
}

.review-author strong {
  display: block;
  color: #f5f5f5;
  font-family: var(--heading);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
}

.review-author small {
  display: block;
  color: var(--muted);
  line-height: 1.2;
}

.review-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.review-dots button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.review-dots .is-active {
  background: #fff;
}

.review-nav,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.review-nav {
  width: 42px;
  height: 74px;
}

.review-nav:hover,
.review-nav:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
}

.contacts {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(390px, 470px) minmax(0, 1fr);
  width: 100%;
  min-height: 230px;
  margin: 0;
  padding-inline: max(36px, calc((100% - 1320px) / 2));
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 9, 0.54), rgba(8, 9, 9, 0.8)),
    url("./assets/bg-why-final.png") center / cover no-repeat,
    #0b0c0c;
}

.contacts__panel {
  padding: 32px clamp(30px, 3vw, 52px);
  border-right: 1px solid var(--line);
  background: #101111;
}

.contacts h2 {
  margin-bottom: 14px;
}

.contact-list {
  display: grid;
  gap: 9px;
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.contact-list svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.social-row {
  display: flex;
  gap: 11px;
  margin-bottom: 17px;
}

.social-row a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.social-row svg {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
}

.social-link svg {
  fill: currentColor;
}

.social-link--whatsapp {
  border-color: rgba(37, 211, 102, 0.38);
  color: #fff;
  background: #25d366;
}

.social-link--telegram {
  border-color: rgba(38, 165, 228, 0.38);
  color: #fff;
  background: #26a5e4;
}

.social-link--whatsapp svg {
  width: 22px;
  height: 22px;
  transform: translateY(0.5px);
}

.social-link--telegram svg {
  width: 20px;
  height: 20px;
  transform: translate(-0.5px, 0);
}

.social-row a:hover,
.social-row a:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
}

.contacts__map {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: #080909;
}

.contacts__map::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 28%, rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent 55%);
}

.contacts__map iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 330px;
  border: 0;
  filter: grayscale(1) contrast(1.08) brightness(0.78);
}

.contacts__map > img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: transform 260ms ease;
}

.contacts__map:hover > img,
.contacts__map:focus-visible > img {
  transform: scale(1.025);
}

.contact-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.contact-features span {
  border: 1px solid var(--line-soft);
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.contact-features span:hover {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.services-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(86vh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 9, 9, 0.82), rgba(8, 9, 9, 0.92)),
    url("./assets/bg-portfolio-final.png") center / cover no-repeat,
    #101111;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.76);
}

.services-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.services-dialog__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 20px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(14, 15, 15, 0.96), rgba(14, 15, 15, 0.9)),
    url("./assets/bg-services-final.png") center / cover no-repeat,
    #0e0f0f;
}

.services-dialog__header .eyebrow {
  margin-bottom: 9px;
}

.services-note {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.icon-button {
  width: 46px;
  height: 46px;
}

.services-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 18px 30px 0;
}

.service-tab {
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-family: var(--heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.service-tab + .service-tab {
  border-left: 0;
}

.service-tab:hover,
.service-tab:focus-visible,
.service-tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

.services-catalog {
  display: block;
  padding: 28px 30px 34px;
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.2), rgba(7, 8, 8, 0.48)),
    url("./assets/bg-reviews-final.png") center / cover no-repeat;
}

.catalog-group h3 {
  margin-bottom: 16px;
  font-size: 25px;
}

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

.catalog-grid--single {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.catalog-grid--single .catalog-card:nth-child(1),
.catalog-grid--single .catalog-card:nth-child(2) {
  grid-column: span 3;
}

.catalog-grid--single .catalog-card:nth-child(n + 3) {
  grid-column: span 2;
}

.catalog-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: auto minmax(92px, 1fr) auto;
  column-gap: 16px;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
    rgba(18, 20, 20, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.catalog-thumb {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 88px;
  height: 88px;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(228, 228, 228, 0.9)),
    #f1f1f1;
}

.catalog-thumb img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  filter: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.catalog-card h4 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.26;
}

.catalog-card p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 15px 0 14px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.48;
}

.catalog-card strong {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  display: block;
  color: #fff;
  font-family: var(--heading);
  font-size: 20px;
}

.site-footer {
  padding: 22px 0 25px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.84)),
    url("./assets/bg-why-final.png") center / cover no-repeat,
    #050606;
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 0.7fr) minmax(190px, 0.8fr);
  gap: 52px;
  align-items: start;
}

.footer-brand {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 22px;
  align-items: center;
}

.footer-brand p {
  max-width: 340px;
  margin-bottom: 0;
  font-size: 14px;
}

.footer-nav,
.footer-contact {
  display: grid;
  gap: 4px;
}

.footer-nav strong,
.footer-contact strong {
  margin-bottom: 4px;
  font-family: var(--heading);
  font-size: 15px;
  text-transform: uppercase;
}

.footer-nav a,
.footer-contact a {
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
}

.footer-nav a:hover,
.footer-contact a:hover,
.footer-nav a:focus-visible,
.footer-contact a:focus-visible {
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

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

  .main-nav {
    gap: 24px;
  }

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

  .why-layout {
    grid-template-columns: 1fr;
  }

  .why-title h2 {
    max-width: 100%;
  }

  .features-grid {
    grid-template-columns: repeat(5, minmax(132px, 1fr));
    overflow-x: auto;
  }

  .services-dialog {
    width: min(980px, calc(100vw - 28px));
  }
}

@media (max-width: 820px) {
  .container,
  .site-header {
    width: min(100% - 28px, 1140px);
  }

  #portfolio {
    scroll-margin-top: 96px;
  }

  .site-header {
    position: fixed;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(8, 9, 9, 0.86);
    backdrop-filter: blur(12px);
  }

  .brand,
  .brand img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(8, 9, 9, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    padding: 13px 8px;
    border-bottom: 1px solid var(--line-soft);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav a::after {
    display: none;
  }

  .header-action {
    min-width: 112px;
    height: 42px;
    font-size: 12px;
  }

  .hero {
    min-height: 680px;
  }

  .hero__media {
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    opacity: 0.86;
  }

  .hero__media img {
    height: 100%;
    object-position: 62% center;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 8, 8, 0.98) 0%, rgba(7, 8, 8, 0.86) 44%, rgba(7, 8, 8, 0.5) 100%),
      linear-gradient(90deg, rgba(7, 8, 8, 0.96), rgba(7, 8, 8, 0.42));
  }

  .hero__content {
    min-height: 680px;
    justify-content: flex-start;
    padding-top: 145px;
  }

  h1 {
    max-width: 470px;
  }

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

  .portfolio-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }

  .portfolio-controls {
    justify-items: start;
  }

  .portfolio-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 14px) / 2);
    grid-auto-rows: auto;
  }

  .portfolio-grid .work-item,
  .portfolio-grid .work-item:first-child {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .reviews-shell {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .reviews-track {
    grid-auto-columns: calc((100% - 3px) / 2);
  }

  .review-nav {
    width: 38px;
  }

  .contacts {
    grid-template-columns: 1fr;
    width: 100%;
    padding-inline: 14px;
  }

  .contacts__panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contacts__map iframe {
    min-height: 300px;
  }

  .services-catalog {
    grid-template-columns: 1fr;
  }

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

  .catalog-grid--single .catalog-card:nth-child(1),
  .catalog-grid--single .catalog-card:nth-child(2),
  .catalog-grid--single .catalog-card:nth-child(n + 3) {
    grid-column: span 1;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .site-header {
    grid-template-columns: auto auto auto;
  }

  .header-action {
    min-width: 96px;
    padding-inline: 14px;
  }

  .hero {
    min-height: 760px;
  }

  .hero__content {
    min-height: 760px;
    padding-top: 164px;
    padding-bottom: 58px;
  }

  .hero__media img {
    object-position: 69% center;
    filter: grayscale(0.02) contrast(1.08) brightness(1.36);
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 8, 8, 0.62) 0%, rgba(7, 8, 8, 0.34) 40%, rgba(7, 8, 8, 0.14) 100%),
      linear-gradient(90deg, rgba(7, 8, 8, 0.62), rgba(7, 8, 8, 0.06));
  }

  h1 {
    max-width: 330px;
    font-size: 42px;
    line-height: 1.06;
  }

  .hero__lead {
    max-width: 312px;
    margin-top: 126px;
    font-size: 15px;
    line-height: 1.55;
  }

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

  .button {
    width: 100%;
  }

  .section--compact {
    padding: 34px 0 38px;
  }

  .why-layout {
    display: block;
  }

  .why-title h2 {
    max-width: 320px;
    margin: 0 auto 18px;
    text-align: center;
    font-size: 32px;
  }

  .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
  }

  .feature-item,
  .feature-item:last-child {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 0;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--line-soft);
    padding: 14px 16px;
    text-align: left;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
      rgba(0, 0, 0, 0.22);
  }

  .feature-item svg {
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .feature-item h3 {
    margin-bottom: 3px;
    font-size: 15px;
  }

  .feature-item p {
    font-size: 13px;
    line-height: 1.42;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-head {
    gap: 18px;
    margin-bottom: 22px;
  }

  .portfolio-heading p {
    font-size: 14px;
    line-height: 1.55;
  }

  .portfolio-controls {
    width: 100%;
    justify-items: stretch;
  }

  .portfolio-count {
    justify-self: start;
  }

  .portfolio-tabs {
    width: 100%;
    gap: 3px;
  }

  .tab {
    min-height: 44px;
    padding: 0 6px;
    font-size: 12px;
  }

  .tab.is-active {
    border-color: #fff;
    color: #080909;
    background: #fff;
  }

  .portfolio-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    grid-auto-rows: auto;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 7%;
    scroll-behavior: auto;
    scrollbar-width: none;
    padding: 0 7% 8px;
  }

  .portfolio-grid.is-line-next,
  .portfolio-grid.is-line-prev {
    animation-duration: 150ms;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .portfolio-grid::-webkit-scrollbar {
    display: none;
  }

  .portfolio-grid .work-item,
  .portfolio-grid .work-item:first-child {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .work-item figcaption,
  .work-item:first-child figcaption {
    padding: 84px 18px 18px;
  }

  .work-item h3,
  .work-item:first-child h3 {
    font-size: 24px;
  }

  .work-item p,
  .work-item:first-child p {
    font-size: 13px;
  }

  .reviews-shell {
    display: block;
  }

  .reviews-viewport {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .reviews-viewport::-webkit-scrollbar {
    display: none;
  }

  .reviews-track {
    grid-auto-columns: 100%;
    gap: 10px;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .review-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .review-dots {
    flex-wrap: wrap;
    gap: 6px;
  }

  .review-dots button {
    width: 6px;
    height: 6px;
  }

  .review-nav {
    display: none;
  }

  .service-card {
    min-height: 150px;
  }

  .contacts__map,
  .contacts__map iframe {
    min-height: min(64vw, 300px);
  }

  .work-item,
  .work-item img {
    min-height: 260px;
  }

  .services-dialog {
    width: calc(100vw - 18px);
  }

  .services-dialog__header {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 22px 18px 20px;
  }

  .services-catalog {
    padding: 22px 18px 26px;
  }

  .catalog-grid,
  .catalog-grid--single {
    grid-template-columns: 1fr;
  }

  .services-switch {
    grid-template-columns: 1fr;
    padding-inline: 18px;
  }

  .service-tab + .service-tab {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .catalog-card {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto minmax(74px, 1fr) auto;
    min-height: 224px;
    padding: 14px;
  }

  .catalog-thumb {
    width: 76px;
    height: 76px;
  }

  .catalog-thumb img {
    width: 58px;
    height: 58px;
    border-radius: 13px;
  }

  .catalog-card h4 {
    font-size: 16px;
  }

  .catalog-card p {
    margin: 13px 0 12px;
    font-size: 12.5px;
    line-height: 1.44;
  }

  .catalog-card strong {
    font-size: 19px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    grid-template-columns: 70px 1fr;
  }

  .footer-brand img {
    width: 70px;
    height: 64px;
  }

  .footer-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 22px;
  }

  .footer-nav,
  .footer-contact {
    align-content: start;
  }

  .footer-nav strong,
  .footer-contact strong {
    font-size: 13px;
  }

  .footer-nav a,
  .footer-contact a {
    font-size: 12px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-grid.is-line-next,
  .portfolio-grid.is-line-prev {
    animation: none;
  }

  .tab,
  .portfolio-page::before,
  .work-item,
  .work-item img {
    transition: none;
  }
}
