/* Keep the reading column on the page axis, including text beside photographs. */
body {
  text-align: center;
}

.hero-grid, .section-heading, .order-options-inner, .about-grid, .contact-card,
.service-grid, .gallery-grid, .advantage-grid, .steps-grid, .contact-phones,
.company-requisites dl div {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy, .section-heading > *, .about-copy, .contact-copy,
.hero h1, .hero-lead, .section-heading h2, .about-copy h2, .contact-copy h2,
.about-copy p, .contact-copy p, .steps-grid p, .service-card p,
.hero-visual, .service-detail .hero-grid > img {
  margin-inline: auto;
}

.hero-copy, .section-heading > *, .about-copy, .contact-copy {
  width: min(100%, 44rem);
}

.hero-copy p, .section-heading p, .service-card p, .advantage-card p, .steps-grid p {
  max-width: 66ch;
  margin-inline: auto;
}

.hero-grid, .order-options-inner, .about-grid, .contact-card { row-gap: 1.5rem; }
.section-heading { row-gap: .75rem; }
.hero::before { display: none; }
.hero-visual { width: min(100%, 60rem); min-height: clamp(16rem, 42vw, 32rem); }
.service-detail .hero-grid > img { max-width: 42rem; }

.hero-actions, .hero-checks, .hero-checks span, .copyable-contact,
.service-detail-actions, .service-card-contact a, .advantage-title {
  justify-content: center;
}

.phone-link {
  flex-basis: 100%;
  align-items: center;
  border: 0;
  padding-inline: 0;
}

.hero-checks { display: flex; }
.visual-caption, .footer-inner { flex-direction: column; align-items: center; gap: .5rem; }
.visual-caption strong { text-align: center; }
.location-chip { inset-inline: 0; margin-inline: auto; width: max-content; max-width: 95%; }
.order-options-actions { width: min(100%, 44rem); margin-inline: auto; grid-template-columns: minmax(0, 1fr); }
.order-option { min-height: 0; }

.service-grid, .advantage-grid, .steps-grid, .contact-phones,
.gallery-grid, .company-requisites, .service-detail .hero-grid > .service-card {
  width: min(100%, 44rem);
  margin-inline: auto;
}

.service-card, .advantage-card, .contact-phone-card, .contact-phones > a { min-height: 0; }
.service-card-contact, .service-card--ilosos .service-card-contact { margin-top: .85rem; }
.advantage-card p { margin-inline: auto; }
.advantage-title { flex-direction: column-reverse; gap: .5rem; }
.about-line { display: flex; justify-content: center; align-items: center; }
.about-line > span:first-child { display: none; }
.steps-grid article, .steps-grid article:not(:first-child) { padding: .875rem 1rem; border-right: 0; }
.company-requisites dl div { gap: .25rem; }
.gallery-grid { grid-auto-rows: clamp(15rem, 48vw, 23rem); }

/* Centre the brand and navigation while keeping the logo at the left edge. */
.header-inner {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: .35rem;
  padding-block: .5rem;
}
.brand-mark, .header-call { position: absolute; top: 50%; transform: translateY(-50%); }
.brand-mark { left: 0; }
.header-call { right: 0; }
.desktop-nav { margin-inline: auto; }
@media (min-width: 981px) {
  .header-inner { padding-inline: 8rem; }
  .desktop-nav { justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 980px) and (min-width: 701px) {
  .header-inner { padding-inline: 8rem; }
}
@media (max-width: 700px) {
  .header-inner { padding-inline: 3.3rem; }
  .hero-actions { align-items: center; }
  .hero h1 { font-size: clamp(2.13rem, 8.75vw, 2.875rem); }
  .mobile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact page widths and keep the main contact numbers together. */
.container {
  width: min(100% - 40px, 68rem);
}

.hero .hero-copy h1 {
  max-width: 100%;
  font-size: clamp(1.625rem, 8.1vw, 3.75rem);
}

.hero .hero-copy h1 span {
  margin-top: .45rem;
}

.service-detail .hero-copy h1 {
  font-size: clamp(1.5rem, 5.7vw, 2.375rem);
  text-wrap: balance;
}

.hero-actions .phone-link {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  column-gap: clamp(.5rem, 2vw, .875rem);
  row-gap: .25rem;
}

.hero-actions .phone-link > .copyable-contact:has(a[href^="tel:"]) {
  grid-row: 2;
}

.hero-actions .phone-link > .contact-email-label,
.hero-actions .phone-link > .contact-email-label + .copyable-contact {
  grid-column: 1 / -1;
}

.hero-actions .phone-link > .copyable-contact {
  margin-top: 0;
}

.hero-actions .phone-link > .contact-email-label {
  margin-top: .5rem;
}

.copyable-contact a[href^="tel:"] {
  font-size: clamp(.875rem, 3.9vw, 1.125rem);
  white-space: nowrap;
}

.contact-phone-card:has(a[href="tel:+74742713747"]),
.service-card-contact:has(a[href="tel:+74742713747"]):has(a[href="tel:+79046849387"]) {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  column-gap: clamp(.5rem, 2vw, 1rem);
}

.contact-phone-card:has(a[href="tel:+74742713747"]) > span {
  grid-column: 1 / -1;
}

.contact-phone-card:has(a[href="tel:+74742713747"]) > a {
  margin-top: .375rem;
  color: var(--white);
  font-size: clamp(.875rem, 3.9vw, 1.125rem);
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.2;
  white-space: nowrap;
}

.service-card-contact:has(a[href="tel:+74742713747"]) > a:not([href^="tel:"]) {
  grid-column: 1 / -1;
}

.service-card-contact:has(a[href="tel:+74742713747"]) > a[href^="tel:"] {
  gap: .25rem;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .container { width: calc(100% - 24px); }

  .service-card-contact:has(a[href="tel:+74742713747"]) > a svg {
    width: .75rem;
    height: .75rem;
  }
}

/* Use the available width for copy and reduce vertical gaps across the site. */
.section {
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.hero,
.order-options {
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem);
}

.hero-grid, .order-options-inner, .about-grid, .contact-card {
  row-gap: 1rem;
}

.hero-copy, .section-heading > *, .about-copy, .contact-copy {
  width: min(100%, 48rem);
}

.hero-copy p, .section-heading p, .about-copy p, .contact-copy p {
  max-width: 73ch;
  line-height: 1.5;
}

.hero-lead, .hero-actions, .hero-checks {
  margin-top: 1rem;
}

.hero-visual {
  min-height: clamp(14rem, 36vw, 27rem);
}

.section-heading {
  row-gap: .5rem;
  margin-bottom: 1.125rem;
}

.section-kicker {
  margin-bottom: .375rem;
}

.order-options-actions {
  width: min(100%, 51rem);
  gap: .625rem;
}

.order-option, .service-card, .contact-phone-card, .contact-phones > a {
  padding: clamp(.875rem, 2vw, 1.125rem);
}

.service-card-contact, .service-card--ilosos .service-card-contact {
  margin-top: .625rem;
  padding-top: .625rem;
}

.gallery-grid {
  grid-auto-rows: clamp(13rem, 42vw, 19rem);
  gap: .75rem;
}

.steps-grid article, .steps-grid article:not(:first-child) {
  padding: .625rem .75rem;
}

.steps-grid p {
  max-width: 34ch;
}

.contact-card, .company-requisites {
  padding: clamp(1rem, 3vw, 1.75rem);
}

.company-requisites h2 {
  margin: .5rem 0 .875rem;
}

.company-requisites dl div {
  padding-block: .625rem;
}

.service-detail .hero-grid {
  margin: 1rem 0 1.5rem;
}

.service-detail .hero-grid > img {
  max-width: min(100%, 38rem);
}

.service-detail-actions {
  margin-block: .875rem .5rem;
}

@media (min-width: 800px) {
  .order-options-actions, .home-service-grid, .about-grid .advantage-grid,
  .gallery-grid, .service-detail .container > .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-service-grid, .about-grid .advantage-grid,
  .gallery-grid, .service-detail .container > .service-grid {
    width: min(100%, 60rem);
  }

  .gallery-grid {
    grid-auto-rows: clamp(14rem, 24vw, 18rem);
  }

  .steps-grid {
    width: min(100%, 60rem);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .contact-phones {
    width: min(100%, 60rem);
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}
