@font-face {
  font-family: Inter;
  src: url("./assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f2eb;
  --ink: #20221c;
  --pink: #b51e63;
  --line: #d9d8cc;
  --gutter: clamp(24px, 4.6vw, 88px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.page {
  max-width: 1750px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead {
  display: flex;
  min-height: 88px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.068em;
  line-height: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(18px, 3.1vw, 56px);
  padding-block: 22px 32px;
}

.hero-copy {
  display: flex;
  align-items: center;
  padding-block: 0 4%;
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 7.2vw, 122px);
  font-weight: 450;
  letter-spacing: -0.085em;
  line-height: 0.98;
}

.hero em {
  display: block;
  padding-right: 0.08em;
  color: var(--pink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.21em;
  font-weight: 400;
  letter-spacing: -0.038em;
  line-height: 0.91;
}

.hero-intro {
  max-width: 390px;
  margin: clamp(28px, 3vw, 48px) 0 28px;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.55;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--pink);
  color: var(--paper);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

.button:hover {
  background: #981950;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.contact-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 42px 36px 36px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
}

.contact-dialog::backdrop {
  background: rgb(24 25 20 / 55%);
}

.contact-dialog h2 {
  max-width: calc(100% - 12px);
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.dialog-intro {
  margin: 16px 0 28px;
  color: #55564d;
  font-size: 16px;
  line-height: 1.6;
}

.close-dialog {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.close-dialog:hover {
  background: #e9e7df;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.contact-dialog label {
  display: block;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.contact-dialog input,
.contact-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #b7b8aa;
  border-radius: 3px;
  background: #fbfaf6;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.contact-dialog textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-dialog [aria-invalid="true"] {
  border-color: var(--pink);
}

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

.form-note {
  margin: 0;
  color: #55564d;
  font-size: 12px;
  line-height: 1.6;
}

.form-status {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.form-status:empty {
  margin: 0;
}

.form-status[data-error] {
  color: #941b49;
}

.send-button {
  width: 100%;
  margin-top: 24px;
}

.hero-image {
  display: block;
  width: 100%;
  height: clamp(440px, max(calc(100svh - 142px), 41vw), 940px);
  background: #c8c6b8;
  object-fit: cover;
  object-position: 57% 84%;
}

@media (max-width: 700px) {
  .masthead {
    min-height: 69px;
  }

  .wordmark {
    font-size: 19px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 0 24px;
  }

  .hero-copy {
    padding-block: clamp(52px, 12vw, 78px) clamp(45px, 11vw, 63px);
  }

  .hero h1 {
    font-size: clamp(53px, 13.6vw, 91px);
  }

  .hero-image {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .hero-intro {
    max-width: 360px;
    margin-block: 26px 24px;
    font-size: 17px;
  }

  .hero-copy .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .contact-dialog {
    padding: 44px 22px 26px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-dialog textarea {
    min-height: 110px;
  }
}
