.contacts-document {
  background: var(--surface);
  color: var(--ink);
}

.contacts-page {
  padding-top: 40px;
}

.contacts-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: stretch;
  padding: 0 40px 82px;
}

.contacts-hero__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-right: 40px;
}

.contacts-hero h1,
.contacts-section-heading h2,
.contacts-location h2 {
  margin: 0;
  font-family: "Radiotechnika", "Montserrat", sans-serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.contacts-hero__lead,
.contacts-section-heading > p {
  max-width: 660px;
  margin: 20px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
}

.contacts-primary {
  display: grid;
  margin-top: auto;
  border-top: 1px solid var(--ink);
}

.contacts-primary a {
  display: grid;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.contacts-primary span,
.contacts-routes article span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

.contacts-primary strong {
  overflow-wrap: anywhere;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
}

.contacts-hero__media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.contacts-hero__media img {
  width: 100%;
  height: min(660px, calc(100dvh - 210px));
  min-height: 520px;
  object-fit: cover;
  object-position: center 54%;
}

.contacts-social,
.contacts-location {
  padding: 82px 40px;
}

.contacts-social {
  background: #fbfaf7;
}

.contacts-section-heading,
.contacts-location__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}

.contacts-section-heading > p {
  margin: 0;
}

.contacts-social__list {
  display: grid;
  border-top: 2px solid var(--ink);
}

.contacts-social__list > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 108px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 220ms ease, padding 220ms ease;
}

.contacts-social__list > a:hover,
.contacts-social__list > a:focus-visible {
  padding-right: 16px;
  padding-left: 16px;
  background: var(--surface);
}

.contacts-social__list span {
  display: grid;
  gap: 8px;
}

.contacts-social__list b {
  font-size: clamp(18px, 2.25vw, 32px);
  font-weight: 400;
}

.contacts-social__list small {
  color: var(--muted);
  font-size: 13px;
}

.contacts-social__list em {
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.contacts-location__heading > p {
  margin: 0;
  max-width: 660px;
  font-size: clamp(20px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .contacts-section-heading > p,
  .contacts-location__heading > p {
    justify-self: end;
    text-align: right;
  }
}

.contacts-routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.contacts-routes article {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--ink);
}

.contacts-routes article + article {
  padding-right: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.contacts-routes h3 {
  margin: 18px 0 14px;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
}

.contacts-routes p {
  max-width: 460px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.contacts-route-button {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 220ms ease, background-color 220ms ease;
}

.contacts-route-button:hover,
.contacts-route-button:focus-visible {
  background: #393836;
}

.contacts-route-button:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: no-preference) {
  .contacts-hero__content,
  .contacts-hero__media {
    animation: contacts-enter 560ms cubic-bezier(.22,.8,.2,1) both;
  }
  .contacts-hero__media { animation-delay: 90ms; }
  @keyframes contacts-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 767px) {
  .contacts-page { padding-top: 40px; }
  .contacts-hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 16px 40px;
  }
  .contacts-hero__content { padding-right: 0; }
  .contacts-hero h1,
  .contacts-section-heading h2,
  .contacts-location h2 { font-size: 26px; line-height: 1.15; }
  .contacts-hero__lead,
  .contacts-section-heading > p { margin-top: 10px; font-size: 12px; line-height: 1.35; }
  .contacts-primary { margin-top: 40px; }
  .contacts-primary a { gap: 8px; padding: 18px 0; }
  .contacts-primary strong { font-size: 17px; }
  .contacts-hero__media img {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
  }
  .contacts-social,
  .contacts-location { padding: 40px 16px; }
  .contacts-section-heading,
  .contacts-location__heading {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 40px;
  }
  .contacts-location__heading > p { font-size: 18px; }
  .contacts-social__list > a {
    min-height: 88px;
    gap: 12px;
    padding: 18px 0;
  }
  .contacts-social__list b { font-size: 16px; }
  .contacts-social__list small,
  .contacts-social__list em { font-size: 11px; }
  .contacts-social__list > a:hover,
  .contacts-social__list > a:focus-visible { padding-right: 10px; padding-left: 10px; }
  .contacts-routes { grid-template-columns: 1fr; }
  .contacts-routes article,
  .contacts-routes article + article {
    min-height: 280px;
    gap: 40px;
    padding: 24px 0;
    border-left: 0;
  }
  .contacts-routes h3 { font-size: 24px; }
  .contacts-routes p { font-size: 12px; }
}
