:root {
  --accent: #4dc0d3;
  --text: #262626;
  --light: #f1fafc;
  --border: #e3ebf2;
  --muted: #a5b3c0;
  --radius: 24px;
  --font: "Roboto Condensed", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: #fff; line-height: 1.4; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }

.container { width: 100%; max-width: 1336px; margin: 0 auto; padding: 0 20px; }
.visually-hidden, .hp {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  border: 0; border-radius: 100px; padding: 15px 45px; cursor: pointer;
  font-size: 17px; line-height: 24px; font-weight: 700; text-transform: uppercase;
  transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-white { background: #fff; color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-outline { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }

.lead-form { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 648px; }
.lead-form--narrow { max-width: 316px; }
.lead-form input[type="text"], .lead-form input[type="tel"] {
  width: 100%; height: 56px; padding: 0 20px; border: 1px solid var(--border); border-radius: 100px;
  background: #fff; color: var(--text); font-size: 17px; outline: none;
}
.lead-form input::placeholder { color: var(--muted); }
.lead-form input:focus { border-color: var(--accent); }
.lead-form input[aria-invalid="true"] { border-color: #d9534f; }
.form-status:empty { display: none; }
.form-status { font-size: 17px; }
.form-status.is-ok { color: #2a8a52; }
.form-status.is-error { color: #c0392b; }

/* ---------- section headings ---------- */
.section-title, .big-title, .test-title {
  font-size: 58px; line-height: 74px; font-weight: 700; text-transform: uppercase;
}
.section-title {
  padding-left: 30px; margin-bottom: 40px;
  background: url(/img/marker.svg) no-repeat left center;
}
.section-title--right { text-align: right; padding: 0 30px 0 0; background-position: right center; }

/* ---------- hero ---------- */
.hero { min-height: 640px; background: url(/img/hero.png) no-repeat right center; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; }
.topbar-address { margin-left: auto; margin-right: 166px; }
.topbar-address, .topbar-phone { font-size: 24px; line-height: 34px; }
.topbar a:hover { color: var(--accent); }
.hero-text { padding-top: 160px; max-width: 720px; }
.hero h1 { font-size: 79px; line-height: 101px; font-weight: 700; text-transform: uppercase; }
.hero-sub { margin-top: 36px; font-size: 28px; line-height: 39px; font-weight: 500; text-transform: uppercase; }

/* ---------- test band ---------- */
.test { background: url(/img/test-bg.png) no-repeat center top / cover; padding: 140px 0 260px; color: #fff; }
.test-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }
.test-title { margin-bottom: 70px; }
.test-photo { justify-self: end; width: 100%; }

/* ---------- services ---------- */
.services { padding: 120px 0 160px; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card {
  background: var(--light); border-radius: var(--radius); padding: 50px 20px 52px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 44px;
}
.service-card h3 { font-size: 28px; line-height: 39px; font-weight: 500; }

/* ---------- diagnostics ---------- */
.diagnostics { background: var(--light) url(/img/diagnostics-bg.png) no-repeat center / cover; padding: 80px 0 140px; }
.diagnostics .big-title { max-width: 400px; }
.diagnostics .lead { margin: 40px 0 26px; font-size: 24px; line-height: 34px; }
.diagnostics-photo { display: none; }

/* ---------- products ---------- */
.products { padding: 170px 0 120px; }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 0 16px; }
.product {
  border: 1px solid var(--border); border-radius: 30px; padding: 20px 20px 45px;
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.product img { margin: 0 auto 20px; border-radius: 20px; }
.product h3 { font-size: 17px; line-height: 24px; font-weight: 400; margin-bottom: 10px; }
.product .price { font-size: 17px; line-height: 24px; font-weight: 700; text-transform: uppercase; }
.product .note { margin-top: 10px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- brands carousel ---------- */
.brands { padding: 0 0 140px; }
.carousel { position: relative; padding: 50px 20px 0; }
.carousel-track {
  display: flex; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track li { flex: 0 0 calc(100% / 6); scroll-snap-align: start; display: flex; justify-content: center; }
.carousel-track img { width: 193px; object-fit: contain; }
.carousel-arrow {
  position: absolute; top: calc(50px + 71px); transform: translateY(-50%); z-index: 1;
  background: none; border: 0; color: var(--accent); font-size: 56px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.carousel-arrow--prev { left: -8px; }
.carousel-arrow--next { right: -8px; }
.carousel-dots { display: flex; justify-content: center; gap: 12px; margin-top: 46px; }
.carousel-dots button {
  width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: var(--border); cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: var(--accent); }

/* ---------- about ---------- */
.about { background: url(/img/about-bg.png) no-repeat center / cover; padding: 80px 0 140px; color: #fff; }
.about-grid { display: grid; grid-template-columns: 648px 1fr; gap: 105px; align-items: center; }
.about-text .big-title { margin-bottom: 50px; }
.about-text p { font-size: 18px; line-height: 35px; }

/* ---------- contacts ---------- */
.contacts { padding: 120px 0 80px; }
.contacts-grid { display: grid; grid-template-columns: 1fr 648px; gap: 30px; align-items: start; }
.contact-list { list-style: none; margin: 0 0 46px; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; align-items: center; gap: 22px; font-size: 24px; line-height: 34px; }
.contact-list a:hover { color: var(--accent); }
.contacts-subtitle { font-size: 28px; line-height: 39px; font-weight: 500; max-width: 480px; margin-bottom: 26px; }
.map img { border-radius: 30px; width: 100%; }

/* ---------- quiz dialog ---------- */
.quiz {
  width: min(640px, calc(100% - 32px)); border: 0; border-radius: var(--radius); padding: 48px 40px 40px;
  color: var(--text);
}
.quiz::backdrop { background: rgba(0, 0, 0, .7); }
.quiz h2 { font-size: 28px; line-height: 36px; font-weight: 700; text-align: center; margin: 0 20px 24px; }
.quiz-close {
  position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 36px; line-height: 1;
  cursor: pointer; color: var(--text);
}
.quiz-steps { display: flex; justify-content: center; gap: 56px; list-style: none; margin: 0 0 28px; padding: 0; }
.quiz-steps li {
  position: relative; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border);
  display: grid; place-items: center; font-weight: 700; color: var(--muted);
}
.quiz-steps li + li::before {
  content: ""; position: absolute; right: 100%; width: 56px; height: 2px; background: var(--border); top: 50%;
}
.quiz-steps li.is-active, .quiz-steps li.is-done { border-color: var(--accent); color: var(--accent); }
.quiz-steps li.is-done { background: var(--accent); color: #fff; }
.quiz .lead-form { max-width: none; }
.quiz-step { display: none; border: 0; margin: 0; padding: 0; width: 100%; }
.quiz-step.is-active { display: flex; flex-direction: column; gap: 12px; }
.quiz-step legend { font-size: 20px; line-height: 28px; font-weight: 500; margin-bottom: 12px; padding: 0; }
.option {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border: 1px solid var(--border);
  border-radius: 100px; cursor: pointer; font-size: 17px;
}
.option:has(input:checked) { border-color: var(--accent); background: var(--light); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.quiz-nav .btn-accent:only-child { margin-left: auto; }

/* ---------- tablet ---------- */
@media (max-width: 1200px) {
  .hero { background-size: 55% auto; }
  .topbar-address { margin-right: 40px; }
  .about-grid, .contacts-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .section-title, .big-title, .test-title { font-size: 44px; line-height: 56px; }
  .hero h1 { font-size: 64px; line-height: 80px; }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
  .section-title, .big-title, .test-title { font-size: 28px; line-height: 36px; }
  .section-title { padding-left: 20px; margin-bottom: 20px; background-size: contain; }
  .section-title--right { text-align: left; padding: 0 0 0 20px; background-position: left center; }
  .btn { width: 100%; }
  .lead-form, .lead-form--narrow { max-width: none; }
  .lead-form--narrow .btn { width: auto; min-width: 60%; }

  .hero { min-height: 620px; background: url(/img/hero-mobile.png) no-repeat center bottom / contain; }
  .topbar { padding-top: 22px; }
  .topbar-address { display: none; }
  .topbar-phone { font-size: 20px; line-height: 28px; }
  .logo img { width: 178px; }
  .hero-text { padding-top: 40px; max-width: none; }
  .hero h1 { font-size: 50px; line-height: 64px; }
  .hero-sub { margin-top: 10px; font-size: 20px; line-height: 28px; }

  .test { background-image: url(/img/test-bg-mobile.png); padding: 50px 0 150px; }
  .test-grid { grid-template-columns: 1fr; gap: 30px; }
  .test-title { margin-bottom: 30px; }
  .test .btn { width: auto; min-width: 60%; }
  .test-photo { justify-self: stretch; }

  .services { padding: 60px 0 80px; }
  .services-grid { grid-template-columns: 1fr; gap: 10px; }
  .service-card { padding: 20px 20px 36px; gap: 28px; }
  .service-card img { width: 89px; }
  .service-card h3 { font-size: 20px; line-height: 28px; }

  .diagnostics { background-image: none; padding: 45px 0 0; }
  .diagnostics .lead { margin: 20px 0 26px; font-size: 20px; line-height: 28px; }
  .diagnostics-photo { display: block; width: 100%; margin-top: 40px; }

  .products { padding: 80px 0 60px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; }
  .product { border-radius: 24px; padding: 14px 10px 28px; }
  .product h3 { font-size: 15px; line-height: 22px; }
  .product .price { font-size: 15px; line-height: 22px; }

  .brands { padding-bottom: 80px; }
  .carousel { padding: 30px 0 0; }
  .carousel-track li { flex-basis: 25%; }
  .carousel-arrow { display: none; }
  .carousel-dots { gap: 8px; margin-top: 30px; flex-wrap: wrap; }
  .carousel-dots button { width: 10px; height: 10px; }

  .about { background-image: url(/img/about-bg-mobile.png); padding: 120px 0 150px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { order: 2; }
  .about-text .big-title { margin-bottom: 20px; }
  .about-text p { font-size: 18px; line-height: 30px; }

  .contacts { padding: 60px 0 0; }
  .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-list li { font-size: 20px; line-height: 28px; gap: 16px; }
  .contacts-subtitle { font-size: 20px; line-height: 28px; font-weight: 700; }
  .map { margin: 0 -20px; }
  .map img { border-radius: 0; }

  .quiz { padding: 44px 20px 24px; }
  .quiz h2 { font-size: 22px; line-height: 28px; margin: 0 10px 20px; }
  .quiz-steps { gap: 40px; }
  .quiz-steps li + li::before { width: 40px; }
  .quiz-step legend { font-size: 18px; line-height: 24px; }
  .quiz-nav .btn { width: auto; flex: 1; padding: 15px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .carousel-track { scroll-behavior: auto; }
  .btn { transition: none; }
}
