:root {
  --ink: #111111;
  --muted: #666666;
  --line: #d8d8d8;
  --paper: #ffffff;
  --form-width: 680px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.map {
  position: absolute;
  z-index: 0;
  top: -12px;
  right: -2.5vw;
  width: min(58vw, 980px);
  aspect-ratio: 937 / 526;
  background: url("assets/world-map.png") center / contain no-repeat;
  opacity: .82;
  pointer-events: none;
}

.site-header {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  padding: clamp(22px, 4vh, 34px) 48px;
}

.wordmark {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(20px, 2vw, 24px);
  font-stretch: condensed;
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1;
  white-space: nowrap;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(82px, 12vh, 120px) 24px clamp(20px, 4vh, 42px);
}

.contact-shell {
  width: min(100%, 960px);
}

.contact-form {
  width: min(100%, var(--form-width));
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: clamp(12px, 2vh, 20px);
}

.form-row-message { align-items: start; }

label {
  padding-top: 2px;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: .13em;
}

.form-row-message label { padding-top: 16px; }

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, .84);
  color: var(--ink);
  font: 16px/1.4 Arial, Helvetica, sans-serif;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input {
  height: clamp(50px, 6.6vh, 58px);
  padding: 0 17px;
}

textarea {
  height: clamp(132px, 19vh, 166px);
  min-height: 88px;
  resize: none;
  padding: 15px 17px;
}

input::placeholder,
textarea::placeholder { color: #777; opacity: 1; }

input:focus,
textarea:focus {
  border-color: #808080;
  box-shadow: 0 0 0 1px #808080;
}

button {
  position: relative;
  min-height: clamp(52px, 7vh, 62px);
  width: min(100%, 408px);
  border: 0;
  border-radius: 0;
  padding: 0 32px;
  background: #101010;
  color: white;
  cursor: pointer;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: .12em;
  transition: background .16s ease, transform .16s ease;
}

button:hover { background: #252525; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .72; }

.arrow {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-52%);
  font: 24px/1 Arial, Helvetica, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}

.status-row {
  margin-top: -4px;
  margin-bottom: 0;
  min-height: 16px;
}

#form-status {
  margin: 0;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
#form-status.error { color: #7d1919; }
#form-status.success { color: #244c2a; }

@media (max-width: 760px) {
  .map {
    top: 0;
    right: -30vw;
    width: 112vw;
    opacity: .4;
  }

  .site-header {
    padding: 24px 20px;
  }

  .wordmark { font-size: 19px; }

  main {
    place-items: center;
    padding: 78px 20px 16px;
  }

  .contact-shell { width: 100%; }

  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: clamp(8px, 1.4vh, 12px);
  }

  label,
  .form-row-message label {
    padding-top: 0;
    font-size: 12px;
  }

  input {
    height: clamp(43px, 5.6vh, 50px);
  }

  textarea {
    height: clamp(92px, 15vh, 122px);
    min-height: 74px;
  }

  .action-row span:first-child,
  .status-row span:first-child { display: none; }

  button {
    width: 100%;
    min-height: clamp(48px, 6.4vh, 56px);
  }

  .status-row { min-height: 14px; }
  #form-status { min-height: 14px; font-size: 11px; }
}

@media (max-height: 650px) and (min-width: 761px) {
  .site-header { padding-top: 20px; padding-bottom: 20px; }
  main { padding-top: 72px; padding-bottom: 12px; }
  .form-row { margin-bottom: 9px; }
  input { height: 43px; }
  textarea { height: 104px; }
  button { min-height: 48px; }
}

@media (max-height: 720px) and (max-width: 760px) {
  .site-header { padding-top: 18px; }
  main { padding-top: 64px; padding-bottom: 8px; }
  .form-row { gap: 4px; margin-bottom: 7px; }
  input { height: 40px; }
  textarea { height: 80px; }
  button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
