:root {
  color-scheme: dark;
}

body.contact-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
  color: #fff;
  font-family: var(--font-body-cn);
}

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

.contact-main {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

.contact-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.contact-background.about-hero {
  height: 100%;
  padding: 0;
}

.contact-background .about-hero-arcs {
  height: 58.5185%;
}

.contact-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 1920px;
  min-height: calc(100vh - 100px);
  margin: 80px auto 20px;
  padding: 160px 130px 80px;
  flex-direction: column;
  gap: 80px;
}

.contact-hero h1,
.contact-hero p,
.contact-info p,
.contact-info a,
.contact-qr,
.contact-submit-row p,
.contact-form-status,
.contact-copyright {
  margin: 0;
}

.contact-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.contact-hero h1 {
  background: linear-gradient(90deg, #5342f7 0%, #d1cefe 100%);
  background-clip: text;
  color: transparent;
  font-family: var(--font-display-cn);
  font-size: 60px;
  font-weight: 700;
  line-height: 80px;
  white-space: nowrap;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-hero p {
  font-size: 30px;
  font-weight: 500;
  line-height: 40px;
  white-space: nowrap;
}

.contact-layout {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}

.contact-info {
  display: flex;
  width: 319px;
  flex: 0 0 319px;
  flex-direction: column;
  gap: 40px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.contact-info-list a,
.contact-info-list p {
  color: #fff;
  text-decoration: none;
}

.contact-info-list a:hover {
  opacity: 0.78;
}

.contact-qr {
  display: flex;
  width: 218px;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.contact-qr-frame {
  width: 218px;
  height: 218px;
  padding: 6px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
}

.contact-qr img {
  display: block;
  width: 206px;
  height: 206px;
  border-radius: 4px;
  object-fit: contain;
}

.contact-qr figcaption {
  font-size: 14px;
  line-height: 14px;
}

.contact-form {
  position: relative;
  display: flex;
  width: 1040px;
  max-width: 1040px;
  flex: 0 0 1040px;
  flex-direction: column;
  gap: 60px;
}

.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: visible;
}

.contact-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
  overflow: visible;
}

.contact-field {
  display: flex;
  height: 46px;
  min-width: 0;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  align-items: center;
  color: #fff;
  font: 500 14px/14px var(--font-body-cn);
}

.contact-field:has(.contact-field-error) {
  height: auto;
  min-height: 46px;
  flex-wrap: wrap;
}

.contact-field .contact-field-error {
  width: 100%;
  flex: 0 0 100%;
  margin: 10px 0 0;
}

.contact-field-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.contact-field input,
.contact-select-trigger,
.contact-message-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 500 14px/14px var(--font-body-cn);
}

.contact-message-field:has(.contact-field-error) {
  height: auto;
  min-height: 120px;
  padding-bottom: 16px;
}

.contact-select:has(.contact-field-error:not(:empty)) {
  padding-bottom: 32px;
}

.contact-field input {
  min-width: 0;
  height: 14px;
  padding: 0 0 0 6px;
  border-bottom: 0;
  flex: 1 1 auto;
}

.contact-field input::placeholder,
.contact-message-field textarea::placeholder {
  color: #fff;
  opacity: 1;
}

.contact-field:focus-within,
.contact-select-trigger:focus-visible,
.contact-message-field textarea:focus {
  border-bottom-color: rgba(255, 255, 255, 0.86);
}

.contact-select {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.contact-select-trigger {
  display: flex;
  height: 46px;
  padding: 11px 16px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.contact-select-trigger svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 180ms ease;
}

.contact-select.is-open .contact-select-trigger svg {
  transform: rotate(180deg);
}

.contact-select-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  z-index: 10;
  display: flex;
  width: max-content;
  min-width: 160px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(100px);
  flex-direction: column;
  gap: 2px;
  -webkit-backdrop-filter: blur(100px);
}

.contact-select-menu[hidden] {
  display: none;
}

.contact-select-menu button {
  width: 100%;
  padding: 4px 16px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 400 14px/1.6 var(--font-body-cn);
  text-align: center;
  white-space: nowrap;
}

.contact-error-summary {
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 212, 212, 0.72);
  border-radius: 12px;
  background: rgba(110, 24, 45, 0.22);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.contact-error-summary p {
  margin: 0 0 8px;
  font-weight: 600;
}

.contact-error-summary ul {
  margin: 0;
  padding-left: 20px;
}

.contact-field-error {
  margin: 8px 0 0;
  color: #ffd4d4;
  font-size: 14px;
  line-height: 1.5;
}

.contact-field-error:empty {
  display: none;
}

.contact-field input[aria-invalid="true"],
.contact-message-field textarea[aria-invalid="true"],
.contact-select-trigger[aria-invalid="true"] {
  border-color: #ffd4d4;
  box-shadow: 0 1px 0 #ffd4d4;
}

.contact-select-menu button:hover,
.contact-select-menu button:focus-visible,
.contact-select-menu button[aria-selected="true"] {
  outline: 0;
  background: rgba(255, 255, 255, 0.2);
}

.contact-message-field {
  display: flex;
  height: 120px;
  padding: 16px 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  flex-direction: column;
  gap: 0;
  font-size: 14px;
  line-height: 14px;
}

.contact-message-field > span {
  flex: 0 0 14px;
  font-weight: 500;
}

.contact-message-field textarea {
  height: 90px;
  min-height: 90px;
  padding: 60px 0 16px;
  border-bottom: 0;
  color: #ccc;
  font-weight: 400;
  resize: none;
}

.contact-message-field textarea::placeholder {
  color: #ccc;
}

.contact-submit-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.contact-submit {
  padding: 16px 26px;
  border: 1px solid #fff;
  border-radius: 45px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  color: #fff;
  cursor: pointer;
  font: 500 14px/1.4 var(--font-body-cn);
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  outline: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05));
}

