:root {
  --sand-light: #eadfce;
  --off-white: #f6f1e8;
  --paper: #f9f5ed;
  --olive: #596040;
  --olive-dark: #343920;
  --charcoal: #1d1e18;
  --muted: #747064;
  --orange: #ff5a12;
  --line: rgb(29 30 24 / 18%);
  --line-strong: rgb(29 30 24 / 35%);
  --shadow: 0 24px 70px rgb(38 31 21 / 14%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--charcoal);
  background: var(--sand-light);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    linear-gradient(
      rgb(255 255 255 / 14%),
      rgb(255 255 255 / 14%)
    ),
    var(--sand-light);
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.11;
  background-image:
    repeating-radial-gradient(
      circle at 20% 30%,
      rgb(38 31 21 / 16%) 0 0.5px,
      transparent 0.8px 4px
    );
  mix-blend-mode: multiply;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

/* Page layout */

.page-shell {
  display: grid;
  height: 100vh;
  padding: 10px;
  overflow: hidden;
  place-items: center;
}

.contact-layout {
  display: grid;
  width: min(1540px, 100%);
  height: calc(100vh - 20px);
  min-height: 0;
  grid-template-columns:
    minmax(400px, 0.86fr)
    minmax(600px, 1.24fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow);
}

/* Left panel */

.intro-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 28px 38px;
  overflow: hidden;
  container-type: inline-size;
  flex-direction: column;
  color: var(--off-white);
  background:
    linear-gradient(
      150deg,
      rgb(28 31 20 / 99%) 0%,
      rgb(55 57 33 / 97%) 48%,
      rgb(24 27 18 / 99%) 100%
    );
}

.intro-panel::before {
  position: absolute;
  right: -25%;
  bottom: -22%;
  width: 105%;
  aspect-ratio: 1;
  border: 1px solid rgb(246 241 232 / 13%);
  border-radius: 50%;
  content: "";
}

.intro-panel::after {
  position: absolute;
  right: 14%;
  bottom: 5%;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid rgb(246 241 232 / 10%);
  border-radius: 50%;
  content: "";
}

.intro-panel__wash {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(
      circle at 82% 25%,
      rgb(255 90 18 / 42%),
      transparent 25%
    ),
    linear-gradient(
      180deg,
      transparent 48%,
      rgb(0 0 0 / 26%) 100%
    );
}

.site-header,
.intro-content,
.intro-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  min-width: 0;
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.5rem, 11cqw, 4.2rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.wordmark strong {
  color: var(--orange);
}

