:root {
  --ivory: #fbf8f3;
  --paper: #ffffff;
  --ink: #2c2a26;
  --ink-soft: #6b6560;
  --ink-faint: #9a938c;
  --line: #e3ddd3;
  --sage: #7d8c72;
  --sage-deep: #5f6c56;
  --blush: #c8a99a;
  --error: #9b3d2e;
  --error-bg: #fbf0ed;
  --radius: 4px;
  --serif: "Cormorant Garamond", "Hoefler Text", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* Author display rules (flex/grid) outrank the UA rule for [hidden], so make the
   attribute win everywhere - several panels below are toggled with it. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  padding: 84px 16px 64px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.eyebrow.center { text-align: center; }

.couple {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 9vw, 82px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

.hero-date {
  font-family: var(--serif);
  font-size: clamp(19px, 3vw, 24px);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

.rule {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.rule span {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--line);
}

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 26px;
  justify-content: center;
}

/* Side by side once there's room; stacked on a phone. */
@media (min-width: 640px) {
  .days { grid-auto-flow: column; gap: 0; }
  .day + .day { border-left: 1px solid var(--line); }
  .day { padding: 0 34px; }
}

.day-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 9px;
}

.day-date {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 5px;
}

.day-venue {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- layout -------------------------------------------------------------- */

.sheet {
  max-width: 660px;
  margin: 0 auto;
  padding: 56px 16px 72px;
}

.step { position: relative; }
.step.center { text-align: center; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.15;
  margin: 0 0 14px;
  text-align: center;
}

.lede {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 auto 36px;
  max-width: 46ch;
}

.note {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 14px 0 0;
}

.note.center { text-align: center; }
.note.error { color: var(--error); text-align: center; }

/* --- forms --------------------------------------------------------------- */

.search-form {
  max-width: 420px;
  margin: 0 auto;
}

.field { display: block; margin-bottom: 18px; }

.label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.help {
  display: block;
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(125, 140, 114, 0.14);
}

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

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236b6560' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn.primary { background: var(--sage); color: #fff; }
.btn.primary:hover { background: var(--sage-deep); }
.btn.primary:disabled { background: var(--ink-faint); cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
  width: auto;
  padding: 12px 26px;
}
.btn.ghost:hover { border-color: var(--ink-faint); color: var(--ink); }

.btn.wide { margin-top: 12px; }

.back {
  position: absolute;
  top: -8px;
  left: 0;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  cursor: pointer;
}
.back:hover { color: var(--ink); }

/* --- party match list ---------------------------------------------------- */

.match-list { margin-top: 28px; }

.match {
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 0.15s ease;
}
.match:hover { border-color: var(--sage); }

.match strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.match span { font-size: 13px; color: var(--ink-faint); }

/* --- guest cards --------------------------------------------------------- */

.guest-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}

.guest-name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 16px;
}

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice {
  display: block;
  position: relative;
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.choice:hover { border-color: var(--ink-faint); }

.choice input:checked + .choice-text { color: #fff; }

.choice.checked { background: var(--sage); border-color: var(--sage); color: #fff; }
.choice.checked.decline { background: var(--ink-soft); border-color: var(--ink-soft); }

.guest-questions {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.radio-list { display: grid; gap: 8px; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  font-size: 15px;
}
.radio-option:hover { border-color: var(--ink-faint); }
.radio-option.checked { border-color: var(--sage); background: rgba(125, 140, 114, 0.07); }
.radio-option input { accent-color: var(--sage); margin: 0; }

.party-questions {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}
.party-questions:empty { display: none; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.q-image {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  /* Bias the crop upward so the facade shows rather than the foreground trees. */
  object-position: center 38%;
  border-radius: var(--radius);
  margin: 0 0 20px;
  background: var(--ivory);
}

.q-intro {
  margin: 0 0 20px;
}

.q-intro p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.q-intro p:last-child { margin-bottom: 0; }

.q-question {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.block-title {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 4px;
}

.block-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.req { color: var(--blush); }

/* --- errors & confirmation ----------------------------------------------- */

.errors {
  background: var(--error-bg);
  border: 1px solid #e8cfc8;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  color: var(--error);
  font-size: 14px;
}
.errors ul { margin: 0; padding-left: 18px; }
.errors li { margin: 4px 0; }

.seal {
  width: 62px;
  height: 62px;
  margin: 0 auto 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blush);
  font-size: 22px;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 30px 16px 46px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}

.foot a { color: var(--ink-soft); }

@media (max-width: 560px) {
  .hero { padding: 60px 16px 48px; }
  .sheet { padding: 40px 16px 56px; }
  .choice-row, .contact-grid { grid-template-columns: 1fr; }
  .back { position: static; display: block; margin-bottom: 20px; }
}
