:root {
  --bg: #ebe7df;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5a5a5a;
  --line: #d7d2c8;
  --line-dark: #b9b2a6;
  --accent: #2d2d2d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.card {
  width: min(780px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
}

.header p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.invite-copy {
  margin: 1.25rem 0 1.6rem;
  font-size: 1.1rem;
  line-height: 1.55;
}

.rsvp h2,
.details h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.rsvp-deadline {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

form {
  margin: 0 auto 1.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field:nth-child(5),
.rsvp-button,
.status {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  padding: 0.62rem 0.7rem;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #d8d2c4;
  border-color: #8f887a;
}

.rsvp-button {
  margin-top: 0.2rem;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.rsvp-button:hover {
  background: #f7f7f7;
}

.status {
  margin: 0.25rem 0 0;
  min-height: 1.4em;
  color: #1f4f2a;
}

.status.error {
  color: #8a2727;
}

.details {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

dl {
  margin: 0.95rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
}

dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

dd {
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

@media (max-width: 700px) {
  form,
  dl {
    grid-template-columns: 1fr;
  }
}
