.contact {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  padding: var(--panel-top) var(--gutter) var(--panel-bottom);
}

.contact h2 {
  font-size: clamp(40px,min(5.86vw,10svh),150px);
  line-height: 1.08;
  margin: 0;
}

.contact-layout {
  flex: 1;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: var(--space-lg);
  align-items: center;
  padding: 30px 0 36px;
}

.contact-intro {
  color: var(--light-muted);
  font-size: var(--text-body);
  line-height: 1.5;
  margin-top: var(--space-md);
}

.contact-form {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  justify-self: stretch;
}

.form-heading {
  display: block;
  margin-bottom: clamp(28px,1.5vw,38px);
  font-size: clamp(22px,calc(14px + .9375vw),38px);
}

.form-field {
  position: relative;
  display: block;
  min-width: 0;
  border-bottom: 1px solid color-mix(in srgb,var(--light-muted) 35%,transparent);
  padding: 12px 0 clamp(18px,1vw,26px);
}

.form-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
  pointer-events: none;
}

.form-field>span {
  display: block;
  font-size: var(--text-small);
  margin-bottom: 12px;
  color: var(--light-muted);
  transition: color .3s;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--light);
  font-size: var(--text-field);
  line-height: 1.35;
  border-radius: 0;
}

.form-field textarea {
  resize: vertical;
  display: block;
  min-height: 78px;
  height: 78px;
  max-height: 120px;
}

.form-field input::placeholder {
  opacity: 1;
  color: var(--light-muted);
}

.form-field textarea::placeholder {
  opacity: 1;
  color: var(--light-muted);
}

.form-field:focus-within::after {
  transform: scaleX(1);
}

.form-field:focus-within>span {
  color: var(--accent);
}

.footer-legal a:hover {
  color: var(--accent);
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-top:hover {
  color: var(--accent);
}

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

.form-submit-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: clamp(24px,1.25vw,32px);
}

.form-submit-row>span {
  display: none;
}

.form-submit-row button {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--dark);
  transition: transform .2s;
  width: 100%;
  min-height: clamp(52px,2.42vw,62px);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-lead);
  text-align: left;
}

.form-submit-row button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.form-submit-row button:disabled {
  opacity: .6;
  cursor: wait;
}

.form-submit-row button span {
  line-height: 1;
  font-size: 26px;
}

.form-status {
  line-height: 1.4;
  color: var(--accent);
  margin-top: 8px;
  min-height: 18px;
  font-size: var(--text-xs);
}

.form-status.is-error {
  color: var(--error);
}

.contact-footer {
  position: relative;
  width: 100%;
  display: grid;
  flex: none;
  margin: 0;
  padding-top: var(--space-md);
  grid-template-columns: minmax(0,1fr) auto auto;
  grid-template-areas: "details social top" "meta legal legal";
  column-gap: var(--space-lg);
  row-gap: var(--space-md);
  border-top: 1px solid color-mix(in srgb,var(--light-muted) 35%,transparent);
}

.footer-cell {
  min-width: 0;
  display: flex;
  align-items: center;
}

.footer-top {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: space-between;
  white-space: nowrap;
  transition: color .2s;
  padding: 0;
  border: 0;
  grid-area: top;
  gap: 20px;
  font-size: var(--text-body);
}

.footer-details p {
  font-size: var(--text-micro);
  line-height: 1.5;
  color: var(--light-muted);
}

.footer-legal a {
  display: inline-flex;
  gap: var(--space-sm);
  transition: color .2s,border-color .2s;
  align-items: center;
  font-size: var(--text-small);
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb,var(--light-muted) 35%,transparent);
  text-underline-offset: 5px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  transition: color .2s;
  gap: var(--space-sm);
  font-size: var(--text-lead);
}

.footer-social a svg {
  color: var(--accent);
  width: 30px;
  height: 30px;
}

.footer-top-arrow {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent);
  border: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  font-size: 30px;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  grid-area: meta;
  align-items: center;
  font-size: var(--text-micro);
  color: var(--light-muted);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  margin-top: clamp(24px,1.25vw,32px);
  gap: var(--space-sm);
}

.form-consent input {
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.form-consent input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.form-consent label {
  color: var(--light-muted);
  cursor: pointer;
  font-size: var(--text-small);
  max-width: none;
  line-height: 1.5;
}

.contact-form .policy-link {
  color: var(--light);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb,var(--light-muted) 35%,transparent);
  text-underline-offset: 3px;
}

.contact-form .policy-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.form-data-note,
.form-policy {
  color: var(--light-muted);
  font-size: var(--text-small);
  line-height: 1.5;
  margin-top: 12px;
}

.form-data-note {
  font-size: var(--text-xs);
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: var(--space-md);
  row-gap: clamp(24px,1.5vw,38px);
}

.form-field:last-child {
  grid-column: 1/-1;
}

.form-contact {
  grid-column: 1/-1;
}

.contact-methods,
.contact-method-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.contact-methods {
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--light-muted);
  font-size: var(--text-small);
}

.contact-method-options label {
  position: relative;
  cursor: pointer;
}

.contact-method-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-method-options span {
  display: block;
  padding-block: 5px;
  border-bottom: 1px solid transparent;
  transition: color .2s,border-color .2s;
}

.contact-method-options input:checked+span {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-method-options input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.footer-details {
  grid-area: details;
}

.footer-legal {
  grid-area: legal;
  justify-self: end;
}

.footer-social {
  grid-area: social;
}

@media(min-width:901px) and (max-height:800px) {
  .contact {
    padding-top: 90px;
    padding-bottom: 20px;
    overflow-y: auto;
  }

  .contact-layout {
    flex: none;
    padding: 18px 0 15px;
  }

  .contact-intro {
    margin-top: 22px;
  }

  .form-heading {
    margin-bottom: 20px;
  }

  .form-field {
    padding: 10px 0 18px;
  }

  .form-field>span {
    margin-bottom: 7px;
  }

  .form-field textarea {
    min-height: 60px;
    height: 60px;
    max-height: 85px;
  }

  .form-consent {
    margin-top: 20px;
  }

  .form-submit-row {
    margin-top: 20px;
  }

  .form-submit-row button {
    min-height: 52px;
    padding: 13px 20px;
  }

  .contact-footer {
    margin-top: auto;
    padding-top: 18px;
    row-gap: 16px;
    column-gap: 35px;
  }
}

@media(min-width:901px) and (max-height:650px) {
  .contact {
    overflow-y: auto;
  }

  .contact-layout {
    flex: none;
  }

  .contact-footer {
    margin-top: auto;
  }
}

@media(max-width:900px) {
  .contact h2 {
    font-size: var(--title-mobile);
  }

  .contact {
    padding: var(--panel-top) var(--gutter) var(--panel-bottom);
  }

  .contact-layout {
    display: block;
    padding: 38px 0 48px;
  }

  .contact-intro {
    margin-top: 25px;
  }

  .contact-form {
    margin-top: 48px;
  }

  .contact-footer {
    grid-template-columns: 1fr auto;
    grid-template-areas: "details details" "social top" "legal legal" "meta meta";
    row-gap: 24px;
    column-gap: 20px;
    padding-top: 26px;
  }

  .footer-legal {
    justify-self: start;
  }
}

@media(max-width:540px) {
  .form-fields {
    grid-template-columns: 1fr;
  }
}

@media(prefers-reduced-motion:reduce) {
  .form-field::after,
  .form-field>span {
    transition: none;
  }

  .form-submit-row button {
    transition: none;
  }
}
