:root {
  color-scheme: light;
  --paper: #e9e3d6;
  --ink: #18352e;
  --muted: #50655e;
  --brass: #9b743b;
  --line: rgba(24, 53, 46, 0.3);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: "Avenir Next", "Futura", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  border: clamp(8px, 1.1vw, 16px) solid var(--ink);
  pointer-events: none;
  content: "";
}

main {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.1fr) minmax(25rem, 0.9fr);
  padding: clamp(2.2rem, 5vw, 5.5rem);
}

.masthead {
  display: flex;
  align-self: start;
  flex-direction: column;
  font-family: var(--serif);
  font-size: clamp(4.4rem, 9.6vw, 9.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.72;
}

.name-residence {
  margin-left: clamp(1.4rem, 7vw, 8rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}

.content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--brass);
  padding-left: clamp(2rem, 5vw, 6rem);
}

.invitation {
  width: min(100%, 34rem);
  margin-top: clamp(11rem, 29vh, 20rem);
}

h1 {
  max-width: 12ch;
  margin: 0 0 2.1rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--ink);
}

input,
button {
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
}

input[type="email"] {
  width: 100%;
  min-width: 0;
  padding: 1rem 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

button {
  padding: 0.75rem 0 0.75rem 1.5rem;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

button::after {
  display: inline-block;
  margin-left: 0.65rem;
  content: "→";
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover::after {
  transform: translateX(0.25rem);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.field-row:focus-within {
  border-bottom-color: var(--brass);
  box-shadow: 0 2px 0 var(--brass);
}

.consent,
.status {
  max-width: 48ch;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.status {
  min-height: 1.2rem;
  color: var(--ink);
  font-weight: 600;
}

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

footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

footer a {
  color: inherit;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
}

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

::selection {
  background: var(--ink);
  color: var(--paper);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  main {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    padding: 2.2rem 1.8rem 2rem;
  }

  .masthead {
    font-size: clamp(4rem, 21vw, 6.4rem);
    line-height: 0.76;
  }

  .name-residence {
    margin-left: 1rem;
  }

  .content {
    flex: 1;
    border-left: 0;
    padding-left: 0;
  }

  .invitation {
    margin-top: auto;
    padding: 6rem 0 4.5rem;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  button {
    width: max-content;
    padding: 0.35rem 0 0.9rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}

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