.page--contact #main-content {
  background: #fafafa;
}

.contact-page {
  color: #666;
  background: #fafafa;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 16px;
}

.contact-page > .cms-hero {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #111;
}

.contact-page > .cms-hero picture,
.contact-page > .cms-hero picture img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.contact-page > .cms-hero .cms-hero__shade {
  display: none;
}

.contact-page > .cms-hero .cms-hero__copy {
  top: 50%;
  right: auto;
  left: 20vw;
  max-width: 30vw;
  text-align: left;
  transform: translateY(-50%);
  animation: contact-page-headline 2s linear 1;
}

.contact-page > .cms-hero h1 {
  margin: 0 0 2.6875rem;
  color: #e3e3e3;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}

.contact-page > .cms-hero .cms-buttons:empty,
.contact-page > .cms-hero .cms-hero__copy > p:empty {
  display: none;
}

/* /us on the English source has no banner at any breakpoint.  Existing
   operator content stays in Wagtail and Japanese/Chinese layouts are intact. */
html[lang="en"] .is-overseas-site .contact-page > .cms-hero {
  display: none;
}

@keyframes contact-page-headline {
  0% { top: 0; opacity: 0; }
  100% { top: 50%; opacity: 1; }
}

.contact-page__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5.25rem;
  margin-bottom: 11.5625rem;
  background: var(--contact-section-bg, transparent);
}

.contact-page__form-section {
  width: 80vw;
  margin-top: 5vw;
}

.contact-page__heading {
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contact-page__heading h2 {
  margin: 0;
  color: #666;
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1.4;
}

.contact-page__form {
  margin-top: 2.5625rem;
}

.contact-page__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 1.25rem;
}

.contact-page__field {
  position: relative;
  display: flex;
  gap: .25rem;
  width: 100%;
  min-width: 0;
}

.contact-page__field--wide {
  grid-column: 1 / -1;
}

.contact-page__field > label {
  width: 10rem;
  flex: 0 0 10rem;
  margin-right: .625rem;
  color: #8c8c8c;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.contact-page__field > label span {
  margin-right: .125rem;
  color: red;
}

.contact-page__control {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.contact-page__control input,
.contact-page__control select,
.contact-page__control textarea {
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  outline: none;
  color: #000;
  background: #fff;
  font: 400 13.3333px/normal Arial, sans-serif;
}

.contact-page__control input,
.contact-page__control select {
  height: 1.75rem;
  padding: 1px 2px;
}

.contact-page__control--location input {
  padding-right: 1.875rem;
}

.contact-page__control textarea {
  display: block;
  width: 100%;
  height: 9.625rem;
  min-height: 9.625rem;
  padding: 1px 2px;
  resize: vertical;
}

.contact-page__control input:focus,
.contact-page__control select:focus,
.contact-page__control textarea:focus {
  outline: none;
}

.contact-page__location-refresh {
  position: absolute;
  top: 50%;
  right: .5rem;
  width: 1.625rem;
  height: 1.625rem;
  padding: 0;
  border: 0;
  color: #8c8c8c;
  background: transparent;
  font-size: .875rem;
  line-height: 1.625rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .3s ease, transform .3s ease;
}

.contact-page__location-refresh:hover,
.contact-page__location-refresh:focus-visible {
  color: #e3540b;
  transform: translateY(-50%) rotate(90deg);
}

.contact-page__location-refresh.is-loading {
  color: #e3540b;
  animation: contact-location-loading 1s linear infinite;
}

@keyframes contact-location-loading {
  to { transform: translateY(-50%) rotate(360deg); }
}

.contact-page__field-errors {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1;
  color: #c52626;
  font-size: .75rem;
}

.contact-page__field-errors ul,
.contact-page__form-errors ul {
  margin: .15rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-page__submit-row {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.contact-page__submit-row button {
  width: 6.25rem;
  height: 1.625rem;
  padding: 0;
  border: .0625rem solid #ccc;
  border-radius: .125rem;
  color: #f0f0f0;
  background: #e3540b;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.625rem;
  text-align: center;
  cursor: pointer;
  box-sizing: content-box;
}

.contact-page__submit-row button:disabled {
  opacity: 1;
  cursor: default;
}

.contact-page__legacy {
  width: 80vw;
  min-height: 30rem;
  margin: 0 auto;
  padding: 8rem 0;
}

.contact-info {
  padding: 5.25rem 0;
  background: var(--contact-info-bg, #fafafa);
}

.contact-info__inner {
  width: 80vw;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 5vw;
}

.contact-info__copy h2 {
  margin: 0 0 2.5rem;
  color: #666;
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1;
}

.contact-info__copy p {
  margin: 0 0 1.25rem;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  color: #666;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-info__copy p span {
  color: #8c8c8c;
}

.contact-info__copy a,
.contact-info__copy strong {
  color: inherit;
  font-weight: 400;
}

.contact-info__social {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.contact-info__social a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color .2s ease;
}

.contact-info__social a:hover {
  color: #e3540b;
}

.contact-info__social img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.contact-info__visual,
.contact-info__visual img {
  width: 100%;
  display: block;
}

@media screen and (max-width: 1024px) {
  .contact-page > .cms-hero .cms-hero__copy {
    left: 11.25rem;
  }

  .contact-page > .cms-hero h1 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 767px) {
  .page--contact {
    padding-top: 0;
  }

  /* The English source removes the desktop contact banner completely on
     phones; keep this scoped to the overseas shell so the Chinese page is
     unchanged. */
  .contact-page > .cms-hero .cms-hero__copy {
    right: auto;
    max-width: none;
    text-align: left;
  }

  .contact-page__form-section {
    width: 80vw;
    margin: 1.875rem;
  }

  .contact-page__fields {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.25rem;
  }

  .contact-page__field--wide {
    grid-column: auto;
  }

  .contact-page__control input,
  .contact-page__control textarea {
    width: 100%;
  }

  .contact-info {
    padding: 3.75rem 0;
  }

  .contact-info__inner {
    width: 80vw;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 800px) {
  .contact-page {
    padding-top: 2.5rem;
  }

  .contact-page__field > label {
    width: 9rem;
    flex-basis: 9rem;
  }

  .contact-page > .cms-hero .cms-hero__copy {
    transform: translateY(calc(-50% - .375rem));
  }
}

@media screen and (max-width: 478px) {
  .contact-page > .cms-hero .cms-hero__copy {
    left: 1.25rem;
  }

  .contact-page > .cms-hero h1 {
    font-size: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page > .cms-hero .cms-hero__copy,
  .contact-page__location-refresh {
    animation: none;
    transition: none;
  }
}
