/* RSVP page, matching the template's RSVP flow (same fonts, colours, sizes) */

@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../_next/static/media/e6099e249fd938cc-s.p.woff2?dpl=dpl_4zrBRoZ1DnW2i8FEF3BSAbYiVDg4) format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../_next/static/media/9cc5b37ab1350db7-s.p.woff2?dpl=dpl_4zrBRoZ1DnW2i8FEF3BSAbYiVDg4) format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../_next/static/media/26d0ba92e140f0dc-s.p.woff2?dpl=dpl_4zrBRoZ1DnW2i8FEF3BSAbYiVDg4) format("woff2");
}

:root {
  --bg: #fcf7ed;
  --surface: #fffaf1;
  --card: #ffffff;
  --text: #2f241b;
  --muted: #76614d;
  --accent: #8a5a2b;
  --border: rgba(47, 36, 27, 0.12);
  --line: rgba(47, 36, 27, 0.2);
  --placeholder: color-mix(in srgb, var(--muted) 45%, white);
  --error: #9b3b24;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.rsvp-exit {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--muted);
  transition: color 0.2s;
}
.rsvp-exit:hover { color: var(--text); }
.rsvp-exit svg { width: 24px; height: 24px; }

.rsvp {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 64px;
}
.rsvp--center {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
}

.rsvp-step:focus { outline: none; }

/* ── Headings ─────────────────────────────────────────────── */

.rsvp-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.025em;
  text-align: center;
}
.rsvp-kicker {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.rsvp-title + .rsvp-kicker { margin: 16px 0 0; }
.rsvp-lede {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* ── Progress (1/3 · ATTENDANCE) ──────────────────────────── */

.rsvp-progress { margin: 0 0 40px; }
.rsvp-progress__labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.rsvp-progress__bar {
  position: relative;
  height: 1px;
  margin-top: 14px;
  background: var(--border);
}
.rsvp-progress__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--text);
}

/* ── Find step ────────────────────────────────────────────── */

.rsvp-find { margin-top: 64px; }
.rsvp-input {
  display: block;
  width: 100%;
  margin: 0 0 24px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-size: 30px;
  font-weight: 300;
  line-height: 36px;
  outline: none;
  transition: border-color 0.2s;
}
.rsvp-input:focus { border-bottom-color: var(--text); }
.rsvp-input::placeholder { color: var(--placeholder); opacity: 1; }

/* ── Buttons ──────────────────────────────────────────────── */

.rsvp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.rsvp-nav--plain { border-top: 0; padding-top: 0; justify-content: flex-end; }

.rsvp-go {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
}
.rsvp-go__circle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--text);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.rsvp-go--search .rsvp-go__circle { width: 56px; height: 56px; }
.rsvp-go:hover .rsvp-go__circle,
.rsvp-go--primary .rsvp-go__circle { background: var(--text); color: var(--bg); }
.rsvp-go svg { width: 20px; height: 20px; transition: transform 0.3s; }
.rsvp-go:hover svg { transform: translateX(3px); }
.rsvp-go:disabled { cursor: progress; opacity: 0.55; }

.rsvp-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border: 0;
  background: none;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.rsvp-back:hover { color: var(--text); }
.rsvp-back svg { width: 20px; height: 20px; }

.rsvp-link {
  display: inline-block;
  margin-top: 40px;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: none;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

/* ── Messages ─────────────────────────────────────────────── */

.rsvp-message {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--error);
}
.rsvp-message:empty { display: none; }
.rsvp-message a,
.rsvp-lede a { color: inherit; text-underline-offset: 3px; overflow-wrap: anywhere; }
.rsvp-note {
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
}

/* ── Guest selection ──────────────────────────────────────── */

.rsvp-row-head {
  display: flex;
  justify-content: space-between;
  margin: 56px 0 24px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.rsvp-choices { display: grid; gap: 12px; }

.rsvp-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rsvp-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rsvp-choice__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--bg);
}
.rsvp-choice__mark svg { width: 12px; height: 12px; opacity: 0; }
.rsvp-choice:has(input:checked) { border-color: var(--text); background: var(--card); }
.rsvp-choice:has(input:checked) .rsvp-choice__mark { border-color: var(--text); background: var(--text); }
.rsvp-choice:has(input:checked) .rsvp-choice__mark svg { opacity: 1; }
.rsvp-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsvp-choice--guest { min-height: 68px; font-size: 18px; }
.rsvp-choice--lead { justify-content: flex-start; }
.rsvp-choice--lead .rsvp-choice__mark { order: -1; }

/* ── Attendance ───────────────────────────────────────────── */

.rsvp-guest { margin-top: 48px; }
.rsvp-guest__name { margin: 0 0 24px; font-size: 24px; font-weight: 400; }
.rsvp-event__name { margin: 0; font-size: 17px; }
.rsvp-event__when { margin: 2px 0 16px; font-size: 14px; color: var(--muted); }

.rsvp-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.rsvp-pills legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rsvp-pill { position: relative; display: block; cursor: pointer; }
.rsvp-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-pill span {
  display: block;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.rsvp-pill input:checked + span { background: var(--text); color: var(--bg); }
.rsvp-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Details ──────────────────────────────────────────────── */

.rsvp-card {
  margin-top: 24px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  background: var(--card);
}
.rsvp-section-title { margin: 56px 0 0; font-size: 24px; font-weight: 400; }
.rsvp-section-title:first-of-type { margin-top: 48px; }
.rsvp-divider { margin: 56px 0 0; border: 0; border-top: 1px solid var(--border); }

.rsvp-field { margin-top: 32px; }
.rsvp-event + .rsvp-field { margin-top: 24px; }
.rsvp-card > .rsvp-field:first-child { margin-top: 0; }
.rsvp-field__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.rsvp-field__help { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.rsvp-field .rsvp-choices { margin-top: 14px; }
.rsvp-field .rsvp-choice { min-height: 46px; padding: 10px 14px; font-size: 14px; background: var(--card); }

.rsvp-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
  resize: vertical;
}
textarea.rsvp-text { min-height: 96px; }
.rsvp-text:focus { border-bottom-color: var(--text); }
.rsvp-text::placeholder { color: var(--placeholder); opacity: 1; }

/* ── Review ───────────────────────────────────────────────── */

.rsvp-review { margin-top: 40px; padding: 24px; border: 1px solid var(--border); background: var(--card); }
.rsvp-review + .rsvp-review { margin-top: 16px; }
.rsvp-review__name { margin: 0 0 16px; font-size: 22px; font-weight: 400; }
.rsvp-review dl { margin: 0; }
.rsvp-review__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-size: 14px;
}
.rsvp-review__row dt { color: var(--muted); }
.rsvp-review__row dd { margin: 0; text-align: right; overflow-wrap: anywhere; white-space: pre-line; }
.rsvp-review__row--sub { padding-left: 16px; }
.rsvp-review__row--sub:last-child { border-bottom: 1px dashed var(--border); padding-bottom: 12px; }

/* ── Thank you ────────────────────────────────────────────── */

.rsvp-done { text-align: center; }
.rsvp-done .rsvp-lede { max-width: 30em; margin-left: auto; margin-right: auto; }

@media (min-width: 768px) {
  .rsvp-exit { top: 32px; right: 32px; }
  .rsvp { padding-top: 160px; }
  .rsvp-title { font-size: 48px; }
  .rsvp-card { padding: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