.edition {
  padding-top: 4px;
  color: rgb(246 241 232 / 68%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.intro-content {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: auto 0;
  padding: 30px 0;
  flex-direction: column;
  align-items: flex-start;
}

.section-label {
  display: flex;
  margin: 0 0 18px;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label span {
  color: var(--orange);
}

.intro-content h1 {
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(3.8rem, 16cqw, 6.4rem);
  font-weight: 900;
  line-height: 0.79;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.intro-content h1 span {
  display: block;
  max-width: 100%;
  color: var(--orange);
  font-size: 0.84em;
}

.intro-copy {
  max-width: 38ch;
  margin: 24px 0 0;
  color: rgb(246 241 232 / 80%);
  font-size: 0.94rem;
  line-height: 1.55;
}

.intro-footer {
  display: flex;
  padding-top: 18px;
  border-top: 1px solid rgb(246 241 232 / 22%);
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.intro-footer p {
  margin: 0;
  color: rgb(246 241 232 / 76%);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decorative-mark {
  color: var(--orange);
  font-size: 2rem;
}

/* Right panel */

.form-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(
      rgb(255 255 255 / 22%),
      rgb(255 255 255 / 22%)
    ),
    var(--off-white);
}

.form-panel__header {
  display: flex;
  min-height: 0;
  padding: 24px 42px 22px;
  border-bottom: 1px solid var(--line);
  align-items: flex-end;
  justify-content: space-between;
}

.form-panel__header .section-label {
  margin-bottom: 10px;
}

.form-panel__header h2 {
  max-width: 9ch;
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.8rem, 4.4vw, 4.6rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

/* Form */

.contact-form {
  display: grid;
  min-height: 0;
  padding: 0 42px;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto;
}

.form-field {
  border-bottom: 1px solid var(--line);
}

.email-field {
  padding: 22px 0 20px;
}

.message-field {
  display: grid;
  min-height: 0;
  padding: 22px 0 20px;
  grid-template-rows: auto minmax(0, 1fr);
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.field-number {
  color: var(--orange);
  font-family: "Inter", sans-serif;
  font-size: 0.67rem;
  font-weight: 800;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

input,
textarea {
  width: 100%;
  color: var(--charcoal);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--charcoal);
  border-radius: 0;
  outline: none;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

input {
  margin-top: 14px;
  padding: 10px 0 12px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 700;
}

textarea {
  min-height: 110px;
  height: 100%;
  margin-top: 14px;
  padding: 10px 0 12px;
  font-size: 1rem;
  line-height: 1.55;
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: rgb(29 30 24 / 36%);
}

input:focus,
textarea:focus {
  border-color: var(--orange);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-bottom-color: #a42a16;
}

.field-help,
.character-count {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.character-count {
  margin: 0;
  white-space: nowrap;
}

/* Submit area */

.form-actions {
  display: grid;
  min-height: 0;
  padding: 18px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

.form-status.success {
  color: var(--olive);
}

.form-status.error {
  color: #a42a16;
}

#submit-button {
  display: inline-flex;
  min-width: 210px;
  min-height: 52px;
  padding: 13px 18px 13px 22px;
  color: var(--off-white);
  background: var(--charcoal);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

#submit-button span:last-child {
  color: var(--orange);
  font-size: 1.45rem;
}

#submit-button:hover:not(:disabled) {
  background: var(--olive-dark);
  transform: translateY(-2px);
}

#submit-button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

#submit-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

/* Honeypot */

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

/* Short desktop screens */

@media (max-height: 760px) and (min-width: 921px) {
  .intro-panel {
    padding-block: 20px;
  }

  .intro-content {
    padding-block: 18px;
  }

  .intro-content h1 {
    font-size: clamp(3.3rem, 14cqw, 5.5rem);
  }

  .intro-copy {
    margin-top: 16px;
    font-size: 0.88rem;
  }

  .intro-footer {
    padding-top: 14px;
  }

  .form-panel__header {
    padding-block: 18px;
  }

  .form-panel__header h2 {
    font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  }

  .email-field,
  .message-field {
    padding-block: 15px;
  }

  textarea {
    min-height: 80px;
  }

  .form-actions {
    padding-block: 12px;
  }
}

/* Medium-width desktops */

@media (max-width: 1120px) {
  .contact-layout {
    grid-template-columns:
      minmax(360px, 0.82fr)
      minmax(520px, 1.18fr);
  }

  .intro-panel {
    padding-inline: 30px;
  }

  .form-panel__header,
  .contact-form {
    padding-inline: 34px;
  }
}

/* Tablet */

@media (max-width: 920px) {
  body {
    min-height: 100vh;
  }

  .page-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    padding: 0;
    overflow: visible;
  }

  .contact-layout {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border: 0;
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: 560px;
    padding: 28px 30px;
  }

  .intro-content {
    padding: 76px 0 60px;
  }

  .intro-content h1 {
    max-width: 9ch;
    font-size: clamp(4.4rem, 15vw, 7.3rem);
  }

  .form-panel {
    min-height: 680px;
  }

  .contact-form {
    grid-template-rows: auto auto auto;
  }

  .message-field {
    min-height: 320px;
  }

  textarea {
    min-height: 220px;
    resize: vertical;
  }
}

/* Mobile */

@media (max-width: 620px) {
  .intro-panel {
    min-height: 500px;
    padding: 22px;
  }

  .wordmark {
    font-size: 2.7rem;
  }

  .intro-content {
    padding: 60px 0 48px;
  }

  .intro-content h1 {
    max-width: 100%;
    font-size: clamp(3.7rem, 19vw, 5.5rem);
  }

  .intro-copy {
    margin-top: 22px;
    font-size: 0.92rem;
  }

  .form-panel__header {
    padding: 26px 22px;
  }

  .form-panel__header h2 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .contact-form {
    padding: 0 22px;
  }

  .email-field,
  .message-field {
    padding-block: 26px;
  }

  .field-heading {
    align-items: flex-start;
  }

  input {
    font-size: 1.8rem;
  }

  .message-field {
    min-height: 300px;
  }

  textarea {
    min-height: 200px;
  }

  .form-actions {
    padding-block: 22px;
    grid-template-columns: 1fr;
  }

  #submit-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}