.contact-submit-row p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.6px;
}

.contact-form-status {
  position: static;
  width: 100%;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
}

.contact-form-status:empty {
  display: none;
}

.contact-copyright {
  position: absolute;
  bottom: 36px;
  left: 60px;
  right: 60px;
  z-index: 2;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

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

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.contact-form-status.is-success {
  color: #fff;
}

.contact-form-status.is-error {
  color: #ffd4d4;
}

@media (max-width: 1700px) {
  .contact-content {
    padding-right: clamp(48px, 6.77vw, 130px);
    padding-left: clamp(48px, 6.77vw, 130px);
  }

  .contact-hero h1 {
    font-size: clamp(48px, 3.125vw, 60px);
  }

  .contact-hero p {
    font-size: clamp(22px, 1.5625vw, 30px);
  }

  .contact-form {
    width: min(1040px, calc(100vw - 570px));
    flex-basis: min(1040px, calc(100vw - 570px));
  }
}

@media (max-height: 1000px) and (min-width: 761px) {
  .contact-content {
    min-height: calc(100vh - 80px);
    margin-bottom: 0;
    padding-top: clamp(64px, 9vh, 120px);
    padding-bottom: 16px;
    gap: clamp(32px, 4.5vh, 48px);
  }

  .contact-copyright {
    bottom: 36px;
  }
}

@media (max-height: 800px) and (min-width: 761px) {
  .contact-content {
    padding-top: 48px;
    padding-bottom: 8px;
    gap: 24px;
  }

  .contact-copyright {
    bottom: 36px;
  }
}

@media (max-width: 1280px) {
  .contact-main {
    min-height: 100vh;
  }

  .contact-content {
    min-height: calc(100vh - 80px);
    padding-top: min(120px, 9vh);
    gap: min(64px, 4.5vh);
  }

  .contact-hero h1,
  .contact-hero p {
    white-space: normal;
  }

  .contact-layout {
    gap: 64px;
  }

  .contact-info {
    width: 280px;
    flex-basis: 280px;
  }

  .contact-form {
    width: auto;
    flex: 1 1 auto;
  }

  .contact-copyright {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 2;
    padding: 0 48px 32px;
  }
}

@media (max-width: 1023px) and (min-width: 761px) {
  .contact-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .contact-field input,
  .contact-select-trigger,
  .contact-message-field textarea {
    font-size: 16px;
    line-height: 1.5;
  }

  .contact-main {
    overflow: hidden;
  }

  .contact-content {
    min-height: auto;
    margin: 80px 0 0;
    padding: 72px 24px 64px;
    gap: 56px;
  }

  .contact-hero h1 {
    font-size: 42px;
    line-height: 1.25;
  }

  .contact-hero p {
    font-size: 18px;
    line-height: 1.65;
  }

  .contact-layout {
    flex-direction: column;
    gap: 64px;
  }

  .contact-info,
  .contact-form {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .contact-info-list {
    line-height: 1.5;
    white-space: normal;
  }

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

  .contact-message-field {
    height: 176px;
  }

  .contact-message-field textarea {
    height: 146px;
    min-height: 146px;
    padding-top: 36px;
    line-height: 1.6;
  }

  .contact-submit-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .contact-submit-row p {
    line-height: 1.5;
  }

  .contact-copyright {
    padding: 0 24px 36px;
    font-size: 12px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-select-trigger svg {
    transition: none;
  }
}

/* Phone and tablet: the inquiry form leads, while contact details follow.
   Width remains constrained by the existing responsive content gutters. */
@media (max-width: 1023px) {
  .contact-layout {
    flex-direction: column;
    gap: 64px;
  }

  .contact-form {
    order: 1;
    width: 100%;
    max-width: none;
    flex: 0 1 auto;
  }

  .contact-info {
    order: 2;
    width: 100%;
    max-width: none;
    flex: 0 1 auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .contact-content {
    padding-right: var(--page-gutter-tablet);
    padding-left: var(--page-gutter-tablet);
  }

  .contact-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 218px;
    align-items: start;
    gap: 64px;
  }

  .contact-qr {
    justify-self: end;
  }

  .contact-message-field textarea {
    height: 30px;
    min-height: 30px;
    margin-top: auto;
    padding: 0 0 16px;
  }
}

@media (max-width: 767px) {
  .contact-content {
    padding-right: var(--page-gutter-mobile);
    padding-left: var(--page-gutter-mobile);
  }

  .contact-message-field textarea {
    height: 40px;
    min-height: 40px;
    margin-top: auto;
    padding: 0 0 16px;
  }
}
