:root {
  --ink: #30391f;
  --line: #4a512b;
  --paper: #f5f7f0;
  --paper-soft: rgba(245, 247, 240, 0.7);
}

* {
  box-sizing: border-box;
}

html {
  background: #f8f8f4;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  margin: 0;
}

.page {
  width: min(100%, 560px);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 40px rgba(48, 57, 31, 0.08);
}

.hero {
  position: relative;
  aspect-ratio: 1920 / 3413;
  overflow: hidden;
  background: #f5f2ed;
}

.hero__video,
.hero__shade,
.hero__content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__video {
  object-fit: cover;
}

.hero__shade {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(0deg, rgba(34, 39, 24, 0.18), transparent 42%);
  pointer-events: none;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7% 7% 9%;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.hero__kicker {
  margin: 0;
  color: #30391f;
  text-align: center;
  font-size: clamp(24px, 7vw, 42px);
  font-weight: 700;
  line-height: 1;
}

.hero__names {
  margin: 0;
  align-self: center;
  width: 100%;
  text-align: center;
  font-size: clamp(34px, 9.5vw, 56px);
  line-height: 0.98;
}

.hero__bottom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: end;
}

.hero__date {
  margin: 0;
  font-size: clamp(76px, 22vw, 128px);
  line-height: 0.95;
}

.hero__place {
  margin: 0 0 10%;
  font-size: clamp(24px, 6.8vw, 42px);
  font-weight: 700;
  line-height: 1.06;
}

.sheet {
  display: block;
  width: 100%;
  height: auto;
}

.rsvp {
  position: relative;
  min-height: 1244px;
  overflow: hidden;
  background: var(--paper);
}

.rsvp__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rsvp__form {
  position: relative;
  z-index: 1;
  width: min(86%, 430px);
  margin: 0 auto;
  padding-top: 36%;
  color: var(--ink);
}

.field {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.field span,
.field legend {
  display: block;
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.22;
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  font: 500 17px/1.35 Arial, sans-serif;
  outline: 0;
}

input[type="text"] {
  height: 40px;
  padding: 7px 10px;
}

textarea {
  min-height: 78px;
  resize: vertical;
  padding: 9px 10px;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #1c2414;
  box-shadow: 0 0 0 2px rgba(48, 57, 31, 0.16);
}

.choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  margin: 0 0 8px;
  font: 16px/1.25 Arial, sans-serif;
}

.choice input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.submit {
  display: block;
  width: 150px;
  height: 34px;
  margin: 22px auto 0;
  border: 1px solid #2f3a1f;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 700 15px/1 Arial, sans-serif;
}

.submit:hover,
.submit:focus-visible {
  background: rgba(48, 57, 31, 0.08);
}

.submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-message {
  min-height: 42px;
  margin: 14px 0 0;
  text-align: center;
  font: 15px/1.35 Arial, sans-serif;
}

.form-message[data-state="success"] {
  color: #253414;
}

.form-message[data-state="error"] {
  color: #7b271d;
}

.contacts {
  position: relative;
}

.contact-link {
  position: absolute;
  top: 37.35%;
  width: 23%;
  height: 3.7%;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font: 600 14px/1 Arial, sans-serif;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-style: solid;
}

.contact-link--left {
  left: 8%;
}

.contact-link--center {
  left: 38.5%;
}

.contact-link--right {
  right: 8%;
}

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

@media (max-width: 420px) {
  .rsvp {
    min-height: 960px;
  }

  .rsvp__form {
    width: 89%;
    padding-top: 39%;
  }

  .field {
    margin-bottom: 10px;
  }

  .field span,
  .field legend {
    font-size: 15px;
  }

  .choice {
    grid-template-columns: 16px 1fr;
    gap: 7px;
    margin-bottom: 6px;
    font-size: 14px;
  }

  input[type="text"] {
    height: 33px;
    font-size: 15px;
  }

  textarea {
    min-height: 66px;
    font-size: 15px;
  }

  .submit {
    width: 115px;
    height: 25px;
    margin-top: 18px;
    font-size: 14px;
  }

  .form-message {
    font-size: 13px;
  }

  .contact-link {
    font-size: 11px;
  }
}
