.contact-page {
  --contact-accent: #e54138;
  --contact-ink: #17191c;
  --contact-surface: #f2f2f1;
  --contact-icon: #d9dcdf;
  background: #fff;
  color: var(--contact-ink);
}

.contact-page *,
.contact-page *::before,
.contact-page *::after {
  box-sizing: border-box;
}

.contact-page__section {
  padding: clamp(56px, 6vw, 96px) 3% clamp(72px, 8vw, 128px);
}

.contact-page__shell {
  width: min(1520px, 100%);
  margin: 0 auto;
}

.contact-page__title {
  margin: 0 0 clamp(44px, 5vw, 72px);
  color: var(--contact-accent);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(28px, 2.4vw, 40px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .04em;
  text-align: center;
  text-wrap: balance;
}

.contact-cards {
  width: min(1320px, 100%);
  margin-right: auto;
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 1.35vw, 24px);
}

.contact-card {
  position: relative;
  min-width: 0;
  min-height: clamp(220px, 16vw, 260px);
  padding: clamp(34px, 3vw, 50px) clamp(28px, 2.5vw, 42px);
  overflow: hidden;
  background: var(--contact-surface);
  border-radius: 10px;
  outline: none;
  isolation: isolate;
}

.contact-card::before {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--contact-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .48s cubic-bezier(.22, 1, .36, 1);
}

.contact-card:hover::before,
.contact-card:focus-visible::before {
  transform: scaleX(1);
}

.contact-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(229, 65, 56, .2);
}

.contact-card__label {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--contact-ink);
  font-size: clamp(19px, 1.25vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}

.contact-card__value {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 2.5vw, 42px);
  bottom: clamp(32px, 3vw, 48px);
  left: clamp(28px, 2.5vw, 42px);
  display: block;
  width: fit-content;
  max-width: calc(100% - clamp(56px, 5vw, 84px));
  margin: 0;
  color: var(--contact-ink);
  font-size: clamp(17px, 1.25vw, 23px);
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
  transition: color .28s ease;
}

.contact-card__value--number {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.contact-card__value--address {
  max-width: 72%;
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.65;
}

.contact-card:hover .contact-card__value[href],
.contact-card:focus-within .contact-card__value[href] {
  color: var(--contact-accent);
}

.contact-card__icon {
  position: absolute;
  z-index: 1;
  right: clamp(20px, 2vw, 34px);
  bottom: clamp(22px, 2vw, 34px);
  width: clamp(74px, 6.5vw, 104px);
  height: clamp(74px, 6.5vw, 104px);
  color: var(--contact-icon);
  fill: none;
  opacity: .58;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  transform: translateZ(0);
  transition: color .32s ease, opacity .32s ease, transform .42s cubic-bezier(.22, 1, .36, 1);
}

.contact-card__icon--location {
  width: clamp(82px, 7vw, 112px);
  height: clamp(82px, 7vw, 112px);
}

.contact-card:hover .contact-card__icon,
.contact-card:focus-visible .contact-card__icon,
.contact-card:focus-within .contact-card__icon {
  color: var(--contact-accent);
  opacity: .2;
  transform: translateY(-3px) scale(1.025);
}

.contact-map {
  position: relative;
  width: min(1320px, 100%);
  height: clamp(420px, 37vw, 570px);
  margin: clamp(64px, 7vw, 104px) auto 0;
  overflow: hidden;
  background: #f4f1eb;
  border-radius: 12px;
}

.contact-map__canvas {
  width: 100%;
  height: 100%;
}

.contact-map__status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: #f4f1eb;
  color: #6f6b65;
  font-size: 15px;
  transition: opacity .25s ease, visibility .25s ease;
}

.contact-map__status.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-map__status.is-error {
  padding: 24px;
  color: #706b65;
  text-align: center;
}

.contact-map__status.is-error .contact-map__loader {
  display: none;
}

.contact-map__loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(229, 65, 56, .2);
  border-top-color: var(--contact-accent);
  border-radius: 50%;
  animation: contact-map-loading .8s linear infinite;
}

.contact-map__info {
  min-width: 230px;
  padding: 4px 2px 2px;
  color: #242424;
  font-size: 13px;
  line-height: 1.65;
}

.contact-map__info strong {
  display: block;
  margin-bottom: 5px;
  color: #17191c;
  font-size: 15px;
}

.contact-map__info p {
  margin: 0;
}

.contact-message {
  width: min(1320px, 100%);
  margin: clamp(68px, 7vw, 104px) auto 0;
}

.contact-message__header {
  margin-bottom: clamp(34px, 4vw, 52px);
  text-align: center;
}

