.contact-section {
  position: relative;
  background: var(--color-background);
  isolation: isolate;
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  z-index: -1;
  background: #1b1d20;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100svh;
  padding: 0;
}

.contact-copy,
.contact-form-panel {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-block: var(--anchor-offset) 56px;
}

.contact-copy {
  padding-left: var(--page-gutter);
  padding-right: clamp(32px, 4vw, 64px);
  background: #1b1d20;
  color: #fff;
}

.contact-heading {
  width: 100%;
}

.contact-copy h2 {
  font-size: clamp(36px, 3.9vw, 56px);
  line-height: 1.2;
}

.contact-copy h2 > span:not(.motion-word-clip) {
  color: var(--color-accent);
}

.contact-heading > p {
  max-width: 480px;
  margin-top: 24px;
  color: #b8bcc1;
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 56px;
  font-size: 22px;
  line-height: 32px;
}

.contact-form-panel {
  padding-left: clamp(32px, 4vw, 64px);
  padding-right: var(--page-gutter);
}

.brief-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
}

.form-intro {
  margin-bottom: 4px;
  font-size: 26px;
  line-height: 34px;
  font-weight: 500;
}

.brief-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.brief-form input,
.brief-form textarea,
.brief-form select {
  width: 100%;
  min-height: 54px;
  padding: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  transition: border-color .2s;
}

.brief-form textarea {
  min-height: 112px;
  resize: vertical;
}

.brief-form input::placeholder,
.brief-form textarea::placeholder {
  color: var(--color-textdisabled);
  opacity: 1;
}

.brief-form input:focus,
.brief-form textarea:focus,
.brief-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.brief-form .button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

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

.form-status {
  font-size: 13px;
  color: var(--color-error);
}

.brief-form .form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.brief-form .button:disabled {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 767px) {
  .brief-form :is(input, textarea, select) { font-size: 16px; }
}

@media (min-width: 901px) and (max-height: 800px) {
  .contact-copy,
  .contact-form-panel { padding-bottom: 40px; }
  .brief-form { gap: 14px; }
  .brief-form label { gap: 6px; }
  .brief-form input,
  .brief-form select { min-height: 48px; padding: 12px 16px; }
  .brief-form textarea { min-height: 96px; padding: 12px 16px; }
}

@media (max-width: 900px) {
  .contact-section::before { display: none; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .contact-copy { padding: var(--anchor-offset) var(--page-gutter) 32px; }
  .contact-copy h2 { font-size: 36px; line-height: 44px; }
  .contact-heading > p { max-width: none; margin-top: 16px; font-size: 16px; line-height: 24px; }
  .contact-details { flex-direction: row; flex-wrap: wrap; gap: 4px 24px; margin-top: 24px; font-size: 16px; line-height: 24px; }
  .contact-form-panel { padding: 32px var(--page-gutter); }
  .brief-form { gap: 16px; }
  .form-intro { margin-bottom: 4px; font-size: 22px; line-height: 30px; }
}

@media (max-width: 767px) {
  .contact-section {
    --color-background: #1b1d20;
    --color-surface: #282b2f;
    --color-text: #fff;
    --color-border: #555b63;
    --color-textdisabled: #b8bcc1;
    --color-error: #f28b9b;
    color: var(--color-text);
    color-scheme: dark;
  }
  .contact-copy { padding-bottom: 24px; }
  .contact-copy h2 { font-size: 30px; line-height: 36px; }
  .contact-heading > p { margin-top: 12px; font-size: 14px; line-height: 22px; }
  .contact-details { gap: 4px 20px; margin-top: 20px; font-size: 14px; line-height: 22px; }
  .contact-form-panel { padding-block: 24px; }
  .brief-form { gap: 12px; }
  .brief-form label { gap: 6px; font-size: 12px; line-height: 18px; }
  .form-intro { font-size: 20px; line-height: 28px; }
  .brief-form input,
  .brief-form select { min-height: 44px; padding: 10px 12px; }
  .brief-form textarea { min-height: 88px; padding: 10px 12px; }
  .brief-form .button { min-height: 48px; padding-block: 12px; }
}

@media (max-width: 767px) and (max-height: 780px) {
  .contact-copy h2 { font-size: 27px; line-height: 32px; }
  .contact-heading > p { margin-top: 8px; line-height: 20px; }
  .contact-details { margin-top: 16px; }
  .brief-form { gap: 10px; }
  .form-intro { font-size: 18px; line-height: 24px; }
  .brief-form label { gap: 4px; line-height: 16px; }
  .brief-form input,
  .brief-form select { min-height: 40px; padding: 8px 12px; line-height: 20px; }
  .brief-form textarea { min-height: 72px; padding: 8px 12px; line-height: 18px; }
  .brief-form .button { min-height: 44px; padding-block: 10px; }
}
