@media (max-width: 1024px) {
  .services__grid,
  .services__grid--five {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__grid,
  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .contacts__cards--sitemap {
    grid-template-columns: 1fr;
  }

  .about__image {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 280px;
    margin-left: 0;
    order: -1;
  }

  .about__image img {
    object-position: center 35%;
  }

  .header__phone {
    display: none;
  }

  .header__socials {
    display: none;
  }

  .header__links {
    gap: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 72px;
    --container-gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --fab-size: 48px;
    --fab-offset-x: 16px;
    --fab-offset-y: 36px;
    --section-padding: clamp(52px, 10vw, 80px);
  }

  main {
    padding-bottom: calc(var(--fab-size) + var(--fab-offset-y) + 32px);
  }

  main:has(+ .footer) {
    padding-bottom: 0;
  }

  .header__nav {
    display: none;
  }

  .header__actions {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .header__inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .header__logo {
    padding: 2px 0;
    max-width: calc(100% - 56px);
  }

  .header__logo img {
    height: 52px;
    max-width: min(110px, 42vw);
  }

  .features__grid,
  .about__pillars {
    grid-template-columns: 1fr;
  }

  .about__grid {
    gap: 24px;
  }

  .about__image {
    max-height: 220px;
    border-radius: var(--radius-md);
  }

  .about__text .btn {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    margin-bottom: 4px;
  }

  .about__text p {
    font-size: 0.9375rem;
  }

  .services__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .service-card {
    padding: 16px 12px;
  }

  .service-card__ring {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
  }

  .service-card__title {
    font-size: 0.875rem;
  }

  .hero {
    align-items: flex-start;
  }

  .hero__content {
    padding: clamp(20px, 5vw, 36px) 0 clamp(36px, 8vw, 64px);
  }

  .hero__title,
  .hero__text {
    text-shadow: 0 1px 2px rgba(58, 58, 58, 0.06);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

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

  .section-title {
    font-size: clamp(1.5rem, 6.5vw, 2.25rem);
  }

  .feature-card {
    padding: 20px;
  }

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

  .contacts__actions .btn {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .contacts__item {
    padding: 14px;
  }

  .contacts__value {
    font-size: 0.875rem;
    word-break: break-word;
  }
}

@media (max-width: 480px) {
  :root {
    --container-gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --fab-size: 48px;
    --fab-offset-x: 16px;
    --fab-offset-y: 36px;
  }

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

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

  .contacts__map.map-wrap {
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .header__socials {
    display: none;
  }

  .hero__badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .hero__title {
    font-size: clamp(1.65rem, 8vw, 2.1rem);
  }

  .hero__text {
    font-size: 0.9375rem;
    margin-bottom: 28px;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }

  .header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .mobile-menu {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .btn {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}