.contact-message__header h2 {
  margin: 0;
  color: var(--contact-ink);
  font-size: clamp(28px, 2.5vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .04em;
}

.contact-message__header span {
  display: block;
  width: 62px;
  height: 3px;
  margin: 20px auto 0;
  background: var(--contact-accent);
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.contact-form__field {
  position: relative;
  min-width: 0;
  height: 68px;
  border: 1px solid #dedede;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.contact-form__field:focus-within {
  border-color: var(--contact-accent);
  box-shadow: inset 0 -2px 0 var(--contact-accent);
}

.contact-form__field.is-invalid {
  border-color: var(--contact-accent);
}

.contact-form__label {
  position: absolute;
  z-index: 2;
  top: 0;
  right: clamp(22px, 2.3vw, 38px);
  bottom: 0;
  left: clamp(20px, 1.8vw, 28px);
  display: flex;
  gap: 12px;
  align-items: center;
  color: #858585;
  font-size: clamp(15px, 1vw, 17px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.contact-form__label svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: #a9a9a9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.contact-form__label em {
  margin-left: auto;
  color: var(--contact-accent);
  font-size: 17px;
  font-style: normal;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 23px clamp(20px, 1.8vw, 28px) 7px 62px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--contact-ink);
  font: inherit;
  font-size: 15px;
  outline: 0;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: transparent;
}

.contact-form__field:focus-within .contact-form__label,
.contact-form__field:has(input:not(:placeholder-shown)) .contact-form__label,
.contact-form__field:has(textarea:not(:placeholder-shown)) .contact-form__label {
  opacity: .72;
  transform: translateY(-20px) scale(.8);
  transform-origin: left center;
}

.contact-form__field--message {
  grid-column: 1 / -1;
  height: 170px;
}

.contact-form__label--message {
  top: 20px;
  bottom: auto;
  align-items: flex-start;
}

.contact-form__field textarea {
  padding-top: 48px;
  padding-left: clamp(20px, 1.8vw, 28px);
  resize: vertical;
  line-height: 1.7;
}

.contact-form__error {
  position: absolute;
  right: 12px;
  bottom: 7px;
  color: var(--contact-accent);
  font-size: 12px;
  line-height: 1;
}

.contact-form__privacy {
  margin: 20px 0 24px;
  color: #343434;
  font-size: 14px;
  line-height: 1.6;
}

.contact-form__privacy span {
  margin-right: 8px;
  color: var(--contact-accent);
}

.contact-form__actions {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(300px, 1fr);
  gap: clamp(32px, 7vw, 104px);
  align-items: start;
}

.contact-form__captcha {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  height: 58px;
  border: 1px solid #dedede;
}

.contact-form__captcha input {
  min-width: 0;
  padding: 0 20px;
  border: 0;
  color: var(--contact-ink);
  font: inherit;
  font-size: 15px;
  outline: 0;
}

.contact-form__captcha input:focus {
  box-shadow: inset 0 -2px 0 var(--contact-accent);
}

.contact-form__captcha-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #f1f1f1;
  border: 0;
  cursor: pointer;
}

.contact-form__captcha-refresh img {
  display: block;
  max-width: 100%;
  height: 40px;
}

.contact-form__captcha.is-invalid {
  border-color: var(--contact-accent);
}

.contact-form__captcha .contact-form__error {
  bottom: -20px;
  left: 0;
}

.contact-form__submit {
  display: flex;
  width: 100%;
  height: 58px;
  align-items: center;
  justify-content: center;
  background: var(--contact-accent);
  border: 1px solid var(--contact-accent);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background .25s ease, color .25s ease, transform .15s ease;
}

.contact-form__submit svg {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  fill: none;
  opacity: 0;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform: translateX(-8px);
  transition: opacity .25s ease, transform .25s ease;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  background: #c9362f;
  outline: none;
}

.contact-form__submit:hover svg,
.contact-form__submit:focus-visible svg {
  opacity: 1;
  transform: translateX(0);
}

.contact-form__submit:active {
  transform: translateY(1px) scale(.995);
}

.contact-form__status {
  min-height: 24px;
  margin: 22px 0 0;
  color: var(--contact-accent);
  font-size: 14px;
  text-align: right;
}

.contact-form__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes contact-map-loading {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .contact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .contact-page__section {
    padding-right: 5%;
    padding-left: 5%;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 188px;
    padding: 30px 26px;
  }

  .contact-card__value {
    right: 26px;
    bottom: 28px;
    left: 26px;
    max-width: calc(100% - 52px);
  }

  .contact-card__value--address {
    max-width: 75%;
  }

  .contact-map {
    height: 380px;
    margin-top: 48px;
    border-radius: 8px;
  }

  .contact-message {
    margin-top: 58px;
  }

  .contact-message__header {
    margin-bottom: 36px;
  }

  .contact-message__header span {
    width: 54px;
    margin-top: 18px;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form__field {
    height: 64px;
  }

  .contact-form__field--message {
    grid-column: auto;
    height: 150px;
  }

  .contact-form__label {
    left: 18px;
  }

  .contact-form__label em {
    display: none;
  }

  .contact-form__field input {
    padding-left: 54px;
  }

  .contact-form__field textarea {
    padding-left: 18px;
  }

  .contact-form__actions {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-form__captcha {
    grid-template-columns: minmax(0, 1fr) 124px;
    height: 54px;
  }

  .contact-form__submit {
    height: 54px;
  }

  .contact-form__status {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card::before,
  .contact-card__icon,
  .contact-card__value,
  .contact-map__status,
  .contact-form__field,
  .contact-form__label,
  .contact-form__submit,
  .contact-form__submit svg {
    transition: none;
  }

  .contact-map__loader {
    animation: none;
  }
}
